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 and ISR

Hi,

I would like to trigger an ISR at the end of a DMA transfert but I don't really know exactly how to proceed... The documentation is still unclear for me.

I'm very new in interrupt process so I'm wondering if someone has a valid example on the subject ? Or maybe some advices to configure the interrupt system..?

By the way, i'm using C6678 but I only use the core #0 for the moment.

Thank you.

  • Each EDMA channel has a active PARAM set associated with it as you will know by this time.

     

    In  OPTIONS field of the PARAM set, the TCINTEN bit ( Bit 20) should be set.  ( Interrupt Enable)

     

    When the DMA transfer is complete, the EDMA will generate a Transfer completion code (TCC) ( Bits 12-17) and this TCC can be used to interrupt the CPU.

     

    Let us say you are using channel 10 for example. When the DMA transfer is done, the TCC will generate  a number 10, which will set the bit in the IPR register ( Interrupt Pending register). Also if the corresponding IER (Interrupt Enable Register) bit 10 is enabled, it  will cause a EDMA global interrupt. This interrupt can be mapped to any of the HWI’s ( CPU INT 4 – 15).

     

    It should be noted that, if the event is a secondary event, then it has to be routed through the INTC module ( Interrupt controller module).

     

    I will also forward this one of our EDMA experts who can provide an example if it exists or add more details to this.

     

    Regards,

    Kishore.

  • It will be easiest for you to use the EDMA3 LLD which comes with the MCSDK. There are several examples which you should try building (in place, not copied) and then study how they work.

    Kishore had the right bit number (20) but the field name is TCINTEN.

    Regards,
    RandyP

  • Thank you both of you.

    I tried the example located at " mcsdk\pdk_C6678_1_0_0_17\packages\ti\csl\example\edma " but the example doen't trigger an ISR.

    For the tranfert, my PaRAM are set as is:

        param_setup.option = CSL_EDMA3_OPT_MAKE(CSL_EDMA3_ITCCH_DIS,
                                                CSL_EDMA3_TCCH_DIS,
                                                CSL_EDMA3_ITCINT_DIS,
                                                CSL_EDMA3_TCINT_EN,
                                                0,
                                                CSL_EDMA3_TCC_NORMAL,
                                                CSL_EDMA3_FIFOWIDTH_NONE,
                                                CSL_EDMA3_STATIC_EN,
                                                CSL_EDMA3_SYNC_A,
                                                CSL_EDMA3_ADDRMODE_INCR,
                                                CSL_EDMA3_ADDRMODE_INCR);

    So it should trigger an interrupt when the transfert is complete because of the parameter  CSL_EDMA3_TCINT_EN.

    What I want to do for now is to trigger an ISR at the end of the transfert but the documentation is not very clear on that subject... How do you register a function to be called when the transfert is completed ? I found out that function CSL_intcPlugEventHandler(); but I'm not sure that it is the good way to proceed...

    Randy, in my use case I prefer to keep the CSL ...

    Thank you for your help.