Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

XMC™ Forum Discussions

User10696
Level 4
Level 4
First solution authored
I am trying to use the DMA to transfer multi-blocks of data from memory to the TBUF of a USIC. The DMA is set to Hardware handshake for the destination.
The behavior at the moment is totally unpredictable. Sometimes it works correctly and sometimes only 0xFFFF is transferred.

There are 2 things that seem strange to me:
1. The DMA transfer starts immediately when it is enabled. As the transmit buffer interrupt from the USIC is a pulse I would expect to have to trigger the interrupt by software to start the DMA transfer. Is the behavior normal or have I set the USIC interrupt incorrectly?

2. The Overrun bit in the DLR is getting set. According to the documentation this only happens when the next Service Request comes before the DMA acknowledges the previous request. I cannot believe the DMA is taking longer to acknowledge the interrupt than the USIC needs to transmit 16bits of data. What could be the problem here? Does the overrun status have an effect on the next service request?

I cannot find any reason why the DMA is not working reliably. The above points are only a guess of what may be going wrong.

Does anyone have an example of DMA transfers from memory to peripheral using link lists?
0 Likes
0 Replies