Hi,
there is a problem with the EDMA3 completion handler which can start spinning in a loop for some time. This problem was originally discussed in another post, but I didn't see any progress:
http://e2e.ti.com/support/embedded/bios/f/355/p/227104/800437.aspx#800437
The affected function is edma3ComplHandler() within edma3resmgr.c of EDMA3 LLD version 2.11.05.02.
There are two situations which can cause this problem:
1.
The EDMA3 channel controller has less than 33 interrupt channels. For example, the EDMA3 CC0 only has 16 TCCs on a C6678 device. Within the handler, the variable indexh is initialized with 1 and never set to 0 and the following loop in line 5241 will always count up to EDMA3_RM_COMPL_HANDLER_RETRY_COUNT:
while ((Cnt < EDMA3_RM_COMPL_HANDLER_RETRY_COUNT)
&& ((indexl != 0u) || (indexh != 0u)))
...
2.
A TCC channel is allocated, but is only used for polling, no ISR is registered. In this case, the interrupt flag in the IPR will not be cleared and the ISR will also count up to EDMA3_RM_COMPL_HANDLER_RETRY_COUNT. Depending on the TCC value, the inner loop in line 5253 (and 5288) will also spin. A solution would be to mask the IPR register with the IER register in line 5245:
pendingIrqs = shadowRegs->IPR & shadowRegs->IER;
I also don't understand the usefulness for the outer loop counting up to EDMA3_RM_COMPL_HANDLER_RETRY_COUNT. All TCC interrupts should already be processed within the first cycle in my opinion.
Thanks,
Ralf