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] [March 2009 Threads] Semaphore times outPosted by ARMinator on March 22, 2009 Hi,
I have added a tick hook that counts ticks and give a semaphore periodically using xSemaphoreGiveFromISR.
A task waits on this semaphore using xSemaphoreTake and the maximum delay (portMAX_DELAY). I have an LED that shows when the semaphore is given and an LED showing when the semaphore is taken. The semaphore is given consistently from the ISR (the ISR LED blinks). You would expect the task LED to blink too... However the semaphore is only taken once from the task. All other tentatives to take the semaphore pend forever, or timeout if I use a timeout value other than portMAX_DELAY.
This issues occurs whenever I use binary or counting semaphores. Any idea what is going wrong?
Thanks
RE: Semaphore times outPosted by ARMinator on March 22, 2009 I thought I would also say that I tried to add the following code and it still fails:
xSemaphoreGiveFromISR(mySemaphore, &dummy); if(pdTRUE == dummy) { portYIELD_FROM_ISR(); }
RE: Semaphore times outPosted by Dave on March 22, 2009 Which port are you using (CPU and compiler). Which version of FreeRTOS are you using? Can you post your code?
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|