
EM358x
182
Rev. 0.4
Figure 10-23. Center-Aligned PWM Waveforms (ARR = 8)
Hints on using center-aligned mode:
When starting in center-aligned mode, the current up-down configuration is used. This means that the counter
counts up or down depending on the value written in the TIM_DIR bit in the TIMx_CR1 register. The TIM_DIR
and TIM_CMS bits must not be changed at the same time by the software.
Writing to the counter while running in center-aligned mode is not recommended as it can lead to unexpected
results. In particular:
The direction is not updated when the value written to the counter that is greater than the auto-reload
value (TIMx_CNT > TIMx_ARR). For example, if the counter was counting up, it continues to count up.
The direction is updated when 0 or the TIMx_ARR value is written to the counter, but no UEV is
generated.
The safest way to use center-aligned mode is to generate an update by software (setting the TIM_UG bit in the
TIMx_EGR register) just before starting the counter, and not to write the counter while it is running.
10.3.10 One-Pulse Mode
One-pulse mode (OPM) is a special 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.
Содержание EMBER EM358 series
Страница 2: ...EM358x 2 Rev 0 4 ...
Страница 7: ...EM358x Rev 0 4 7 ...