Introduction
This example configures ePWM1 and ePWM2 as follows
- ePWM1 has TZ1 as one shot trip source
- ePWM2 has TZ1 as cycle by cycle trip source
Initially tie TZ1 high. During the test, monitor ePWM1 or ePWM2 outputs on a scope. Pull TZ1 low to see the effect.
- ePWM1A is on GPIO43
- ePWM2A is on GPIO45
This example also makes use of the Input X-BAR. The external trigger pin is routed to the input X-BAR, from which it is routed to TZ1.
The TZ-Event is defined such that ePWM1A will undergo a One-Shot Trip and ePWM2A will undergo a Cycle-By-Cycle Trip.
External Connections
- GPIO60 is connected to GPIO64.
- EPWM9_A and EPWM10_A 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 FSI header (on ControlCard) pin 6 to pin 7
- Connect FSI header (on ControlCard) pin 8 to scope
- Connect FSI header (on ControlCard) pin 5 to scope
AM263X-LP
Supported Combinations
Parameter | Value |
CPU + OS | r5fss0-0 nortos |
Toolchain | ti-arm-clang |
Board | am263x-cc, am263x-lp |
Example folder | examples/drivers/epwm/epwm_trip_zone |
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
- When the trip input TZ is high, 2 EPWMs generate PWM waveforms.
- When trip input is pulled low , 2 EPWMs gets tripped.
See Also
EPWM
Sample Output
Shown below is a sample output when the application is run,
EPWM Trip Zone Test Started ...
TZ OST interrupt hit 1 times!!
TZ OST interrupt hit 2 times!!
TZ OST interrupt hit 3 times!!
TZ OST interrupt hit 4 times!!
TZ OST interrupt hit 5 times!!
TZ OST interrupt hit 6 times!!
TZ OST interrupt hit 7 times!!
TZ OST interrupt hit 8 times!!
TZ OST interrupt hit 9 times!!
TZ OST interrupt hit 10 times!!
TZ CBC interrupt hit 1 times!!
TZ CBC interrupt hit 2 times!!
TZ CBC interrupt hit 3 times!!
TZ CBC interrupt hit 4 times!!
TZ CBC interrupt hit 5 times!!
TZ CBC interrupt hit 6 times!!
TZ CBC interrupt hit 7 times!!
TZ CBC interrupt hit 8 times!!
TZ CBC interrupt hit 9 times!!
TZ CBC interrupt hit 10 times!!
EPWM Trip Zone Test Passed!!
All tests have passed!!
EPWM Trip Zone waveform