SDAA266B March   2026  – May 2026 MSPM0C1104 , MSPM0C1106 , MSPM0G3507 , MSPM0L1306

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Block Diagram
    1. 2.1 Power Supply Module
    2. 2.2 Zero-Crossing Detection (ZCD)
    3. 2.3 Current Detection
    4. 2.4 MSPM0 Microcontroller
    5. 2.5 TRIAC
  6. 3Phase Angle Control
    1. 3.1 Operating Principle
    2. 3.2 Boundary Conditions and Special Cases
    3. 3.3 Implementation with MSPM0
  7. 4Soft-Start Feature
  8. 5Software
    1. 5.1 Software Workflow
    2. 5.2 Zero-Crossing Detection Implementation
    3. 5.3 Pulse Generation
    4. 5.4 Update Targeted Speed
    5. 5.5 Overcurrent Protection
    6. 5.6 User System Define
  9. 6Results
    1. 6.1 Scope Waveforms
    2. 6.2 Speed Change
    3. 6.3 Soft Start
    4. 6.4 Temperature
  10. 7Summary
  11. 8References
  12. 9Revision History

Zero-Crossing Detection Implementation

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:

  • CC0_DN (First Half-Cycle):Captures the timer value at the positive-to-negative zero crossing and calculates the first half-period duration
  • CC1_DN (Second Half-Cycle):Captures the timer value at the negative-to-positive zero crossing, calculates the second half-period, and manually reloads the timer counter to maintain synchronization
  • ZERO Event: If the timer reaches zero without detecting a zero-crossing, the system sets gSynced = false to indicate loss of synchronization, preventing erratic gate pulse generation

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.