168
CHAPTER 5 TIMEBASE TIMER
5.4
Timebase Timer Interrupt
The timebase timer can generate an interrupt request when an overflow occurs on the
specified bit of the timebase counter (for the interval timer function).
s Interrupts for Interval Timer Function
The counter counts-up on the internal count clock. When an overflow occurs on the selected
interval timer bit, the overflow interrupt request flag bit (TBTC: TBOF) is set to "1". At this time,
an interrupt request (IRQ7) to the CPU is generated if the interrupt request enable bit is enabled
(TBTC: TBIE ="1"). Write "0" to the TBOF bit in the interrupt processing routine to clear the
interrupt request. The TBOF bit is set when at the specified counter bit overflows, regardless of
the TBIE bit value.
Check:
When enabling an interrupt request output (TBIE = "1") after wake-up from a reset, always
clear the TBOF bit (TBOF = "0") at the same time.
Notes:
An interrupt request is generated immediately if the TBOF bit is "1" when the TBIE bit is
changed from disabled to enabled ("0" --> "1").
The TBOF bit is not set if the counter is cleared (TBTC: TBR = "0") at the same time as an
overflow on the specified bit occurs.
s Oscillation Stabilization Delay Time and Timebase Timer Interrupt
If the interval time is set shorter than the main clock oscillation stabilization delay time, an
interval interrupt request from the timebase timer (TBTC: TBOF = "1") is generated at the time
when the main clock mode starts operation. In this case, disable the timebase timer interrupt
when changing to a mode in which the main clock oscillation is stopped (main stop mode and
subclock mode).
s Register and Vector Table for Timebase Timer Interrupts
Reference:
See Section 3.4.2 "Interrupt Processing" for details on the operation of interrupt.
Table 5.4-1 Register and Vector Table for Timebase Timer Interrupt
Interrupt
Interrupt level settings register
Vector table address
Register
Set bit
Upper
Lower
IRQ7
ILR2(007DH)
L71 (Bit 7)
L70 (Bit 6)
FFECH
FFEDH