Introduction
This example uses the ECAP in capture mode to capture PWM.
The example does the below
- Configures ECAP in Capture mode and captures the epwm output.
- It captures the time between the rising and falling edge of epwm output.
___________________ _____________ __________________
| | | | | |
| EPWM |---GPIO---| I/P XBAR |---I/P MUX---| ECAP |---INT XBAR
|_________________| |___________| |________________|
External Connections
AM263X-CC
No external connection is required.
AM263X-LP
No external connection is required.
Supported Combinations
Parameter | Value |
CPU + OS | r5fss0-0 nortos |
Toolchain | ti-arm-clang |
Boards | am263x-cc, am263x-lp |
Example folder | examples/drivers/ecap/ecap_capture_pwm/ |
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
ECAP
Sample Output
Shown below is a sample output when the application is run,
ECAP Capture Pwm Test Started ...
Interrupt No.: 10 and Pass Count: 10
ECAP Capture Pwm Passed!!
All tests have passed!!