![GigaDevice Semiconductor GD32E23 Series Скачать руководство пользователя страница 399](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32e23-series/gd32e23-series_user-manual_2225794399.webp)
GD32E23x User Manual
399
Figure 14-81. Output behavior 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
Single pulse mode
Single pulse mode is opposite to the repetitive mode, which can be enabled by setting SPM
in TIMERx_CTL0. When you set SPM, the counter will be clear and stop when the next
update event. In order to get pulse waveform, you can set the TIMERx to PWM mode or
compare by CHxCOMCTL.
Once the timer is set to operate in the single pulse mode, it is necessary to set the timer
enable bit CEN in the TIMERx_CTL0 register to 1 to enable the counter. Setting the CEN bit
to 1 can generate a pulse and then keep the CEN bit at a high state until the update event
occurs or the CEN bit is written to 0 by software. If the CEN bit is cleared to 0 using software,
the counter will be stopped and its value held.
In the single pulse mode, the trigger active edge which sets the CEN bit to 1 will enable the
counter. However, there exist several clock delays to perform the comparison result between
the counter value and the TIMERx_CHxCV value. In order to reduce the delay to a minimum
value, the user can set the CHxCOMFEN bit in each TIMERx_CHCTL0 register. After a
trigger rising occurs in the single pulse mode, the OxCPRE signal will immediately be forced
to the state which the OxCPRE signal will change to, as the compare match event occurs
without taking the comparison result into account. The CHxCOMFEN bit is available only
when the output channel is configured to operate in the PWM0 or PWM1 output mode and
the trigger source is derived from the trigger signal.
Figure 14-82. Single pulse mode TIMERx_CHxCV = 0x04 TIMERx_CAR=0x60