Figure 320. 6-Step Generation, Com Example (Ossr=1) - ST STM32G4 Series Reference Manual

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32G4 Series:
Table of Contents

Advertisement

RM0440
Counter (CNT)
tim_ocxref
COM event
tim_ocx
Example 1
tim_ocxn
tim_ocx
Example 2
tim_ocxn
tim_ocx
Example 3
tim_ocxn
27.3.22
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. One-pulse mode is selected
by setting the OPM bit in the TIMx_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 upcounting: CNT < CCRx ≤ ARR (in particular, 0 < CCRx)
In downcounting: CNT > CCRx

Figure 320. 6-step generation, COM example (OSSR=1)

CCxE = 1
CCxNE = 0
OCxM = 0010 (forced inactive)
CCxE = 1
CCxNE = 0
OCxM = 0100 (forced inactive)
CCxE = 1
CCxNE = 0
OCxM = 0010 (forced inactive)
Advanced-control timers (TIM1/TIM8/TIM20)
Write COM to 1
Write OCxM to 0100
Write CCxNE to 1
and OCxM to 0101
Write CCxNE to 0
and OCxM to 0100
RM0440 Rev 1
CCxE = 1
CCxNE = 0
OCxM = 0100
CCxE = 0
CCxNE = 1
OCxM = 0101
CCxE = 1
CCxNE = 1
OCxM = 0100
MSv62343V1
1097/2083
1181

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Table of Contents

Save PDF