Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

uxSchedulerSuspended

Posted 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: uxSchedulerSuspended

Posted 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.

uxSchedulerSuspended

Posted 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.


uxSchedulerSuspended

Posted 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.


uxSchedulerSuspended

Posted 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


uxSchedulerSuspended

Posted 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


uxSchedulerSuspended

Posted 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.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner