STM32F103 ADC and DMA?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-24 11:49 PM
Hello
I am familiar with STM32. I have a simple project with CubeMX
One ADC reads 3 channels, continuousmade disable , DMA active.
I turn everything on and start the first ADC conversion with a function
HAL_ADC_Start_DMA.
My questions
- How do I start another ADC conversion?
- What should I test to make the program wait for the ADC conversion to complete and the data transfer via DMA?
Thanks you
Solved! Go to Solution.
- Labels:
-
ADC
-
DMA
-
STM32CubeMX
-
STM32F1 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-25 12:23 AM
Typically you would start the conversion in timer interrupt routine. This is also a convenient place to handle the results of a previous conversion, before starting the new one. Another possibility is to use hardware triger via timer for starting the conversion and handling the results in DMA channel interupt. Alternatively, without DMA interrupt, you may test the DMA transfer complete flag.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-25 12:23 AM
Typically you would start the conversion in timer interrupt routine. This is also a convenient place to handle the results of a previous conversion, before starting the new one. Another possibility is to use hardware triger via timer for starting the conversion and handling the results in DMA channel interupt. Alternatively, without DMA interrupt, you may test the DMA transfer complete flag.
