The Periodic Interrupt Timer - Motorola MPC823e Reference Manual

Microprocessor for mobile computing
Table of Contents

Advertisement

System Interface Unit

12.8 THE PERIODIC INTERRUPT TIMER

The periodic interrupt timer consists of a 16-bit counter clocked by a PITRTCLK clock
supplied by the clock module. It decrements to zero when loaded with a value from the
periodic interrupt timer count register (PITC) and after the timer reaches zero, the PS bit is
set and an interrupt is generated if the PIE bit is a logic 1. At the next input clock edge, the
value in the PITC register is loaded into the counter and the process starts all over again.
When a new value is loaded into the PITC register, the periodic interrupt timer is updated,
the divider is reset, and the counter starts counting. If the PS bit is not cleared, it generates
an interrupt at the interrupt controller and the interrupt remains pending until it is cleared. If
the PS bit is set again, prior to being cleared, the interrupt remains pending until the PS bit
is cleared. Any write to the PITC register stops the current countdown and the count
resumes with a new value in the PITC. If the PTE bit is not set, the periodic interrupt timer
is unable to count and retains the old count value. Reads of the periodic interrupt timer have
no effect on it.
PTE
CLOCK
PITRTCLK
DISABLE
CLOCK
FRZ
Figure 12-5. Periodic Interrupt Timer Block Diagram
The timeout period is calculated as:
Solving this equation using a 32.768kHz external clock gives:
This gives a range from 122 microseconds with a PITC of 0x0000 to a maximum of 8
seconds with a PITC of 0xFFFF.
12-22
PITC
16-BIT
MODULUS
COUNTER
PITC 1
+
PITC 1
PIT
=
------------------------ -
=
----------------------------------------------------------- -
period
F
ExternalClock
pitrtclk
----------------------------------------- -
1or128
PITC 1
+
PITperiod
=
------------------------ -
8192
MPC823e REFERENCE MANUAL
PS
PIE
+
÷
4
PIT
INTERRUPT
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents