Other Parts Discussed in Thread: CONTROLSUITE
I am trying to configure the DMA to transfer my ADC results into a known buffer location as triggered by an ePWM SOC pulse. An an interim step I am attempting to simply transfer one buffer's values into another buffer (similar to the behavior of the "dma_ram_to_ram_C28.c" example), but triggered by an SOC pulse.
However, the transfer is not occurring. When I manually trigger the DMA the transfer occurs. When I setup the DMA to transfer according to a CPU timer, the transfer occurs. But not when I set it up to trigger on the SOC pulse.
If I monitor the PWM registers during runtime I see that the SOC flag is being set.
Here are some relevant code snippets:
---------------------------------------------------------------------------
EPwm4Regs.ETSEL.bit.SOCBSEL = ET_CTRU_CMPB; // SOCA on counting up to CMPB
EPwm4Regs.ETSEL.bit.SOCBEN = 1; // Enable SOCA
EPwm4Regs.ETPS.bit.SOCBPRD = ET_1ST; // Generate SOCA on every event
// configure the DMA burst settings
DMACH1BurstConfig(0,2,2);
DMACH1TransferConfig(31,2,2);
DMACH1WrapConfig(0xFFFF,0,0xFFFF,0);
// Use timer0 to start the transfer.
// This is a static copy use one shot mode, so only one trigger is needed
// Use 32-bit mode to decrease transfer time
// Enable the PIE interrupt for the DMA channel
DMACH1ModeConfig(DMA_EPWM4B,PERINT_ENABLE,ONESHOT_ENABLE,CONT_DISABLE,
SYNC_DISABLE,SYNC_SRC,OVRFLOW_DISABLE,THIRTYTWO_BIT,
CHINT_END,
CHINT_DISABLE);
// Start the DMA
StartDMACH1();
--------------------------------------------------------------------------------
Any obvious things to check? Or helpful debug tips?
Thanks,
Nick