Timing System
Real-Time Interrupt (RTI)
MC68HC11E Family
—
Rev. 4
Technical Data
MOTOROLA
Timing System
199
9.6 Real-Time Interrupt (RTI)
The real-time interrupt (RTI) feature, used to generate hardware
interrupts at a fixed periodic rate, is controlled and configured by two bits
(RTR1 and RTR0) in the pulse accumulator control (PACTL) register.
The RTII bit in the TMSK2 register enables the interrupt capability. The
four different rates available are a product of the MCU oscillator
frequency and the value of bits RTR[1:0]. Refer to
Table 9-5
, which
shows the periodic real-time interrupt rates.
The clock source for the RTI function is a free-running clock that cannot
be stopped or interrupted except by reset. This clock causes the time
between successive RTI timeouts to be a constant that is independent
of the software latencies associated with flag clearing and service. For
this reason, an RTI period starts from the previous timeout, not from
when RTIF is cleared.
Every timeout causes the RTIF bit in TFLG2 to be set, and if RTII is set,
an interrupt request is generated. After reset, one entire RTI period
elapses before the RTIF is set for the first time. Refer to the
9.5.9 Timer
Interrupt Mask 2 Register
,
9.6.2 Timer Interrupt Flag Register 2
, and
9.6.3 Pulse Accumulator Control Register
.
Table 9-5. RTI Rates
RTR[1:0]
E = 3 MHz
E = 2 MHz
E = 1 MHz
E = X MHz
0 0
2.731 ms
4.096 ms
8.192 ms
(E/2
13
)
0 1
5.461 ms
8.192 ms
16.384 ms
(E/2
14
)
1 0
10.923 ms
16.384 ms
32.768 ms
(E/2
15
)
1 1
21.845 ms
32.768 ms
65.536 ms
(E/2
16
)