[riot-users] possible hwtimer bug

Aleksandr Mikoff sir.enmity at gmail.com
Sun Apr 14 13:47:57 CEST 2013


Currently i am testing RIOT on chronos and stm32f4discovery boards. Thank
you for your comments.
Finally i found the problem - i compile the code with DEBUG parameter, this
leads to printf lines inside thread_wakeup function, and that caused my
problem. Now, when i removed all printf code from this functions all works
fine.
Also some printf inside scheduler causes the same effect.



2013/4/14 Marco Ziegert <ziegert at inf.fu-berlin.de>

> Hello Aleksandr,
>
> as the name says hwtimer is hardware dependent - can you tell us which MCU
> you are using?
>
> If you are programming for the STM Cortex-M3/M4 - only 16-Bit Timer are
> implemented for hwtimer. 32-Bit Timer are very rare and may be used for
> more important tasks than waiting for longer periods. E.g. one 32-Bit Timer
> is temporarily used for hwtimer_now(). The longest period you can wait with
> a 16-Bit Timer are 54-56 seconds as far as I remember the implementation.
> For longer periods use the RTC alerts.
>
> Best regards,
> Marco Ziegert
>
> Am 14.04.2013 um 12:39 schrieb Aleksandr Mikoff <sir.enmity at gmail.com>:
>
> Dear developers and users,
> Today i discovered a very strange behaviour of scheduler. When i perform
> hwtimer_wait(x) function, where x - time to wait, if x < critical_value
> then the function is finished correctly, but if x>critical_value, then the
> function never wakes up. The critical_value varies and depends on time of
> excectuion of sched_set_status function.
> I have the following output from scheduler when the  function doesn`t
> wakes up:
> thread_wakeup: Trying to wakeup PID 1..
> status = 4875(or = 64)
> thread_wakeup: Thread is not sleeping!
> I tried to catch the function, which change the pid_status value, but
> nothing came out.
> Let me know, if you have any ideas, thank you.
>
> --
> Best regards,
> Aleksandr Mikov
>  _______________________________________________
> users mailing list
> users at riot-os.org
> http://lists.riot-os.org/mailman/listinfo/users
>
>
>
> _______________________________________________
> users mailing list
> users at riot-os.org
> http://lists.riot-os.org/mailman/listinfo/users
>
>


-- 
С уважением,
Миков Александр

RealTrac: пример применения разработанной нами технологии
http://www.rfidexpert.ru/ru/story/985 (rus, 13.09.2011)
http://www.rfidjournal.com/article/view/8600/1 (eng)

Оцените качество локации внутри помещений
http://www.youtube.com/watch?v=fmpKqhZGJBc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/users/attachments/20130414/aab3f9d2/attachment.html>


More information about the users mailing list