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] [January 2011 Threads] multiple calls to xQueueSendFromISRPosted by rgavrilov on January 24, 2011 I call xQueueSendFromISR twice posting to two different queues. But only one task waiting on the queue gets awaken. __attribute__((__naked__)) static void NAME(void) { portENTER_SWITCHING_ISR(); \ portENTER_CRITICAL(); bool taskAwaken = FALSE; taskAwaken = xQueueSendFromISR(_queue_1, &key, taskAwaken); taskAwaken = xQueueSendFromISR(_queue_2, &key, taskAwaken); portEXIT_CRITICAL(); return taskAwaken; portEXIT_SWITCHING_ISR(); }
if I only post to one of two queues - the corresponding task is awaken as expected.
What am I doing wrong?
I use preemptive scheduling. Port: Atmel UC3A3256
RE: multiple calls to xQueueSendFromISRPosted by Richard Damon on January 24, 2011 While I am not familiar with that port, the signature of xQueueSendFromISR changed in Version 5 to portBASE_TYPE xQueueSendFromISR( xQueueHandle pxQueue, const void *pvItemToQueue, portBASE_TYPE *pxHigherPriorityTaskWoken ); where the return value is NOT the new value of taskAwaken but a flag to indicate if the Send was successful or not., thus your lines should be (not also the adding of an & when passing taskAwaken)
flag = xQueueSendFromISR(_queue_1, &key, &taskAwaken); flag = xQueueSendFromISR(_queue_2, &key, &taskAwaken);
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|