<html><head><style> body {height: 100%; color:#000000; font-size:12pt; font-family:arial,helvetica,sans-serif;}</style></head><body><div>You get an infinite loop in _Watchdog_Tickle() if someone inserts an already inserted watchdog for example. This looks like a bug in the watchdog or event implementation. It would help a lot if you can provide a self contained test case. I have a STMF4 discovery board here.<br></div><div><br></div><div>----- Mr. Andrei Chichak <groups@chichak.ca> schrieb:<br>></div><div class="">A couple of days ago, Sebastian Huber rightly asked:</div><div class=""><br class=""><blockquote class=""><div class=""><br class="">In which function is this infinite loop?<br class=""></div></blockquote></div><br class=""><div class=""><br class=""></div><div class="">Please don’t take this as definitive, but your comments regarding events and watchdogs might be correct. I managed to get my debugger working and have a stuck program that seems to be spending a lot of time in Watchdog_Tickle</div><div class=""><br class=""></div><div class="">I am seeing:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px;" class="" data-mce-style="margin: 0px;"><div style="font-family: Monaco; font-size: 11px; margin: 0px;" class="" data-mce-style="font-family: Monaco; font-size: 11px; margin: 0px;">#0  _Watchdog_Tickle (header=0x20002e60 <_Watchdog_Ticks_header>) at ../../../../../../rtems/c/src/../../cpukit/score/src/watchdogremove.c:164</div><div style="font-family: Monaco; font-size: 11px; margin: 0px;" class="" data-mce-style="font-family: Monaco; font-size: 11px; margin: 0px;">#1  0x0001fa36 in _Watchdog_Tickle_ticks () at ../../cpukit/../../../stm32f4/lib/include/rtems/score/watchdogimpl.h:341</div><div style="font-family: Monaco; font-size: 11px; margin: 0px;" class="" data-mce-style="font-family: Monaco; font-size: 11px; margin: 0px;">#2  _Watchdog_Tick () at ../../../../../../rtems/c/src/../../cpukit/score/src/watchdogtick.c:28</div><div style="font-family: Monaco; font-size: 11px; margin: 0px;" class="" data-mce-style="font-family: Monaco; font-size: 11px; margin: 0px;">#3  0x0001d964 in _Timecounter_Tick_simple (delta=<optimized out>, offset=<optimized out>) at ../../../../../../rtems/c/src/../../cpukit/score/src/kern_tc.c:1932</div><div style="font-family: Monaco; font-size: 11px; margin: 0px;" class="" data-mce-style="font-family: Monaco; font-size: 11px; margin: 0px;">#4  0x00017a2c in rtems_timecounter_simple_downcounter_tick (tc=0x20001c70 <_ARMV7M_TC>, get=<optimized out>) at ../../../../../.././stm32f4/lib/include/rtems/timecounter.h:215</div><div style="font-family: Monaco; font-size: 11px; margin: 0px;" class="" data-mce-style="font-family: Monaco; font-size: 11px; margin: 0px;">#5  _ARMV7M_TC_tick () at ../../../../../../../../rtems/c/src/lib/libbsp/arm/stm32f4/../shared/armv7m/clock/armv7m-clock-config.c:53</div><div style="font-family: Monaco; font-size: 11px; margin: 0px;" class="" data-mce-style="font-family: Monaco; font-size: 11px; margin: 0px;">#6  Clock_isr (arg=0x0 <bsp_start_vector_table_begin>) at ../../../../../../../../rtems/c/src/lib/libbsp/arm/stm32f4/../shared/armv7m/clock/../../../../shared/clockdrv_shell.h:137</div><div style="font-family: Monaco; font-size: 11px; margin: 0px;" class="" data-mce-style="font-family: Monaco; font-size: 11px; margin: 0px;">#7  _ARMV7M_Systick_handler () at ../../../../../../../../rtems/c/src/lib/libbsp/arm/stm32f4/../shared/armv7m/clock/armv7m-clock-config.c:67</div><div style="font-family: Monaco; font-size: 11px; margin: 0px;" class="" data-mce-style="font-family: Monaco; font-size: 11px; margin: 0px;">#8  <signal handler called></div><div style="font-family: Monaco; font-size: 11px; margin: 0px;" class="" data-mce-style="font-family: Monaco; font-size: 11px; margin: 0px;">#9  0x00000000 in bsp_start_vector_table_begin ()</div><div style="font-family: Monaco; font-size: 11px;" class="" data-mce-style="font-family: Monaco; font-size: 11px;"><br class=""></div><div class="">Of course, your version of a watchdog is different from what I know so I don’t actually know what you are trying to achieve, but I suspect that it has something to do with the timeout on the rtems_event_receive call. The events are being posted 200 times per second and the receive will timeout at 1/10 second. Therefore a lot of timeouts will be expired, like every 5 ticks, and will then be immediately reestablished.</div><div class=""><br class=""></div><div class="">I will try and get more information until I screw up this debug session.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Andrei</div></div></div><div><br>-- <br></div><div><pre>Sebastian Huber, embedded brains GmbH<br></pre><div><br></div><pre>Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>Phone   : +49 89 189 47 41-16<br>Fax     : +49 89 189 47 41-09<br>E-Mail  : <a href="http://lists.rtems.org/mailman/listinfo/devel" data-mce-href="http://lists.rtems.org/mailman/listinfo/devel">sebastian.huber at embedded-brains.de</a><br>PGP     : Public key available on request.<br></pre><div><br></div><pre>Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.</pre></div></body></html>