AW: [En-Nut-Discussion] Synching Calldirect using NutOS

Oliver Schulz Oliver.Schulz at bong.de
Mon Oct 13 16:16:58 CEST 2003


Hi All,

Last weekend I wrote some code to get something similar like a RTC... 
It's based on the standard (or just MS?) C struct '_tm' and uses the
timer0 interrupt to update the "current" time and date on a per second
base.
Included leap year and day of week calculation.

If Harald is interested, perhaps it can be added to the Nut/OS. Please
let me know!

Oliver.


-----Ursprungliche Nachricht-----
Von: en-nut-discussion-admin at egnite.de
[mailto:en-nut-discussion-admin at egnite.de]Im Auftrag von Harald Kipp
Gesendet: Montag, 13. Oktober 2003 15:48
An: en-nut-discussion at egnite.de
Betreff: Re: [En-Nut-Discussion] Synching Calldirect using NutOS


Hi Andre,

Timing is a bad chapter in Nut/OS. Initially a second counter
had been implemented, but I had to learn, that the patches
for running Nut/OS without 32kHz crystal do not update this
counter. Another bad story is, that NutGetTickCount is almost
unusable for timing calculations unless you spoil the code
with lots of ifdefs.

Well, the new function NutGetSeconds() should be a better
basis for adding time(), gmtime() and all the other goodies.
As long as an accuracy of about 1 second is sufficient,
this should be easy to implement now.

On the protocol side NTP is quite complicated, I'd prefer
a simplified SNTP. But nothing is available right now, AFAIK.

Harald

At 18:07 13.10.2003 +0500, you wrote:
>Hi
>
>I need to get accurate timing (current time) from a Calldirect gprs
modem 
>using ethernut. Is there some support for getting accurate time in
NutOS? 
>Can I synch with NTP servers? Is there any such support for this?
Thanks
>
>
>-Andre
>
>_________________________________________________________________
>MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
>http://join.msn.com/?page=features/virus

How come I receive all worms from MS then. :-)


_______________________________________________
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