| Electronic Components Datasheet Search |
|
AN3371 Datasheet(PDF) 34 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3371 Datasheet(HTML) 34 Page - STMicroelectronics |
|
34 / 45 page ![]() RTC firmware driver API AN3371 34/45 Doc ID 018624 Rev 5 Note: After a reset, the backup domain (RTC registers, RTC backup data registers and backup SRAM) is protected against any possible unwanted write access. To enable access to the RTC domain and RTC registers: – Enable the Power Controller (PWR) APB1 interface clock using the RCC_APB1PeriphClockCmd() function. – Enable the access to the RTC domain using the PWR_BackupAccessCmd() function on STM32F2xx and STM32F4xx devices, or the PWR_RTCAccessCmd() function on STM32L1xx, STM32F0xx and STM32F3xx devices. – Select the RTC clock source using the RCC_RTCCLKConfig() function. – Enable RTC Clock using the RCC_RTCCLKCmd() function. 3.1.1 Time and date configuration To configure the RTC Calendar (Time and Date), use the RTC_SetTime() and RTC_SetDate() functions. To read the RTC Calendar, use the RTC_GetTime(), RTC_GetDate() and RTC_GetSubSecond() functions. To add or subtract one hour to/from the RTC Calendar, use the RTC_DayLightSavingConfig() function. 3.1.2 Alarm configuration RTC Alarm To configure the RTC alarm, use the RTC_SetAlarm() function. To enable the selected RTC alarm, use the RTC_AlarmCmd() function. To read the RTC alarm, use the RTC_GetAlarm() function. RTC Alarm Sub-second To configure the RTC alarm sub-second, use the RTC_AlarmSubSecondConfig() function. To read the RTC alarm sub-second, use the RTC_GetAlarmSubSecond() function. 3.1.3 RTC wakeup configuration To configure the RTC Wakeup Clock source, use the RTC_WakeUpClockConfig() function. To configure the RTC WakeUp Counter, use the RTC_SetWakeUpCounter() function. To enable the RTC WakeUp, use the RTC_WakeUpCmd() function. To read the RTC WakeUp Counter register, use the RTC_GetWakeUpCounter() function. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |