[En-Nut-Discussion] RFC: Adding NuGetJiffies() ( + NutGetJiffiesClock)

Matthias Ringwald mringwal at inf.ethz.ch
Mon Nov 27 11:51:58 CET 2006


The 32768 Hz RTC crystal used in most AVR designs is quite accurate  
but Nut/OS only provides read
access to pre-scaled "Ticks" (256 in earlier versions = 62.5 ms / 32  
now = 0.97.. ms).

I propose to add a NutGetJiffies() function which returns the current  
time as a unsigned long
which has the full resolution of the RTC. This provides accurate 30.5  
us time information for apps
that need it and does not require other changes to the nut/os system.

A NutGetJiffiesClock which would return the clock frequency (32768 in  
this case) would
provide for portability.

Cheers,
  Matthias



More information about the En-Nut-Discussion mailing list