| Electronic Components Datasheet Search |
|
AN3133 Datasheet(PDF) 16 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3133 Datasheet(HTML) 16 Page - STMicroelectronics |
|
16 / 43 page ![]() Real-time clock overview AN3133 16/43 Doc ID 16956 Rev 5 Only a power-on reset can reset the calendar. A system reset does not affected it but resets the shadow registers which are read by the application. They will be updated again when the RSF bit is set. After a system reset, the application can check the INITS status flag in RTC_ISR1 to verify if the calendar is already initialized. This flag is reset when the calendar year field is set to 0x00 (power-on reset value), meaning that the calendar must be initialized. 1.8.3 Synchronization When the application reads the calendar, it actually accesses shadow registers which contain a copy of the real calendar time and date clocked by the RTCCLK clock. To make sure that the shadow registers are updated with the current calendar value, the application must check that the RSF bit is set in the RTC_ISR1 register. This bit is set by hardware each time the calendar time and date shadow registers are updated, that is when the RTCCLK clock is synchronized with the system clock SYSCLK. The application software must clear the RSF bit after reading the calendar registers. When the system is woken up from Active-halt mode (SYSCLK was off), the application must first clear the RSF bit, and then wait until it is set again before reading the calendar registers. This ensures that the value read by the application is the current calendar value, and not the value before entering Active-halt mode. On medium+ and high density devices, it is possible to directly read the calendar instead of reading shadow registers. This is configured by setting the BYPSHAD bit in the RTC_CR1 register. In this case, it is not necessary to wait for the synchronization time, but the calendar registers consistency must be checked by SW by executing a SW vote. The user must read the required calendar fields values. Then the read operation must be performed again. The results of the two read sequence are then compared. If the results match, the read result is correct. If they do not match, the fields must be read once more, and the 3rd read result is valid. |
|
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 |