![Geehy SEMICONDUCTOR APM32F405 Series User Manual Download Page 274](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f405-series/apm32f405-series_user-manual_573630274.webp)
www.geehy.com Page 273
Figure 68 RTC Structure Block Diagram
RTC_TS
Backup and
tamper
sampling
controller
Timestamp
RTC_TAMP2
RTC_TAMP1
Timestamp
controller
LSECLK
HSECLK
LSICLK
Asynchronous
prescaler
7bit
RTC
calibration
Synchronous
prescaler
15bit
Wake-up
prescaler
/2,/4,/8,/16
16bit reload
wake-up
counter
RTC
output
Subsecond
Calendar
Time and date
register
Alarm B
ALRBFLG
WUTFLG
TSFLG
RTC_OUT
RTC_ALARM
RTC_CALIB
RTCCLK
Digital
calibration
register
Alarm A
ALRAFLG
Match
512Hz
1Hz
Match
RTC_AF2
RTC_AF1
TSEN
TPxEN
Note:
(1) Alternate function output: RTC_OUT is output in one of the following two forms
RTC_CALIB: This output is enabled through CALOEN bit of RTC_CTRL register, and when
the frequency of LSECLK is 32.768kHz, the clock output is 512Hz or 1Hz.
RTC_ALARM: This output, Alarm A, is enabled through OUTSEL bit of RTC_CTRL register.
(2) Alternate function input:
RTC_TS: Timestamp event
RTC_TAMP1: Tamper event detection 1
RTC_TAMP2: Tamper event detection 2
(3) The multiplexing function of RTC_AF1 and RTC_AF2 is connected to PC13 and PI8
respectively
Functional description
Timebase unit
Clock source
RTC has three clock sources:
External LSECLK crystal oscillator
External HSECLK crystal oscillator
Internal LSICLK
Select different clock sources by configuring the register of the clock controller
CCM.
Prescaler
When backup power supply is used, the power consumption of RTC peripherals