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.

TM4C1294NCPDT: Data transfer between UDMA and timer

Part Number: TM4C1294NCPDT

Hi team,

The customer would like to know how to configure UDMA to transfer MemoryToPerihal in a loop Passes the value of one array in memory one at a time to the match register of TIMER2A, transmitting at the end of each count to generate PWM waveforms with different duty ratios. The code is currently configured as follows:

//TIMER configuration:

SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER2);
TimerConfigure(TIMER2_BASE, TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_PWM);
TimerLoadSet(TIMER2_BASE, TIMER_A, 61);
TimerControlLevel(TIMER2_BASE, TIMER_A, true);
TimerDMAEventSet(TIMER2_BASE,TIMER_DMA_TIMEOUT_A);
TimerEnable(TIMER2_BASE, TIMER_A);

//UDMA configuration:

uint8_t pui8ControlTable[1024];
SysCtlPeripheralEnable(SYSCTL_PERIPH_UDMA);
uDMAEnable();
uDMAControlBaseSet(pui8ControlTable);
uDMAChannelAttributeDisable(UDMA_SEC_CHANNEL_TMR2A_4, UDMA_ATTR_ALTSELECT | UDMA_ATTR_USEBURST | UDMA_ATTR_HIGH_PRIORITY | UDMA_ATTR_REQMASK);
uDMAChannelSelectSecondary(UDMA_DEF_USBEP3RX_SEC_TMR2A);
uDMAChannelAssign(UDMA_CH4_TIMER2A);
uDMAChannelAttributeEnable(UDMA_SEC_CHANNEL_TMR2A_4, UDMA_ATTR_USEBURST);
uDMAChannelControlSet(UDMA_SEC_CHANNEL_TMR2A_4 | UDMA_PRI_SELECT, UDMA_SIZE_32 | UDMA_SRC_INC_32 | UDMA_DST_INC_NONE | UDMA_ARB_4);
uDMAChannelTransferSet(UDMA_SEC_CHANNEL_TMR2A_4 | UDMA_PRI_SELECT,
UDMA_MODE_BASIC, buffer,
(void *)(TIMER2_BASE + TIMER_O_TAMATCHR), num);
uDMAChannelEnable(UDMA_SEC_CHANNEL_TMR2A_4);

During debugging, it's found that the value of the register remains the last value of the array of buffers. Is there any way to resolve this?

Could you help check this case? Thanks.

Best Regards,

Cherry