AM263Px MCU+ SDK: EPWM XCMP EDMA

| AM263Px MCU+ SDK 26.00.00 |

EPWM XCMP EDMA

# Introduction

EPWM XCMP Multiple Edges

Example Description : The Example demonstrates xcmp shadow set registers of EPWMs to be loaded with EDMA, post period and duty calculations. Xcmp shadow values are calculated and populated in an array in TCM memory, whilst EDMA channels are configured for the transfer of these set of values to the Shadow sets of the EPWMs, xlinked with xload register.

EDMA Configurations :

1. Each EPWM xcmp shadow set has 1 EDMA channel configured, in AB synchronized mode.
2. All the EDMA channels except for the last are chained to their previous channel transfers so that, 1 manual trigger can trigger all the params
3. Last EDMA channel has interrupt enabled for the intermediate and final transfers

Shadow sets 2,3 are set to repeat 5 times each.

EPWM XCMP DMA Block Diagram

# External Connections

connect the following EPWM outputs to an oscilloscope to view the waveform.

## AM263Px-CC E1 or AM261x-SOM

- EPWM0_A and EPWM0_B pin ie, HSEC 49, HSEC 51.
- EPWM1_A and EPWM1_B pin ie, HSEC 53, HSEC 55.
- EPWM2_A and EPWM2_B pin ie, HSEC 50, HSEC 52.
- EPWM3_A and EPWM3_B pin ie, HSEC 54, HSEC 56.
- EPWM4_A and EPWM4_B pin ie, HSEC 57, HSEC 59.

## AM263Px-LP

- EPWM0_A and EPWM0_B pin ie, J4 11 / J8 59.
- EPWM1_A and EPWM1_B pin ie, J2 37 / J2 38.
- EPWM2_A and EPWM2_B pin ie, J2 39 / J2 40.
- EPWM3_A and EPWM3_B pin ie, J8 77 / J8 78.
- EPWM9_A and EPWM9_B pin ie, J8.75 / J8.76.

## AM261x-LP

- EPWM5_A/B pin ie, J6 80/ J6 79.
- EPWM6_A/B pin ie, J6 78/ J6 77.
- EPWM2_A/B pin ie, J2 40/ J2 39.
- EPWM3_A/B pin ie, J2 38/ J2 37.
- EPWM4_A/B pin ie, J2 36/ J2 35.

# Supported Combinations

Parameter | Value
--- | ---
CPU + OS | r5fss0-0 nortos
Toolchain | ti-arm-clang
Board | am263px-cc, am263px-lp
Example folder | examples/drivers/epwm/epwm_xcmp_dma

# 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 XCMP EDMA Test Started ...
EPWM XCMP EDMA Test Passed!!
All tests have passed!!

EPWM XCMP DMA waveform