From 7ca150bf07795e3d4fe6830c669b8e9710ca73f8 Mon Sep 17 00:00:00 2001 From: geeksville Date: Sat, 26 Sep 2020 06:50:54 -0700 Subject: [PATCH] personal notes about threading --- docs/software/TODO.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/software/TODO.md b/docs/software/TODO.md index 4a63cf040..514fda9cf 100644 --- a/docs/software/TODO.md +++ b/docs/software/TODO.md @@ -2,6 +2,16 @@ You probably don't care about this section - skip to the next one. +Threading tasks: + +- Use https://github.com/ivanseidel/ArduinoThread? rather than full coroutines +- clean up main loop() +- check that we are mostly asleep, show which thread is causing us to wake +- +- use tickless idle on nrf52, and sleep X msec or until an interrupt occurs or the cooperative scheduling changes. https://devzone.nordicsemi.com/f/nordic-q-a/12363/nrf52-freertos-power-consumption-tickless-idle +- BAD IDEA: use vTaskDelay and https://www.freertos.org/xTaskAbortDelay.html if scheduling changes. (define INCLUDE_xTaskAbortDelay on ESP32 and NRF52 - seems impossible to find?) +- GOOD IDEA: use xSemaphoreTake to take a semaphore using a timeout. Expect semaphore to not be set, but set it to indicate scheduling has changed. + Nimble tasks: - readerror.txt stress test bug