SDAA266B March 2026 – May 2026 MSPM0C1104 , MSPM0C1106 , MSPM0G3507 , MSPM0L1306
The zero-crossing detection uses a timer operating in capture mode, configured to trigger on both rising and falling edges of the ZCD input signal. The interrupt handler (CAPTURE_0_INST_IRQHandler) processes three distinct events:
The captured period values are averaged (periodAvg) to provide a robust measurement that compensates for minor variations in line frequency and noise. This averaged value serves as the time base for calculating the precise firing angle delay.