time
RTICPUC0
NTUx
RTIUC0
RTITBLCOMP
RTITBHCOMP
Active Edge
Detection
31 0
Timebase
≥
NTU
edge detect
≤
Timebase Low Compare
RTITBLCOMP
RTIUC0
31 0
Timebase High Compare
RTITBHCOMP
Control
RTIGCTRL
Control
RTITBCTRL
NTU0
NTU1
RTIFRC0
Control
RTITBCTRL
In
c
re
m
e
n
t
b
y
1
Control
RTITBCTRL
Interrupt
TBINT
Module Operation
589
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
Real-Time Interrupt (RTI) Module
Figure 17-4. Timebase Control
17.2.4.1 Detecting Clock Edges
To detect clock edges on the NTUx signal, the timebase low compare has to be set lower or equal than
the value stored in the RTICPUC0 register and the timebase high compare has to be set higher than 0
and lower than the timebase low compare value. This effectively opens a window in which an edge of the
NTUx signal is expected (see
). Outside this window, no edges will be detected. If no edge will
occur inside the detection window, the multiplexer is switched to internal timebase. The application can
select to generate a timebase interrupt (TBINT) and if the INC bit is set, also will automatically increment
RTIFRC0 by one to compensate for the missed clock cycle of NTUx. If an edge occurs inside the window,
RTIUC0 will be reset to synchronize the two timebases.
In order to make the edge detection work properly, the value in RTICPUC0 needs to be adapted so that
RTIUC0 has a similar period as NTUx.
NOTE:
To ensure the NTUx signal is properly detected, the NTUx period must be at least twice as
long as the RTICLK period.
Figure 17-5. Clock Detection Scheme