SPRUJ53C April 2024 – February 2025 TMS320F28P550SG , TMS320F28P550SJ , TMS320F28P559SG-Q1 , TMS320F28P559SJ-Q1
In this example, the PWM requirements are:
Figure 1-1 and Figure 19-92 show the DAC function and the required PWM waveform. As explained previously, configuration for the ePWM1 module is almost identical to the normal case except that the appropriate MEP options need to be enabled/selected.
Figure 19-91 Simple
Reconstruction Filter for a PWM-based DAC
Figure 19-92 PWM
Waveform Generated for the PWM DAC Function
The example code shown consists of two main parts:
This example assumes a typical MEP_SP and does not use the SFO library.
Example19-5 shows the Initialization code. The first part is configured for conventional PWM. The second part sets up the HRPWM resources.
Example19-6 shows an assembly example of run-time code that can execute in a high-speed ISR loop.