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