2025-01-19 08:09 PM
Hello,
I am working with an STM32G071. I am using Comp2. I have configured it with the STM32CubeIDE. Presently, It is set to "medium" speed/power, and Rising Edge Input with High Hysteresis. The positive input is set to INP/PB6. The negative input is set to Internal VRef. (I can't find anywhere in the manual what that value is. Maybe its only in the data sheet!?) Anyway, my problem is when I enable the AC it instantly triggers the interrupt. However, I don't see any evidence that VALUE is ever high. Meaning It doesn't look like the comparator is actually triggered but maybe its some type of configuration initialization issue? If I ignore this first trigger the AC seems to work fine afterwards.
I have checked the flags in EXTI and they are not set until the exact moment the AC is enabled.
Any idea what could be causing this? I haven't found anything on the forums that might point to an explanation.
2025-01-19 10:15 PM - edited 2025-01-19 10:16 PM
> Maybe its only in the data sheet!?
good idea, look it up.
> when I enable the AC
No idea what you are saying here, please show code and external wiring.
hth
KnarfB