AM263Px MCU+ SDK  11.00.00
CMPSS Asynchronous trip

Introduction

A CMPSS example that enables the CMPSS High comparator and feeds the asynchronous output to GPIO and EPWM

This example enables the CMPSSA1 COMPH comparator and feeds the asynchronous CTRIPOUTH signal to the XBAROUT0 (XBAROUT8 in case of AM263PX) pin and CTRIPH to EPWM0B (EPWM2B in case of AM261x-LP).

Block diagram

CMPSS is configured to generate trip signals to trip the EPWM signals. CMPIN1P is used to give positive input and internal DAC is configured to provide the negative input. Internal DAC is configured to provide a signal at VDD/2. An EPWM signal is generated at EPWM0B (EPWM2B in case of AM261x-LP) and is configured to be tripped by CTRIPOUTH.

When a low input(VSS) is provided to CMPIN1P,

  • Trip signal(XBAROUTx) output is low
  • EPWM0B (EPWM2B in case of AM261x-LP) gives a PWM signal

When a high input(higher than VDD/2) is provided to CMPIN1P,

  • Trip signal(XBAROUTx) output turns high
  • EPWM0B (EPWM2B in case of AM261x-LP) gets tripped and outputs as high

External Connections

  • Give input on CMPIN1P
  • Outputs can be observed on XBAROUT0(XBAROUT8 in case of AM263PX) and EPWM0B (EPWM2B in case of AM261x-LP) using an oscilloscope

AM263PX-CC E2 or AM263X-CC E2 or AM261X-SOM

When using AM263x-CC or AM263Px-CC or AM261x-SOM with TMDSHSECDOCK (HSEC180 controlCARD Baseboard Docking Station)

  • Feed analog input on HSEC Pin 15
  • Capture and analyze waveforms on USER_LED1 and HSEC pin 51

AM263PX-LP or AM263X-LP

When using AM263x-LP or AM263PX-LP

  • Feed analog input on J5/J6 Pin 66
  • Capture and analyze waveforms on DS2 LED and boosterpack header J6/J8 pin 59

AM261x-LP

When using AM261x-LP

  • Feed the Analog input on J7 Pin 63
  • Capture the Trip out on OUTXBAR OUT 0 ON GPIO1 or J8 Pin 51
  • Capture the EPWM output on J7 Pin 39

Supported Combinations

Parameter Value
CPU + OS r5fss0-0 nortos
Toolchain ti-arm-clang
Boards am263px-cc, am263px-lp
Example folder examples/drivers/cmpss/cmpss_asynchronous_trip/

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
  • When a low input is provided, Trip signal output is low and EPWM gives a PWM waveform
  • When a high input(higher than VDD/2) is provided, Trip signal output turns high and EPWM gets tripped

See Also

CMPSS

Sample Output

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

[Cortex_R5_0] CMPSS asynchronous trip Test Started ...
CMPSS asynchronous trip Test Passed!!!All tests have Passed!!!CMPSS asynchronous trip Test Started ...
CTRIP signal is asserted
CTRIP signal is asserted
CTRIP signal is asserted
CTRIP signal is asserted
CTRIP signal is asserted
CTRIP signal is asserted
CTRIP signal is asserted
CTRIP signal is asserted
CTRIP signal is asserted
CTRIP signal is asserted
CTRIP signal is asserted
CTRIP signal is asserted
CTRIP signal is asserted
CTRIP signal is asserted
CTRIP signal is asserted
CMPSS asynchronous trip Test Passed!!!All tests have Passed!!!