Introduction
This example configures an ePWM instance and DMA as follows:
- ePWMx is set up to generate PWM waveforms
- DMA channel 0 is set up to update the CMPAHR, CMPA, CMPBHR and CMPB every period with the next value in the configuration array. This allows the user to create a DMA enabled fifo for all the CMPx and CMPxHR registers to generate unconventional PWM waveforms.
- DMA channel 1 is set up to update the TBPHSHR, TBPHS, TBPRDHR and TBPRD every period with the next value in the configuration array.
- Other registers such as AQCTL can be controlled through the DMA as well by following the same procedure.
Block Diagram for EPWM DMA example
External Connections
- For AM263x-CC or AM263Px-CC: EPWM0_A/B pin can be connected to an oscilloscope to view the waveform.
- For AM263x-LP or AM263Px-LP: EPWM1_A/B pin can be connected to an oscilloscope to view the waveform.
AM263X-CC or AM263PX-CC
When using AM263x-CC or AM263PX-CC with TMDSHSECDOCK (HSEC180 controlCARD Baseboard Docking Station)
- Capture waveform on HSEC Pin 49 for epwm0_A
- Capture waveform on HSEC Pin 51 for epwm0_B
AM263X-LP or AM263PX-LP
When using AM263x-LP or AM263PX-LP
- Capture waveform on boosterpack header J2/J4 Pin 37 for epwm1_A
- Capture waveform on boosterpack header J2/J4 Pin 38 for epwm1_B
Supported Combinations
Parameter | Value |
CPU + OS | r5fss0-0 nortos |
Toolchain | ti-arm-clang |
Board | am263x-cc, am263x-lp |
Example folder | examples/drivers/epwm/epwm_dma |
Steps to Run the Example
See Also
EPWM
Sample Output
Shown below is a sample output when the application is run,
EPWM DMA Test Started ...
EPWM DMA Test Passed!!
All tests have passed!!
EPWM DMA waveform