Figure 198. Edge-Aligned Pwm Waveforms (Arr=8); One-Pulse Mode - STMicroelectronics STM32F405 Reference Manual

Advanced arm-based 32-bit mcus
Table of Contents

Advertisement

General-purpose timers (TIM9 to TIM14)
PWM edge-aligned mode
In the following example, we consider PWM mode 1. The reference PWM signal OCxREF is
high as long as TIMx_CNT < TIMx_CCRx else it becomes low. If the compare value in
TIMx_CCRx is greater than the auto-reload value (in TIMx_ARR) then OCxREF is held at
'1'. If the compare value is 0 then OCxRef is held at '0'.
aligned PWM waveforms in an example where TIMx_ARR=8.
19.3.10

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 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 as follows:
CNT < CCRx≤ ARR (in particular, 0 < CCRx)
656/1731

Figure 198. Edge-aligned PWM waveforms (ARR=8)

Counter register
OCXREF
CCRx=4
CCxIF
OCXREF
CCRx=8
CCxIF
OCXREF
CCRx>8
CCxIF
OCXREF
CCRx=0
CCxIF
DocID018909 Rev 11
Figure 198
0
1
2
3
4
5
RM0090
shows some edge-
6
7
8
0
1

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents

Save PDF