I am debugging with my application with FreeRTOS on LPC1830,
At first, I find my application have different running result with enable debug message out and disable.
When I enable my debug message, the result is correct.
In my experience, my application may has something wrong.
I find one of my task always show the stack usage is too much,
I don't know why, no mater how I increase the stack size, and I remove all variable and function call in this task,
It still happens?
Is any possible reason to cause this condition?
can you share the code how you crate the MainControl task? Of interest is how much of stack you actually are requesting for the task.
Otherwise it could be that a dangling pointer changes/corrupts your TCB (Task Control Block), causing the task list to report a wrong stack size?
I assume you have enabled the stack overflow hook and the FreeRTOS asserts too?
I hope this helps,
Thanks for fast reply,
After I remove any variable and API, actually, the task is almost empty.
But it also happen the stack size usage is over. So I think the cause is not the task itself.
I am not sure where to enabled stack overflow hook and FreeRTOS asserts.
I will confirm it soon.
I create the task with the API,
xTaskCreate(taskSystemMainControl, "MainControl", TASK_SYSTEM_MAIN_CONTROL_STACK_SIZE, NULL, (tskIDLE_PRIORITY + 1UL), (TaskHandle_t *) NULL);
And My utilTaskSleepMilliSec() is called vTaskDelay API,
I verify the application on LPC1857 evaluation broad , I also check again the stack usage in LPC1857, it's no problem.
But when I transfer the code to LPC1830, these problem happens.
Hard to know why.