SPRUIZ1B July 2023 – August 2024 TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1
In this example, the PWM requirements are:
Figure 22-120 and Figure 22-121 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.
Example22-5 shows the Initialization code. The first part is configured for conventional PWM. The second part sets up the HRPWM resources.
Example22-6 shows an assembly example of run-time code that can execute in a high-speed ISR loop.