2018-11-30 12:04 AM
Hello,
On a low power application, using STM32L031x, I want to monitor a 3-level signal (24V, 5V, 0V) using COMP1 and COMP2.
Comparator positive input are configured by software on analog input mode, No pull-up, pull-down
When the 3-level signal under test goes to 0V, I measure about 400mV instead of 0V on COMPxIN+ (so COMP2 never toggle): is there a leakage current (it's about 400mV/200K=2uA) from comparator inputs that alter the external voltage divider? Maybe from internal pullup?
Or there is a mistake/inaccuracy on comparator and/or GPIO software configuration?
Thanks for your support!
Massimo
2018-11-30 02:38 PM
I have no experience with the comparators in 'L0, but maybe this is the reason for the behaviour you observe:
JW
2018-12-02 11:40 PM
Hello Jan,
maybe the issue come from COMP1 electrical characteristics, but the purposes were
so I expected correct behaviour of comparators.
2018-12-03 04:59 AM
What I want to say is that COMP1 may inject the current you see if you try to pull it below 0.6V; and as you have both comparators' pins connected, that prevents the other comparator to see the lower transition.
Maybe try using two individual dividers.
JW
2018-12-04 03:35 AM
Jan,
maybe you are right, but on board it's very difficult to isolate some pins and keep signals.
And in datasheets there are poor COMPx's electical characteristics, in particular for leakage current and/or particular operating condition you named.
Thanks,
Massimo