I have an application running on an AT91SAM7S256 with 8 tasks. Normally the CPU utilization is very low, more than 95% idle. The highest priority task is implemented as an infinite loop, which waits for an OS_Event coming from the ISR for a timer tick. The event is signaled with a call to OS_EVENT_Pulse(). After the task sees the event it does some processing and then restarts the timer. If I do something to flood the system with work I can bring a couple of tasks up to 30% utiltization, and within seconds my hi pri task stops running. I put counters in to see how many times the event is signaled and how many times the wait succeeded in waking the task. The number of times signaled is one greater than the number of times that the tasks awakened. Since there are no other users of this event, and only one place in the code where the task waits on it, it looks like the event has been lost.
My quick and satisfactory fix for this is to just use a task event with OS_SignalEvent and OS_WaitSingleEvent. My counters remain equal so I know with this implementation that the task is waking up once for every time that it is signaled. I hesitate to call the problem with the other mechanism a bug since my application is still pretty green. However, I use OS events and OS_EVENT_Pulse elsewhere, and am wondering if there is something that I have missed about how they work.
My quick and satisfactory fix for this is to just use a task event with OS_SignalEvent and OS_WaitSingleEvent. My counters remain equal so I know with this implementation that the task is waking up once for every time that it is signaled. I hesitate to call the problem with the other mechanism a bug since my application is still pretty green. However, I use OS events and OS_EVENT_Pulse elsewhere, and am wondering if there is something that I have missed about how they work.