[En-Nut-Discussion] Real time clock on 1.3F not accurate anymore.
Lars Andersson
lars at larsandersson.com
Sun Feb 19 18:26:54 CET 2006
Hi,
it should be 1.3F in the subject line.
I was thinking maybe this is a hardware fault after all?
It is probably not, I have two NUT 1.3F boards with identical behaviour and
flashing the old 3.3.0.1 .HEX file back onto any of the NUTs the problem
is gone.
Regards,
Lars H. Andersson
> -----Original Message-----
> From: en-nut-discussion-bounces at egnite.de
> [mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of
> Lars Andersson
> Sent: Saturday, 18 February, 2006 14:49
> To: 'Ethernut User Chat (English)'
> Subject: [En-Nut-Discussion] Real time clock on 1.3G not
> accurate anymore.
>
>
> Hi group,
> when moving from version 3.3.0.1 to 4.0.1.0 in an application
> running on 1.3F boards I found my homemade RTC using a 1 second
> timer callback was very inaccurate; about 1/60 to slow. I
> then switched to
> using the
> built-in RTC using stime() and time().
>
> I find the built-in RTC is also very inaccurate in the same
> way as the timer
> callback was,
> about one second too slow per minute.
>
> I use ethernut 1.3F NUT 4.0.1.0 and winavr 3.4.1
> NutGetCpuClock() returns 14.7438 MHz
> NutGetTickClock()returns 1024 Hz
>
> I tried to follow what happens with platform definitions
> from the configurator and onvards in code generation thinking that
> NUT_TICK_FREQ
> might be wrong. Unfortunately, I got lost in this (for me) very large
> forest.
> It certainly had been easier if the error had been greater
> like double freq
> or so.
>
> Any help is appreciated.
>
> HW manual enhwm16 says:
> - An additional 32.768 kHz crystal (Q2) drives an on-chip asynchronous
> timer,
> - which is typically used for a software realtime clock.
>
> ostimer.c says:
> Since version 3.9.8, the default frequency had been changed
> from 16 Hz to 1024 Hz, when the timer is running with an
> external 32 kHz clock crystal.
>
> Best regards,
> Lars H. Andersson
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>
More information about the En-Nut-Discussion
mailing list