Hi all,
I am using ADC1_GP1 - triggered by HET - along with DMA. I am trying to place the data in the following way into the destination buffer.
uint16_t buf[40]:
I know how to do this for one channel (imagine the picture without the blue parts in the 3rd column):
- ADC-DMA configuration is set to block transfer, the block size being the number of adc channels, simply one.
- The DMA src address is set to adcREG1->GxBUF[adcGROUP1 + 2 (0xFFF7C0B2), fixed
- DMA dest address is set to top of the buffer, increments automatically
- DMA Frame-Counter is set to 20, Element-Cnt to 1.
- DMA interrupts are fired when half/full blocks are transferred
x-Channels (for x = 2):
- do I still set ADC-DMA to block transfer? => one DMA request after 2 results are written into the ADC's result buffer
- Frame size is still 20 but 2 elements per frame now?
- Should the dest element offset be set to 20 Byte in order to place the samples of CH1 to the blue locations depicted on the left?
- do I still set DMA src address to adcREG1->GxBUF[adcGROUP1 + 2 (0xFFF7C0B2)? It needs to increment after reading one element, how do I do that?
Thanks for your help in advance
Juergen