Docs: idle I2C bus costs nothing; a 100 Hz tick saves 0.34 mA (tickless ceiling)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-12-03 21:44:08 +01:00
1 parent 8605d35a64
commit 6da05693a0
1 file changed
+17 -3
+17 -3
View File
@@ -344,6 +344,23 @@ for any GPIOTE PORT rewrite (it removes the channel completely, so it would
also miss every packet), and it reads the same as the baseline. That rewrite
is therefore not worth doing.
**Two more, same rig and method (3. 12. 2026 evening):** baselines 7.08 / 7.08
/ 7.06 mA.
| image | cell | vs. the surrounding baselines |
|---|---|---|
| I2C bus ended at boot despite the sensors on it (`Wire.end()`, sensors dropped from the list) | 7.08 mA | **±0.00 mA** |
| FreeRTOS tick 100 Hz instead of 1024 Hz (`configTICK_RATE_HZ`) | 6.73 mA | **−0.34 mA** |
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.
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
BLE DFU, which brought x4 back without touching it.
**Measured to make no difference, kept anyway** (each below 0.1 mA):
- **DC/DC re-enabled after SoftDevice start** (`onBootComplete()`):
+0.02 / −0.10 mA at runtime on the 5 V pin, and no difference as a boot flag
@@ -359,9 +376,6 @@ is therefore not worth doing.
- **GPS UART pins disconnected while the GPS is off**:
`NmeaGpsDriver::stopHardware()` resets TX/RX via `nrf_gpio_cfg_default()`
after `Uart::end()`, so the unpowered receiver is not back-powered.
- **Unused I2C bus switched off**: `EnvironmentSensorManager::begin()` calls
`Wire.end()` when the bus scan finds no device, and enables it again for the
`i2c` CLI command.
- **SenseCAP Solar battery divider (`VBAT_ENABLE`)**: held `HIGH` (off) at boot
and set back to `HIGH` right after `getBattMilliVolts()`, instead of staying
`LOW`. `initiateShutdown()` still drives it `LOW` when it arms the LPCOMP