constant ADC Average via DMA

Post here first, or if you can't find a relevant section!
Post Reply
jenspogo
Posts: 30
Joined: Mon Feb 24, 2020 10:42 am

constant ADC Average via DMA

Post by jenspogo »

Hello everyone,

I would like to have something like a continous ADC Average Value. Or at least maybe 1000 values that I can load from a buffer which is continously filled. But i don't want to use the CPU processing time. As far as I know that seems to be the functionality of DMA. Is this correct?
And I don't want to have an Interrupt - I want to acces the buffer whenever it is necessary controlled by the normal programm flow.

Is there any possibility to implement something like that any any kind of example?

Greetings,
Jens
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: constant ADC Average via DMA

Post by stevestrong »

DMA cannot do average, it just saves values in an array or one variable.
If you want average of some values that would inevitably involve CPU processing either in an ISR or on main level.
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: constant ADC Average via DMA

Post by ag123 »

average needs to be done on the cpu, the analog alternatives are to low pass filter it (e.g. rc filter) before reading it with an adc
Post Reply

Return to “General discussion”