GD32F403xx User Manual
81
f or the real time clock circuit or the free watchdog timer. The IRC40K offers a low cost clock
source as no external components are required. The IRC40K RC oscillator can be switched
on or off by using the IRC40KEN bit in the reset source/clock register (RCU_RSTSCK). The
IRC40KSTB f lag in the reset source/clock register RCU_RSTSCK will indicate if the IRC40K
clock is stable. An interrupt can be generated if the related interrupt enable bit IRC40KSTBIE
in the clock interrupt register (RCU_INT) is set when the IRC40K becomes stable.
System clock (CK_SYS) selection
Af ter the system reset, the def ault CK_SYS source will be IRC8M and can be switched to
HXTAL or CK_PLL by changing the system clock switch bits, SCS, in the clock configuration
register 0, RCU_CFG0. When the SCS value is changed, the CK_SYS will continue to
operate using the original clock source until the target clock source is stable. When a clock
source is directly or indirectly (by PLL) used as the CK_SYS, it is not possible to stop it.
HXTAL clock monitor (CKM)
The HXTAL clock monitor function is enabled by the HXTAL clock monitor Enable bit, CKMEN,
in the control register (RCU_CTL). This f unction should be enabled after the HXTAL start-up
delay and disabled when the HXTAL is stopped. Once the HXTAL f ailure is detected, the
HXTAL will be automatically disabled. The HXTAL clock stuck interrupt f lag, CKMIF, in the
clock interrupt register, RCU_INT, will be set and the HXTAL failure event will be generated.
This f ailure interrupt is connected to the non-maskable Interrupt, NMI, of the Cortex-M4. If the
HXTAL is selected as the clock source of CK_SYS, PLL and CK_RTC, the HXTAL failure will
f orce the CK_SYS source to IRC8M, the PLL will be disabled automatically. If the HXTAL is
selected as the clock source of PLL, the HXTAL failure will f orce the PLL closed automatically.
If the HXTAL is selected as the clock source of RTC, the HXTAL f ailure will reset the RTC
clock selection.
Clock output capability
The clock output capability is ranging from 3 MHz to 168 MHz. There are several clock signals
can be selected via the CK_OUT0 clock source selection bits, CKOUT0SEL, in the clock
conf iguration register 0 (RCU_CFG0). The corresponding GPIO pin should be configured in
the properly alternate function I/O (AFIO) mode to output the selected clock signal..
Table 5-1. Clock output 0 source select
Clock Source 0 Selection bits
Clock Source
00xx
NO CLK
0100
CK_SYS
0101
CK_IRC8M
0110
CK_HXTAL
0111
CK_PLL/2
1000
CK_PLL1
1001
CK_PLL2/2
Содержание 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 ...