xWRL1432 MMWAVE-L-SDK  05.03.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 elapsed time.
  • Show usage of ePWM APIs

Supported Combinations

Parameter Value
CPU + OS m4fss0-0 freertos
Toolchain ti-arm-clang
Boards xWRL1432-evm
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
  • Use any kind of logic analyzers etc. to probe ePWM output on pin configured as per Syscfg

See Also

EPWM

Sample Output on CCS Console

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!!