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.

TMS570LS1227: Shifts occur when the SPI slave sends data using DMA

Part Number: TMS570LS1227

Hi team,

Using the SoC as the SPI host, data is read 128 bytes in a single time, at 20 ms intervals. SPI4 of the TMS570LS1227 is a slave and uses DMA for data transmission with 1 DMA element count and 128 frames. 

Issue: an array of 128 bytes is defined in the TMS570 for transmission and the SPI host can continuously read the slave data normally if the array contents remain unchanged. However, when the assignment changes the SPI slave array contents, the contents read by the SPI host are shifted. 

After DMA startup, the SoC's SPI host can continuously read data normally without the TMS570 SPI slave making an assignment change to the array as the figure shows:

The following figure shows the data read from the SoC's SPI host program for a period of time from the start of the SPI host program when the TMS570 SPI slave makes an assignment change to the fourth byte of the array after the DMA starts: 

The following figure shows the slave data read by the SoC's SPI host program is shifted after the SPI dual communication program has been running for a period of time (during which the slave transmit data byte 4 is still assigned a timing change): 

An array assignment from a slave is unavoidable, either in a loop or in a DMA frame transfer complete interrupt. 

Could you help check this case? Thanks.

Best Regards,

Cherry

  • Hi Cherry,

    I started working on this thread and will provide an update ASAP.

    --
    Thanks & regards,
    Jagadish.

  • Hi Cherry,

    Apologies for the delay

    Using the SoC as the SPI host, data is read 128 bytes in a single time, at 20 ms intervals. SPI4 of the TMS570LS1227 is a slave and uses DMA for data transmission with 1 DMA element count and 128 frames. 

    I am confused with the question,

    what is mean by SoC as SPI host, is that means PC have some driver to act its USB port as SPI? Do you connected any USB to SPI adapter to the PC?

    If yes give me more details about it.

    However, when the assignment changes the SPI slave array contents, the contents read by the SPI host are shifted. 

    I am also confused with the term assignment change; can you please elaborate what you are doing with the data?

    And also, can i get your complete project of the slave device?

    --

    Thanks & regards,
    Jagadish.