Quality RTOS & Embedded Software

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


Loading

task stuck in BLOCKED state on NXP Cortex-M3

Posted by alexde on November 6, 2013

Hi,

I'm using FreeRTOS 7.5.3 and lwIP 1.4.1 on a NXP LPC1776 Cortex M3 device. The development environment I use is IAR embedded workbench and the C-SPY debugger.

After about 30 minutes of operation without any problems receiving data via ethernet stops. Using the debugger I could see that the receive interrupt is fired and the interrupt handler tries to wakeup the receive task by calling xQueueGenericSendFromISR. This fails because the queue is not empty.

But the receive task remains in the blocked state. The task stays in xQueueGenericReceive with BlockTime set to portMAX_DELAY.

best regards, Alex


task stuck in BLOCKED state on NXP Cortex-M3

Posted by davedoors on November 6, 2013

Can you post screen shots of the state viewer again. This time add the queue to the queue registry so you can include the queue table in the screen shot.


task stuck in BLOCKED state on NXP Cortex-M3

Posted by alexde on November 6, 2013

Here it is

Attachments

FreeRTOSTasks.png (105047 bytes)

task stuck in BLOCKED state on NXP Cortex-M3

Posted by davedoors on November 6, 2013

I can't think you you would get into that state without some kind of data corruption or breaking some rules on how you use the API. Look through the following list if you have not done so already and carefully consider if you could have done something wrong http://www.freertos.org/FAQHelp.html

If you are using 7.5.3 and have configASSERT() defined to something that will halt your program then bad interrupt priority assignments is probably not the problem this time.


task stuck in BLOCKED state on NXP Cortex-M3

Posted by alexde on November 7, 2013

Hi,

today I've had a hard fault in the tick interrupt handler.

Attached you will find a screenshot showing the call stack, the local variables of xTaskIncrementTick, the task state window and the register settings of the NVIC.

The reason for the hardfault seems to be that pxTCB points to 0 but why does it? Another strange thing is that the task state window shows a task without name and strange parameters.

I set #define configCHECKFORSTACK_OVERFLOW 2 and took a look at the task stacks to make sure that there is no stack overflow.

Attachments

FreeRTOSHardFault.png (119229 bytes)

task stuck in BLOCKED state on NXP Cortex-M3

Posted by richardbarry on November 7, 2013

[since when did posts start needing moderation? I will see if I can turn that off]

As per Dave's post (which I have just moved out of the moderation queue), the most likely cause of your issues is an old fashioned data corruption. Something is writing over your RAM, and as you are using lwIP, I would hazard a guess something there is to blame (maybe the MAC driver?).

Regards.


[ 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