[riot-notifications] [RIOT-OS/RIOT] cpu/fe310: periph/timer: reset counter in timer_init() (#11046)

kenrabold notifications at github.com
Thu Feb 21 23:36:44 CET 2019


I don't have any issue with the change (setting the value of the timer to 0 during a call to timer_init()). The timer is reset to 0 on a processor reset and counts up from there. However, it looks like the isr_yield_higher test app assumes that the timer is always set to 0 when it runs because of this code:

`    while(xtimer_now_usec() < TEST_TIME) {}`

rather that taking a snapshot of the xtimer_now_uesc() value at the start of the test and doing something like this:

`    while(xtimer_now_usec() - now < TEST_TIME) {}`

So my question is should the timer always be reset to 0 on a call to timer_init() as a RIOT OS rule? Or is this a problem with the implementation of this particular test app?



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11046#issuecomment-466196040
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190221/c96b5933/attachment.html>


More information about the notifications mailing list