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

Certain tasks stop running

Posted by mishung on March 30, 2017

Hello! I have a problem that after a random ammount of time (10minutes - 12hours) certain tasks stop executing. I believe this is caused by some kind of data corruption caused by me but I can't seem to find when and what gets corrupted. Can you suggest any dubugging utility that could help me find out what happens? Or where to set data breakpoint?

What I know so far: Total ammount of SRAM available: 16kB Total ammount of SRAM used: 10,9kB Heap size: 6kB (only 3,8kB actually used) Number of tasks: 12 Number of priorities: 4 No stack overflow detected anywhere, every task has at least 50 words high water mark

I called the vTaskList after 2 of the tasks stopped working and one of these two was in Blocked state and the other one was in Ready state. Both of them had about 100words of stack still unused. One of them had a priority of 4 which no other task has and it is the simplest task of them all so there is no way it could get stuck in a loop (actually there is no loop in that task).

Here is the code to the priority 4 task that stopped executing: ~~~ void pwrTask(void* p) { for ever { if(powerisdropout()) go_sleep();

	vTaskDelay(1);

	// monitor for maximal stack depth
	pwrTask_high_water_mark = uxTaskGetStackHighWaterMark(NULL);
}

} ~~~

I am using a port of FreeRTOS on AVR atmel xmega256a3u (8 bit).

Any suggestion would be greatly appreciated!


Certain tasks stop running

Posted by rtel on March 30, 2017

There are a few debug aware plug-ins and the trace tool available, but that's a pretty small and basic device, so I don't think they are going to work for you.

What does the go_sleep() function do?


Certain tasks stop running

Posted by mishung on March 30, 2017

Yes indeed, the trace tool does not work in this case, unfortunately. The go_sleep() does something in this manner:

~~~ disableperipheralx(); disableperipheraly();

while(!powerisstable) sleep_cpu();

enableperipheralx(); enableperipheraly(); ~~~

but if the power was out and go_sleep() was called, nothing would work because it stops everything except the RTC. And this function has been tested numerous times, if I turn the power off, the MCU goes to sleep mode and after the power is back on it wakes up no problem.


[ 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