FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [June 2008 Threads] Multiple tasks woken from ISR in V5.0.2?Posted by Jeff Henshaw on June 26, 2008 I'm running V5.0.2 on an Atmel AT3UCA0512. The UART ISR handles both transmitter empty and receiver full interrupts by either pulling a character from a queue or posting a character to a queue. If both conditions are simultaneously true then the ISR could potentially activate TWO tasks.
Is this possible, or illegal, or what? How would I handle this? Would I detect that the 1st task has been activated and ignore the 2nd interrupt cause, leaving the IRQ to fire again and then handling the 2nd interrupt source? Or do I just note that a task was activated and let taskYIELD_FROM_ISR() figure it out?
RE: Multiple tasks woken from ISR in V5.0.2?Posted by MEdwards on June 26, 2008 No problem.
void interrupt_routine( void ) { int Woken = 0;
// Do something.
// Send to a task. Woken will be set // to true if this send wakes a task. xQueueSendFromISR(q, &Woken);
// Do something else.
// Send to another task. Again, Woken // will be set to true if this send // wakes a task. xQueueSendFromISR(q2, &Woken);
// Two sends so you might have woken // two tasks. FreeRTOS will have done // this for you, but will always return // to the highest priority ready task // which might be one of the two tasks // woken in this isr, or might be the // task that was originally running // anyway. portYIELD_FROM_ISR(Woken); }
RE: Multiple tasks woken from ISR in V5.0.2?Posted by Jeff Henshaw on June 26, 2008 Great, thanks !!!
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|