Latching comparator output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-15 9:41 AM
I'm building an overcurrent protection device based on an STM32F301C8, using COMP2 to compare an analog signal from a hall sensor against the DAC1 output value.
Now I'd like to generate a latching error signal that will remain asserted when the overcurrent situation goes away. The error signal shuts down the device, so it is expected that this resolves the situation.
Is there something I can (ab)use for this latch, ideally without involving software or requiring external pins (COMP outputs reduce ADC inputs, which I have way too few of)?
Ideas so far:
- triggering a timer that immediately expires, without reload and using the output compare as an error signal
- feeding the COMP output back as a BREAK signal into a timer that generates a 100% PWM
Resetting the latch is not time critical.
Solved! Go to Solution.
- Labels:
-
COMP
-
DAC
-
STM32F3 Series
-
TIM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-15 10:15 AM
> triggering a timer that immediately expires, without reload and using the output compare as an error signal
Yes.
Using Set Active On Match setting in TIMx_CCMRx.OCxM, and perhaps also setting OCxFE.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-15 10:15 AM
> triggering a timer that immediately expires, without reload and using the output compare as an error signal
Yes.
Using Set Active On Match setting in TIMx_CCMRx.OCxM, and perhaps also setting OCxFE.
JW
