GD32VF103 User Manual
224
15.1.3.
Block diagram
Figure 15-1. Advanced timer block diagram
provides details of the internal configuration
of the advanced timer.
Figure 15-1. Advanced timer block diagram
=1
0
0
0
0
Input Logic
Synchronizer&Filter
&Edge Detector
Edge selector
Prescaler
Trigger processor
Trigger Selector&Counter
Quadrate Decoder
Slave mode processor
Counter
External Trigger
Input logic
Polarity selection
Edge detector
Prescaler
Filter
TIMERx_CHxCV
Register /Interrupt
Register set and update
Interrupt collector and
controller
APB BUS
CK_TI MER
CH0_I N
CH1_I N
CH2_I N
CH3_IN
CI0
ITI0
ITI1
ITI2
ITI3
ETI
CAR
Repeater
Output Logic
generation of outputs signals in
compare, PWM,and mixed modes
according to initialization,
complementary mode, software
output control, deadtime insertion,
break input, output mask, and
polarity control
BKEN
BRKI N
CKM
clock monitor
CH0_O
CH0_O N
DMA controller
TIMERx_TRGO
DMA REQ/ ACK
TIMERx_CH0
TIMERx_CH1
TIMERx_CH2
TIMERx_CH3
TIMERx_TG
TIMERx_UP
TIMERx_CMT
.
Interrupt
break
update
trig/ct rl
cap/cmt
CH1_O
CH1_O N
CH2_O
CH2_O N
CH3_O
req en/direct req set
PSC
PSC_CLK
TIMER_CK
ETIFP
15.1.4.
Function overview
Clock selection
The clock source of the advanced timer can be either the CK_TIMER or an alternate clock
source controlled by SMC bits (TIMERx_SMCFG bit[2:0]).
SMC [2:0] == 3’b000. Internal clock CK_TIMER is selected as timer clock source which
is from module RCU.
The default clock source is the CK_TIMER for driving the counter prescaler when the slave
mode is disabled (SMC [2:0] == 3
’
b000). When the CEN is set, the CK_TIMER will be divided
by PSC value to generate PSC_CLK.
In this mode,
the TIMER_CK which drives counter’s prescaler to count is equal to CK_TIMER
which is from RCU module.
If the slave mode controller is enabled by setting SMC [2:0] in the TIMERx_SMCFG register
to an available value including 0x1, 0x2, 0x3 and 0x7, the prescaler is clocked by other clock
sources selected by the TRGS [2:0] in the TIMERx_SMCFG register, more details will be