AM62x MCU+ SDK  09.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

AM62X-SK

  • Signal can be probed on Pin 24 of User Expansion Connector (J3) on the board.
  • EPWM Signal: A13/GPIO1_15 (Pin_24)

AM62X-SK-LP

  • Signal can be probed on Pin 24 of User Expansion Connector (J3) on the board.
  • EPWM Signal: C11/GPIO1_15 (Pin_24)

AM62X-SK-SIP

  • Signal can be probed on Pin 24 of User Expansion Connector (J3) on the board.
  • EPWM Signal: A13/GPIO1_15 (Pin_24)

Supported Combinations

Parameter Value
CPU + OS m4fss0-0 freertos
Toolchain ti-arm-clang
Board am62x-sk, am62x-sk-lp, am62x-sip-sk
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!!