User Manual
442
Rev. 1.1
2019-03-18
TLE984xQX
Microcontroller with LIN and Power Switches for Automotive Applications
General Purpose Timer Units (GPT12)
Timer T3 in Incremental Interface Mode
Incremental interface mode for the core timer T3 is selected by setting bitfield T3M in register T3CON to 110
B
or 111
B
. In Incremental Interface Mode, the two inputs associated with core timer T3 (T3IN, T3EUD) are used
to interface to an incremental encoder. T3 is clocked by each transition on one or both of the external input
pins to provide 2-fold or 4-fold resolution of the encoder input.
Figure 90 Block Diagram of Core Timer T3 in Incremental Interface Mode
Bitfield T3I in control register T3CON selects the triggering transitions (see
). The sequence of the
transitions of the two input signals is evaluated and generates count pulses as well as the direction signal. So
T3 is modified automatically according to the speed and the direction of the incremental encoder and,
therefore, its contents always represent the encoder’s current position.
The interrupt request (T3IRQ) generation mode can be selected: In Rotation Detection Mode (T3M = 110
B
), an
interrupt request is generated each time the count direction of T3 changes. In Edge Detection Mode
(T3M = 111
B
), an interrupt request is generated each time a count edge for T3 is detected. Count direction,
changes in the count direction, and count requests are monitored by status bits T3RDIR, T3CHDIR, and
T3EDGE in register T3CON.
The incremental encoder can be connected directly to the TLE984xQX without external interface logic. In a
standard system, however, comparators will be employed to convert the encoder’s differential outputs (such
as A, A) to digital signals (such as A). This greatly increases noise immunity.
Note:
The third encoder output T0, which indicates the mechanical zero position, may be connected to an
external interrupt input and trigger a reset of timer T3.
If input T4IN is available, T0 can be connected there and clear T3 automatically without requiring an
interrupt.
MCB05394
Count
T3EUD
T3
EDGE
T3
RDIR
MUX
0
1
=1
T3UD
T3UDE
Change
Detect
T3CH
DIR
T3M
T3M
>1
_
Phase
Detect
T3R
T3IN
T3I
T3IRQ
Core
Timer T3
Toggle
Latch
T3OUT
to
T2/T4
Edge
Select