SPRUJ53B April 2024 – September 2024 TMS320F28P550SJ , TMS320F28P559SJ-Q1
FILE: clb_ex29_timestamp.c
This example displays how to timestamp interrupts generated by the CLB. An interrupt is generated when ePWM1 is tripped.
ePWM1 is configured to be interrupted by TZ1 and TZ2, both one shot trip sources.
The CLB is configured as follows:
TZ1 is tripped when GPIO12 is connected to GND. TZ2 is tripped when GPIO13 is connected to GND. When an interrupt occurs, the interrupt handler determines the initial trip source and stores this value in a variable 'initialTripZone'.
View these variables in Debug Expressions tab:
initialTripZone: stores the first TZ to have been tripped tz1Counter64bit: stores the counter value at the instant that TZ1 is tripped. tz2Counter64bit: stores the counter value at the instant that TZ2 is tripped.