EasyManuals Logo

ST STM32F31xx User Manual

ST STM32F31xx
584 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #362 background imageLoading...
Page #362 background image
Real-time clock (RTC)
UM1581
362/584
DocID023800 Rev 1
19.2.7 Initialization and Configuration functions
This section provide functions allowing to initialize and configure the RTC Prescaler
(Synchronous and Asynchronous), RTC Hour format, disable RTC registers Write
protection, enter and exit the RTC initialization mode, RTC registers synchronization check
and reference clock detection enable.
1. The RTC Prescaler is programmed to generate the RTC 1Hz time base. It is split into
2 programmable prescalers to minimize power consumption.
 A 7-bit asynchronous prescaler and A 13-bit synchronous prescaler.
 When both prescalers are used, it is recommended to configure the
asynchronous prescaler to a high value to minimize consumption.
2. All RTC registers are Write protected. Writing to the RTC registers is enabled by
writing a key into the Write Protection register, RTC_WPR.
3. To Configure the RTC Calendar, user application should enter initialization mode. In
this mode, the calendar counter is stopped and its value can be updated. When the
initialization sequence is complete, the calendar restarts counting after 4 RTCCLK
cycles.
4. To read the calendar through the shadow registers after Calendar initialization,
calendar update or after wakeup from low power modes the software must first clear
the RSF flag. The software must then wait until it is set again before reading the
calendar, which means that the calendar registers have been correctly copied into the
RTC_TR and RTC_DR shadow registers. The RTC_WaitForSynchro() function
implements the above software sequence (RSF clear and RSF check).
ï‚· RTC_DeInit()
ï‚· RTC_Init()
ï‚· RTC_StructInit()
ï‚· RTC_WriteProtectionCmd()
ï‚· RTC_EnterInitMode()
ï‚· RTC_ExitInitMode()
ï‚· RTC_WaitForSynchro()
ï‚· RTC_RefClockCmd()
ï‚· RTC_BypassShadowCmd()
19.2.8 Backup Data Registers configuration functions
ï‚· RTC_WriteBackupRegister()
ï‚· RTC_ReadBackupRegister()
19.2.9 Output Type Config configuration functions
ï‚· RTC_OutputTypeConfig()
19.2.10 Shift control synchronisation functions
ï‚· RTC_SynchroShiftConfig()
19.2.11 Interrupts and flags management functions

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32F31xx and is the answer not in the manual?

ST STM32F31xx Specifications

General IconGeneral
BrandST
ModelSTM32F31xx
CategoryMicrocontrollers
LanguageEnglish

Related product manuals