General Timers
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
205
Counter
register
CCxIP=0
0
1
3
2
4
5
6
7
8
0
1
OCx
CCxIF
OCx
CCxIF
CCRx=4
CCRx=8
OCx
CCxIF
CCRx>8
OCx
CCxIF
CCRx=0
Clear CCxIF by
Software
1
0
Fig 10-14 Edge-aligned PWM waveforms (ARR=8, CCxP=0)
10.3.4.4
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 active edge of TRGI. Generating the waveform can be done in PWM mode. You select One-
pulse mode by setting the OPM bit in the TIMx_CR register. This makes the counter stop automatically at the next update.
The one-pulse mode is shown in Fig 10-15.
OCx
(CCxP=0)
OCx
(CCxP=1)
TRGI
CCR
ARR+1
Synchronous delay
by hardware
Fig 10-15 One-pulse mode timing
Note
: Since the 18 channels are independent with each other, when TRGI is used to trigger one channel to output PWM signal, it can also be
used as capture source in input capture mode of another channel.
Realtek confidential files
The document authorized to
SZ99iot
2019-05-15 10:08:03