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

Tasks Hang show as Suspended but no call to vTaskSuspend

Posted by tomwbarclay on May 20, 2015

HI, I have an issue with tasks that send messages out of a serial port stopping unexpectedly.

My setup is processor : SAM4N, Tools : Atmel Studio6.2, fitted with FreeRTOS viewer, RTOS : FreeRTOS 8.2.0

If I pause the program execution with the ICE, and look in FreeRTOS viewer I see tasks suspended that are never started or stopped with vTaskSuspend/VTaskResume. (as per latest FreeRTOS docs)

In fact I see this even if its running normally and I pause with the ICE.

Q1) Is the FreeRTOS viewer accurately reflecting the state of each task ? Q2) I have seen this before (FreeRTOS 7) when a task was blocked indefinitely showing as suspended But I thought that this was fixed in FreeRTOS 8. Tasks that show as blocked are tasks that have a timed delay that blocks the task for a certain period of time and not indefinitely. Tasks that are blocked, on queue or semaphore etc, with an indefinite delay show as suspended. Has this indeed been fixed in FreeRTOS 8 ?

I need to get a handle on the task status issue before I can progress . Any help gratefully accepted.


Tasks Hang show as Suspended but no call to vTaskSuspend

Posted by rtel on May 20, 2015

If I pause the program execution with the ICE, and look in FreeRTOS viewer I see tasks suspended that are never started or stopped with vTaskSuspend/VTaskResume. (as per latest FreeRTOS docs)

If you have INCLUDEvTaskSuspend set to 1 and block a task using portMAXDELAY as the timeout (which is generally a bad idea anyway as it does not allow for any error recovery) then the task will probably show in the debugger as being suspended. There is a little more work to do for the debugger to determine if a task is truly suspended, rather than just blocked indefinitely, but as far as I am aware there is only one such debugger plug in that actually does this.

Q1) Is the FreeRTOS viewer accurately reflecting the state of each task ?

I have no visibility into how the viewer is implemented, please ask whoever wrote it.

Q2) I have seen this before (FreeRTOS 7) when a task was blocked indefinitely showing as suspended But I thought that this was fixed in FreeRTOS 8

FreeRTOS functions that return the task's state now distinguish between tasks that are blocked indefinitely and tasks that are suspended, but you are using a third party debugger which is no doubt querying the data structures within the target's RAM and figuring this out for itself. It definitely won't be calling FreeRTOS functions to get the information - so in summary changes within FreeRTOS are not going to change how third party debuggers work.

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