Quality RTOS & Embedded Software

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




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 ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists