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.

SPI compatibility mode DMA request skips second packet



I am sending large packets of data between two dissimilar microcontrollers, one of which is the TMS570. I have noticed that when I use SPI in compatibility mode and set it up to use DMA for transmitting, the second packet in my SRAM buffer is always skipped. It's not that the packet isn't getting received by the other MCU; I have bus analyzer hooked up and the packet doesn't ever come out of the TMS570. I've tried this for up to 128 16-bit packets and the second one is always skipped.

When transmitting, the order of operations are:

1. Disable DMA requests from SPI from a possible previous transmit.

2. Update DMA control packet RAM with new frame count and start address

3. Enable the transmit DMA channel for hardware requests

4. Enable DMA requests from SPI.


I have found a work-around where I can write my first packet to DAT1 between steps 3 and 4, make the DMA start address the second element in the buffer and it works fine. But I'd like to know if this is bug with the TMS570 or if there is some other order of operations that I can try.