Hello,
I downloaded the Tiva M4C1249NCPDT SPI loopback example and found that it is not working properly. I had to spend a little time upfront to figure out how to jumper MIMO, MISO, CLK, and !CS but once this was done I ran the example. When I ran the example I got the following output on the CCS console,
Starting the SPI loop-back example
System provider is set to SysMin. Halt the target to view any SysMin contents in ROV.
Slave: Hello, this is master SPI
Master:
Done
No data from the slave to the master!! I checked the masterRxBuffer and found that the first byte position was 0x00 or null. The next 25 bytes had . No that is not a typo, the "H" was replace by a 0x00. The
System_printf("Master: %s\n", masterRxBuffer);
instruction interpreted the 0x00 at the beginning of the buffer as a null and ignored the rest of the string. I checked the slaveTxBuffer and it contained the correct string "Hello, this is the slave SPI" with "H" being in the first byte.
I even connected an O-scope and looked at the SSI3CLK, SSI3Fss(!CS3), SSI3xDAT0(SPI3 MOSI), and SSI3xDAT1(SPI3 MISO). Al the signals looked good except MISO. The first character was an 0x00 followed by "ello, this is the slave SPI.
Where is this 0x00 coming from? I checked the example, which is very simple, and the program looks correct. For some reason the first character coming out of the slave is a 0x00. Any ideas?
Best Regards,
Steve Mansfield