Problem with rtems_event_send crashing from interrupt routine

Mr. Andrei Chichak groups at chichak.ca
Fri Jun 12 16:35:08 UTC 2015


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_Tickle

I 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20150612/15701caf/attachment-0002.html>


More information about the users mailing list