| Electronic Components Datasheet Search |
|
AN3060 Datasheet(PDF) 21 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3060 Datasheet(HTML) 21 Page - STMicroelectronics |
|
21 / 23 page ![]() AN3060 RTC initialization Doc ID 16253 Rev 2 21/23 Power-up from backup Coming out of backup, the first thing to do is read the time. Prior to clearing the HT bit, the RTC's buffer/transfer registers will contain the time of power down. If the duration of power outage is needed by the application, the time of power down will be required. Otherwise, this step can be skipped. The next step is to clear the HT bit by writing it to 0. It is very important that the HT bit be cleared prior to writing any of the timekeeping registers (addresses 0x00 to 0x07). Failure to do so can resulting in corrupting the RTC counters. If, at this point in the application flow, the present time is required, the time would be read. With the HT bit clear, the present time will be returned by a read. Upon servicing any interrupts from the RTC - e.g., alarm or OF - the flags register must be cleared. Most of the flag bits clear upon reading, but the OF bit must be written to 0. Also, the user should bear in mind that clearing the alarm flags (AF1, AF2) and oscillator fail flag (OF) will clear the associated interrupt. Figure 12. Power-up from backup Watchdog and timer Lastly, power cycling always leaves the watchdog and timer disabled. If either is being used by the application, they will need to be re-initialized. Clear HT bit Optional: Read time/date (present time). off_duration = present_time – time_of-power-down Clear any flags (read flags register) Optional: Re-initialize watchdog. Optional: Re-enable / Re-initialize timer. Optional: Read time/date (time of power-down). Power-up from backup END AM04730v1 |
|
|
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 |