W5500 and CC3200 SPI
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: W5500 and CC3200 SPI
by Coccoliso ·
Hi,
for every MPU first of all you need to know how to set the SPI as a master, identify an I / O for use as SCS and using the bit-bang try reading a known register like the VERSIONR that always returns 0x55 and 0x00.
You must first be able to do all this.
The sequence to read a register in VDM with bit-bang is this:
Low SCS
SPIWriteByte Addr_high_part
SPIWriteByte Addr_low_part
SPIWriteByte BlockOP
Result = SPIReadByte
High SCS
The sequence to write a register in VDM with bit-bang is this:
Low SCS
SPIWriteByte Addr_high_part
SPIWriteByte Addr_low_part
SPIWriteByte BlockOP
SPIWriteByte Data
High SCS
The sequence to read from RX buffer in VDM with bit-bang is this:
Low SCS
SPIWriteByte Addr_high_part
SPIWriteByte Addr_low_part
SPIWriteByte (RXBlock <<3 )
Return_Data(0) = SPIReadByte
Return_Data(1) = SPIReadByte
…
Return_Data(n) = SPIReadByte
High SCS
The sequence to write into TX buffer in VDM with bit-bang is this:
Low SCS
SPIWriteByte Addr_high_part
SPIWriteByte Addr_low_part
SPIWriteByte ((TXBlock <<3 ) Or 4) // VDM write
SPIWriteByte Data_Byte(0)
SPIWriteByte Data_Byte(1)
…
SPIWriteByte Data_Byte(n)
High SCS
Where:
BlockOP = 0 for common register
BlockOP = (1 + 4 * Socket_number ) for socket register
TXBlock = (2 + 4 * Socket_number ) for a TX buffer write
RXBlock = (3 + 4 * Socket_number ) for a RX buffer read
To ping device you must set mac, gateway address, ip address and subnet mask registers.
Buffers are set to 2k by default.
Send a reset with 0x80 into MR register and then set these 4 registers…anything else, device must respond
RE: W5500 and CC3200 SPI
by SecretSPI ·
I am supposed to write this code in the IDE for the CC3200 (Code Composer), correct? I assume I am supposed to use the WIZnet ioLibrary functions to perform these actions, but Code Composer can’t recognize the data types of the WIZnet ioLibrary such as uint8_t, unint16_t, etc.
RE: W5500 and CC3200 SPI
by Coccoliso ·
hi,
no.
It just the sequence of SPI commands necessary to reading and writing.
You can hardly find the source ready unless you do not find in this forum or in that of your MPU someone who has already developed (as SteveS here [url]WIZ550io SPI problems]) .
As I said in my previous post you must have knowledge of your library and use the SPI sequence that I have presented to perform the four basic operations :
The examples that are on the site as explained here [url]W5500 and CC3200 SPI] contain all the features that you need and are well commented but they are not written for your IDE, you have to take note of the sequences but you can not throw them directly into your editor and compile.
These are the problems… uint8_t is a Byte , unint16_t is a Word ( or a UShort ) and are the types that must be converted to be recognized by your compiler, I understand it’s a big job and you must first read and understand them before translating but the thing is possible.
I converted these sources for the PIC18 (8 bit) and PIC24 (16 bit) and I know what we’re talking.