AM261x MCU+ SDK: ECAP APWM Phase Shift

| AM261x MCU+ SDK 26.00.00 |

ECAP APWM Phase Shift

# Introduction

ECAP APWM Phase Shift Feature.

This example showcases the phase shift feature of the ECAP.

Configurations,

1. EPWM and 2 ECAPs (in APWM mode) are configured for period of 5000 SYSCLKs
2. ECAPs are configured for Duty of 50% Active High PWM.
3. ECAP 0 has phase shift value of 0, where are the ECAP1 has phase shift value of 2500.
4. Output Xbars are used for routing the ECAP APWM output

# External Connections

Observe ECAP outputs on the Outputxbar instances

## AM263x

- CC E2, outputxbar 7,8 showcase ecap0,1 apwm outs respectively on HSEC pins 85 and 87
- LP, outputxbar 7,8 showcase ecap0,1 apwm outs respectively on J5.49, J5.50

## AM263Px

- CC E2, outputxbar 7,8 showcase ecap0,1 apwm outs respectively on HSEC pins 85 and 87
- LP, outputxbar 7,8 showcase ecap0,1 apwm outs respectively on J5.49, J5.50

## AM261x

- LP, outputxbar 1,5, showcase ecap 0,1 apwm outs respectively on J1.5, J5.48
- SOM E1, outputxbar 5,6 showcase ecap0,1 apwm outs respectively on HSEC pins 76 and 78

# Supported Combinations

Parameter | Value
--- | ---
CPU + OS | r5fss0-0 nortos
Toolchain | ti-arm-clang
Boards | am261x-som, am261x-lp
Example folder | examples/drivers/ecap/ecap_apwm_phase_shift/

# 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

ECAP

# Sample Output

Shown below is a sample output when the application is run,

ECAP APWM Phase Shift Test Started ...
ECAP APWM Phase Shift Test Passed!!
All tests have passed!!

Sample Output