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 to trigger DMA through PWM timer capture interrupts?

Hello, i'm trying to trigger dma request by timer via pwm timer mode. Actually i just find sequence of acts in datasheet "producing DMA trigger events". I'm using simplelink_cc13x0_sdk_1_50_00_08 library and doing next sequence to drive trigering dma via timer event and it don't work, what can i repair, help please:

PWM_init();
PWM_Params_init(&pwmParams);
pwmParams.dutyUnits = PWM_DUTY_FRACTION;
pwmParams.dutyValue = pwmDuty;
pwmParams.periodUnits = PWM_PERIOD_HZ;
pwmParams.periodValue = pwmFreq;

pwmHandle = PWM_open(Board_GPTIMER0A, &pwmParams);
    if (pwmHandle == NULL) {
        while (1);
    }

/* This setting DMAEV register, because any other way to set this register i haven't found */ 
HWREG(((PWMTimerCC26XX_Object*)pwmHandle->object)->hTimer->hwAttrs->baseAddr + GPT_LUT[((PWMTimerCC26XX_Object*)pwmHandle->object)->hTimer->timerPart].offset + GPT_O_DMAEV) |= GPT_DMAEV_CAEDMAEN;

GPTimerCC26XX_registerInterrupt(((PWMTimerCC26XX_Object*)pwmHandle->object)->hTimer, PWM_userFunc, GPT_INT_CAPTURE);

EventRegister(EVENT_O_UDMACH9SSEL, EVENT_O_GPT0ACAPTSEL);

dmaHandle = UDMACC26XX_open();
if(dmaHandle == NULL)   {
while(1);
}

uDMAChannelAttributeDisable(((UDMACC26XX_HWAttrs*)dmaHandle->hwAttrs)->baseAddr, UDMA_CHAN_TIMER0_A, UDMA_ATTR_USEBURST | UDMA_ATTR_ALTSELECT | UDMA_ATTR_REQMASK | UDMA_ATTR_HIGH_PRIORITY);

uDMAChannelControlSet(((UDMACC26XX_HWAttrs*)dmaHandle->hwAttrs)->baseAddr, UDMA_PRI_SELECT, UDMA_SIZE_32 | UDMA_SRC_INC_32 | UDMA_DST_INC_NONE | UDMA_ARB_1);

/* Actually source is buffer and destination is unincremented TAMARCH register */
uDMAChannelTransferSet(((UDMACC26XX_HWAttrs*)dmaHandle->hwAttrs)->baseAddr,
                               UDMA_PRI_SELECT, UDMA_MODE_BASIC,
                               cnvData, (void *)(((PWMTimerCC26XX_Object*)pwmHandle->object)->hTimer->hwAttrs->baseAddr + GPT_LUT[((PWMTimerCC26XX_Object*)pwmHandle->object)->hTimer->timerPart].offset + GPT_O_TAMATCHR),
                               1
                );

uDMAChannelEnable(((UDMACC26XX_HWAttrs*)dmaHandle->hwAttrs)->baseAddr, UDMA_CHAN_TIMER0_A);

PWM_start(pwmHandle);

while(1);

However, if i configure dma via UDMA_CHAN_SW_EVT0 channel event and using uDMAChannelRequest(); for software request it perfectly works.