English
Language : 

XC161 Datasheet, PDF (64/419 Pages) Infineon Technologies AG – 16-Bit Single-Chip Microcontroller with C166SV2 Core Volume 2 (of 2): Peripheral Units
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
The General Purpose Timer Units
14.2.6 GPT2 Clock Signal Control
All actions within the timer block GPT2 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 BPS2 in register T6CON (see Figure 14-20). The count clock can be generated
in two different ways:
• Internal count clock, derived from GPT2’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-14 Basic Clock Selection for Block GPT2
Block Prescaler1) BPS2 = 01B
Prescaling Factor F(BPS2)
for GPT2: F(BPS2) = 2
BPS2 = 00B2)
F(BPS2)
=4
BPS2 = 11B
F(BPS2)
=8
Maximum External fGPT/4
Count Frequency
fGPT/8
fGPT/16
Input Signal
Stable Time
2 × tGPT
4 × tGPT
8 × tGPT
1) Please note the non-linear encoding of bitfield BPS2.
2) Default after reset.
BPS2 = 10B
F(BPS2)
= 16
fGPT/32
16 × tGPT
Internal Count Clock Generation
In timer mode and gated timer mode, the count clock for each GPT2 timer is derived from
the GPT2 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(BPS2) × 2<Txl>
rTx[µs]
=
F-----(--B----P-----S----2----)---×-----2----<--T--x---l>-
fGPT[MHz]
(14.2)
The effective count frequency depends on the common module clock prescaler factor
F(BPS2) as well as on the individual input prescaler factor 2<TxI>. Table 14-15
summarizes the resulting overall divider factors for a GPT2 timer that result from these
cascaded prescalers.
User’s Manual
GPT_X1, V2.0
14-50
V2.2, 2004-01