Hello, could somebody help me in how to configure one DMA block (specially number of bytes per burst, and number of request per burst) to do this?:
I have one DFB outputting 16bit words at Fs (3KSPS)
Its EOC fires one DMA request ina DMA block
I want the DMA to transfer first Low byte (available in HOLDA_PTR) then HIgh byte (in HOLDAM_PTR) to one UART (UART_1_TXDATA_PTR)
I have tryied several configs, using one or two transfer descriptors, but I only get one byte out off the UART for every EOC.
See my last attempt (only sends out one byte):
uint8 DMA_3_Chan;
uint8 DMA_3_TD[1];
#define DMA_3_BYTES_PER_BURST 2
#define DMA_3_REQUEST_PER_BURST 1
#define DMA_3_SRC_BASE (CYDEV_PERIPH_BASE)
#define DMA_3_DST_BASE (CYDEV_SRAM_BASE)
/* DMA Configuration for DMA_3 */
DMA_3_Chan = DMA_3_DmaInitialize(DMA_3_BYTES_PER_BURST,DMA_3_REQUEST_PER_BURST,
HI16(DMA_3_SRC_BASE),HI16(DMA_3_DST_BASE));
DMA_3_TD[0] = CyDmaTdAllocate();
CyDmaTdSetConfiguration(DMA_3_TD[0], 1, DMA_INVALID_TD, TD_INC_SRC_ADR);
CyDmaTdSetAddress(DMA_3_TD[0], LO16((uint32)Filter_1_HOLDA_PTR), LO16((uint32)UART_1_TXDATA_PTR));
CyDmaChSetInitialTd(DMA_3_Chan, DMA_3_TD[0]);
CyDmaChEnable(DMA_3_Chan, 1);
Thanks,
Maxi Guzman
|