st7pmc2s6 STMicroelectronics, st7pmc2s6 Datasheet - Page 114

no-image

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
On-chip peripherals
114/371
Figure 49. Output compare timing diagram, f
One pulse mode
One pulse mode enables the generation of a pulse when an external event occurs. This
mode is selected via the OPM bit in the CR2 register.
The one pulse mode uses the input capture1 function and the output compare1 function.
Procedure
1.
2.
3.
Load the OC1R register with the value corresponding to the length of the pulse (see
Equation 3
Select the following in the CR1 register:
Select the following in the CR2 register:
Using the OLVL1 bit, select the level to be applied to the OCMP1 pin after the
pulse.
Using the OLVL2 bit, select the level to be applied to the OCMP1 pin during the
pulse.
Select the edge of the active transition on the ICAP1 pin with the IEDG1 bit (the
ICAP1 pin must be configured as floating input).
Set the OC1E bit, the OCMP1 pin is then dedicated to the output compare 1
function.
Set the OPM bit.
Select the timer clock CC[1:0] (see
Output compare register i (OCRi)
Output compare flag i (OCFi)
below).
ST7MC1K2-Auto, ST7MC1K6-Auto, ST7MC2S4-Auto, ST7MC2S6-Auto
OCMPi pin (OLVLi = 1)
Internal CPU clock
Counter register
Timer clock
2ECF
Table
2ED0
TIMER
51).
2ED1
= f
2ED3
CPU
2ED2
/4
2ED3
2ED4

Related parts for st7pmc2s6