Other Parts Discussed in Thread: SYSCONFIG
I am using the following snippet of code to configure a DMA channel - on an F28379D - to write a buffer of data out to a SPI-addressable DAC device. My intent is to have a single 16-bit element from dac_buffer_a to be written to the peripheral each time the SOCA event triggers.
#define DAC_SPI_TX_DMA_TRIGGER DMA_TRIGGER_EPWM1SOCA#define DAC_SPI_TX_DMA_ADDRESS ((uint16_t *)(SPIA_BASE + SPI_O_TXBUF))
void DAC_SPI_TX_DMA_init() { DMA_setEmulationMode(DMA_EMULATION_FREE_RUN); DMA_configAddresses(DAC_SPI_TX_DMA_BASE, DAC_SPI_TX_DMA_ADDRESS, dac_buffer_a); DMA_configBurst(DAC_SPI_TX_DMA_BASE, 1U, 1, 0); DMA_configTransfer(DAC_SPI_TX_DMA_BASE, 16U, 0, 0); DMA_configMode(DAC_SPI_TX_DMA_BASE, DAC_SPI_TX_DMA_TRIGGER, DMA_CFG_ONESHOT_DISABLE | DMA_CFG_CONTINUOUS_ENABLE | DMA_CFG_SIZE_16BIT); DMA_setInterruptMode(DAC_SPI_TX_DMA_BASE, DMA_INT_AT_END); DMA_enableInterrupt(DAC_SPI_TX_DMA_BASE); DMA_disableOverrunInterrupt(DAC_SPI_TX_DMA_BASE); DMA_enableTrigger(DAC_SPI_TX_DMA_BASE);}
Unfortunately, this is not occurring. At the end of a transfer (16 bytes), inspection of the source address indicates that it did not advance. Why is this the case? My understanding is that passing 1 as the burst size to DMA_configBurst() should result in the source address advancing after each single-word burst. This does not appear to be happening.
If I change the second argument of DMA_configBurst() from 1 to 2, by the way, the source address ends up as expected (starting address + 16) at the end of the transfer. However, I do not want to send 2 16-bit words each time the triggering event occurs. Rather, I want a single word to be sent.