2020-10-15 09: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:
Resetting the latch is not time critical.
Solved! Go to Solution.
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
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