6.3.3.6 Example PWM Configuration and Usage

This is an example configuration of PWM Module 4, utilizing the values calculated in the examples above.

Period (2 ms) = 0xC350

Duty Cycle (30%) = 0x3A98

  1. To configure Module 4 and corresponding Timer for 2 ms period, enter the following command:
    >AT+PWMCFG=4,0XC350
    OK
  2. To configure Module 4 for a 30% duty cycle and start output, enter the following command:
    >AT+PWMSTART=4,0X3A98
    OK
  3. To stop Module 4 output, enter the following command:
    >AT+PWMSTOP=4
    OK
The following figure shows the Output Waveform for a 2 ms period with a 30% duty cycle using a 25 MHz Timer.
Figure 6-72. Output Waveform