mishung wrote on Thursday, 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(power_is_dropout())
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!