SPRUI33H November 2015 – June 2024 TMS320F280040-Q1 , TMS320F280040C-Q1 , TMS320F280041 , TMS320F280041-Q1 , TMS320F280041C , TMS320F280041C-Q1 , TMS320F280045 , TMS320F280048-Q1 , TMS320F280048C-Q1 , TMS320F280049 , TMS320F280049-Q1 , TMS320F280049C , TMS320F280049C-Q1
In this example, the PWM requirements are:
Figure 18-93 and Figure 18-94 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.
Example18-5 shows the Initialization code. The first part is configured for conventional PWM. The second part sets up the HRPWM resources.
Example18-6 shows an assembly example of run-time code that can execute in a high-speed ISR loop.