AM261x MCU+ SDK: DAC Synced by EPWM

| AM261x MCU+ SDK 26.00.00 |

DAC Synced by EPWM

# Introduction

The DAC Shadow value syncs to DAC Active Value from EPWM Event. The EPWM Peripheral can send out a EPWMSYNCPER signal, on certain events,(check syscfg, under timebase submodule for more details on events) which may be used by the DAC peripheral to sync its shadow to active register transfers. The example showcases this in the EPWM ISR, where the event for sync signal and the event for the interrupt are same. now, if there is a new shadow value set, it wouldn't reflect in the active until the next ISR iteration. and similarly, the last set shadow value would appear in the active register of the DAC.

Note that, the events for EPWMSYNCPER signal and the Interrupt signal from EPWM are not dependant, in other words, the EPWMSYNCPER may be configured without the need to configure the INT signal from the EPWM.

## Configurations

- DAC loadmode is set to the EPWM SYNC PER signal.
- EPWM SYNCPER signal is generated at its counter equals to period event
- EPWM INT is generated at its counter equals to period event. routed via INT Xbar 0

## External connections

The status Pin, EPWM output A, DAC output may be probed to view the waveforms

### On AM263x-CC or AM263Px-CC with HSEC dock

- Probe the HSEC Pin 9 for DAC output.
- Probe the HSEC Pin 49 for EPWM A output.
- Probe the HSEC Pin 51 for STATUS (GPIO 44) output.

### On AM263x-LP or AM263Px-LP,

- Probe the J3 Pin 30
- Probe the J4 Pin 11 for EPWM A output.
- Probe the J8 Pin 59 for STATUS (GPIO 44) output.

### On AM261x-LP,

- Probe the J3 Pin 30
- Probe the J4 Pin 40 for EPWM A output.
- Probe the J4 Pin 39 for STATUS (GPIO 48) output.

# Supported Combinations

Parameter | Value
--- | ---
CPU + OS | r5fss0-0 nortos
Toolchain | ti-arm-clang
Board | am261x-som, am261x-lp
Example folder | examples/drivers/dac/dac_epwm_sync/

# 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
- Use an Oscilloscope to view the ramp wave on DAC output pin.

# See Also

DAC

# Sample Output

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

EPWM synced DAC Test Started ...
EPWM synced DAC Test Passed!!
All tests have passed!!

Sample Output