English
Language : 

XC164-16 Datasheet, PDF (40/417 Pages) Infineon Technologies AG – 16-Bit Single-Chip Microcontroller with C166SV2 Core Volume 2 (of 2): Peripheral Units
XC164-16 Derivatives
Peripheral Units (Vol. 2 of 2)
The General Purpose Timer Units
14.1.5 GPT1 Clock Signal Control
All actions within the timer block GPT1 are triggered by transitions of its basic clock. This
basic clock is derived from the system clock by a basic block prescaler, controlled by
bitfield BPS1 in register T3CON (see Figure 14-2). The count clock can be generated in
two different ways:
• Internal count clock, derived from GPT1’s basic clock via a programmable
prescaler, is used for (gated) timer mode.
• External count clock, derived from the timer’s input pin(s), is used for counter mode.
For both ways, the basic clock determines the maximum count frequency and the timer’s
resolution:
Table 14-6 Basic Clock Selection for Block GPT1
Block Prescaler1)
Prescaling Factor for
GPT1: F(BPS1)
BPS1 = 01B
F(BPS1)
=4
BPS1 = 00B2) BPS1 = 11B
F(BPS1)
F(BPS1)
=8
= 16
Maximum External
Count Frequency
fGPT/8
fGPT/16
fGPT/32
Input Signal
Stable Time
4 × tGPT
8 × tGPT
16 × tGPT
1) Please note the non-linear encoding of bitfield BPS1.
2) Default after reset.
BPS1 = 10B
F(BPS1)
= 32
fGPT/64
32 × tGPT
Internal Count Clock Generation
In timer mode and gated timer mode, the count clock for each GPT1 timer is derived from
the GPT1 basic clock by a programmable prescaler, controlled by bitfield TxI in the
respective timer’s control register TxCON.
The count frequency fTx for a timer Tx and its resolution rTx are scaled linearly with lower
clock frequencies, as can be seen from the following formula:
fTx
=
------------------f--G---P---T------------------
F(BPS1) × 2<Txl>
rTx[µs]
=
F-----(--B----P-----S----1----)---×-----2----<--T--x--l->-
fGPT[MHz]
(14.1)
The effective count frequency depends on the common module clock prescaler factor
F(BPS1) as well as on the individual input prescaler factor 2<TxI>. Table 14-7 summarizes
the resulting overall divider factors for a GPT1 timer that result from these cascaded
prescalers.
Table 14-8 lists a timer’s parameters (such as count frequency, resolution, and period)
resulting from the selected overall prescaler factor and the applied system frequency.
Note that some numbers may be rounded.
User’s Manual
GPT_X41, V2.0
14-27
V2.1, 2004-03