timer_clock
pi_eventcapt
eventcapt_resync
capt_pulse
int_serve
clear_trig
FSM State
tcar1_enable
TCRR
TCAR1
TCAR2
UN-LOCKED
LOCKED1
UN-LOCKED
LOCKED1
UN-LOCKED
NEW_VA
NO CHANGE
NEW_VALUE
NEW_VALUE
Capture ignored
Capture ignored
DMTimer
Rising transition, falling transition or both can be selected in TCLR (TCM bit) to trig the timer counter
capture. The module sets the IRQSTATUS (TCAR_IT_FLAG bit) when an active transition is detected and
at the same time the counter value TCRR is stored in one of the timer capture registers TCAR1 or TCAR2
as follows:
•
If TCLR’s CAPT_MODE field is 0 then, on the first enabled capture event, the value of the counter
register is saved in TCAR1 register and all the next events are ignored (no update on TCAR1 and no
interrupt triggering) until the detection logic is reset or the interrupt status register is cleared on TCAR’s
position writing a 1 in it.
•
If TCLR’s CAPT_MODE field is 1 then, on the first enabled captured event, the counter value is saved
in TCAR1 register and, on the second enabled capture event, the value of the counter register is saved
in TCAR2 register. All the other events are ignored (no update on TCAR1/2 and no interrupt triggering)
until the detection logic is reset or the interrupt status register is cleared on TCAR’s position writing a 1
in it. This mechanism is useful for period calculation of a clock if that clock is connected to the
PIEVENTCAPT input pin.
The edge detection logic is reset (a new capture is enabled) when the active capture interrupt is served -
TCAR_IT_FLAG bit of IRQSTATUS (previously 1) is cleared. The timer functional clock (input to
prescaler) is used to sample the input pin (PIEVENTCAPT). Input negative or positive pulse can be
detected when pulse time is above functional clock period. An interrupt can be issued on transition
detection if the capture interrupt enable bit is set in the Timer Interrupt Enable Register IRQENABLE_SET
(TCAR_IT_FLAG bit).
In
, the TCM value is 01 and CAPT_MODE is 0 - only rising edge of the PIEVENTCAPT will
trigger a capture in TCAR and only TCAR1 will update.
In
, the TCM value is 01 and CAPT_MODE is 1 - only rising edge of the PIEVENTCAPT will
trigger a capture in TCAR1 on first enabled event and TCAR2 will update on the second enabled event.
Figure 20-5. Capture Wave Example for CAPT_MODE = 0
3558
Timers
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated