Problem with rtems_event_send crashing from interrupt routine

Joel Sherrill joel.sherrill at oarcorp.com
Thu Jun 11 14:04:25 UTC 2015



On 6/11/2015 1:40 AM, Sebastian Huber wrote:
> 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.
>

+1 Andrei .. git bisect may be the easiest way to narrow this down if it
ever worked. Your debug setup sounds like you are fighting it.

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the users mailing list