MC68332
SYSTEM INTEGRATION MODULE
USER’S MANUAL
4-7
Figure 4-3 Periodic Interrupt Timer and Software Watchdog Timer
4.2.11 Periodic Interrupt Timer
The periodic interrupt timer allows the generation of interrupts of specific priority at pre-
determined intervals. This capability is often used to schedule control system tasks
that must be performed within time constraints. The timer consists of a prescaler, a
modulus counter, and registers that determine interrupt timing, priority and vector as-
signment. Refer to
SECTION 5 CENTRAL PROCESSING UNIT
for further information
about interrupt exception processing.
The periodic interrupt modulus counter is clocked by a signal derived from the buffered
crystal oscillator (EXTAL) input pin unless an external frequency source is used. The
value of the periodic timer prescaler (PTP) bit in the periodic interrupt timer register
(PITR) determines system clock prescaling for the watchdog timer. One of two op-
tions, either no prescaling, or prescaling by a factor of 512, can be selected. The value
of PTP is affected by the state of the MODCLK pin during reset, as shown in
. System software can change PTP value.
Either clock signal (EXTAL or EXTAL
÷
512) is divided by four before driving the mod-
ulus counter (PITCLK). The modulus counter is initialized by writing a value to the pe-
riodic timer modulus (PITM) field in the PITR. A zero value turns off the periodic timer.
When the modulus counter value reaches zero, an interrupt is generated. The modu-
lus counter is then reloaded with the value in PITM and counting repeats. If a new val-
ue is written to PITR, it is loaded into the modulus counter when the current count is
completed.
Table 4-5 MODCLK Pin and
PTP Bit at Reset
MODCLK PTP
0 (External Clock)
1 (
÷
512)
1 (Internal Clock)
0 (
÷
1)
CLOCK
DISABLE
PRESCALER (2
9
)
CLOCK
MUX
EXTAL
LPSTOP
SWP
PTP
FREEZE
SWCLK
PITCLK
PRECLK
2
9
÷
4
RESET
PIT
INTERRUPT
PITR
SWT1
SWT0
SWE
15 STAGE
DIVIDER CHAIN (2
15
)
2
11
2
13
2
15
8-BIT MODULUS
PIT BLOCK
COUNTER
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..