SPRUIZ1B July 2023 – August 2024 TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1
FILE: epwm_ex16_event_detection.c
(Note - base frequency and duty cycle of all ePWM's are 50 KHz and 50% respectively. Value of TBPRD = 1999) This example configures ePWM1 and ePWM2 in identical fashion with XCMP1-8 allocated to channel A. No shadow registers are used.
External Connections
CAPIN and CAPGATE signals are both sourced as Trip4 for ePWM1 and Trip5 for ePWM2. Trip4 and Trip5 are routed from the INPUT X-BAR through EPWM-XBAR which feeds into the Digital Compare submodule. CAPEVT signal is used as Tripout and Trip-Zone interrupt source.
For ePWM1, Trip-Zone ISR configured to make LED1 blink 1 second on/off. For ePWM2, Trip-Zone ISR configured to make LED2 turn on if an interrupt ever occurs.