
GD32L23x User Manual
269
16.3.14.
Calibration clock output
Calibration clock can be output on the RTC_OUT if COEN bit is set to 1.
When the COS bit is set to 0(this is default) and asynchronous prescaler is set to
0x7F(FACTOR_A), the frequency of RTC_CALIB is f
rtcclk
/64.When the RTCCLK is 32.768KHz,
RTC_CALIB output is cor
responding to 512Hz.It’s recommend to using rising edge of
RTC_CALIB output for there may be a light jitter on falling edge.
When the COS bit is set to 1, the RTC_CALIB frequency is:
𝑓
𝑟𝑡𝑐_𝑐𝑎𝑙𝑖𝑏
=
𝑓
𝑟𝑡𝑐𝑐𝑙𝑘
(𝐹𝐴𝐶𝑇𝑂𝑅_𝐴+1)×(𝐹𝐴𝐶𝑇𝑂𝑅_𝑆+1)
(16-5)
When the RTCCLK is 32.768 KHz, RTC_CALIB output is corresponding to 1Hz if prescaler
are default values.
16.3.15.
Alarm output
When OS control bits are not reset, RTC_ALARM alternate function output is enabled. This
function will directly output the content of alarm flag or auto wakeup flag bit in RTC_STAT.
The OPOL bit in RTC_CTL can configure the polarity of the alarm or auto wakeup flag output
which means that the RTC_ALARM output is the opposite of the corresponding flag bit or not.
16.3.16.
RTC pin configuration
RTC_OUT, RTC_TS and RTC_TAMP0 use the same pin (PC13). Function of PC13 is
controlled by the RTC and regardless of PC13 GPIO configuration. The RTC functions of
PC13 are available in all low-power modes and in VBAT only mode.
The priority of the PC13 output shown in
Table 16-1 RTC pin PC13 configuration
Table 16-1 RTC pin PC13 configuration
function
configuration
and pin function
OS[1:0]
(output
selection
)
COEN
(calibration
output
)
TP0EN
(tamper
enabled)
TSEN
(time
stamp
enabled)
ALARMOUTTYP
E(RTC_ALARM
output type
)
Alarm out
output open drain
01 or 10 or 11
-
-
-
0
Alarm out
output push-pull
01 or 10 or 11
-
-
-
1
Calibration
output push-pull
00
1
-
-
-
TAMP0
input floating
00
0
1
0
-
TIMESTAMP
and
TAMP0
input floating
00
0
1
1
Don’t care