summaryrefslogtreecommitdiff
path: root/src/systemtask/SystemTask.cpp
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2022-03-14 20:54:04 +0100
committerJF <JF002@users.noreply.github.com>2022-03-21 20:53:46 +0100
commitf1194a5f74fa7e02805940a39489210783b94878 (patch)
treed6525f1b7f01392793f2a37c38623ffcc16b324f /src/systemtask/SystemTask.cpp
parent88197b66328ab8cbecc199c91d1ce1e1688ade83 (diff)
In current configuration, the timer task (the one from FreeRTOS) has the lowest priority (0). Both display and system tasks are also set on priority 0.
In cases where any other task takes too much time to execute (it can happen in Display Task, see https://github.com/InfiniTimeOrg/InfiniTime/issues/825), the timer task does not have the opportunity to run fast enough to detect and debounce presses on the button. This commit sets the following priorities: - [0] : Display Task - [1] : Timer and System tasks - [2] : BLE Host - [3] : BLE LL This way, we ensure that button presses will always be detected, even if the rendering of the display takes a huge amount of time.
Diffstat (limited to 'src/systemtask/SystemTask.cpp')
-rw-r--r--src/systemtask/SystemTask.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp
index 1e45fac1..77cf411b 100644
--- a/src/systemtask/SystemTask.cpp
+++ b/src/systemtask/SystemTask.cpp
@@ -107,7 +107,7 @@ SystemTask::SystemTask(Drivers::SpiMaster& spi,
void SystemTask::Start() {
systemTasksMsgQueue = xQueueCreate(10, 1);
- if (pdPASS != xTaskCreate(SystemTask::Process, "MAIN", 350, this, 0, &taskHandle)) {
+ if (pdPASS != xTaskCreate(SystemTask::Process, "MAIN", 350, this, 1, &taskHandle)) {
APP_ERROR_HANDLER(NRF_ERROR_NO_MEM);
}
}