Repository navigation
perf(battery): increase gauge sleep measurement intervals to 60 seconds - #291
Conversation
✅ Unit tests passed2 passed, 0 failed/error, 0 skipped — view workflow run
Download the |
|
Build output available: |
Compiler warningsThe extended-warning build completed successfully. Application compiler warningsNone. |
CodeChecker static analysis (advisory)Note This report is informational. It does not block merging and does not change code. At a glance
Findings on changed linesNo non-style findings were reported on lines changed by this PR. Analyzer coverage
Complete-codebase summarySeverity: 2 high Complete-codebase findingsEach finding includes source context. The Show detailed findings with source context (2 of 2)HIGH —
|
64d27d0 to
020ef51
Compare
|
Build output available: |
The BQ27220 periodically measures while the earable is off. Set its SLEEP voltage/temperature and current measurement intervals to 60 seconds instead of the 20-second defaults, reducing the measured average off-state current by about 1.6–1.9 µA (4–5%).
This adds only the two adjacent one-byte settings at
0x921Eand0x921Fto the existing gauge setup transaction. Normal-mode measurement timing is unchanged. Sleep readings update less frequently, so changes detected through those measurements can take longer to appear. The standard FOTA configuration applies gauge setup when confirming a new image.Power validation
Rechecked the archived raw PPK2 captures and their SHA-256 hashes before creating this PR:
The sequence was 60 s → restored 20 s → repeated 60 s. Same Main v2.7 device, PPK2 source at 3.7 V replacing the battery, device USB disconnected, 100 ksample/s and matching filter settings. All samples, including measurement pulses, contribute to the means. The MCU entered OFF without an active debugger; retained journals were complete and recorded no spontaneous application wakes. Full captures were saved before endpoint debug access.
These measurements used the P0.6-fixed diagnostic reference firmware with the interval bytes changed in gauge RAM and read back. They establish the saving from the settings; they are not measurements of this PR's firmware binary. The P0.6 change is released separately as 2.2.9 in #294 (original fix: #290). No other gauge configuration changes are included here.
Registers and sleep sampling behavior: TI BQ27220 technical reference manual, data-memory table and §§4.9.54–4.9.55.
Build validation
openearable_v2/nrf5340/cpuappusing nRF Connect SDK 3.0.1 (-DFILE_SUFFIX=fota, explicit worktreeBOARD_ROOT).3c 3cwrite at0x921E.git diff --checkpassed.This PR now targets
2.2.10; it remains limited to the same six added driver lines. Historical build and power results above predate the release-branch reorganization.