System Interface Unit
MOTOROLA
MPC801 USER’S MANUAL
12-11
12
12.6 THE POWERPC TIMEBASE
The timebase (TB) is a PowerPC architecture defined timer facility. It is a 64-bit free-running
binary counter that is incremented at a frequency determined by each implementation of the
timebase. There is no interrupt or other indication generated when the count rolls over. The
timebase period depends on the driving frequency. For the MPC801, the timebase is
clocked by the tmbclk clock and the timebase period is:
The state of the timebase is unaffected by any resets and should be initialized by the
software. Reads and writes of the timebase are restricted to special instructions. For the
MPC801 implementation, it is not possible to read or write the entire timebase in a single
instruction. Therefore, the
mttb
and
mftb
instructions are used to move the lower half of the
timebase (TBL) while the
mttbu
and
mftbu
instructions are used to move the upper half of
the timebase (TBU). The timebase has four reference registers associated with it. A
maskable interrupt is generated when the timebase count reaches the value programmed
in one of the four reference registers and the two status bits indicate which of the four
reference registers generated the interrupt.
12.7 THE REAL-TIME CLOCK
The real-time clock (RTC) is a 45-bit counter that is clocked by the pitrtclk clock. It is used
to provide time-of-day indication to the operating system and application software. The
counter is not affected by reset and operates in all low-power modes. It is initialized by the
software. The real-time clock can be programmed to generate a maskable interrupt when
the time value matches the value programmed in the associated alarm register. It can also
be programmed to generate an interrupt once every second. A control and status register is
used to enable or disable the different functions and report the interrupt source. The
real-time clock related registers are “l(fā)ocked” after power-on reset. To enable a write action
to any of these registers, a previously open operation should be taken. For more information
refer to
Section 5.10.2 The Key Mechanism
.
COUNT VALUE
TIMEOUT
COUNT VALUE
TIMEOUT
0
1 microsecond
999999
1.0 second
9
10. microseconds
9999999
10.0 seconds
99
100. microseconds
99999999
100.0 seconds
999
1.0 millisecond
999999999
1000. seconds
9999
10.0 milliseconds
(hex) FFFFFFFF
4295 seconds
TTB
Ftmbclk
=