[En-Nut-Discussion] Timer timing changed btw. ver 2.5.2 and 3.2.1
Lars Andersson
lakab at telia.com
Sun Jun 1 10:56:48 CEST 2003
Harald,
Thank you for taking your time to explain things. I really
appreciate and enjoy.
The board is an original Ethernut board marked ver 1.3 Rev=C
with MAC 01002A on a hand written label.
The reason I put in -DNUT_CPU_FREQ=3686400 in nut/os 3.0.1 was that
without it the timer was was way off, almost double or half speed,
I do not remember which way. With the define in, the timing
was perfect, counting seconds in a real time clock application
for 36 days it was off by 15 seconds. In 2.5.6 timing was okay
without the define.
So, now I try without the CPU_FREQ define in nut/os 3.2.1,
NutGetCpuClock() returns a reasonable value, 3.6865 MHz,
but real time based on on counting callbacks from a 1 second
timer is much worse than with CPU_FREQ defined, it is now
21% slower. (I have not touched anything in the OS except
defining/undefining CPU_FREQ and reMaking)
Regards,
Lars Andersson
More information about the En-Nut-Discussion
mailing list