Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
stm32:peripherals:rtc_wakeup [2017/10/24 10:41] – [Setup wakeup timer] kjaz | stm32:peripherals:rtc_wakeup [2021/09/06 07:29] – frtt | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Wake Up Timer ====== | + | {{: |
The wakeup timer is a programmable 16 bit auto-reload down-counter. \\ | The wakeup timer is a programmable 16 bit auto-reload down-counter. \\ | ||
Line 40: | Line 40: | ||
* Program reload value in '' | * Program reload value in '' | ||
* Enable wakeup interrupt in '' | * Enable wakeup interrupt in '' | ||
- | * Clear any pending wakeup interrupt flag in '' | ||
To use the wakeup interrupt, you need to configure the EXTI channel \\ | To use the wakeup interrupt, you need to configure the EXTI channel \\ | ||
and enable it in the NVIC: | and enable it in the NVIC: | ||
+ | * Clear any pending wakeup interrupt flag in '' | ||
* Configure the dedicated [[exti|EXTI interrupt]] channel for the RTC. \\ I.e. select edge and enable. | * Configure the dedicated [[exti|EXTI interrupt]] channel for the RTC. \\ I.e. select edge and enable. | ||
* Enable the RTC wakeup interrupt in the [[nvic|NVIC]]. | * Enable the RTC wakeup interrupt in the [[nvic|NVIC]]. | ||
Line 90: | Line 90: | ||
|WUTWF*|0|Wake up timer configuration not allowed| | |WUTWF*|0|Wake up timer configuration not allowed| | ||
|:::|1|Wake up timer configuration allowed| | |:::|1|Wake up timer configuration allowed| | ||
+ | |WUTF||Wake up timer flag is set by hardware when wakeup counter reaches 0 and cleared by software by writing 0.|| | ||
* This bit is set, after the WUTE bit (control register) has been set to 0, and reset by hardware. | * This bit is set, after the WUTE bit (control register) has been set to 0, and reset by hardware. | ||
+ | |||
+ | ===== Back domain control register ===== | ||
+ | |||
+ | ==== RCC_BDCR ==== | ||
+ | Back domain control register | ||
+ | |||
+ | \\ {{rcc_reg_bdcr.svg}} \\ \\ | ||
+ | |||
+ | |< 100% 5em 5em >| | ||
+ | |RTCEN*|0|RTC clock disabled| | ||
+ | |:::|1|RTC clock enabled| | ||
+ | |RTCSEL|00|No clock| | ||
+ | |:::|01|LSE oscillator clock used as the RTC clock| | ||
+ | |:::|10|LSI oscillator clock used as the RTC clock| | ||
+ | |:::|11|HSE oscillator clock divided by a programmable prescaler(selection Through RTCPRE[4:0] bits in the RCC clock configuration register (RCC_CFGR)) used as the RTC clock| | ||
+ |