SLAAEM1 June   2024 MSPM0C1104 , MSPM0C1104 , MSPM0L1105 , MSPM0L1105

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2System Architecture Introduction
  6. 3Hardware Design Introduction
    1. 3.1 Power Supply Circuit
    2. 3.2 Drive Circuit
    3. 3.3 Sampling Circuit
    4. 3.4 Main Controller Circuit
    5. 3.5 Control System Introduction
      1. 3.5.1 Drive Method
      2. 3.5.2 Control Method
  7. 4Software Design Introduction
    1. 4.1 Parameters Initialization
    2. 4.2 Direction Setup
    3. 4.3 Timer Interrupt
    4. 4.4 Closed Loop Controller
  8. 5Evaluation

Timer Interrupt

The timer is configured in countdown mode, triggering an interrupt when it reaches zero. The counting period is set to 50ms, meaning the duty cycle is updated every 50ms. Within this interrupt function, the current reference value is calculated first using the speed loop controller, and current is then clamped. Subsequently, the duty cycle is determined using the current loop controller, meanwhile considering the dead-time. Finally, the duty cycle information is updated based on the actual direction of the motor.

 Timer Interrupt Figure 4-4 Timer Interrupt