[En-Nut-Discussion] Timer timing changed btw. ver 2.5.2 and 3.2.1
Harald Kipp
harald.kipp at egnite.de
Fri May 30 21:32:14 CEST 2003
Some explanation:
The Ethernuts are equipped with 32kHz clock crystal. This is used
for the system timer tick (every 62.5 ms) and to have a reference
for automatic main crystal frequency detection. Ethernut must know
its main crystal frequency to properly calculate the baudrate divisor
for serial I/O.
Many people have asked for adding some extra code, so Nut/OS will be
able to run without the 32kHz crystal. But without reference, there's
no chance to determine the main clock. So the extra code is activated
by adding
-DNUT_CPU_FREQ=<main crytal frequency in Hertz>
So in your case, if you are using a board (like original Ethernut)
with 32kHz crystal, then do not use -DNUT_CPU_FREQ. Btw. this option
only applies to os/timer.c. You need to recompile this file and
relink the libnutos.lib. Or to make it more simple, run
make clean
and
make install
in your installation directory.
Anyway, your observation is valuable for people running boards without
crystal. Seems to be a bug.
Harald
More information about the En-Nut-Discussion
mailing list