Introduction
EPWM Valley Switching
This example configures ePWMx as follows
- ePWMx with DCAEVT1 forcing the ePWM output LOW
- GPIO_A is used as the input to the INPUT XBAR INPUT1
- INPUT1 (from INPUT XBAR) is used as the source for DCAEVT1
- GPIO_B is set to output and toggled in the main loop to trip the PWM
- ePWMx with DCBEVT1 forcing the ePWM output LOW
- GPIO_A is used as the input to the INPUT XBAR INPUT1
- INPUT1 (from INPUT XBAR) is used as the source for DCBEVT1
- GPIO_B is set to output and toggled in the main loop to trip the PWM
- DCBEVT1 uses the filtered version of DCBEVT1
- The DCFILT signal uses the valley switching module to delay the
- DCFILT signal by a software defined DELAY value.
Block Diagram for EPWM Valley Switching example
External Connections
- For AM263x-CC
- GPIO48 is connected to GPIO122.
- EPWM0_A and EPWM0_B pin can be connected to an oscilloscope to view the waveform.
- For AM263x-LP
- GPIO11 is connected to GPIO12.
- EPWM1_A and EPWM1_B pin can be connected to an oscilloscope to view the waveform.
AM263X-CC
When using AM263x-CC with TMDSHSECDOCK (HSEC180 controlCARD Baseboard Docking Station)
- Connect HSEC Pin 52 to HSEC Pin 72
- Capture waveform on HSEC Pin 49 for epwm0_A
- Capture waveform on HSEC Pin 51 for epwm0_B
AM263X-LP
- Connect boosterpack header J1/J3 pin 7 to J2/J4 pin 18
- 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_valley_switching |
Steps to Run the Example
- When using CCS projects to build, import the CCS project for the required combination and build it using the CCS project menu (see Using SDK with CCS Projects).
- When using makefiles to build, note the required combination and build using make command (see Using SDK with Makefiles)
- Establish connections as mentioned in External Connections section
- Launch a CCS debug session and run the executable, see CCS Launch, Load and Run
See Also
EPWM
Sample Output
Shown below is a sample output when the application is run,
EPWM Valley Switching Test Started ...
EPWM Valley Switching Test Passed!!
All tests have passed!!
EPWM Valley Switching waveform