I am trying to put together a scenario where I trigger an M4 ADC on a timer and use an interrupt handler to process the data that's returned. When the ADC finishes taking a sample I would like it to DMA it into a ring buffer in memory, so I can then get an interrupt and process the data.
it looks like pretty much all the example code out there is for either software-based transfers or UART, which seem to operate differently. In theory, I shouldn't need a ping-pong buffer to handle this since I should only ever be capturing one ADC sequence at a time. My question is related to this piece of code from the udma_demo in the boards/ek-lm4f232 folder:
ROM_uDMAChannelTransferSet(UDMA_CHANNEL_UART0RX | UDMA_PRI_SELECT,
UDMA_MODE_PINGPONG,
(void *)(UART0_BASE + UART_O_DR),
g_ucRxBufA, sizeof(g_ucRxBufA));
They seem to use UART0_BASE + UART_0_DR as their offset into memory where the data is being read from, however I don't see anywhere in driverlib/adc.h or inc/hw_memmap.h where a similar offset into the ADC is given for ADC sequences. If I were using, say, ADC Sequence 3 to get my data, what do I put in for a memory location where I could read the data out of?
I am also assuming I need to select the proper channel and change my mode from MODE_PINGPONG to MODE_AUTO, but those I can find reference materials to let me know what I should change - this is a piece I can't find any documentation on.