CHAPTER 5 Timebase timer
5.5
Explanation of Operations of Timebase Timer Functions
The timebase timer operates as an interval timer or an oscillation stabilization wait time
timer. It also supplies a clock to peripherals.
I Interval Timer Function
Interrupt generation at every interval time enables the timebase timer to be used as an interval timer.
Operating the timebase timer as an interval timer requires the settings shown in Figure 5.5-1.
G
Setting of timebase timer
Timebase timer control register
(TBTC)
-: Unused bit
: Used bit
0 : Set to "0".
1 : Set to "1".
G
Operations of the Interval Timer Functions
The timebase timer can be used as an interval timer by generating an interrupt at every set interval time.
• The timebase timer continues incrementing in synchronization with the main clock (a half frequency of
the oscillation clock) while the oscillation clock is active.
• When the timebase timer counter reaches the interval time set by the interval time select bits in the
timebase timer control register (TBTC: TBC1, TBC0), it causes an overflow (carrying) and the overflow
interrupt request flag bit (TBTC: TBOF) is set to "1".
• When the overflow interrupt request flag bit is set (TBTC: TBOF = 1) with interrupts enabled (TBTC:
TBIE = 1), an interrupt request is generated.
Note:
The interval time may be longer than the one set by clearing the timebase timer counter.
200
Figure 5.5-1 Setting of timebase timer
bit15 14 13 12 11 10
-
-
TBIE TBOF
Reserved
1
9 bit8
TBR
TBC1TBC0
0
0