Skip to main content
LSmil.1
Associate II
August 14, 2022
Question

How do I set ADC DMA sample rate?

  • August 14, 2022
  • 3 replies
  • 1218 views

Hi there,

I'm using DMA to circular sample ADC channels. I'm getting the ADC complete interrupt - its all good. The question is, how do I set the sampling rate of the DMA, let's say that I need those samples every 2 milisec - how to I set the DMA to perform a 2 milisec sample?

THanks,Lior.

This topic has been closed for replies.

3 replies

MasterT
Lead II
August 14, 2022

In case of ADC linked to DMA, ADC is a master. ADC does conversion on it's own clock settings, and request dma transfer when event "conversion complete" happened . DMA serves request.

AScha.3
Super User
August 14, 2022

#Lior, what you want is ADC at a fixed sample rate . So take any of the many timers, generate a trigger event at your desired frequency and set the ADC on triggered by xx-event, and DMA will bring the data to your array. simple - eh ? :)

If you feel a post has answered your question, please click on " Best Answer ".
S.Ma
Principal
August 15, 2022

The maximum ratr depends on adc frequency, sample and hold time and averaging etc... adc config

Now for lower rates, each adc round of conversion can wait for a trigger signal coming from timer (pwm mode), or a pin to visualise and better debug through a pin to pin external jumper wire.