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.

EDMA3 misses an event from time to time

Hello,

I am using the K2H EVM board for doing DMA transfers from EMIF16 to DDR3. They work nicely most of the time at 25kHz repetition frequency, but from time to time, say once per hour, I get a missed event error. I finally managed to have a screen shot of it by making a GPIO pulse in the event missed interrupt handler and triggering my oscilloscope on that pulse.

In the figure above the GPIO10 signal is used to initiate 16 X 12 transfers by every rising edge. This means that the EDMA receives 16 pulses from an external device (GPIO 0, there are 2 probes on that pin: one analog (blue) and one digital (white) in the figure) each of them triggering 12 reads from EMIF16 connected to CS1 (or CE1, chip select or chip enable). The yellow probe (CS) shows these reads in the figure above. Normally there are 12 yellow pulses (not visible in the figure because of resolution) after each blue pulse. The transfer completion pulse (TC) comes after the last 12 reads.

But sometimes it happens that EDMA reads more than 12 times from the EMIF16, for example 60 times like in the figure above. This causes the transfer to go out of synch. and the "event missed" interrupt occurs, see purple probe (EM) in the figure above, don't mix it with GPIO 0 although they overlap on the screen. The TC comes too early and after that the EDMA considers the last incoming blue pulse be extra.

Any ideas why the EDMA is fooled to read too much data? Possibilities:

1) Something corrupts the PaRAM register BCNT during the transfer making it be 60? In that case it is strange that the BCNT automatically goes back to 12. This is not likely.

2) Emulator interferes with the board. I have the Blackhawk USB560 v2 System Trace emulator connected into the board for debugging the code. Can it make interference to EDMA? During the years I have experienced that the emulators sometimes cause strange errors, so could this be yet another one?

3) EDMA sleeps sometimes. Can it happen that EDMA needs sometimes more time to do those 12 reads and then the blue pulses come too suddenly for it?

4) Something else reserves the DDR3 bus. The device I use for reading the data from is the only one using the EMIF16 on CE1 bus. But can some other peripheral or CPU reserve the DDR3 bus temporarily thus blocking the EDMA using it for writing? I run my code on DSP0 core. I don't know if the Linux is still running on the ARM CPUs when I use the debugger. If I understand right, there are two independent DDR3 buses. Should I use the other DDR3 bus instead the current one?

Best regards,

Ari

  • Hi,

    Thanks for your post.

    Kindly validate the below check points:

    First, ensure whether TCINTEN bit is enabled in channel OPT and only then, the interrupt pending register (IPR / IPRH) relevant bit position appropriate to the DMA event would be set on transfer completion.

    Secondly, please ensure the TCCMODE bit in OPT which would indicate normal or early completion of data transfer. To clarify further that, any TCC value cannot be set in the PaRAM and the fact is that the 6-bit TCC would be posted by the TC to the CC after it receives the transfer completion signal from the destination peripheral in normal completion mode. This 6-bit code sets the relevant bit in the interrupt pending register (IPR [TCC] / IPRH [TCC]) for interrupt triggered.

    At last, We would suggest you to validate the received TCC code in OPT first and obviously, the corresponding bit position in IPR/IPRH would be set which is directly the TCC value and thereafter, the corresponding IER[TCC] / IERH [TCC] bit would be set to generate a EDMA completion interrupt to the DSP.

    Starting from CC, please ensure if any outstanding completion requests submission to the TC are pending and check the status on the same through "COMPACTV" bit field of CCSTAT register (see Table 4.25 below) and also check the transfer request status through "TRACTV" bit field on the same CCSTAT

    http://www.ti.com/lit/ug/sprugs5b/sprugs5b.pdf

    Next coming to TC, check the destination FIFO status and source controller of EDMA3TC through bit fields "DSTACTV" and "SRCACTV" of TCSTAT register (see Table 4-68 on the above guide). Kindly check how many TR's are residing in destination FIFO and primarily these bit fields are used for advanced debugging.

    In addition to above, we could also set enable bits in ERREN (see section 4.3.4.2) and correspondingly ERRSTAT (see section 4.3.4.1) register would assert any EDMA3TC interrupt in case of any error events. This is to confirm that, no bus error or TR error or MMR address error occurs on EDMA3TC

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    -------------------------------------------------------------------------------------------------------