EmbeddedRelated.com
Forums

FreeRTOS queues and ISRs

Started by Guillermo Prandi January 23, 2006
Hi. Perhaps this is not the right place to post this, so sorry if it
is not.

I am implementing FreeRTOS in my LPC2138 board. I am using the queue
mechanism to serve the serial ports (this include an SPI port). In
the ISRs I am using the xQueueSendFromISR() and xQueueReceiveFromISR
() functions, to whom I pass the xTaskPreviouslyWoken parameter with
a pdFALSE the first time and, if the same ISR calls another QUEUE
function, the xTaskPreviouslyWoken parameter gets the return value
from a previous call. This seems pretty straightforward, but then I
realized that I might be wrong. These are the questions that come to
my mind:

- If xQueueSendFromISR() returns pdTRUE, should a further call to
xQueueSendFromISR() but to a different queue get xTaskPreviouslyWoken
= pdTRUE?

- If xQueueSendFromISR() returns pdTRUE, should a further call to
xQueueReceiveFromISR() get xTaskPreviouslyWoken = pdTRUE? Or vice-
versa.

- What happens if two consecutive interrupts are served, the first
interrupt gets a pdTRUE from -let's say- xQueueSendFromISR() and the
second interrupt occurs before the woken task had had any scheduled
time. Could a call to xQueueSendFromISR() with xTaskPreviouslyWoken =
pdFALSE be harmful? i.e., the second interrupt knows nothing about
the pdTRUE got from the first interrupt call.

Thanks in advance.

Guille



An Engineer's Guide to the LPC2100 Series

Hi,

> Hi. Perhaps this is not the right place to post this, so sorry if it
> is not.

It's not. Try the FreeRTOS forums:
http://sourceforge.net/forum/forum.php?forum_id82005.

Rgds,

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for MSP430, ARM, AVR and now MAXQ processors



OK. Sorry. Thanks for the link.

Guille

--- In lpc2000@lpc2..., "Paul Curtis" <plc@r...> wrote:
>
> Hi,
>
> > Hi. Perhaps this is not the right place to post this, so sorry if
it
> > is not.
>
> It's not. Try the FreeRTOS forums:
> http://sourceforge.net/forum/forum.php?forum_id82005.
>
> Rgds,
>
> --
> Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
> CrossWorks for MSP430, ARM, AVR and now MAXQ processors
>