Task Restarting?

Hi, When I run a task, in a while(1) loop, it randomly restarts, resetting all variables. Could anyone tell me why? Thanks,

Task Restarting?

Sounds like a total reboot to me.  Check if you have enough stack space for the task.  When this happens to me, I double my stack size and see if it changes anything.

Task Restarting?

Good advise. You can also use the new stack check functions and stack inspectino functions in freertos. Have you disabled the watchdog?

Task Restarting?

That fixed it! Thanks!