Programmable Interval Timer
16-6
Élan™SC520 Microcontroller User’s Manual
In this mode, the counter output behaves just as in mode 4, except for the triggering
mechanism. This mode is supported on PIT Channel 2 only.
16.5.5
Clocking Considerations
The PIT clock source can be either the derived 1.1882-MHz PIT clock or an external pin.
This is configured in the CLK_PIN_DIR bit in the Clock Select (CLKSEL) register (MMCR
offset C26h).
The PIT clock on the ÉlanSC520 microcontroller does not run at 1.19318 MHz, as in
PC/AT-compatible systems. See Section 16.5.7.1 for more information.
16.5.5.1
Internal Clock
16.5.5.2
External Clock
A separate external clock input pin, CLKTIMER, is provided to the PIT. Table 16-5 specifies
the external clock source frequency range for the CLKTIMER input for the PIT.
16.5.6
Interrupts
Each PIT channel provides its own interrupt to the programmable interrupt controller (PIC).
See Chapter 15, for more information on interrupt steering.
For the PIT, the interrupt request is always generated on terminal count, and it is basically
the output signal of the PIT channel. The pattern of the interrupt request signal depends
on the programmed operation mode in the channel. Modes 0 and 1 generate a Low-to-
High signal on terminal count, and they are usually used as interrupt sources.
16.5.7
Software Considerations
16.5.7.1
Using the PIT Clock Source in PC/AT-Compatible Systems
In PC/AT-compatible systems, system boot code usually programs the PIT Channel 0 Count
(PIT0CNT) register (Port 0040h) to a value of FFFFh. It relies on this periodic interrupt in
order to keep accurate time of day. Since the timer clock source is 1.1882 MHz in the
ÉlanSC520 microcontroller, the priority P1 interrupt (IRQ0) is generated every 55.15 ms.
Historically the PIT clock source has been 1.19318 MHz, and this translates into an interrupt
generation rate of 54.93 ms. This interrupt generation rate difference causes the time-
keeping function of a PC/AT-compatible system to be inaccurate.
There are two possible ways to address this issue. One method involves modifying the PIT
Channel 0 Count (PIT0CNT) register via the system boot code. The second method involves
driving the PIT from an external clock source.
■
Modifying the PIT Channel 0 Count (PIT0CNT) register—If the system boot code
programs this register to a value of FEF3h, the desired interrupt generation rate of
54.93 ms can be achieved.
Table 16-4
PIT Internal Clock Source
Internal Clock Source
Resolution Range
Duration
1.1882 MHz
841.61 ns
±
55.1 ms
16-bit duration
Table 16-5
PIT External Clock Source
External Clock Source
Frequency Range
CLKTIMER
1.18125–1.20511 MHz
Содержание Elan SC520
Страница 1: ...lan SC520 Microcontroller User s Manual Order 22004A...
Страница 4: ...iv lan SC520 Microcontroller User s Manual...
Страница 28: ...Introduction xxviii lan SC520 Microcontroller User s Manual...
Страница 42: ...Architectural Overview 1 14 lan SC520 Microcontroller User s Manual...
Страница 78: ...System Initialization 3 22 lan SC520 Microcontroller User s Manual...
Страница 108: ...Clock Generation and Control 5 10 lan SC520 Microcontroller User s Manual...
Страница 118: ...Reset Generation 6 10 lan SC520 Microcontroller User s Manual...
Страница 148: ...System Arbitration 8 24 lan SC520 Microcontroller User s Manual...
Страница 214: ...SDRAM Controller 10 36 lan SC520 Microcontroller User s Manual...
Страница 230: ...Write Buffer and Read Buffer 11 16 lan SC520 Microcontroller User s Manual...
Страница 288: ...GP Bus DMA Controller 14 22 lan SC520 Microcontroller User s Manual...
Страница 316: ...Programmable Interval Timer 16 8 lan SC520 Microcontroller User s Manual...
Страница 328: ...Software Timer 18 4 lan SC520 Microcontroller User s Manual...
Страница 346: ...Real Time Clock 20 12 lan SC520 Microcontroller User s Manual...
Страница 360: ...UART Serial Ports 21 14 lan SC520 Microcontroller User s Manual...
Страница 414: ...AMDebug Technology 26 8 lan SC520 Microcontroller User s Manual...