| Electronic Components Datasheet Search |
|
AN3371 Datasheet(PDF) 29 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3371 Datasheet(HTML) 29 Page - STMicroelectronics |
|
29 / 45 page ![]() AN3371 Overview of the STM32 advanced RTC Doc ID 018624 Rev 5 29/45 Figure 20. Periodic wakeup routed to RTC_ALARM pinout 1.12 RTC security aspects 1.12.1 RTC register write protection To protect RTC registers against possible parasitic write accesses after reset, the RTC registers are automatically locked. They must be unlocked to update the current calendar time and date. Writing to the RTC registers is enabled by programming a key in the Write protection register (RTC_WPR). The following steps are required to unlock the write protection of the RTC register: 1. Write 0xCA into the RTC_WPR register. 2. Write 0x53 into the RTC_WPR register. Writing an incorrect key automatically reactivates the RTC register write access protection. 1.12.2 Enter/exit initialization mode The RTC can operate in two modes: ● Initialization mode, where the counters are stopped. ● Free-running mode, where the counters are running. The calendar cannot be updated while the counters are running. The RTC must consequently be switched to the Initialization mode before updating the time and date. When operating in this mode, the counters are stopped. They start counting from the new value when the RTC enters the Free-running mode. The INIT bit of the RTC_ISR register enables you to switch from one mode to another, and the INITF bit can be used to check the RTC current mode. The RTC must be in Initialization mode to program the time and date registers (RTC_TR and RTC_DR) and the prescalers register (RTC_PRER). This is done by setting the INIT bit and waiting until the RTC_ISR_INITF flag is set. To return to the Free-running mode and restart counting, the RTC must exit the Initialization mode. This is done by resetting the INIT bit. Only a power-on reset can reset the calendar. A system reset does not affect it but resets the shadow registers that are read by the application. They are updated again when the RSF bit is set. After a system reset, the application can check the INITS status flag in the RTC_ISR register to verify if the calendar is already initialized. This flag is reset when the MS19536V1 RTC_ALARM output OSEL[1:0]=11 Wakeup unit 16-bit autoreload timer Periodic wakeup flag |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |