Want to know the each ADC value reading time in Debug Mode ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-18 9:54 PM
Hi
I am reading some ADC value in to the DMA
Is there any option indebug mode to see how much times taken to the each read of the ADC values ?
- Labels:
-
ADC
-
DMA
-
STM32F0 Series
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-18 10:59 PM
I use timestamp by another timer or systemtick to measure each period of sampling.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-18 11:08 PM
hi
How to impliment it i didnt get well?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-18 11:50 PM
it's depend on your speed sampling.
The system Tick is usually increase value every 1ms so if your sampling very slow than 1ms (1KHz), you can gettick every time when ADC Start sampling and you will get how long period for each sampling.
But another way that you also can use timer to measure that period by read from CNT register in timer on up counter mode but this method is a little more complicate than systemtick because you have to set that timer to be counter mode and you have to know range of period you want to measure too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-19 5:51 AM
Hello @thannara123 ,
You can check this wiki article --> https://wiki.st.com/stm32mcu/wiki/Getting_started_with_ADC.
There is an example for ADC + DMA.
Best Regards
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-19 6:24 AM
The sampling and conversion times for ADC are given in the reference manual.
Due to the overhead of callbacks and instructions, it is difficult to measure this in code.
