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.

TMS320F28377D: SPI communication with Raspberry PI

Part Number: TMS320F28377D

Hello all,

I am using TMS320F28377D for SPI communication purpose from SPI to Raspberry PI to save data in it. I am programming raspberry pi in python but I am getting an distorted data. I am using the inbuilt program of CCS which is 'SPI loopback DMA' changing just the master/slave mode and clock polarity with matching baud rate. The data sent and received buffer are getting the correct data but in raspberry pi the data is incorrect, which is the sequence is not matching.

My Raspberry Pi code is given below:

Regards,

Mona Shah

  • Hello,

    What other code did you change in the example? I imagine you would have to do more than just switch to slave move and adjust the clock. Did you configure the GPIOs?

    How many bits are you sending per word? 16? 8?

    Do you have access to a logic analyzer or oscilloscope to see what the C2000 is actually transmitting?

    Thanks,
    Whitney
  • Thank You Whitney,

    I have configured GPIO according to reference manual. I have changed the program according to manual and it seems okay.

    I am sending 16 bits per word.

    I am using oscilloscope to check results like clock pulse and other all pins of SPI like MOSI, MISO ,CS at both ends. They are okay. So what should I do next?

    Regards,
    Mona Shah
  • Looking at the data the Python side is printing out, it appears to be shifted by one and interpreted as 8 bits at a time instead of 16. So my theory is that you should try different polarity/phase settings and double check that both sides are definitely set to 16 bits per word.

    Thanks,

    Whitney