[riot-devel] Question about hwtimer_now implementation..

Hauke Petersen hauke.petersen at fu-berlin.de
Wed Oct 15 11:51:15 CEST 2014

Hi Jaokim,

I try to answer your questions to the best of my knowledge...

On 14.10.2014 22:06, Joakim Gebart wrote:
> I have some other hwtimer questions too:
> Is the hardware timer module expected not to halt when the CPU is
> entering low power modes (STOP etc.)?
I am actually not sure this specified (yet).
> Is the hwtimer module expected to be able to keep any particular precision?
There is no official RIOT-wide requirement on hwtimer precision so far. 
There are however some device (i.e. radio) drivers, that do need a 
certain precision. Unifying this over all platforms is however still 
work in progress.
> Does the hwtimer module need to be able to wake the CPU from sleep?
Depends on the answer of your first question...
>> But as Ludwig mentioned, hwtimer_arch_now() is expected to return this free running counter value.
> What are the assumptions made by the OS on this timer implementation?
> Is it expected to not overflow in less than X seconds? There has been
> some discussions on the mailing list and the Github tracker about some
> platforms with only 16 bit counters for timers and the problems that
> comes with it.
In general the hwtimer is allowed to overflow and there is no 
specification on the period this happens. Providing a timer abstraction 
that can cope with different overflow intervals and different 
timer-widths is something we are working on, though.

>> Best, Thomas
>> _______________________________________________
>> devel mailing list
>> devel at riot-os.org
>> http://lists.riot-os.org/mailman/listinfo/devel
> Best regards,
> Joakim
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> http://lists.riot-os.org/mailman/listinfo/devel

More information about the devel mailing list