ST7FL15F1MAE STMICROELECTRONICS [STMicroelectronics], ST7FL15F1MAE Datasheet - Page 60

no-image

ST7FL15F1MAE

Manufacturer Part Number
ST7FL15F1MAE
Description
8-bit MCU for automotive with single voltage Flash/ROM memory, data EEPROM, ADC, 5 timers, SPI
Manufacturer
STMICROELECTRONICS [STMicroelectronics]
Datasheet
ST7L15, ST7L19
DUAL 12-BIT AUTORELOAD TIMER 4 (cont’d)
Pulses that last more than 8µs can be measured
with an accuracy of 4µs if f
following conditions:
– The 12-bit AT4 Timer is clocked by the Lite Timer
– The ICS bit in the ATCSR2 register is set so that
Figure 42. Long Range Input Capture Block Diagram
Notes:
1. Since the input capture flags (ICF) for both tim-
ers (AT4 Timer and LT Timer) are set when signal
transition occurs, software must mask one inter-
rupt by clearing the corresponding ICIE bit before
setting the ICS bit.
2. If the ICS bit changes (from 0 to 1 or from 1 to
0), a spurious transition might occur on the input
capture signal because of different values on LTIC
and ATIC. To avoid this situation, it is recommend-
ed to do the following:
– First, reset both ICIE bits.
– Then set the ICS bit.
– Reset both ICF bits.
60/138
1
ATIC
LTIC
(RTC pulse: CK[1:0] = 01 in the ATCSR register)
the LTIC pin is used to trigger the AT4 Timer cap-
ture.
Long Input Capture
ICS
1
0
f
LTIMER
OFF
f
cpu
f
OSC/32
OSC
LTICR
= 8 MHz under the
CNTR1
ATR1
ATICR
12-bit Input Capture Register
8-bit Input Capture Register
12-bit AutoReload Register
8-bit Timebase Counter1
12-bit Upcounter1
– The signal to be captured is connected to LTIC
– Input Capture registers LTICR, ATICRH and
This configuration allows to cascade the Lite Timer
and the 12-bit AT4 Timer to get a 20-bit input cap-
ture value. Refer to
– Finally, set the ICIE bit of desired interrupt.
3. How to compute a pulse length with long input
capture feature:
As both timers are used, computing a pulse length
is not straight-forward. The procedure is as fol-
lows:
– At the first input capture on the rising edge of the
Refer to
pin
ATICRL are read
pulse, we assume that values in the registers are
as follows:
LTICR = LT1
ATICRH = ATH1
ATICRL = ATL1
Hence ATICR1 [11:0] = ATH1 & ATL1
12-bit ARTIMER
LITE TIMER
Figure 43 on page
Figure
8 LSB bits
12 MSB bits
42.
61.
20
cascaded
bits

Related parts for ST7FL15F1MAE