RTC time lost

Problem description

After setting the hardware RTC with the command:

# hwclock -w

after just few minutes the RTC already lost seconds with the command:

# hwclock -r


This problem is due to an error in the AT91Bootstrap configuration. We missing to set this flag during the make menuconfig setup (see Compile AT91Bootstrap).

The right configuration is this:

Slow Clock Configuration Options  --->
    [*] Use external 32KHZ oscillator as source of slow clock
    [ ]   Use external 32kHz clock as source of slow clock

You can re-compile the AT91Bootstrap following this article:

or simply change boot.bin in the first partition of microSD with the binaries file available on the same page

Problem with at91bootstrap 3.7

In some cases at91bootstrap 3.7 compiled for Aria and Arietta boards is not able to set properly the RTC registers in order to use the external quartz as slow clock source and it uses still the internal RC oscillator causing a not precise clock when in shutdown. You need to recompile the 3.8.8 version of at91bootsrap. You can try this 3.8.8 at91bootstrap binary:

(compiled for SAM9G25 CPU so for Aria and Arietta boards).