GD32VF103 User Manual
296
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 the PWM mode 0 or PWM mode 1 and the trigger source is
derived from the trigger signal.
Figure 15-51. 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
Refer to
Timer DMA mode
Timer DMA mode is the function that configures timer
’
s register by DMA module. The relative
registers are TIMERx_DMACFG and TIMERx_DMATB. Corresponding DMA request bit
should be asserted to enable DMA request for internal interrupt event. TIMERx will send a
request to DMA when the interrupt event occurs. DMA is configured to M2P (memory to
peripheral) mode and the address of TIMERx_DMATB is configured to PADDR (peripheral
base address), then DMA will access the TIMERx_DMATB. In fact, TIMERx_DMATB register
is only a buffer, timer will map the TIMERx_DMATB to an internal register, appointed by the
field of DMATA in TIMERx_DMACFG. If the field of DMATC in TIMERx_DMACFG is 0 (1
transfer), the timer sends only one DMA request. While if TIMERx_DMATC is not 0, such as
3 (4 transfers), then timer will send 3 more requests to DMA, and DMA will access timer
’
s
registers DMATA+0x4, DMATA+0x8 and DMATA+0xC at the next 3 accesses to
TIMERx_DMATB. In a word, one-time DMA internal interrupt event asserts, (DMATC+1) times
request will be sent by TIMERx.
If one more DMA request event occurs, TIMERx will repeat the process above.
Timer debug mode
When the RISC-V core halted, and the TIMERx_HOLD configuration bit in DBG_CTL register
set to 1, the TIMERx counter stops.