User Manual
467
Rev. 1.1
2019-03-18
TLE984xQX
Microcontroller with LIN and Power Switches for Automotive Applications
General Purpose Timer Units (GPT12)
16.4
Timer Block GPT2
From a programmer’s point of view, the GPT2 block is represented by a set of SFRs as summarized below.
Those portions of port and direction registers which are used for alternate functions by the GPT2 block are
shaded.
Figure 102 SFRs Associated with Timer Block GPT2
Both timers of block GPT2 (T5, T6) can run in one of 3 basic modes: Timer Mode, Gated Timer Mode, or Counter
Mode. All timers can count up or down. Each timer of GPT2 is controlled by a separate control register TxCON.
Each timer has an input pin TxIN (alternate pin function) associated with it, which serves as the gate control in
Gated Timer Mode, or as the count input in Counter Mode. The count direction (up/down) may be
programmed via software or may be dynamically altered by a signal at the External Up/Down control input
TxEUD (alternate pin function). An overflow/underflow of core timer T6 is indicated by the Output Toggle
Latch T6OTL, whose state may be output on the associated pin T6OUT (alternate pin function). The auxiliary
timer T5 may additionally be concatenated with core timer T6 (through T6OTL).
The Capture/Reload register CAPREL can be used to capture the contents of timer T5, or to reload timer T6. A
special mode facilitates the use of register CAPREL for both functions at the same time. This mode allows
frequency multiplication. The capture function is triggered by the input pin CAPIN, or by GPT1 timer’s T3 input
lines T3IN and T3EUD. The reload function is triggered by an overflow or underflow of timer T6.
Overflows/underflows of timer T6 may also clock the timers of the CAPCOM units.
The current contents of each timer can be read or modified by the CPU by accessing the corresponding timer
count registers T5 or T6, located in the SFR space (see
). When any of the timer registers is
written to by the CPU in the state immediately preceding a timer increment, decrement, reload, or capture
operation, the CPU write operation has priority in order to guarantee correct results.
The interrupts of GPT2 are controlled through the GPTM1IEN and GPTM1IRC. These registers are not part of
the GPT2 block.
The input and output lines of GPT2 are connected to pins. The control registers for the port functions are
located in the respective port modules.
mc_gpt2_registers.vsd
Data Registers
Control Registers
T5CON
Interrupt Control
Tx
GPT2 Timer x Register
CAPREL
GPT2 Capture/Reload Register
TxCON
GPT2 Timer x Control Register
TxIC
GPT2 Timer x Interrupt Ctrl . Reg.
T5
T6
T5IC
T6IC
CAPREL
T6CON
CRIC
KSCCFG
Miscellaneous
PISEL
ID
KSCCFG
Kernel State Configuration Register
PISEL
Port Input Select Register
ID
Module Identification Register