User Manual
454
Rev. 1.1
2019-03-18
TLE984xQX
Microcontroller with LIN and Power Switches for Automotive Applications
General Purpose Timer Units (GPT12)
For both ways, the basic clock determines the maximum count frequency and the timer’s resolution:
Note:
When initializing the GPT1 block, and the block prescaler BPS1 in register T3CON needs to be set to
a value different from its reset value (00
B
), it must be initialized first before any mode involving
external trigger signals is configured. These modes include counter, incremental interface, capture,
and reload mode. Otherwise, unintended count/capture/reload events may occur.
In this case (e.g. when changing BPS1 during operation of the GPT1 block), disable related interrupts
before modification of BPS1, and afterwards clear the corresponding service request flags and re-
initialize those registers (T2, T3, T4) that might be affected by a count/capture/reload event.
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
f
Tx
for a timer Tx and its resolution
r
Tx
are scaled linearly with lower clock frequencies, as
can be seen from the following formula:
(16.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>
.
summarizes the resulting overall divider factors for a
GPT1 timer that result from these cascaded prescalers.
lists GPT1 timer’s parameters (such as count frequency, resolution, and period) resulting from the
selected overall prescaler factor and the module clock
f
GPT
. Note that some numbers may be rounded.
Table 239 Basic Clock Selection for Block GPT1
Block Prescaler
1)
1) Please note the non-linear encoding of bitfield BPS1.
BPS1 = 01
B
BPS1 = 00
B
2)
2) Default after reset.
BPS1 = 11
B
BPS1 = 10
B
Prescaling Factor for GPT1:
F(BPS1)
F(BPS1)
= 4
F(BPS1)
= 8
F(BPS1)
= 16
F(BPS1)
= 32
Maximum External Count
Frequency
f
GPT
/8
f
GPT
/16
f
GPT
/32
f
GPT
/64
Input Signal Stable Time
4 ×
t
GPT
8 ×
t
GPT
16 ×
t
GPT
32 ×
t
GPT
Table 240 GPT1
Timer
Parameters
Module Clock
f
GPT
= 10 MHz
Overall
Prescaler
Factor
Module Clock
f
GPT
= 40 MHz
Frequency
Resolution
Period
Frequency
Resolution
Period
2.5 MHz
400 ns
26.21 ms
4
10.0 MHz
100 ns
6.55 ms
1.25 MHz
800 ns
52.43 ms
8
5.0 MHz
200 ns
13.11 ms
625.0 kHz
1.6 µs
104.9 ms
16
2.5 MHz
400 ns
26.21 ms
312.5 kHz
3.2 µs
209.7 ms
32
1.25 MHz
800 ns
52.43 ms
156.25 kHz
6.4 µs
419.4 ms
64
625.0 kHz
1.6 µs
104.9 ms
78.125 kHz
12.8 µs
838.9 ms
128
312.5 kHz
3.2 µs
209.7 ms
39.06 kHz
25.6 µs
1.678 s
256
156.25 kHz
6.4 µs
419.4 ms
f
Tx
=
f
GPT
F BPS1
(
)
•
<Txl>
2
r
Tx
[
μ
s]
=
f
GPT
[MHz]
F BPS1
(
)
•
<Txl>
2