SPRUIZ1B July 2023 – August 2024 TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-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.