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 2010 Threads] uxSchedulerSuspendedPosted by Alessio Tognazzolo on March 31, 2010 Hi to all, I have a problem with multitask in freeRTOS 6.0.4. The problem is after some time all tasks are suspended without any apparent reason. FreeRTOS isn't in a fault situation,but when i controlled the value of the variable uxSchedulerSuspended in task.c i found a very big value (5a5a5a5a5a6). What is the possible cause? Is it possible a task writes something in the memory region where this variable is placed?
RE: uxSchedulerSuspendedPosted by Richard on April 1, 2010 That definitely looks like a memory corruption, I suspect the number you see starts a5, rather than 5a, as this is the value that task stacks are filled with before the task starts.
You don't give enough information to offer an opinion on what the possible cause could be.
uxSchedulerSuspendedPosted by matita87 on August 3, 2017 Hi to all
I have a similar problem related to uxSchedulerSuspended.
In my proj this variable start with FFFFFFFF in routine:
void vTaskSuspendAll( void )
{
/* A critical section is not required as the variable is of type
BaseTypet. Please read Richard Barry's reply in the following link to a
post in the FreeRTOS support forum before reporting this as a bug! -
http://goo.gl/wu4acr */
++uxSchedulerSuspended;
}
even if it was initialized with pbFALSE:
PRIVILEGEDDATA static volatile UBaseTypet uxSchedulerSuspended = ( UBaseTypet ) pdFALSE;
The MDK is Keil, FreeRTOS 9.0.0 and board STM32F4.
The optimization is set to 0.
NOTE: I have another trivial project (with a different configuration) where vTaskSuspendAll works fine.
Regards.
uxSchedulerSuspendedPosted by rtel on August 3, 2017 I don't understand your question. Can it be rephrased to the following
statement:
"uxSchedulerSuspended has an initial value of 0xffffffff even though the
C code initialised it to 0".
If so that sounds like a compiler or linker or linker script problem,
not a FreeRTOS problem.
uxSchedulerSuspendedPosted by matita87 on August 4, 2017 Dear
In the module task.c the variable uxSchedulerSuspended is define as:
PRIVILEGEDDATA static volatile UBaseTypet uxSchedulerSuspended= ( UBaseType_t )pdFALSE;
This variable can be incremented only by vTaskSuspendAll() which is call the first time in xTaskCreate.
The first time the vTaskSuspendAll() is called the uxSchedulerSuspended is equal to FFFFFFFE (and then incremented by 1)
This problem appears only with this variable and it causes a problem in vTaskDelay() (e.i. the vTaskDelay() never return because the xTaskResumeAll fails).
Thanks
Regards
uxSchedulerSuspendedPosted by matita87 on August 4, 2017 This problem related to the uxSchedulerSuspended was solved.
vTaskDelay still dosen't work, it never return.
I can see that:
vTaskDelay(100ms)
{
vTaskSuspendAll(); //seems ok
prvAddCurrentTaskToDelayedList()
{
uxListRemove// return 0
//INCLUDE_vTaskSuspend == 1
// here note xTimeToWake > xNextTaskUnblockTime. is this strange ?
}
xTaskResumeAll()
{
//xPendingReadyList is not empty.
//xYieldPending = pdTRUE;
//pxTCB != NULL
//uxPendedTicks == 0
//Here the problem. It not possible to continue debue another tash execute this routine.
}
}
How can i solve ?
thaks all regads
uxSchedulerSuspendedPosted by rtel on August 4, 2017
This problem related to the uxSchedulerSuspended was solved.
vTaskDelay still dosen't work, it never return.
For the benefit of others using this forum, and to ensure this resource
is as useful for others as possible, please state how the problem was
solved, after which we can look at your new problem.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|