[riot-notifications] [RIOT] Use multiple timers to implement the 'hwtimer' core module (#173)

Kévin Roussel notifications at github.com
Fri Aug 23 10:13:05 CEST 2013


In order to offer more than 3 or 4 available instances of 'hwtimer' for a given system --- a feature that may prove useful and even necessary if "hard real-time" applications are to be built upon RIOT --- we will need to use more than one hardware timer to implement this core module.

The main problem to do this is that different hardware timers have different, independent counters; and as such, they may have different counter values at the same given instant.

Actually, the value of the reference counter is not an issue when you only use hwtimers in a relative manner (that is: use the hwtimer_set(), hwtimer_wait()/hwtimer_spin() functions) ; you only need to now the current counter value for a given timer when you use the hwtimer_set_absolute() function. Is such a function really needed? I couldn't find a place where it was used in current RIOT code...

if we need to keep the hwtimer_set_absolute() function, we will need to handle the different counter values problem: either the index of the timer to set must be specified so as the correct target counter value can be pre-calculated, or the function must adjust the target value given according to the timer that will be set. In any case, the signature of the hwtimer_arch_now() function will need to be modified, so as to pass as a parameter the index of the timer whose counter shall be read.

What is your opinion on this subject?

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/173
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20130823/dbe6e036/attachment.html>


More information about the notifications mailing list