Commit Graph
2 Commits
Author SHA1 Message Date
liquidraverandClaude Opus 5.5 3a8b0dcdbb tests: INA3221 power monitor PM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 16:46:09 +01:00
Laszlo AshinandClaude Opus 5.5 3658e15499 sensors: power down INA power monitors between reads
Behavioural change.

Cause: ZephCore reads power monitors in triggered mode, but an INA219
does not power down after a triggered conversion; it idles at its
active supply current (datasheet 0.7 mA typ, 1 mA max; measured
579 uA) between telemetry reads.

Fix: power monitors are suspended after probe and resumed only around
each read. Of the INA drivers only the INA219 has PM, and its suspend
wrote "ADC off" (0b100), which measured the same 579 uA;
patches/zephyr/0020 makes it write power-down (0b000), as TURN_OFF
already does. Resume re-runs ina219_init(), restoring configuration
and calibration. A monitor that fails to wake is not read and its
error is returned, so telemetry drops the channel instead of
reporting 0 A; a failed suspend is logged.

Measured on a XIAO nRF52840 repeater, INA219 supply current: 579 uA
before, 579 uA with suspend as "ADC off" (without 0020), 4 uA with
0020; telemetry readings stay valid.

Tests: UNIT-SENSOR-001..005 build ZephyrEnvSensors.cpp on the host
against new device/sensor/PM stubs. Docs: ARCHITECTURE.md telemetry,
1.18.3 release notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:29:38 +01:00