
123
5.5 Explanation of Operations of Timebase Timer Functions
5.5
Explanation of Operations of Timebase Timer Functions
The timebase timer functions as an interval timer or supplies clocks to some
peripherals.
s Operations of Interval Timer Function (timebase timer)
To use as an interval timer, the settings shown below must be made.
Figure 5.5-1 Setting Interval Timer Function
The counter in the timebase counter continues to count up in synchronization with the internal
count clock (at the oscillation frequency divided by two) so long as the clock oscillates.
The counter counts from 0 upon being cleared (TBR = 0). When the interval timer bit overflows,
the overflow interrupt request flag bit (TBOF) is set to 1.
In other words, interrupts are
generated at specified intervals, starting from when the counter is cleared.
s Operations of Clock Supply Function
The timebase timer is often used to make time for stabilizing an oscillation. The oscillation
stabilization time is measured from when the timebase timer counter is cleared to when the
oscillation stabilization time bit overflows. One of three oscillation stabilization times can be
selected by the oscillation stabilization time selection bits of the system clock control register
(SYCC : WT1, WT0).
The timebase timer supplies clocks to the watchdog timer and A/D converter.
Clearing the
timebase timer counter affects the operation of continuous activation cycles. In addition, when
the timebase timer is cleared, the counter in the watchdog timer is also cleared.
s Operations of Timebase Timer
Figure 5.5-2 "Operations of Timebase Timer" shows the operation of the timebase timer when:
power-on reset occurs.
sleep mode is entered while the interval timer function is being performed in normal mode.
stop mode is entered.
a counter clear request is generated.
In stop mode, the timebase timer is cleared and stops operating. When returning from stop
mode, the timebase timer counts the oscillation stabilization time.
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
TBTC
TBOF TBIE
TBC1 TBC0 TBR
"0"
1
0
"1"
"0"
: Bits used
: Set to 1
: Set to 0