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

FreeRTOS, uxNumberOfItems of pxReadyTasksLists[ uxTopPriority ] becomes "0" randomly

Posted by tarun-patel on December 18, 2014

Hi,

First of all, as an embedded developer, I want thank FreeRTOS to make my life easier.


I am using FreeRTOS V8.1.2 on custom board using STM32L151 uC. My applications run smooth most of the time. however, sometimes within 1 minute after power ON or sometimes after few hours, freeRTOS calls configASSERT function and execution get stopped (as I have written configASSERT function to stop execution).

In configASSERT function, debugger shows error is in "tasks.c" file and line number which cause error is "2160".

After some debugging, I found that uxNumberOfItems of pxReadyTasksLists[ uxTopPriority ] becomes "0" due to that configASSERT been called.

I am using configUSEPORTOPTIMISEDTASKSELECTION. However, I have tried with disabling "port optimized task selection" with no luck.

I have provided more than sufficient stack to every tasks and set every interrupt priority to configLIBRARYLOWESTINTERRUPT_PRIORITY. Yes, I am using "FromISR" functions from ISR.

I have also called "NVICPriorityGroupConfig(NVICPriorityGroup_4);" in main after system initialization.

I have tried hard to solve this issue but till data not find any solution.

I am requesting you all to help me to get rid on this issue.

Thanks in Advance. Tarun


FreeRTOS, uxNumberOfItems of pxReadyTasksLists[ uxTopPriority ] becomes "0" randomly

Posted by rtel on December 18, 2014

It sounds like you are doing all the right things. Do you also have stack overflow and malloc failed hook functions defined? (http://www.freertos.org/a00016.html).

Is it possible you are experiencing a simple data corruption somewhere, for example, writing off the end of a buffer, or using a pointer that has become corrupt?

We have had an idea for a while to add some [optional] 'check values' into the code that place known values at the start and end of structures to make it easier to see if a structure has simply been over written by something that should not have done.

Regards.


FreeRTOS, uxNumberOfItems of pxReadyTasksLists[ uxTopPriority ] becomes "0" randomly

Posted by tarun-patel on December 18, 2014

Thanks for quick response.

Yes, both stack overflow and malloc failed hook functions defined. I am not getting any call of both function. So that should not be a issue.

BTW, I like your idea about 'check values'. I will implement it in my code.

However, if you find any other solution, please post it to me.

Thanks, Tarun


[ 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