GD32F403xx User Manual
277
Once the timer is set to operate in the single pulse mode, it is not necessary to set the timer
enable bit CEN in the TIMERx_CTL0 register to 1 to enable the counter. The trigger to
generate a pulse can be sourced from the trigger signals edge or by setting the CEN bit to 1
using software. Setting the CEN bit to 1 or a trigger from the trigger signals edge 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/1 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 16-25. Single pulse mode TIMERx_CHxCV = 0x04 TIMERx_CAR=0x60
TIMER_CK(CNT_CLK)
CEN
CNT_REG
00
01
02
03
04
05
…
.
5F
60
00
O2CPRE
CI3
Under SPM, count er stop
Timers interconnection
Timer can be conf igured as interconnection, that is, one timer which operate in the master
mode outputs TRGO signal to control another timer which operate in the slave mode, TRGO
include reset evevt, start evevt, update evevt, capture/compare pulse evevt, compare evevt.
slave timer received the ITIx and perf orms the corresponding mode, include internal clock
mode, quadrature decoder mode, restart mode, pause mode, event mode, external clock
mode.
Figure 16-26. Timer0 master/slave mode timer example
selection when it is configured in slave mode.
Содержание GD32F403 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F403xx Arm Cortex M4 32 bit MCU User Manual Revision 2 6 Jul 2022 ...
Страница 177: ...GD32F403xx UserManual 177 Peripheral Channel 0 Channel 1 Channel 2 Channel 3 Channel 4 SDIO SDIO ...
Страница 217: ...GD32F403xx UserManual 217 ensures that no conversion is in progress ...