This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hello,
I am trying to connect the TMS320F28P650DK9 via SPI to the W5500 (Wiznet). But I think there are some problems here, so some questions to the community.
the C2000 are 16-bitters, which means that I always have to transfer at least 2 bytes, regardless of the protocol, peripherals, etc. (is this true?). (is this statement correct?)
Now I have the feeling that this is overwriting data on the SPI slave.
In this picture from the datasheet of the w5500 only 1byte of data is transferred but let's assume we want to transfer 2byte.
So if I want to transfer e.g. 5byte, because the slave device, the w5500 expects this, or SPI frame: 2byte ADR + 1 byte control + 2 byte data then I have to transfer 6byte with the c2000 and then I assume that this additional byte is written in a wrong register of the w5500. In any case, my written values do not match the read values.
Also with the read command is a problem cause it expected 3Bytes
but what i send are 4 bytes
I have tried to use the c library from Wiznet: ioLibrary_Driver/Ethernet at master - Wiznet/ioLibrary_Driver - GitHub
I have written an additional typedef:
#ifndef int8_t typedef int16_t int8_t; #endif #ifndef uint8_t typedef uint16_t uint8_t; #endif
Are my statements correct? and has anyone by chance ever had the two chips working together? The task results from the fact that the TMS320F28P650DK9 is the only high-performance chip with a lockstep processor. However, it "only" has EtherCat and I absolutely need an Ethernet interface.
Best regards
Hans
Hi Hans,
As you've identified you must always send 16-bits in every transmission. It is possible to send 8-bits or even 24-bits using drivers found in the SPI driverlib files. When writing 8-bits (less than 16-bits), ensure you are bit-shifting left accordingly before transmitting. Received data does not need to be bit-shifted since it is received into the LSB of SPIDAT first. Please refer to the SPI EEPROM software examples for more details.
Best Regards,
Aishwarya
Hey Aishwarya,
happy new year.
Thanks for your reply. Unfortunately I overlooked the DataWidth setting of the SPI module in the syscfg. What a stupid mistake. Anyway there is a lot to do in the original ioLibrary to get this running on the 16-bit arch. I'am able to ping my device (with the SPI-transmitted IP) now. When i finished the changes, maybe i will fork the ioLibrary and push the things on github. Maybe its useful for other devs
regards
Hans