FS#1087 - check and autopreset for valid RTC-values

Attached to Project: Rockbox
Opened by Anonymous Submitter - Thursday, 13 March 2003, 01:12 GMT
Last edited by Björn Stenberg (zagor) - Wednesday, 04 June 2003, 14:23 GMT
Task Type Patches
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


This is a replacement for formerly submitted #699086.

With this patch, time/date-values are stored in the
config_block from [0xa9] to [0xad], which is saved on
the disk.

The time values have got 36bit alltogether:
second (0-59): 6 bit
minute (0-59): 6 bit
hour (0-23): 5 bit
dayofweek (0-7): 3 bit
day (0-31): 5 bit
month (0-12): 4 bit
year (0-99): 7 bit

Now the values are packed in 5 bytes of the config_block.

Known from #699086:
After a power-loss, the values are read from the
config_block and written to the RTC, so there is
immediately a defined status of the clock.

If the config_block is invalid, the time is generated
from the APPSVERSION-string, which is build at

If you just change the batteries, the last time on disk
will be set,
if you change the CONFIG_VERSION, the time you compiled
your ajbrec.ajz will be set.
This task depends upon

Closed by  Björn Stenberg (zagor)
Wednesday, 04 June 2003, 14:23 GMT
Reason for closing:  Rejected
Additional comments about closing:  Logged In: YES

Basically already solved in CVS.
Comment by Michael Schopferer (uchk) - Thursday, 13 March 2003, 01:17 GMT

I don't get it. I was logged in to sourceforge, but this
patch was not submitted with my login but as nobody.

So if you have any comments: (uchk at sourceforge)
Comment by Björn Stenberg (zagor) - Wednesday, 04 June 2003, 14:23 GMT

Basically already solved in CVS.