SDK: LPC Open v3.02
IDE: MCUXpresso v11.21
Hardware: Link2 (one as a programmer/debugger, the other as the target)
Update:
I overlooked needing to add the entries in the GPDMA_LUTPerBurst and GPDMA_LUTPerWid arrays. Once I added the values for the ADCHS, the Peripheral to Memory DMA seems to fire and copies the data properly, but only does it a handful of times before the program freezes. I have a breakpoint set in the DMA_IRQHandler, however, the program execution never gets there.
Any idea what I am overlooking in order to have continuous transfers occur? From my understanding, the FIFO_FULL flag will be set when the FIFO is equal to or above the level set and this should trigger a DMA transfer. When the transfer occurs, this should clear the ADCHS FIFO and the everything should repeat. Please let me know if I am wrong here.
Please see attached for my code. Thanks.
ORIGINAL:
Hello. I Have been struggling with this for quite some time.
The goal is to use DMA to transfer data from the ADCHS FIFO to user memory.
I have not been able to get his to work.
To simplify things, I first set up a memory to memory transfer with the DMA controller as the flow controller. This works correctly.
Next I tried a memory to memory transfer with DMA controller as flow controller, but the source address is the address of a peripheral register.
Registers I have tried:
0x400F001C (ADCHS->CONFIG)
0x400F0200 (ADCHS->FIFO_OUTPUT)
0x40002030 (GPDMA->CONFIG)
I noticed that the needed DMAMUX values for channels 7 and 8 (ADCHS Read/Write) are not included in the SDK. I added them as well as the entries in *GPDMA_LUTPerAddr.
Is there an example of using DMA with the High Speed ADC on the LPC4370?
Why isn't the manual transfer working?
Thanks