English
Language : 

TLE9871QXA20_15 Datasheet, PDF (55/122 Pages) Infineon Technologies AG – Microcontroller with PWM Interface and BLDC MOSFET Driver for Automotive Applications
16
Timer2 and Timer21
TLE9871QXA20
Timer2 and Timer21
16.1
Features
• 16-bit auto-reload mode
– selectable up or down counting
• One channel 16-bit capture mode
16.2
Introduction
The timer modules are general-purpose 16-bit timers. Timer 2/21 can function as a timer or counter in each of its
modes. As a timer, it counts with an input clock of fPCLK/12 (if prescaler is disabled). As a counter, Timer 2 counts
1-to-0 transitions on pin T2. In the counter mode, the maximum resolution for the count is fPCLK/24 (if prescaler is
disabled).
16.2.1 Timer2 and Timer21 Modes Overview
Table 11 Timer2 and Timer21 Modes
Mode
Description
Auto-reload
Up/Down Count Disabled
• Count up only
• Start counting from 16-bit reload value, overflow at FFFFH
• Reload event configurable for trigger by overflow condition only, or by
negative/positive edge at input pin T2EX as well
• Programmable reload value in register RC2
• Interrupt is generated with reload events.
Auto-reload
Channel capture
Up/Down Count Enabled
• Count up or down, direction determined by level at input pin T2EX
• No interrupt is generated
• Count up
– Start counting from 16-bit reload value, overflow at FFFFH
– Reload event triggered by overflow condition
– Programmable reload value in register RC2
• Count down
– Start counting from FFFFH, underflow at value defined in register RC2
– Reload event triggered by underflow condition
– Reload value fixed at FFFFH
• Count up only
• Start counting from 0000H, overflow at FFFFH
• Reload event triggered by overflow condition
• Reload value fixed at 0000H
• Capture event triggered by falling/rising edge at pin T2EX
• Captured timer value stored in register RC2
• Interrupt is generated by reload or capture events
Data Sheet
55
Rev. 1.0, 2015-04-30