Content originally posted in LPCWare by eTLA on Mon May 05 07:54:25 MST 2014
Ok, that was stupid. I found one bug: Giving the value, rather than the address, of ADDR0 bordered to sheer stupidity. So the line:
GPDMACH0->DMACCSrcAddr = ADC->ADDR0;
now reads:
GPDMACH0->DMACCSrcAddr = (uint32_t) &(ADC->ADDR0);
The data in the buffer now reads:
2147490192, 6544, 6544, 6544, 6544, 6544, 2147490240, 6592, 6592, 6592, 6592, 6592, 6592, 214749019...
Which makes sense. 2147490192 is DONE-bit set + 0x199 as ADC-result and 6544 is, of course, the same result minus the DONE-bit.
So now I have a working DMA-transfer from the ADC, but it just burst the data without waiting for the ADC to complete.
Anyone have an idea?