Skip to content

2.3.3 - #373

Merged
TobiasRoeddiger merged 19 commits into
mainfrom
2.3.3
Nov 5, 2026
Merged

2.3.3#373
TobiasRoeddiger merged 19 commits into
mainfrom
2.3.3

Conversation

@TobiasRoeddiger

@TobiasRoeddiger TobiasRoeddiger commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Firmware 2.3.3 combines hardware 2.1.0 support (#276) and the encrypted bond-clear/shutdown service (#371). Both source PRs are merged into this branch. Current main (0d0b5d82) is included, and the release merges into it without conflicts.

Latest CodeChecker fixes (e0280085):

  • Bound MAXM86161 exposure counts, FIFO tags, output indices and DMA read length; large caller capacities cannot overflow the item-count calculation.
  • Pass the address-array capacity to bt_id_get, check its returned count and bound the logging loop by the array itself.
  • Review the 14 known nRF5340 peripheral/UICR accesses as intentional using exact checker/path/full-hash rules. Fixed-address and array-bound checks stay enabled for other findings. The CI artifact retains the reviewed findings and reasons, and the PR report discloses their count.
  • Production-source Clang analysis reproduces the PPG warning before the change and emits no diagnostics afterward. ASan/UBSan regressions cover normal/split PPG frames, invalid tags/state, oversized FIFO/caller capacities and Bluetooth identity counts. Both local firmware variants and all four GitHub workflows passed. The fresh CodeChecker artifact contains 0 outstanding findings, 14 reviewed intentional hardware accesses, 186 analyzer results and 0 analyzer failures. The local F5 image bundle is updated to this verified build; BLE remains exactly 2.3.3. Physical boards retain their last flashed ae29902f image until updated.

Battery profiles are selected by a powered, validated IMU probe before charger/gauge configuration, including charging-only boots:

Detected IMU Battery Charge voltage/current Design capacity
0x68 VARTA CP1454 A4X 4.30 V / 100 mA 108 mAh
0x69 Grepow GRP1454M1 4.20 V / 90 mA 111 mAh
Failed/unexpected probe Conservative fallback 4.20 V / 80 mA 108 mAh

Grepow uses the supported step below 95 mA; the charger uses 10 mA steps in this range. Grepow temperature derating requests 40 mA. Profiles prohibit charging outside 0–45 °C or with invalid readings; Grepow/fallback do not automatically recover below 3.0 V. Existing 10 mA termination is retained. UICR metadata cannot enable 4.3 V. Learned FCC is excluded from design-setting mismatch checks.

Review fixes retained in this release:

  • Charger I/O failures latch charging off until restart. Setup verifies voltage, charge current, termination, TS mode, input limit and UVLO before permitting charging; runtime current changes are also read back. A retained 4.3 V setting cannot pass a failed 4.2 V configuration.
  • Manual gauge setup and battery workers serialize complete transactions using the recursive I2C mutex. In-flight work finishes before setup; subsequent work remains gated. Reboot releases the mutex before draining workers.
  • IMU detection waits 10 ms for power-on reset before probing, avoiding a premature fallback on a slow-starting sensor.
  • Hardware testing identified the LDO voltage field as locked while its output is enabled, as specified in BQ25120A table 20. The existing rail request is retained without gating battery charging on that unrelated field. The safety-related settings above remain verified.

The BQ27220 driver also serializes its 66 µs command gap and timestamp under the bus mutex and uses byte writes at 400 kHz, per TI TRM section 5.3. Both firmware variants default to Balanced auto-off after 15 minutes; saved preferences take precedence. The device-control service preserves existing identity handling and requires encryption for bond-clear/shutdown operations.

The release reports exactly 2.3.3 over BLE, using the release number from VERSION. Git/development metadata remains available in internal build diagnostics. MCUboot version remains 2.3.3+0.

The pair flasher adds --hw auto: it retains each device's existing UICR revision before erasing, supports mixed 2.0.1/2.1.0 pairs, and uses the established 2.0.1 station default for blank boards. Invalid hardware metadata stops both devices before either is erased. Explicit hardware selection keeps its previous behavior.

Validation:

  • Local SDK 3.4.1 regular and FOTA builds pass; ZIP CRC, app/network manifest, embedded identity and SHA-256 verified.
  • Seven battery-control host regression groups pass locally and in Linux CI: I/O faults, ignored writes/readback mismatches, profile settings, locked LDO, deterministic setup/worker interleaving, reboot lock release and delayed IMU startup. Four additional mocked pair-flasher scenarios verify mixed revisions, blank defaults, invalid metadata aborts before erase, and explicit revision compatibility. CI also runs eight native Unity suites, including battery-policy and device-control tests.
  • Both application and network cores flashed and verified at ae29902f on HW 2.0.1 (823008641) and HW 2.1.0 (823009485), preserving UICR and MCUboot trailers.
  • Both boards pass charging-only and active startup, gauge readiness and charger verification. Manual gauge setup completed and rebooted into advertising on both at 26298fd9; that control path is unchanged by the latest update.
  • VARTA reads back 4.30 V / 100 mA, 108 mAh, Power Good = 1, with 103 mA gauge current. Grepow reads back 4.20 V / 90 mA, 111 mAh and Power Good = 1; charging has terminated at about 4.18 V. These are gauge readings without an independent meter reference.
  • HW 2.1.0 GATT confirms the final firmware, physical ID, normal LED controls and Balanced/15-minute auto-off. HW 2.0.1 UART also confirms Balanced/15-minute auto-off. It advertises with its existing bond accept list; a GATT connection from this Mac timed out. Existing bonds were preserved.

All four latest-head workflows pass: firmware build, native and sanitizer tests, compiler-warning report and CodeChecker. CodeChecker now reports no outstanding findings; reviewed hardware accesses remain disclosed and retained in the artifact.

Grepow capacity learning did not complete: the previous discharge test ended at 3.30 V with VDQ = 1, EDV2 = 0 and FCC unchanged at 111 mAh. The supplied datasheet/user do not provide Grepow CEDV coefficients, so accurate state-of-charge characterization remains open. The 123.1 mAh gross experiment log excludes a pause/recharge and is not net usable capacity. No independent meter calibration, full temperature/rate characterization, end-to-end acoustic measurement or full OTA transfer is claimed.

Other open PRs #111, #220, #267 and #311 remain targeted to 2.3.3. This PR targets main and is ready for review. No stable release/tag is published.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

✅ Unit tests passed

8 passed, 0 failed/error, 0 skipped — view workflow run

Test scenario Platform Result
openearable.unit.battery_profile native_sim/native/64 ✅ passed
openearable.unit.bond_cleanup native_sim/native/64 ✅ passed
openearable.unit.audio_startup native_sim/native/64 ✅ passed
openearable.unit.csip_identity native_sim/native/64 ✅ passed
openearable.unit.sensor_component native_sim/native/64 ✅ passed
openearable.unit.sensor_transport native_sim/native/64 ✅ passed
openearable.unit.audio_encoder native_sim/native/64 ✅ passed
openearable.unit.ring_buffer native_sim/native/64 ✅ passed

Download the unit-test-results artifact for full Twister reports and logs.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Compiler warnings

The extended-warning build completed successfully.

Application compiler warnings

Show warnings
unicast_server/main.cpp:78:33: warning: 'int usb_enable(usb_dc_status_callback)' is deprecated [-Wdeprecated-declarations]

View this workflow run

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.zip
openearable_v2_fota.zip

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

CodeChecker static analysis

✅ No non-style issues found.

14 known nRF5340 hardware-register accesses are reviewed as intentional using exact checker/path/hash rules in .codechecker-review.json. Other fixed-address and array-bound findings remain enabled. The artifact includes reviewed-hardware-accesses.json with the findings and reviewed-hardware-rules.json with the matching rules and reasons.

Merge #276 and #371 into the release branch, preserving current main.
Select battery profiles from the powered IMU probe before charging setup;
use a 4.2 V fallback on failed detection and share charging safety checks.

Validated with clean SDK 3.4.1 FOTA/regular builds and nine host battery-policy tests.
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.zip
openearable_v2_fota.zip

Bound gauge configuration transitions and propagate I2C errors. Keep charging
inhibited on missing/failed gauge setup, report the fault through the shell,
and stop periodic readers before manual gauge configuration.
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.zip
openearable_v2_fota.zip

Use 80 mA for Grepow and unidentified cells, retaining 100 mA for VARTA.
Enable the CD input buffer so diagnostics and fault-injection validation can
read the actual charging-inhibit gate. Update profile regression expectations.
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.zip
openearable_v2_fota.zip

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.zip
openearable_v2_fota.zip

Keep the BQ27220 66 us command gap and timestamp update inside the I2C mutex so concurrent telemetry and policy reads cannot bypass the required wait.
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.zip
openearable_v2_fota.zip

Follow BQ27220 TRM section 5.3 at 400 kHz: split multi-byte commands into individual byte writes with a locked 66 us gap between every packet.
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.zip
openearable_v2_fota.zip

@TobiasRoeddiger
TobiasRoeddiger marked this pull request as ready for review November 4, 2026 15:13
Use the supported step below the requested 95 mA. Keep the unidentified fallback at 80 mA and VARTA at 100 mA; round temperature-derated current down to a representable charger step.
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.zip
openearable_v2_fota.zip

Verify charger profile/current readback before enabling CD; latch I2C or setpoint failures off until restart. Serialize manual gauge setup, charging work and diagnostics with the recursive bus mutex, releasing it before publication/reboot. Wait for sensor POR before each detection. Add production-driver fault/concurrency regressions to CI.
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.zip
openearable_v2_fota.zip

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.zip
openearable_v2_fota.zip

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.zip
openearable_v2_fota.zip

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.zip
openearable_v2_fota.zip

@TobiasRoeddiger
TobiasRoeddiger merged commit 660fbdd into main Nov 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant