SPRUII0F May 2019 – June 2024 TMS320F28384D , TMS320F28384D-Q1 , TMS320F28384S , TMS320F28384S-Q1 , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S
In this example, the PWM requirements are:
Figure 26-91 and Figure 26-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.
The example code shown consists of two main parts:
This example assumes a typical MEP_SP and does not use the SFO library.
Example26-5 shows the Initialization code. The first part is configured for conventional PWM. The second part sets up the HRPWM resources.
Example26-6 shows an assembly example of run-time code that can execute in a high-speed ISR loop.