09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>RM0090</strong> Real-time clock (RTC)<br />

Figure 222. RTC block diagram<br />

LSE (32.768 Hz)<br />

HSE_RTC<br />

(4 MHz max)<br />

LSI<br />

RTC_TAMP1<br />

Smooth<br />

calibration<br />

RTC_CALR<br />

RTCCLK<br />

Asyn ch.<br />

7-bit prescaler<br />

(default = 128)<br />

ck_apre<br />

(default 256 Hz)<br />

1. On STM32F4xx devices, the RTC_AF1 and RTC_AF2 alternate functions are connected to PC13 and PI8, respectively.<br />

23.3 RTC functional description<br />

23.3.1 Clock and prescalers<br />

512 Hz<br />

RTC_PRER RTC_PRER<br />

WUCKSEL[1:0]<br />

Prescaler<br />

/ 2, 4, 8, 16<br />

Coarse<br />

Calibration<br />

RTC_CALIBR<br />

1 Hz<br />

Synchronous<br />

15-bit prescaler<br />

RTC_WUTR<br />

16-bit wakeup<br />

auto-reload timer<br />

Alarm A<br />

(RTC_ALRMAR<br />

RTC_ALRMASSR<br />

ck spre registers)<br />

(default 1 Hz)<br />

(default = 256) Calendar<br />

Shadow register<br />

(RTC_SSR)<br />

Shadow registers<br />

(RTC_TR,<br />

RTC_DR)<br />

RTC_TAMP2<br />

Time stamp<br />

registe rs<br />

RTC_CALIB<br />

The RTC clock source (RTCCLK) is selected through the clock controller among the LSE<br />

clock, the LSI oscillator clock, and the HSE clock. For more information on the RTC clock<br />

source configuration, refer to Section 6: Reset and clock control for (RCC).<br />

A programmable prescaler stage generates a 1 Hz clock which is used to update the<br />

calendar. To minimize power consumption, the prescaler is split into 2 programmable<br />

prescalers (see Figure 222: RTC block diagram):<br />

● A 7-bit asynchronous prescaler configured through the PREDIV_A bits of the<br />

RTC_PRER register.<br />

● A 15-bit synchronous prescaler configured through the PREDIV_S bits of the<br />

RTC_PRER register.<br />

MS19902V3<br />

Note: When both prescalers are used, it is recommended to configure the asynchronous prescaler<br />

to a high value to minimize consumption.<br />

RTC_TS<br />

Alarm B<br />

(RTC_ALRMBR<br />

RTC_ALRMBSSR<br />

registers)<br />

Backup and<br />

RTC tamper<br />

control registers<br />

=<br />

=<br />

ALRAF<br />

RTC_ALARM<br />

ALRBF<br />

Doc ID 018909 Rev 3 622/1416<br />

TSF<br />

WUTF<br />

TAMPE<br />

TSE<br />

Output<br />

control<br />

RTC_OUT<br />

RTC_AF1<br />

RTC_AF2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!