SLAAEU3 June   2025 MSPM0C1104

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Four Wire Cooling Fans
  5. 2Cooling FAN Controller with MSPM0 Designs
    1. 2.1 Design with MSPM0C1104 and MSPM0C1106
    2. 2.2 Design with MSPM0H3215 and MSPM0H3216
  6. 3Software Introduction
    1. 3.1 Software Working Flow
    2. 3.2 Function Description
      1. 3.2.1 PWM Output
      2. 3.2.2 TACH Capture
      3. 3.2.3 ADC Sample
      4. 3.2.4 FAN Fault Detection and Overflow Maximum Value
    3. 3.3 I2C Communication Protocol
    4. 3.4 Registers Definition in the Demo
  7. 4Demo Test with Hardware
    1. 4.1 Hardware Setup
    2. 4.2 Software Setup
    3. 4.3 Running Demo Code
  8. 5Summary
  9. 6References

PWM Output

To start a PWM in a specific channel, the output can write a non-zero duty cycle into the specific duty cycle register (start from 0x20). To stop the PWM output, write zero duty cycle to the specific channel duty cycle register. The duty cycle valid bits for this demo is 9 bits and using two registers to identify one duty cycle in the channel. In this demo all the registers are one byte length.

This demo can also support to change the frequency of the PWM in the PWM frequency register (start from 0x10). Currently, the demo can support four different frequencies in the demo: 22.9Hz, 45.8Hz(default), 91.7Hz and 23.4kHz. The customer can change different frequencies as required in the code. Four bits can be used to configured different frequencies in one register, so one register can be used to configure two different timers. In the demo code, some PWM channels are generated in one timer. These PWMs can use the same frequency.