![Geehy SEMICONDUCTOR APM32F405 Series Скачать руководство пользователя страница 240](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f405-series/apm32f405-series_user-manual_573630240.webp)
www.geehy.com Page 239
Figure 460 PWM1 Center-aligned Mode Timing Diagram
AUTORLD
CCx
OCXREF
In PWM mode 2, if the value of the counter CNT is less than that of the compare
register CCx, the output level will be invalid; otherwise, it will be valid.
Set the timing diagram in PWM mode 2 when CCx=5, AUTORLD=7
Figure 61 PWM2 Center-aligned Mode Timing Diagram
CCx
AUTORLD
OCxREF
Single-pulse mode
The single-pulse mode is a special case of timer compare output, and is also a
special case of PWM output mode.
Set SPMEN bit of TMRx_CTRL1 register, and select the single-pulse mode.
After the counter is started, a certain number of pulses will be output before the
update event occurs. When an update event occurs, the counter will stop
counting, and the subsequent PWM waveform output will no longer be changed.
After a certain controllable delay, a pulse with controllable pulse width is
generated in single-pulse mode through the program. The delay time is defined
by the value of TMRx_CCx register; in the count-up mode, the delay time is CCx
and the pulse width is AUTORLD-CCx; in the count-down mode, the delay time
is AUTORLD-CCx and the pulse width is CCx.