2025-07-09 10:23 AM - last edited on 2025-07-09 2:06 PM by mƎALLEm
In my STM32G431CBU6 implementation, COMP1, COMP2 and COMP3 are configured for back-EMF zero-crossing detection with TIM1 CH5 serving as the blanking source. Both rising and falling edge interrupts are enabled on the comparators. TIM1 channels 1, 2 and 3 generate PWM signals for motor MOSFET driving. Despite TIM1 CH5 blanking covering the entire PWM period, the comparator interrupts continue to be erroneously triggered by PWM switching noise