Problem with rtems_event_send crashing from interrupt routine
Gedare Bloom
gedare at rtems.org
Fri Jun 12 19:01:37 UTC 2015
On Fri, Jun 12, 2015 at 12:35 PM, Mr. Andrei Chichak <groups at chichak.ca> wrote:
> 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
>
This code was recently re-worked to use the new time counters support,
and you may be hitting a bug in it.
> 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
The watchdog is a simple list of blocked tasks with firing times in
ticks, and every tick the watchdog gets "tickled" and any tasks in its
list whose timeout has been reached will be unblocked.
> 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
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
More information about the users
mailing list