AM263x MCU+ SDK  09.02.00
EPWM HR Phase Shift SFO

Introduction

This example modifies the MEP control registers to show edge displacement for high-resolution phase shift with ePWM in Up count mode due to the HRPWM control extension of the respective ePWM module.

Block diagram

External Connections

  • EPWM0_A, EPWM1_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 HSEC 49 for epwm0_A
  • Connect HSEC 53 for epwm1_A

Supported Combinations

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

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 High Resolution Phase Shift Test Started ...
Please observe pins HSEC 49 and HSEC 53
High Resolution Phase 14.39 degree. (shift = 20.000 nanoseconds)
EPWM1 PHS = 6, PHSHR = 0
Calibration... Running...
High Resolution Phase 14.54 degree. (shift = 20.208 nanoseconds)
EPWM1 PHS = 7, PHSHR = 246
Calibration... Running...
High Resolution Phase 14.69 degree. (shift = 20.416 nanoseconds)
EPWM1 PHS = 7, PHSHR = 235
Calibration... Running...
High Resolution Phase 14.84 degree. (shift = 20.624 nanoseconds)
EPWM1 PHS = 7, PHSHR = 225
Calibration... Running...
High Resolution Phase 14.99 degree. (shift = 20.833 nanoseconds)
EPWM1 PHS = 7, PHSHR = 214
Calibration... Complete
SFO status=1 , MEP_ScaleFactor=45
High Resolution Phase 15.14 degree. (shift = 21.041 nanoseconds)
EPWM1 PHS = 7, PHSHR = 203
Calibration... Running...
High Resolution Phase 15.29 degree. (shift = 21.249 nanoseconds)
EPWM1 PHS = 7, PHSHR = 193

Expected output