Part Number: TMS320F28379D
Tool/software:
Hello,
I have a 20-element lookup table with uint16_t values for a sinewave.
I have EPWM6 configured for 200kHz, and EPWM6 SOCB configured to trigger DMA.
For DMA, I have set the trigger source to DMA_TRIGGER_EPWM6SOCB.
If I set the DMA burst size to 1U and the transfer size to 20U, I can see the end-of-transfer interrupt being generated at 10kHz, which is what I expect.
However, the DAC output is not correct. It doesn't look like it is iterating through the table. I suspect the issue is somewhere in the setup of burst/transfer/wrap.
This is my setup:
uint16_t lookup_table[20];
const void* src= (void *)lookup_table;
const void* dst= (void *)(DACA_BASE + DAC_O_VALS);
DMA_configAddresses(DMA_CH1_BASE, dst, src);
DMA_configBurst(DMA_CH1_BASE, 1U, 1, 0);
DMA_configTransfer(DMA_CH1_BASE, 20U, 0, 0);
DMA_configWrap(DMA_CH1_BASE, 20U, 0, 65535U, 0);
DMA_configMode(DMA_CH1_BASE, DMA_TRIGGER_EPWM6SOCB, DMA_CFG_ONESHOT_DISABLE | DMA_CFG_CONTINUOUS_ENABLE | DMA_CFG_SIZE_16BIT);
Any suggestions on what I may be doing wrong?
Thanks!