169
5.5 Operation of Timebase Timer
5.5
Operation of Timebase Timer
The timebase timer has the interval timer function and the clock supply function for
some peripherals.
s Operation of Interval Timer Function (Timebase Timer)
Figure 5.5-1 "Interval Timer Function Settings" shows the settings required to operate the
interval timer function.
Figure 5.5-1 Interval Timer Function Settings
Provided the main clock is oscillating, the timebase timer counter continues to count-up in sync
with the internal count clock (divide-by-two main clock source oscillation).
After being cleared (TBR = "0"), the counter restarts counting-up from zero. The timebase timer
sets the overflow interrupt request flag bit (TBOF) to "1" when an overflow occurs on the interval
timer bit. Consequently, the timebase timer generates interrupt requests at fixed intervals (the
selected interval time), based on the time that the counter is cleared.
s Operation of Clock Supply Function
The timebase timer is also used as a timer to generate the main clock oscillation stabilization
delay time. The time from when the timebase timer counter is cleared and starts counting-up
until an overflow occurs on the oscillation stabilization delay time bit is the oscillation
stabilization delay time. One of four possible delay times is selected by the oscillation
stabilization delay time bits of the system clock control register (SYCC: WT1, WT0).
The timebase timer also provides the clock for the watchdog timer and buzzer output, A/D
converter, and LCD controller/driver. Clearing the timebase timer counter affects the operation
of the continuous activation cycle of the A/D converter, the frame cycle of the LCD controller/
driver, and the buzzer output. If the timebase timer output is selected by the watchdog timer
counter (WDTC: CS=0), it will also be cleared simultaneously.
s Operation of Timebase Timer
The state of following operations are shown in Figure 5.5-2 "Operation of Timebase Timer".
A power-on reset occurs.
Changes to sleep mode during operation of the interval timer function in the main clock
mode.
Changes to main stop mode.
A counter clear request occurs.
The timebase timer is cleared by changing to subclock and main stop modes, and stops
operation. The timebase timer counts the oscillation stabilization delay time after wake-up from
subclock and main stop modes.
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
TBTC
TBOF
TBIE
—
TBC1
TBC0
TBR
01
0
: Used bit
1 : Set "1".
0 : Set "0".