SPRUJ55D September 2023 – July 2025 AM263P2 , AM263P2-Q1 , AM263P4 , AM263P4-Q1
In this example, the PWM requirements are:
Figure 7-226 and Figure 7-272 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 7-273 Simple Reconstruction Filter for a PWM-based DAC
Figure 7-274 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.
Example7-12 shows the Initialization code. The first part is configured for conventional PWM. The second part sets up the HRPWM resources.
Example7-11 shows an assembly example of run-time code that can execute in a high-speed ISR loop.