Rtc Initialization And Configuration - ST STM32F205 series Reference Manual

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32F205 series:
Table of Contents

Advertisement

Real-time clock (RTC)
The wakeup timer clock input can be:
RTC clock (RTCCLK) divided by 2, 4, 8, or 16.
When RTCCLK is LSE(32.768kHz), this allows configuring the wakeup interrupt period
from 122 µs to 32 s, with a resolution down to 61µs.
ck_spre (usually 1 Hz internal clock)
When ck_spre frequency is 1Hz, this allows achieving a wakeup time from 1 s to
around 36 hours with one-second resolution. This large programmable time range is
divided in 2 parts:
The WUTF flag must then be cleared by software.
When the periodic wakeup interrupt is enabled by setting the WUTIE bit in the RTC_CR2
register, it can exit the device from low-power modes.
The periodic wakeup flag can be routed to the AFO_ALARM output provided it has been
enabled through bits OSEL[1:0] of RTC_CR register. AFO_ALARM polarity can be
configured through the POL bit in the RTC_CR register.
System reset, as well as low-power modes (Sleep, Stop and Standby) have no influence on
the wakeup timer.
22.3.5

RTC initialization and configuration

RTC register access
The RTC registers are 32-bit registers. The APB interface introduces 2 wait-states in RTC
register accesses.
RTC register write protection
After system reset, the RTC registers are protected against parasitic write access with the
DBP bit of the PWR power control register (PWR_CR). The DBP bit must be set to enable
RTC registers write access.
After backup domain reset, all the RTC registers are write-protected. Writing to the RTC
registers is enabled by writing a key into the Write Protection register, RTC_WPR.
The following steps are required to unlock the write protection on all the RTC registers
except for RTC_ISR[13:8], RTC_TAFCR, and RTC_BKPxR.
1.
Write '0xCA' into the RTC_WPR register.
2.
Write '0x53' into the RTC_WPR register.
Writing a wrong key reactivates the write protection.
The protection mechanism is not affected by system reset.
574/1378
from 1s to 18 hours when WUCKSEL [2:1] = 10
and from around 18h to 36h when WUCKSEL[2:1] = 11. In this last case 2
added to the 16-bit counter current value.When the initialization sequence is
complete (see
Programming the wakeup timer on page
counting down.When the wakeup function is enabled, the down-counting remains
active in low-power modes. In addition, when it reaches 0, the WUTF flag is set in
the RTC_ISR register, and the wakeup counter is automatically reloaded with its
reload value (RTC_WUTR register value).
RM0033 Rev 8
RM0033
is
16
576), the timer starts

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F205 series and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Stm32f207 seriesStm32f215 seriesStm32f217 series

Table of Contents