Problem with rtems_event_send crashing from interrupt routine

Sebastian Huber sebastian.huber at embedded-brains.de
Sat Jun 13 06:59:44 UTC 2015


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.

----- Mr. Andrei Chichak <groups at chichak.ca> schrieb:
>A couple of days ago, Sebastian Huber rightly asked:In which function is this infinite loop?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_TickleI am seeing:#0  _Watchdog_Tickle (header=0x20002e60 <_Watchdog_Ticks_header>) at ../../../../../../rtems/c/src/../../cpukit/score/src/watchdogremove.c:164#1  0x0001fa36 in _Watchdog_Tickle_ticks () at ../../cpukit/../../../stm32f4/lib/include/rtems/score/watchdogimpl.h:341#2  _Watchdog_Tick () at ../../../../../../rtems/c/src/../../cpukit/score/src/watchdogtick.c:28#3  0x0001d964 in _Timecounter_Tick_simple (delta=<optimized out>, offset=<optimized out>) at ../../../../../../rtems/c/src/../../cpukit/score/src/kern_tc.c:1932#4  0x00017a2c in rtems_timecounter_simple_downcounter_tick (tc=0x20001c70 <_ARMV7M_TC>, get=<optimized out>) at ../../../../../.././stm32f4/lib/include/rtems/timecounter.h:215#5  _ARMV7M_TC_tick () at ../../../../../../../../rtems/c/src/lib/libbsp/arm/stm32f4/../shared/armv7m/clock/armv7m-clock-config.c:53#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#7  _ARMV7M_Systick_handler () at ../../../../../../../../rtems/c/src/lib/libbsp/arm/stm32f4/../shared/armv7m/clock/armv7m-clock-config.c:67#8  <signal handler called>#9  0x00000000 in bsp_start_vector_table_begin ()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.I will try and get more information until I screw up this debug session.Andrei
-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20150613/b7eed3d8/attachment-0002.html>


More information about the users mailing list