Download Print this page

ST STM32F301 6 Series Reference Manual page 451

Advanced arm-based 32-bit mcus

Advertisement

RM0366
The timer is able to generate PWM in edge-aligned mode or center-aligned mode
depending on the CMS bits in the TIMx_CR1 register.
PWM edge-aligned mode
Upcounting configuration
Upcounting is active when the DIR bit in the TIMx_CR1 register is low. Refer to
mode on page
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.
PWM waveforms in an example where TIMx_ARR=8.
CCRx=4
CCRx=8
CCRx>8
CCRx=0
Downcounting configuration
Downcounting is active when DIR bit in TIMx_CR1 register is high. Refer to
mode on page
In PWM mode 1, the reference signal ocxref is low as long as TIMx_CNT>TIMx_CCRx else
it becomes high. If the compare value in TIMx_CCRx is greater than the auto-reload value in
TIMx_ARR, then ocxref is held at 100%. PWM is not possible in this mode.
PWM center-aligned mode
Center-aligned mode is active when the CMS bits in TIMx_CR1 register are different from
'00 (all the remaining configurations having the same effect on the ocxref/OCx signals). The
430.
Figure 179. Edge-aligned PWM waveforms (ARR=8)
Counter register
0
OCXREF
CCxIF
OCXREF
CCxIF
OCXREF
'1'
CCxIF
'0'
OCXREF
CCxIF
433.
Figure 179
1
2
3
4
5
RM0366 Rev 5
General-purpose timer (TIM2)
Upcounting
shows some edge-aligned
6
7
8
0
1
Downcounting
MS31093V1
451/874
495

Advertisement

loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Stm32f301 8 seriesStm32f318 8 series