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.

How do I trig a EDMA3 transfer from a GPIO?

Other Parts Discussed in Thread: TMS320C6655

Hi

I  am using the EVM_C6657, and I want to start a EDMA transfer when the GPIO15 goes high.

I have started with the edma example project, and modified it so my EDMA transfer works, but only with a manual transfer

result = EDMA3_DRV_enableTransfer (hEdma, startEdmaChainChId, EDMA3_DRV_TRIG_MODE_MANUAL);

But I do not know how to start the transfer automatically when GPIO15 toggles.

Hope that some one can help me please

Best

Jens

  • Hmm thats strange - does nobody know how to do this?

    I will just put in some of the steps that I think needs to be setup, then hopefully some one can help me tie it all together

    First of all I need to change from EDMA3_DRV_TRIG_MODE_MANUAL to EDMA3_DRV_TRIG_MODE_EVENT

    but how do I get the event to the EDMA controller?

    Maybe I need to setup the GPIO15?

    CSL_GPIO_setPinDirOutput(hGpio, 15);
    CSL_GPIO_setOutputData(hGpio, 15);
    CSL_GPIO_setRisingEdgeDetect(hGpio, 15);
    CSL_GPIO_bankInterruptEnable (hGpio, 0);

    This should enable interrupt on GPIO15 - right???

    From the data manual for tms320c6655  

    Table 7-35 CIC1 Event Inputs (Secondary Events for EDMA3_CC)

    Input Event # on CIC System     Interrupt       Description
    7                                                      GPINT15      GPIO interrupt

    Does that mean that GPINT15 has to go through CIC1 before it comes to the EDMACC?

    Table 7-32 EDMA3_CC Events for C6655/57 (Part 1 of 2)

    Event Number                    Event                   Event Description
    43                                          CIC1_OUT0        Interrupt Controller output 
    ...
    50                                          CIC1_OUT7        Interrupt Controller output
    ...
    60                                          CIC1_OUT17      Interrupt Controller output 

    Does this mean that if CIC1 is configured so that CIC1 input # 7 is routed to CIC1 out 7, and that I have to select EDMA event number 50? And if how do I do that?

    I have tried with the following code

    /* Setup for Channel 1 (HS_ADC) */
    tcc1 = EDMA3_DRV_TCC_ANY;
    ch1Id = EDMA3_DRV_HW_CHANNEL_EVENT_7;

    if (result == EDMA3_DRV_SOK)
    {
    result = EDMA3_DRV_requestChannel (hEdma, &ch1Id, &tcc1, (EDMA3_RM_EventQueue)0, &DMA_TC1, NULL);
    }

    ...

    result = EDMA3_DRV_enableTransfer (hEdma, ch1Id, EDMA3_DRV_TRIG_MODE_EVENT);

    but that did not do anything

    I have also tried with 

    ch1Id = EDMA3_DRV_HW_CHANNEL_EVENT_50;

    but then I get an error when I call 

    result = EDMA3_DRV_enableTransfer (hEdma, ch1Id, EDMA3_DRV_TRIG_MODE_EVENT);

    I have attached a zip file of the project that I am woking on

    .2021.edma3_drv_bios6_c6657_st_sample.zip