STM32L496 (COMP1/COMP2): False Comparator Edges During LoRa TX/RX
Hello,
I am using STM32L496VGT6 with COMP1 and COMP2 to monitor the output voltage of a pressure transmitter. The MCU operates in STOP1 mode most of the time, where the comparator behaves correctly.
However, in RUN mode, whenever the SX1262 LoRaWAN module transmits or opens RX1/RX2 slots, I see continuous false edges from the comparator:
If 0.255 < Vin < VL (0.275 V) → I get continuous falling edges.
If VL < Vin < VH (0.55 V) → I get continuous rising edges.
This only happens during LoRaWAN TX or RX windows, not during idle.
Log :
**comp2 Falling edge TX on freq 866585000 Hz ...**comp1 Rising edge RX_1 on freq 865062500 HzWhat I tried:
COMP configured with medium/high hysteresis.
Added blanking source using TIM3 OC channels, started before Radio TX/RX and stopped after.
Added RC filter (10 kΩ + 10 µF) at COMP input. Still see one false edge every TX/RX.
In STOP1 mode: comparator works fine (only one edge when Vin actually crosses threshold).
In RUN mode: false edges appear only during SX1262 activity.
My setup:
STM32L496VGT6
SX1262 LoRaWAN module (SPI + DIO handled by MCU)
COMP1/COMP2 monitoring pressure transmitter voltage divider
Questions:
Is this a known issue where LoRaWAN TX/RX (RF or digital noise) couples into STM32 comparators?
What is the best way to synchronize COMP blanking with LoRa activity (e.g. using SX1262 DIO pins to gate blanking)?
Do you recommend hardware filtering/buffering (e.g. op-amp buffer before COMP input, shielded layout) to reduce RF-induced false triggers?
Any application notes, example designs, or recommendations would be highly appreciated.
Thanks in advance!
