[riot-devel] Question about hwtimer_now implementation..

Thomas Eichinger thomas.eichinger at fu-berlin.de
Tue Oct 14 19:36:11 CEST 2014


Hi Michael,

On 14 Oct 2014, at 19:26, Ludwig Ortmann <ludwig.ortmann at fu-berlin.de> wrote:

>> Specially, what should be hwarch_now()/hwtimer_arch_now be returning?
>> 
>> Is it supposed to be the ticks from boot, or the current value of the timer
>> from when hwtimer_arch_set*() called?
> 
> hwtimer_arch_now should return the "system time".
> As the timer may overflow, this is the tick count since boot in the
> first iteration.
To be more specific, hwtimer is started by RIOT during startup by auto_init. It is expect to run from this point on in upcounting mode. Optimally the underlying timer is 32bit wide and driven by a 1MHz clock. 

But as Ludwig mentioned, hwtimer_arch_now() is expected to return this free running counter value. 

Best, Thomas 


More information about the devel mailing list