How to get best ADC sample using ADC + TIM + DMA.??
- March 2, 2020
- 3 replies
- 1006 views
Hello everyone,
I am using ADC + DMA + TIMER for my analog samples on STM32 nucleoF401RE.
I am new into the STM32 family.So I refer some code as per given some examples in this community.But I am not able to achieve it.
I wanted to follow below method for my code.
1) Configure Peripherals
(For that any External trigger convergence required in terms of ADC.)
2) I want sample at every 1 ms.
3) Wanted to collect 1400 samples in DMA(Approx time to collect all samples is 1.4 seconds).
4) After 1400 Samples successfully completed, trigger interrupt.
5) Want to process on received samples.
6) Again follow same procedure from step number 3.
I have attached my code for better understanding.
In that i have tried 2 method. Both i have tried and output also i have written in that file.
I don't quite understand the relationship between the Timer's interrupt rate and the sampling frequency.
Can someone help me with sample code?I searched but can not find proper explanation.
Thank you in advance
Regards,
Milan
