EasyManuals Logo

ST STM32F10 Series User Manual

ST STM32F10 Series
519 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #181 background imageLoading...
Page #181 background image
UM0306 Advanced control timer (TIM1)
181/519
12.4.15 One pulse mode
One Pulse Mode (OPM) is a particular case of the previous modes. It allows the counter to
be started in response to a stimulus and to generate a pulse with a programmable length
after a programmable delay.
Starting the counter can be controlled through the slave mode controller. Generating the
waveform can be done in output compare mode or PWM mode. You select One Pulse Mode
by setting the OPM bit in the TIM1_CR1 register. This makes the counter stop automatically
at the next update event UEV.
A pulse can be correctly generated only if the compare value is different from the counter
initial value. Before starting (when the timer is waiting for the trigger), the configuration must
be:
In up-counting: CNT<CCRxARR (in particular, 0<CCRx),
In down-counting: CNT>CCRx.
Figure 64. Example of one pulse mode.
For example you may want to generate a positive pulse on OC1 with a length of t
PULSE
and
after a delay of t
DELAY
as soon as a positive edge is detected on the TI2 input pin.
Let’s use TI2FP2 as trigger 1:
Map TI2FP2 to TI2 by writing CC2S=’01’ in the TIM1_CCMR1 register.
TI2FP2 must detect a rising edge, write CC2P=’0’ in the TIM1_CCER register.
Configure TI2FP2 as trigger for the slave mode controller (TRGI) by writing TS=’110’ in
the TIM1_SMCR register.
TI2FP2 is used to start the counter by writing SMS to ‘110’ in the TIM1_SMCR register
(trigger mode).
TI2
OC1Ref
COUNTER
t
0
TIM1_ARR
TIM1_CCR1
OC1
t
DELAY
t
PULSE
www.BDTIC.com/ST

Table of Contents

Other manuals for ST STM32F10 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32F10 Series and is the answer not in the manual?

ST STM32F10 Series Specifications

General IconGeneral
BrandST
ModelSTM32F10 Series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals