29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

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.

RM0008<br />

Real-time clock (RTC)<br />

16.3.5 RTC flag assertion<br />

The RTC Second flag (SECF) is asserted on each RTC Core clock cycle before the update<br />

of the RTC Counter.<br />

The RTC Overflow flag (OWF) is asserted on the last RTC Core clock cycle before the<br />

counter reaches 0x0000.<br />

The RTC_Alarm <strong>and</strong> RTC Alarm flag (ALRF) (see Figure 156) are asserted on the last RTC<br />

Core clock cycle before the counter reaches the RTC Alarm value stored in the Alarm<br />

register increased by one (RTC_ALR + 1). The write operation in the RTC Alarm <strong>and</strong> RTC<br />

Second flag must be synchronized by using one of the following sequences:<br />

● Use the RTC Alarm interrupt <strong>and</strong> inside the RTC interrupt routine, the RTC Alarm<br />

<strong>and</strong>/or RTC Counter registers are updated.<br />

● Wait for SECF bit to be set in the RTC Control register. Update the RTC Alarm <strong>and</strong>/or<br />

the RTC Counter register.<br />

Figure 156. RTC second <strong>and</strong> alarm waveform example with PR=0003, ALARM=00004<br />

RTCCLK<br />

RTC_PR 0002 0001 0000 0003 0002 0001 0000 0003<br />

0002 0001 0000 0003<br />

0002 0001 0000 0003<br />

0002 0001 0000 0003<br />

0002 0001 0000 0003<br />

RTC_Second<br />

RTC_CNT 0000 0001<br />

0002<br />

0003<br />

0004<br />

0005<br />

RTC_ALARM<br />

1 RTCCLK<br />

ALRF<br />

(not powered<br />

in St<strong>and</strong>by)<br />

can be cleared by software<br />

Figure 157. RTC Overflow waveform example with PR=0003<br />

RTCCLK<br />

RTC_PR 0002 0001 0000 0003 0002 0001 0000 0003<br />

0002 0001 0000 0003<br />

0002 0001 0000 0003<br />

0002 0001 0000 0003<br />

0002 0001 0000 0003<br />

RTC_Second<br />

RTC_CNT FFFFFFFB FFFFFFFC<br />

FFFFFFFD<br />

FFFFFFFE<br />

FFFFFFFF<br />

0000<br />

RTC_Overflow<br />

1 RTCCLK<br />

OWF<br />

(not powered<br />

in St<strong>and</strong>by)<br />

can be cleared by software<br />

Doc ID 13902 Rev 9 391/995

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

Saved successfully!

Ooh no, something went wrong!