Device OS threads: what happens if one thread takes long to execute and does not yield?

long here is around 5 seconds. Can this be a cause for a panic reset?
EDIT: firmware is using


PS: what RTOS is Device OS based on? I'm almost ashamed to ask this but could not find it on the docs.


@gusgonnet, the RTOS used is FreeRTOS and if a thread takes too long, it will be preempted (switched) by a higher priority thread by the task scheduler. Did you create a thread and what priority did you assign it when you created it? Also, if you didn't assign enough stack space for the thread, it could easily create a panic situation if your thread code is complex.

1 Like

If you're getting a panic at boot before your code runs, it's almost always caused by a prohibited operation from a global object constructor. The annoying this is that it's random, so sometimes it will work, then you make an innocuous change to your code and it will panic. This is because C++ does not call the constructors for global objects in any particular order, and if it picks the wrong order, the device will panic.

It's easy enough to fix, however. See Global Object Constructors.


Great, thanks for all the tips!
I know what to search for now. Thanks.