Atmel AT91M55800A Answering Machine User Manual


 
75
1745D–ATARM–04-Nov-05
AT91M55800A
6. Hour (BCD check, in 24-hour mode check range 00 - 23 and check that AM/PM flag is
not set if RTC is set in 24-Hour mode, in 12-Hour mode check range 01 - 12)
7. Minute (check BCD and range 00 - 59)
8. Second (check BCD and range 00 - 59)
Note: If the 12-hour mode is selected by means of the RTC_MODE register, a 12-hour value can be
programmed and the returned value on RTC_TIME will be the corresponding 24-hour value.
The entry control checks the value of the AM/PM indicator (bit 22 of RTC_TIME register) to
determine the range to be checked.
13.2.4 Updating Time/Calendar
To update any of the time/calendar fields, the user must first stop the RTC by setting the corre-
sponding field in the Mode Register (RTC_MR). Bit UPDTIM must be set to update time fields
(hour, minute, second) and bit UPDCAL must be set to update calendar fields (century, year,
month, date, day).
Then the user must poll or wait for the interrupt (if enabled) of bit ACKUPD in the Status Reg-
ister (RTC_SR). Once the bit reads 1 (the user must clear this status bit by writing ACKUPD to
1 in RTC_SCR), the user can write to the appropriate register.
Once the update is finished, the user must reset (0) UPDTIM and/or UPDCAL in the Mode
Register (RTC_MR).
When programming the calendar fields, the time fields remain enabled. This avoids a time slip
in case the user stays in the calendar update phase for several tens of seconds or more.