SPRUHM8K December 2013 – May 2024 TMS320F28374D , TMS320F28375D , TMS320F28376D , TMS320F28377D , TMS320F28377D-EP , TMS320F28377D-Q1 , TMS320F28378D , TMS320F28379D , TMS320F28379D-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.