AM243x MCU+ SDK  08.02.00
EPWM Duty Cycle

Introduction

This example generates a signal for a specified time and duty cycle using ePWM module. The time and duty cycle can be configured by the user.

The example does the below

  • Configures ePWM0 to generate a 1KHz signal with 25% duty cycle for 60 seconds.
  • Output channel A is used in the example.
  • The parameters frequency, duty cycle and application run time are configurable by the user.
  • Deadband submodule and chopper submodule are entirely bypassed in this example.
  • ISR is used to keep track of keep track of elapsed time.
  • Show usage of ePWM APIs

AM243X-EVM

  • To probe ePWM output you need to have IO breakout board..
  • Short Pin 2 and 3 of J11 on IO break out board.
  • Signal can be probed on Pin 7 of J6 on IO break out board.

AM243X-LP

  • Signal can be probed on Pin 1 of J2 header on am243x-lp board. You need to probe J4 Pin 40 which corresponds to Pin 1 of J2 header.

Supported Combinations

Parameter Value
CPU + OS r5fss0-0 nortos
r5fss0-0 freertos
Toolchain ti-arm-clang
Boards am243x-evm, am243x-lp
Example folder examples/drivers/epwm/epwm_duty_cycle/

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)
  • Launch a CCS debug session and run the executable, see CCS Launch, Load and Run
  • To probe the ePWM output please refer setup details as mentioned above in Introduction section

See Also

EPWM

Sample Output

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

EPWM Duty Cycle Test Started ...
App will wait for 60 seconds (using PWM period ISR) ...
EPWM Duty Cycle Test Passed!!
All tests have passed!!