From 61f15eeddf2515ca977d0d8b08ba80ea03bb510a Mon Sep 17 00:00:00 2001 From: TeTeHacko Date: Thu, 3 Dec 2026 23:55:09 +0100 Subject: [PATCH] Docs: tickless loop measured at -0.35 mA on XIAO at 3.3 V (tth #20) Co-Authored-By: Claude Opus 5.5 --- docs/power.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/power.md b/docs/power.md index d2ef055de..6e0f9fa08 100644 --- a/docs/power.md +++ b/docs/power.md @@ -356,6 +356,16 @@ An idle TWIM costs nothing measurable, so `Wire.end()` on an empty bus is kept only because it is harmless. The tick is worth about 0.34 mA (5 % of this node): ten times fewer wake-ups. That is close to the ceiling of a tickless `loop()` (issue tth #20), which would remove the remaining ~100 wakes a second too. + +**Tickless loop, implemented (3. 12. 2026).** `NRF52Board::sleep()` now blocks +the loop task on a FreeRTOS task notification (at most 50 ms, +`NRF52_TICKLESS_MAX_MS`; 0 = the old `sd_app_evt_wait()`), so the idle task +runs and `configUSE_TICKLESS_IDLE` suppresses the tick; the DIO1 interrupt +gives the notification, so a received packet is handled at once, and a queued +TX keeps the loop awake (`hasPendingWork()`). Same rig, A/T/A/T/A, both images +from one tree: A 7.06 / 7.10 / 7.10 mA, T **6.73 / 6.74 mA**, i.e. **−0.35 mA**, +the whole ceiling of the 100 Hz test. Reception checked with x1 as the +sender (3 of 3 zero-hop adverts). Only nodes with `powersaving on` sleep at all. A first try of this image hung: it ended the bus while sensors were still listed, and the local framework (symlink, without the Wire timeout of PR #873) waits forever on a disabled TWIM. A main loop that hangs still answers buttonless