AM261x MCU+ SDK: EPWM trip zone

| AM261x MCU+ SDK 26.00.00 |

EPWM trip zone

# Introduction

The difference could be seen in the waveform generated as shown below. We can see that the for OSHT, as long as we kept clearing the flag (i.e. for 10 times) it recovered. Once loop exits, it goes into permanent trip state.

For CBC as observed at the end, after exiting the loop, it recovers from trip state and goes to active state.

# External Connections

- For AM261x-SOM:
  - GPIO48 is connected to GPIO122
  - EPWM2_A and EPWM3_A pin can be connected to an oscilloscope to view the waveform.
- For AM261x-LP:
  - GPIO5 is connected to GPIO6
  - EPWM2_A and EPWM3_A pin can be connected to an oscilloscope to view the waveform.

## AM261X-SOM

When using AM261x-SOM with TMDSHSECDOCK (HSEC180 controlCARD Baseboard Docking Station)

- Connect HSEC Pin 52 to HSEC Pin 72
- Connect HSEC Pin 50 to scope for epwm2_A
- Connect HSEC Pin 54 to scope for epwm3_A

## AM261X-LP

- Connect boosterpack header J6/J8 pin 52 to J6/J8 pin 53
- Connect J2/J4 pin 40 and 38 to scope

# Supported Combinations

Parameter | Value
--- | ---
CPU + OS | r5fss0-0 nortos
Toolchain | ti-arm-clang
Board | am261x-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