[En-Nut-Discussion] timer problem

Hans Franke franke.hans at freenet.de
Sun Dec 16 23:41:50 CET 2007


Hi Bob,
many thanks for the prompt answer.
It seemed to be the same problem.
I intended the same procedure like you (workaround) already, because 
timers are absolutly dominant stuff.

Again, many thanks. So, I loose not much time

One shortly Question more:
what's your expierence with nut-os (events, messages). Is it useful???

many regards and best wishes for christmas and the new year

Hansel

PragmaLab schrieb:
> Hello Hansel,
>
>   
>> so i see that after the "crash" the timerlist is destroyed and an 
>> endloss loop inside of  "NutTimerInsert" is working. Only one timer 
>> exists, instead of my intended three timers, which really 
>> exists before 
>> (LED-Output).
>>
>> timer1->next = timer1; timer1->prev=timer1;
>> timer2->next = timer3; timer2->prev= NULL;
>> timer3->next = timer2; timer3->prev= NULL;
>>
>> had anyone a problem with timers in nut-os???
>>     
>
>
> I'm not sure if the timer problem we worked around some half year ago is
> related to yours. I just wanted to mention that we indeed had problems with
> the timerroutines. What happened was:
>
> 1) we resuested a one-shot timer in thread A
> 2) used another timer in thread B (implicit by calling NutSleep(xxx))
> 3) manually killed the first one-shot timer while thread A was suspened
> 4) Noticed that when thread A woke up, it still assumed that the first
> one-shot timer was there,
>    killed it when it expired, but in fact was killing the wrong timer (of
> thread B)
> 5) so the second timer of thread B never expired anymore, so thread B never
> woke up, so the watchdog was not kicked, so.....
>
> We even purchased an ICE50 to trace down this problem. The problem was 100%
> reproducable and clearly we could see it happen in the tracebuffer (a
> feature which is not available with a MKII -debugger). I've posted this
> issue in this list but never got any reply.
>
> First we used NutOS 3.9.6 which did not suffer from this problem because
> timercallbacks run in interrupt context. We noticed the bug when we started
> using 4.2.1 (to shorten interrupt latencies, callback functions no longer
> run in interrupt-context).
>
> Our workaround was (and still is) to use our own timeradministration.
>
> Hope this helps?
>
> Best regards,
>
> Rob van Lieshout
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
>
>   


-- 
Hans Franke
Dipl.-Ing. Elektrotechnik

Kapa-Technik Hans Franke
E-Mail: franke.hans at freenet.de <mailto:%20franke.hans at freenet.de>
Tel:      (+49) (0)431/2000802
FAX:   (+49) (0)431/2000803
Mobil: (+49) (0)151/17805508

Gib jedem Tag die Chance, der schönste Deines Lebens zu werden
"Give every day the chance to become the most beautiful day in your 
life."(Mark Twain)



More information about the En-Nut-Discussion mailing list