![GigaDevice Semiconductor GD32F10 Series Скачать руководство пользователя страница 296](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32f10-series/gd32f10-series_user-manual_2225800296.webp)
GD32F10x User Manual
296
triggered by its CI0 input rises edge. To ensure 2 timers start synchronously, Timer2 must be
configured in Master/Slave mode. Do as follow:
1.
Configure Timer2 in slave mode to get the input trigger from CI0 (TRGS=3’b100 in the
TIMER2_SMCFG register).
2.
Configure Timer2 in event mode (SMC=3’b110 in the TIMER2_SMCFG register).
3.
Configure the Timer2 in Master/Slave mode by writing MSM=1 (TIMER2_SMCFG
register).
4.
Configure Timer0 to get the input trigger from Timer2 (TRGS=3’b010 in the
TIMERx_SMCFG register).
5.
Configure Timer0 in event mode (SMC=3’b110 in the TIMER0_SMCFG register).
When a rising edge occurs on Timer2’s CI0, two timer’s counters start counting synchronously
on the internal clock and both TRGIF flags are set.
Figure 15-30. Triggering TIMER0 and TIMER2 with TIMER2’s CI0 input
TIMER_CK
CNT_REG
CNT_REG
CI0
00
01
CEN
02
03
00
01
02
03
CNT_CK
TRGIF
CEN
TRGIF
TIMER2
TIMER0
Timer DMA mode
Timer’s DMA mode is the function that configures timer’s register by DMA module. The
relative registers are TIMERx_DMACFG and TIMERx_DMATB. Of course, you have to
enable a DMA request which will be asserted by some internal event. When the interrupt
event was asserted, TIMERx will send a request to DMA, which is configured to M2P mode
and PADDR is TIMERx_DMATB, then DMA will access the TIMERx_DMATB. In fact, register
TIMERx_DMATB 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
Содержание GD32F10 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F10x Arm Cortex M3 32 bit MCU User Manual Revision 2 6 Jun 2022 ...
Страница 63: ...GD32F10x User Manual 63 programmed during the chip production ...
Страница 117: ...GD32F10x User Manual 117 010 1 0 011 0 9 ...
Страница 416: ...GD32F10x User Manual 416 shadow register updates every update event ...
Страница 427: ...GD32F10x User Manual 427 value ...
Страница 518: ...GD32F10x User Manual 518 These bits are not used in SPI mode ...