Quality RTOS & Embedded Software

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




Loading

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;
}

Richard,

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.

Thanks
Phil

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.

Phil


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

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