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.

Power control (PWR) <strong>RM0090</strong><br />

Safe RTC alternate function wakeup flag clearing sequence<br />

If the selected RTC alternate function is set before the PWR wakeup flag (WUTF) is cleared,<br />

it will not be detected on the next event as detection is made once on the rising edge.<br />

To avoid bouncing on the pins onto which the RTC alternate functions are mapped, and exit<br />

correctly from the Stop and Standby modes, it is recommended to follow the sequence<br />

below before entering the Standby mode:<br />

● When using RTC alarm to wake up the device from the low-power modes:<br />

a) Disable the RTC alarm interrupt (ALRAIE or ALRBIE bits in the RTC_CR register)<br />

b) Clear the RTC alarm (ALRAF/ALRBF) flag<br />

c) Clear the PWR Wakeup (WUF) flag<br />

d) Enable the RTC alarm interrupt<br />

e) Re-enter the low-power mode<br />

● When using RTC wakeup to wake up the device from the low-power modes:<br />

a) Disable the RTC Wakeup interrupt (WUTIE bit in the RTC_CR register)<br />

b) Clear the RTC Wakeup (WUTF) flag<br />

c) Clear the PWR Wakeup (WUF) flag<br />

d) Enable the RTC Wakeup interrupt<br />

e) Re-enter the low power mode<br />

● When using RTC tamper to wake up the device from the low-power modes:<br />

a) Disable the RTC tamper interrupt (TAMPIE bit in the RTC_TAFCR register)<br />

b) Clear the Tamper (TAMP1F/TSF) flag<br />

c) Clear the PWR Wakeup (WUF) flag<br />

d) Enable the RTC tamper interrupt<br />

e) Re-enter the low-power mode<br />

● When using RTC time stamp to wake up the device from the low-power modes:<br />

a) Disable the RTC time stamp interrupt (TSIE bit in RTC_CR)<br />

b) Clear the RTC time stamp (TSF) flag<br />

c) Clear the PWR Wakeup (WUF) flag<br />

d) Enable the RTC TimeStamp interrupt<br />

e) Re-enter the low-power mode<br />

105/1416 Doc ID 018909 Rev 3

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

Saved successfully!

Ooh no, something went wrong!