Increase control thread priority to -1
Set to lowest cooperative priority so that it cannot be interrupted by main or other threads (only by ISRs).
This commit is contained in:
+2
-1
@@ -168,6 +168,7 @@ void control_thread()
|
||||
}
|
||||
|
||||
// 2s delay for control thread as a safety feature: be able to re-flash before starting
|
||||
K_THREAD_DEFINE(control_thread_id, 1024, control_thread, NULL, NULL, NULL, 2, 0, 2000);
|
||||
// priority is set to -1 (=cooperative) to have higher priority than other threads incl. main
|
||||
K_THREAD_DEFINE(control_thread_id, 1024, control_thread, NULL, NULL, NULL, -1, 0, 2000);
|
||||
|
||||
#endif // UNIT_TEST
|
||||
|
||||
Reference in New Issue
Block a user