DMA stops working | Cypress Semiconductor
DMA stops working
I'm using DMA to transfer data from an ADC to a buffer. First of all: Everything works and I can work with the buffered Data, but then...
After a time of about 230 seconds the pulse on the 'nrq' output of the DMA component stops and therefore the ISR isn't entered.
The ADC is working with 182250 SPS at 8 bit resolution and I'm saving 50 bytes.
A DMA_release and reinitializing didn't help. The only solution I have so far is reseting the device.
Attached find the TopDesign part of the DMA. I'm meassuring on 'ADC_eoc' to check for the pulse.
The DMA Configuration looks as follows:
#define DMA_ADC_Buffer_BYTES_PER_BURST 1
#define DMA_ADC_Buffer_REQUEST_PER_BURST 1
#define DMA_ADC_Buffer_SRC_BASE (CYDEV_PERIPH_BASE)
#define DMA_ADC_Buffer_DST_BASE (CYDEV_SRAM_BASE)
DMA_ADC_Buffer_Chan = DMA_ADC_Buffer_DmaInitialize(DMA_ADC_Buffer_BYTES_PER_BURST,DMA_ADC_Buffer_REQUEST_PER_BURST, HI16(DMA_ADC_Buffer_SRC_BASE), HI16(DMA_ADC_Buffer_DST_BASE));
DMA_ADC_Buffer_TD = CyDmaTdAllocate();
CyDmaTdSetConfiguration(DMA_ADC_Buffer_TD, 50, DMA_DISABLE_TD, DMA_ADC_Buffer__TD_TERMOUT_EN | TD_INC_DST_ADR);
CyDmaTdSetAddress(DMA_ADC_Buffer_TD, LO16((uint32)Rx_ADC_DEC_SAMP_PTR), LO16((uint32)ADC_Buffer));