Introduction
This example uses the ECAP in APWM mode to generate a PWM signal.
The example does the below
- Configures ECAP in APWM mode and configures values in period and compare registers.
- Waits for the specified time using the ECAP ISR.
External Connections
Connect OUTPUTXBAR1 output to oscilloscope
AM263PX-CC
When using AM263x-CC with TMDSHSECDOCK (HSEC180 controlCARD Baseboard Docking Station)
- Connect HSEC Pin 85 to oscilloscope
AM263PX-LP
When using AM263x-LP
- Connect boosterpack header J6/J8 Pin 50 to oscilloscope
AM263X-CC
When using AM263x-CC with TMDSHSECDOCK (HSEC180 controlCARD Baseboard Docking Station)
- Connect HSEC Pin 81 to oscilloscope
AM263X-LP
When using AM263x-LP
- Connect boosterpack header J6/J8 Pin 58 to oscilloscope
AM261X-LP
When using AM261x-LP
- Connect boosterpack header J6/J8 Pin 51 to oscilloscope
AM261X-SOM E1
When using AM261x-SOM with TMDSHSECDOCK (HSEC180 controlCARD Baseboard Docking Station)
- Connect HSEC Pin 76 to oscilloscope
Supported Combinations
| Parameter | Value |
| CPU + OS | r5fss0-0 nortos |
| Toolchain | ti-arm-clang |
| Boards | am263px-cc, am263px-lp |
| Example folder | examples/drivers/ecap/ecap_apwm_mode/ |
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 APWM Mode Test Started ...
ECAP APWM Test Passed!!
All tests have passed!!