SPRAC94D September 2018 – March 2022 AFE030 , AFE031 , TMS320F28075 , TMS320F28075-Q1 , TMS320F28076 , TMS320F28374D , TMS320F28374S , TMS320F28375D , TMS320F28375S , TMS320F28375S-Q1 , TMS320F28376D , TMS320F28376S , TMS320F28377D , TMS320F28377D-EP , TMS320F28377D-Q1 , TMS320F28377S , TMS320F28377S-Q1 , TMS320F28379D , TMS320F28379D-Q1 , TMS320F28379S
Unique to the C2000 device is the ability to use High Resolution PWM (HRPWM). HRPWM enables increased resolution for both the duty cycle and period of the PWM signals. In this example, HRPWM is used to generate both the mark and the space frequencies.
The HRPWM is based on micro edge positioned (MEP) technology. MEP logic is capable of positioning an edge very finely by sub-dividing one coarse system clock of a conventional PWM generator. The time step accuracy is on the order of 150 ps.
Table 4-3 shows the resolutions possible with and without HRPWM.
PWM Frequency | Regular Resolution (PWM) | High Resolution (HRPWM) | ||
---|---|---|---|---|
100 MHz EPWMCLK | ||||
(kHz) | Bits | % | Bits | % |
20 | 12.3 | 0.02 | 18.1 | 0.000 |
50 | 11 | 0.05 | 16.8 | 0.001 |
100 | 10 | 0.1 | 15.8 | 0.002 |
150 | 9.4 | 0.15 | 15.2 | 0.003 |
200 | 9 | 0.2 | 14.8 | 0.004 |
250 | 8.6 | 0.25 | 14.4 | 0.005 |
500 | 7.6 | 0.5 | 13.4 | 0.009 |
1000 | 6.6 | 1 | 12.4 | 0.018 |
1500 | 6.1 | 1.5 | 11.9 | 0.027 |
2000 | 5.6 | 2 | 11.4 | 0.036 |
For example, the mark frequency was generated at 131.25 kHz signal. Using PWM, only a 131.2 kHz or a 131.3 kHz signal can be generated. This limitation is due to the resolution that is available for the PWM module. If HRPWM is added, a 131.250 kHz signal can be effectively generated.
If this amount of accuracy is not necessary or the desired frequency can be reached with normal PWM, HRPWM is not required. HRPWM is an add-on to PWM. To disable this in the software example, remove the code associated with it inside the main.c file.