ADC triggering on value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-12 3:07 PM
Hello,
Is it possible to set trigger when ADC converter reach a certain value? I mean that an interrupt rutine is called when ADC reach a user value. Can you please provide or refer a piece of code?
Thank,
Petr
- Labels:
-
ADC
-
Interrupt
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-12 4:08 PM - edited ‎2023-08-12 4:08 PM
As far as I know, comparators are used for this.
The Analog Comparator is used to compare the voltage of two analog inputs, with a digital output
indicating which input voltage is higher. Inputs can either be one of the selectable internal references or
from external pins.
See here: https://kalapiinfotech.in/stm32-peripherals-comparator/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-12 4:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-13 12:17 AM
Which STM32?
In most STM32 ADC there is a feature called ADC watchdog. If, after a conversion, the converted value is outside a region defined by two registers, an interrupt is invoked (if enabled).
Read the ADC chapter in RM.
JW
