Quality RTOS & Embedded Software

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


Loading

xTaskResumeAll - Endless loop

Posted by Nobody/Anonymous on December 19, 2005
I'm using LPC2148 and freeRTOSV3.2.4.

It works fine for a whole bunch of tasks. But if I start now anothoer one I get into this while loop in xTaskResumeAll after a while:

/* If any ticks occurred while the scheduler was suspended then they should be processed now. This ensures the tick count does not slip, and that any delayed tasks are resumed at the correct time. */
if( uxMissedTicks > ( unsigned portBASE_TYPE ) 0 )
{
while( uxMissedTicks > ( unsigned portBASE_TYPE ) 0 )
{
vTaskIncrementTick();
--uxMissedTicks;
}

It doesn't return from this loop anymore, so RTOS is blocked. I'm just starting a simple task more like:

for(;;)
{
vTaskDelay(20);
}

If i don't start this task, my application works fine. I don't have an idea what I have done wrong.

Can you help me?

Thanks, Stefan

RE: xTaskResumeAll - Endless loop

Posted by Nobody/Anonymous on December 19, 2005
Most likely memory corruption. Check the stacks of your tasks have not overflowed. Also, try stepping through the creation of the offending task to check it can obtain the memory it requires.

RE: xTaskResumeAll - Endless loop

Posted by John W. on December 20, 2005
I agree.

You said you allocated a whole bunch of tasks.
Each task takes stack space - you can deplete
available memory with too many tasks.

How many tasks have you created?
What is the amount of stack space allocated for
each task?
How much memory can your application address?

These types of problems are usually simple to figure out - so that's the good news I suppose.
The bad news is that you many not be able to allocate all of the tasks you require with the memory available.

Good Luck,
John W.

RE: xTaskResumeAll - Endless loop

Posted by Nobody/Anonymous on December 20, 2005
Thanks a lot. I'll check out the memory allocation and I'm sure I'll get this thing working. Thanks for helping me, kind regards Stefan


[ 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