[En-Nut-Discussion] Courious problem with NutEventWait()
uprinz2 at netscape.net
Mon Apr 4 21:51:24 CEST 2011
I have a small problem with the eNut Event system.
I installed a handle
I Post this event in the init part of a thread and then wait and timeout
on that event via
NutEventWait( &van_evt, 1000)
This so far works.
Now I added an external interrupt:
void Exti2( void *arg)
And at the moment the IRQ rises, the system lives some milliseconds and
then runs into UsageFault trap.
Ok, I thought I never checked external interrupts so they might not
work. I modified the irq to just toggle a GPIO and that works.
So I added a simple thing to the main loop:
This should now wake up the Event ten times faster then its timeout.
But, the system crashes... UsageFault Trap.
Now I checked my sources and found, that I use events in many other
places with success. I.e. the LED handler and I2C, both use events for
coordination. So why does this event crash my system?
For thos who never saw a UsageFault Trap, it's a 'feature' of Cortex
architecture and yes, this code runs on STM32F103. But it must be a more
general thing that breaks up the system.
Thanks in advance
More information about the En-Nut-Discussion