Problem with rtems_event_send crashing from interrupt routine

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jun 11 06:40:41 UTC 2015


On 10/06/15 21:05, Mr. Andrei Chichak wrote:
> This one is weird (for me).
>
> I’m dealing with an STM32F407 (ARM M4F), stripping data off of the ADCs using DMA.  Using double buffering, I get an interrupt telling me that my ADC scan is done and the data is waiting in region “A”, then 1/200 of a second later I get a different interrupt telling me that data is waiting in region “B”, repeat.
>
> To indicate to my task that the buffer is ready I use rtems_event_send in the interrupt routine and either send RTEMS_EVENT_0 or RTEMS_EVENT_1, depending on which interrupt routine got called.
>
> The task does a:
>
> 		status = rtems_event_receive( RTEMS_EVENT_0 | RTEMS_EVENT_1, RTEMS_WAIT | RTEMS_EVENT_ANY, 100, &events);
>
> and this is seen to run 200 times per second.
>
>
> BUT, after (exactly and repeatably) 3101 seconds the receive no longer happens and never return with a status code. Actually the process seems to go into an infinite loop outside of my code. The interrupts continue to fire (as seen on a GPIO bit being twiddled) sending events and the return codes are always RTEMS_SUCCESSFUL.

Maybe you overwrite some memory each turn and after 3101 turns you hit 
something that doesn't like it and goes into the infinite loop.

If it worked with a particular RTEMS version before, then you can use 
git bisect to find the problematic change in RTEMS.

-- 
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.




More information about the users mailing list