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.

EDMA missing event

Other Parts Discussed in Thread: TMS320C6678

All TMS320C6678 cores are running, but only core 0 uses the EDMA. EDMA gets used by core 0 only during a PCIe MSI interrupt service routine. This PCIe MSI fires at a rate of 30Hz (every 33.3ms). The interrupt service routine (ISR) does one of the following:

1) Process data, EDMA transfer resulting 2 buffers to PCIe, or

2) EDMA previous result from DDR to PCIe, process data, store resulting 2 buffers to DDR


The EDMA transfer consists of the following operations, using ti/csl/csl_edma3.h:

1) Wait for IPR bit 0 to go high.

2) Set up PaRAM for channel 0. CC1 TC3 is used. There are 2 PaRAM entries. Each entry uses AB synchronization with CCNT > 1. Intermediate transfer complete chaining is enabled. Transfer complete chaining is enabled on the first entry, disabled on the second entry. Intermediate completion interrupt is disabled. Transfer completion interrupt is disabled on first entry, enabled on second entry. TCC is 0 (same as channel). Transfer completion is normal.

3) IPR bit 0 is cleared.

4) Channel 0 is triggered.

5) In ISR case 2, wait for IPR bit 0 to go high.

When ISR is switched via PCIe from case 1 to case 2, the first wait exits, but the second wait never exits, indicating that IPR bit 0 is stuck low. EMR, EMRH, and QEMR shows that there is a missed event for channel 0: EMR bit 0 = 1, all other bits = 0. SER and SERH shows that channel 0 is in the queue: SER bit 0 = 1, all other bits = 0. CCERR shows no TCC errors and no queue threshold errors: CCERR = 0.


It should be noted that the ISRs take roughly 3ms to execute, and it is expected that the DMA takes much less than 30ms to complete. The DMA is used to transfer 1 50 kilobyte buffer from DDR to PCIe, and 1 12.5 kilobyte buffer from DDR to PCIe.


What is causing IPR bit to get stuck low while EMR bit 0 is stuck high?

  • Hi,

    Are you using EVM or your own custom board? You can start with edma test using CSL. The pdk package having simple edma test code. Before going with PCIe, test this example edma code to find the EDMA transfer.

    C:\ti\pdk_C6678_1_x_x_x\packages\ti\csl\example\edma

  • I am using my own custom board. I successfully ran the CSL EDMA test code you mention above on my board. There were no problems.

    I have been running the EDMA with PCIe for almost 1 year now.

    EDMA to PCIe runs roughly every 33ms. The problem only occurred when a feature requirement was added that resulted in a slight break in this pattern - the EDMA gets called 3ms earlier for one, then resumes its 33ms cadence.

  • I have found the problem.

    Software was accidentally initiating a dummy transfer (ACNT=4, BCNT=2, CCNT=0). But, the EDMA was treating this transfer as if it was a null transfer. See section 2.3.3 of sprugs5a.pdf.

    The symptoms that I outlined in my description above match what is defined in this section of the EDMA document.

    Are there any known problems with EDMA treating a dummy PaRAM set like a null PaRAM set?

  • Hi,

    I believe that,  EDMA treating a dummy PaRAM set like a null PaRAM set is not an known issue. You can check the release notes. 

    The EDMA resources like Channels, PaRAMs and TCCs which are shared by multiple cores, the default configuration file allocates all the resources to every core since the resource split is application dependent.

    If the applications using EDMA3LLD should appropriately allocate the resources in the config files and build EDMA3LLD libraries.

    A null PaRAM set is defined as a PaRAM set where all count fields (ACNT, BCNT, and CCNT) are cleared to 0.

    A dummy PaRAM set is defined as a PaRAM set where at least one of the count fields (ACNT, BCNT, or CCNT) is cleared to 0 and at least one of the count fields is nonzero.

    Please see the EDMA user guide to get more detailed information.

  • I understand the difference between a null PaRAM set and a dummy PaRAM set. I was using a dummy PaRAM set.

    Where can I find the release notes? C:\ti\pdk_C6678_1_1_2_6\docs does not have any EDMA release notes.

    It looks like someone else has reported this problem. See http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/p/155540/569773.aspx#569773. From the replies in that ticket, it appears there is a problem if CCNT=0, but not if ACNT=0 or BCNT=0.

  • Hi,

    For release notes, find at the below path in the EDAM package.

    C:\ti\edma3_lld_02_xx_xx_xx\release_notes_edma3_lld

    You have mentioned is older thread, need to track this one.

  • C:\ti\edma3_lld_02_11_05_02\release_notes_edma3_lld.html shows issues with the LLD, not with the peripheral (hardware). Issue mentioned in thread above, even though thread is 2 years old, still seems to apply.

  • Hi,

    I will check this issue with hardware team and let you know.