Quality RTOS & Embedded Software

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


Infinite loop

Posted by Nobody/Anonymous on September 14, 2005
pxPreviousBlock = &xStart;
pxBlock = xStart.pxNextFreeBlock;
while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock ) )
pxPreviousBlock = pxBlock;
pxBlock = pxBlock->pxNextFreeBlock;


I'm still having this looping problem within heap2 in the above code. It does appear to occur randomly. I've tried everything to understand this, except for beating my head against a wall :-)

If I step through the above code, the value of pxBlock is always the same. IE the linked list seems to be linked to the same cell.

My guess is that there is a critical area somewhere which is not protected and an interrupt has sneaked it... Any ideas.


RE: Infinite loop

Posted by Richard on September 14, 2005
ThatÂ’s interesting. I will have to run through the test code to re-familiarise myself with this function to see if I can work out how this could happen.

Before you enter the loop pxBlock is set to the address of xStart. Is this still the case when you start looping forever, or does the loop execute correctly for a bit before getting stuck. Alternatively, If you are able to inspect xStart from within your debugger, then does xStart.pxNextFreeBlock point back to xStart?

RE: Infinite loop

Posted by Nobody/Anonymous on September 14, 2005
Will check and see.


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

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.


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


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