GD32W51x User Manual
465
TIMERx_CTL1 register as soon as POEN is 0. If IOS is 0 then the timer releases the enable
output else the enable output remains high. The complementary outputs are first put in reset
state, and then the dead-time generator is reactivated in order to drive the outputs with the
level programmed in the ISOx and ISOxN bits after a dead-time.
When a break occurs, the BRKIF bit in the TIMERx_INTF register is set. If BRKIE is 1, an
interrupt generated.
Figure 17-19. Output behavior of the channel in response to a break (the break high
active)
OxCPRE
CHx_O
CHx_ON
BRKIN
CHx_O
CHx_ON
CHx_O
CHx_ON
= ISOx
= ISOxN
= ISOx
= ISOxN
CHxEN: 1 CHxNEN: 1
CHxP : 0 CHxNP : 0
ISOx = ~ISOxN
CHxEN: 1 CHxNEN: 0
CHxP: 0 CHxNP : 0
ISOx = ~ISOxN
CHxEN: 1 CHxNEN: 0
CHxP : 0 CHxNP : 0
ISOx = ISOxN
Quadrature decoder
The quadrature decoder function uses two quadrature inputs CI0 and CI1 derived from the
TIMERx_CH0 and TIMERx_CH1 pins respectively to interact with each other to generate the
counter value. Setting SMC=0x01, 0x02, or 0x03 to select that the counting direction of timer
is determined only by the CI0, only by the CI1, or by the CI0 and the CI1. The DIR bit is
modified by hardware automatically during the voltage level change of each direction
selection source. The mechanism of changing the counter direction is shown in
Counting direction versus encoder signals
. The quadrature decoder can be regarded as
an external clock with a direction selection. This means that the counter counts continuously
from 0 to the counter-reload value. Therefore, users must configure the TIMERx_CAR register
before the counter starts to count.