st7pmc2s6 STMicroelectronics, st7pmc2s6 Datasheet - Page 109
![no-image](/images/manufacturer_photos/0/6/637/stmicroelectronics_sml.jpg)
st7pmc2s6
Manufacturer Part Number
st7pmc2s6
Description
8-bit Mcu For Automotive With Nested Interrupts, Flash, 10-bit Adc, Brushless Motor Control, 5 Timers, Spi, Linsci?
Manufacturer
STMicroelectronics
Datasheet
1.ST7PMC2S6.pdf
(371 pages)
- Current page: 109 of 371
- Download datasheet (7Mb)
ST7MC1K2-Auto, ST7MC1K6-Auto, ST7MC2S4-Auto, ST7MC2S6-Auto
Note:
1
2
3
4
5
Input capture
In this section, the index, i, may be 1 or 2 because there are two input capture functions in
the 16-bit timer.
The two input capture 16-bit registers (IC1R and IC2R) are used to latch the value of the
free-running counter after a transition detected by the ICAPi pin (see below).
ICiR register is a read-only register.
The active transition is software programmable through the IEDGi bit of control registers
(CRi).
Timing resolution is one count of the free running counter: (
Procedure
To use the input capture function, select the following in the CR2 register:
Select the following in the CR1 register:
When an input capture occurs:
Clearing the input capture interrupt request (that is, clearing the ICFi bit) is done in two
steps:
1.
2.
After reading the ICiHR register, transfer of input capture data is inhibited and ICFi is never
set until the ICiLR register is also read.
The ICiR register contains the free running counter value which corresponds to the most
recent input capture.
The two input capture functions can be used together even if the timer also uses the two
output compare functions.
In One Pulse mode and PWM mode only the input capture 2 can be used.
The alternate inputs (ICAP1 and ICAP2) are always directly connected to the timer. So any
transitions on these pins activate the input capture function. Moreover if one of the ICAPi pin
is configured as an input and the second one as an output, an interrupt can be generated if
Select the timer clock (CC[1:0]) (see ).
Select the edge of the active transition on the ICAP2 pin with the IEDG2 bit (the ICAP2
pin must be configured as floating input).
Set the ICIE bit to generate an interrupt after an input capture coming from either the
ICAP1 pin or the ICAP2 pin
Select the edge of the active transition on the ICAP1 pin with the IEDG1 bit (the
ICAP1pin must be configured as floating input).
The ICFi bit is set
The ICiR register contains the value of the free running counter on the active transition
on the ICAPi pin (see
A timer interrupt is generated if the ICIE bit is set and the I bit is cleared in the CC
register. Otherwise, the interrupt remains pending until both conditions become true.
By reading the SR register while the ICFi bit is set.
By accessing (reading or writing) the ICiLR register.
ICiR
Figure
46).
ICiHR
MSB
f
CPU
/
CC[1:0]).
On-chip peripherals
ICiLR
LSB
109/371
Related parts for st7pmc2s6
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![ST7-DVP3](/images/no-image3.png)
Part Number:
Description:
Low Cost, Real Time Emulator Series for ST7
Manufacturer:
STMICROELECTRONICS [STMicroelectronics]
Datasheet:
![ST7-EMU3](/images/no-image3.png)
Part Number:
Description:
Full-featured, real time emulator series for ST7
Manufacturer:
STMICROELECTRONICS [STMicroelectronics]
Datasheet:
![ST7-88](/images/no-image3.png)
Part Number:
Description:
Power Transformer
Manufacturer:
Superworld Electronics
Datasheet:
![ST7-STICK](/images/manufacturer_photos/0/6/637/stmicroelectronics_tmb.jpg)
Part Number:
Description:
In-Circuit Programmer
Manufacturer:
STMicroelectronics
Datasheet:
![st7-56](/images/no-image3.png)
Part Number:
Description:
Power Transformer
Manufacturer:
Superworld Electronics
Datasheet:
![st7-40](/images/no-image3.png)
Part Number:
Description:
Power Transformer
Manufacturer:
Superworld Electronics
Datasheet:
![st7-48](/images/no-image3.png)
Part Number:
Description:
Power Transformer
Manufacturer:
Superworld Electronics
Datasheet:
![st7-30](/images/no-image3.png)
Part Number:
Description:
Power Transformer
Manufacturer:
Superworld Electronics
Datasheet:
![st7-34](/images/no-image3.png)
Part Number:
Description:
Power Transformer
Manufacturer:
Superworld Electronics
Datasheet:
![st7-36](/images/no-image3.png)
Part Number:
Description:
Power Transformer
Manufacturer:
Superworld Electronics
Datasheet:
![st7-28](/images/no-image3.png)
Part Number:
Description:
Power Transformer
Manufacturer:
Superworld Electronics
Datasheet:
![st7-24](/images/no-image3.png)
Part Number:
Description:
Power Transformer
Manufacturer:
Superworld Electronics
Datasheet:
![st7-20](/images/no-image3.png)
Part Number:
Description:
Power Transformer
Manufacturer:
Superworld Electronics
Datasheet:
![st7-16](/images/no-image3.png)
Part Number:
Description:
Power Transformer
Manufacturer:
Superworld Electronics
Datasheet:
![st7-10](/images/no-image3.png)
Part Number:
Description:
Power Transformer
Manufacturer:
Superworld Electronics
Datasheet: