[En-Nut-Discussion] Timer resolution....
Damian Slee
damian at commtech.com.au
Fri Aug 22 02:44:26 CEST 2003
See file makedefs.
uncomment #DEFS = -DNUT_CPU_FREQ=14745600
and rebuild libraries. By default the 37kHz crystal is used I think. This #define is also meant to remove the need of the 37kHz crystal on the board, and Calc cpu freq, just uses this #define value.
This is supposed to cause the timer interrupt at 1/1000. ie 1ms.
I tried it last week tho, and I couldn't get it to work. Must have done something wrong somewhere.
-----Original Message-----
From: Czerteak [mailto:czerteak at email.cz]
Sent: Friday, 22 August 2003 12:06 AM
To: en-nut-discussion at egnite.de
Subject: [En-Nut-Discussion] Timer resolution....
Hi,
I was just wondering whether there's an easy way to get better system clock
resolution. Digging through the sources (and experimenting, too) brought me
to the magic number of 62 which seems to be the shortest interval you can
wait (zero is considered exception). I need to get some data from the outside
through the data/adress bus and send them in the interval of 30ms. Whe I use
NutSleep(30) (or any other number between 1 and 62) it always returns after
62ms which is too long time period for me. On the other hand, send the data
at maximal speed (about 1ms according to my measuring) is too much.
I know about NutDelay which can be used to achieve that but it eats up the
whole CPU and other threads are frozen which is bad for me, too. :-(
I have a feeling that the clock ticks are interrupt driven. Is there a way to
make these interrupts appear at higher frequency?
Czerteak
P.S.: Thanks for the previous help. The fault was (as usual) on my side -> one
stupid wire was unplugged so the device reacted to more addresses than it was
supposed to... :-(
_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo/en-nut-discussion
More information about the En-Nut-Discussion
mailing list