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] [October 2016 Threads] freertos 8.0.1 failing to schedule any tasks after a sempahore take on Atmel SAMG55G19Posted by srinaag on October 25, 2016 My project runs in total 13 different threads and the task facing the issue is the one with highest priority.
I am running a Freertos version 8.0.1 on Atmel SAMG55G19 microcontroller.
There is a xSemaphoreTake on my button task (task with highest priority) with a blocking period of 2 seconds. Once in a while Freertos tends to not unblock, even after the expiry of 2 seconds, the semaphore take leading to a frozen thread. I have already investigated and confirmed that no other task is interfering with this task by faulty interrupts or lengthy critical sections.
The issue is sporadic in nature and its frequency of occurrence is once or twice in a day.
Looking forward to your suggestions.
Thanks,
Srinaag.
freertos 8.0.1 failing to schedule any tasks after a sempahore take on Atmel SAMG55G19Posted by rtel on October 25, 2016 Hi Srinaag,
The most likely cause is an incorrect interrupt priority assignment,
even if you think it is correct.
http://www.freertos.org/RTOS-Cortex-M3-M4.html
The normal way of detecting this is to define configASSERT() (you will
see a link to that on the page linked above), but you are using quite an
old version of FreeRTOS and I'm not sure how many asserts it contains.
I would recommend updating the FreeRTOS version to get better error
detection.
The second most likely cause is a stack overflow.
http://www.freertos.org/Stacks-and-stack-overflow-checking.html
Hope this helps.
freertos 8.0.1 failing to schedule any tasks after a sempahore take on Atmel SAMG55G19Posted by srinaag on October 25, 2016 Thank you for your suggestion, I will upgrade the Freertos and see if it helps fix things.
Thanks,
Srinaag.
freertos 8.0.1 failing to schedule any tasks after a sempahore take on Atmel SAMG55G19Posted by setharram on January 9, 2017 Hi,
I trying to porting freeRtos 7.3 to 9.0 for samG55 in my application.
earlier i was using xTaskResumeFromISR() and vTaskSuspend() for task synchronize which was doing pretty well for my application but interrupt was less often. But later I found there are chances of missing, if interrupt rates are high and xSemaphoreGiveFromISR/xSemaphoreTake is solution for this.
While porting i faced the same issue has above. the semaphore take thread being into block state.
Looks this related to interrupt priority. I have macro in FreeRTOSConfig.h which i didnt understood.
define configPRIO_BITS 2
configLIBRARYLOWESTINTERRUPTPRIORITY 0x0f
configLIBRARYMAXSYSCALLINTERRUPT_PRIORITY 4
configKERNELINTERRUPTPRIORITY ( configLIBRARYLOWESTINTERRUPTPRIORITY << (8 - configPRIOBITS) )
configMAXSYSCALLINTERRUPTPRIORITY ( configLIBRARYMAXSYSCALLINTERRUPTPRIORITY << (8 - configPRIOBITS) )
Is this proper configured? i couldn't able to find any information regarding "configPRIO_BITS" for armM4.
Please do needfull
Thanks,
Seetharam
freertos 8.0.1 failing to schedule any tasks after a sempahore take on Atmel SAMG55G19Posted by rtel on January 9, 2017
But later I found there are chances of missing, if
interrupt rates are high and xSemaphoreGiveFromISR/xSemaphoreTake is
solution for this.
If you are using FreeRTOS V9.0.0 then it is actually better to use task
notifications as they are smaller and faster than semaphores. See the
example on the following page:
http://www.freertos.org/vTaskNotifyGiveFromISR.html
define configPRIO_BITS 2
I doubt that is correct as I've never seen a processor of this class
only having 2 priority bits. Have a look in the hardware manual for the
G55 part to find the number of priority bits that are actually
implemented. It is likely to be between 3 and 5 inclusive.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|