[En-Nut-Discussion] NutGetTickClock rounding (again)

Bernard Fouché bernard.fouche at kuantic.com
Fri Jul 18 13:13:35 CEST 2008


Henrik Maier wrote:
>
> So in the standard Ethernut case (1024Hz) if we waited 5 ticks, we actually
> waited 4.88 ms. So a bit less than we expected. Based on previous
> discussions from yourself and Duane I understand the function should round
> up to 6 ticks in this case which is exactly what the Linux calculation would
> do.
>
>   
Oops, yes you're right!
>> If the Linux calculation is fine, then let's take it: anyway, if the
>>     
>
> So are we then back to the following implementation proposal, which is the
> generic case of Linux' msecs_to_jiffies function?
>   
IMHO yes, and we have to keep all the possible cases listed in the Linux 
function (all possible relations between HZ & 1000ms/sec)

  Bernard



More information about the En-Nut-Discussion mailing list