- If I disable DMAContinuousRequests, does the ADC automatically trigger a DMA request every time it finishes a conversion?
- What if I enable DMAContinousRequests, does the DMA transfer a sample of the adc multiple times if there was no new conversion inbetween ?
This is what the manual says:
"[...] this parameter specifies whether the DMA requests are performed in one shot mode (DMA transfer stops when number of conversions is reached) or are performed in continuous mode (DMA transfer unlimited, whatever number of conversions)."
What I want to do
I want to watch the input for an edge that exceeds a threshold. If I detect one I want to save the next X samples to memory via the DMA with a samplerate of Y samples/s.
(for example: X = 64 and Y = 10k)
My idea
- setup a analog watchdog
- when the threshold is exceeded use the callback to set the ADC to DMA-mode and trigger it with a timer (Continous Converion Mode disabled and DMAContinousRequests disabled)
- switch back to watchdog-mode after X samples (DMA buffer full)
Back to the question
Is my Continous Converion Mode and DMA Continous Requests setting, correct for this purpous ?