V2 source and ear-feed policy¶
This component owns HUSB320-BA000 source status, the two INA232A ear-feed monitors
and the volatile LED allowance. The v2 preset deliberately leaves
ESPURR_POWER_QUALIFIED off. It collects telemetry, but supplies zero LED
allowance until a complete, electrically qualified model is configured. The
1.25 A per-ear path qualification target supplies none of those operating values.
Legacy profiles link a resource-free stub and retain their existing output policy.
board owns both native I2C buses. One core-0 task borrows three device handles at
100 kHz: HUSB320 at I2C0/0x42, left INA232 at I2C1/0x40, right at I2C1/0x41.
There are no bus resets, general-call resets, new buses or I2C calls in the render
task, transport callbacks or snapshot getter. Startup failures remove only the
service's acquired handles; they do not fail the input/render OTA health gate.
There is no bus teardown while the device task is running.
Each transaction has a 20 ms timeout. The owner waits 50 ms after bounded work, without catch-up polling; a failed device waits one second before reconfiguration. The 300 ms sample deadline is checked both by the owner and by each snapshot reader, so a stalled publisher cannot preserve a positive allowance. These are software timing choices, not measured fault response or electrical acceptance. An already latched LED frame cannot be changed while the output owner itself is stalled. Black also retains 27.6 mA of modelled pixel idle draw; there is no rail gate capable of disconnecting a short.
Register contracts¶
The interface follows saved hardware 5c68ca6, without changing that workspace.
Datasheet review uses the Hynetek HUSB320 Rev 1.4 datasheet,
tables 17–29, and TI INA232 SBOSAA2, December 2022,
sections 7.6 and 8.1.2. The small register adapters sit on native ESP-IDF I2C;
similarly named TUSB320, HUSB238, INA219 and INA3221 drivers are not interchangeable.
No third-party implementation was copied. The local evidence PDFs and extraction
are kept in the firmware workspace's ignored acceptance artifacts.
- HUSB320 uses 8-bit registers. Verify version/device type; enforce sink role and enable its I2C state machine while preserving unrelated fields. Mask the unused physical interrupt and poll/acknowledge only observed documented W1C events. Bracket STATUS/TYPE reads to reject transitions. Positive allowance needs an ordinary attached sink, VBUSOK, a valid CC orientation and a nonzero current advertisement. Debug/audio accessories and source mode receive none. A latched detach event counts even if reattachment occurred between polls.
- INA232 uses explicit register pointers and big-endian 16-bit words. The selected
10 mΩ shunt,
ADCRANGE=1,CAL=0x0800produce signed 62,500 nA current steps, signed 625 nV shunt steps, unsigned 1,600 µV bus steps and 2,000 µW power steps.CONFIG=0x54dfselects 16 averages, 588 µs bus/shunt conversion and continuous operation: approximately 18.816 ms per averaged pair. The manufacturer field says TI; it is not a unique INA232 silicon identity. - Reload calibration after reset/configuration loss. Check configuration and calibration around data reads, memory/math flags and the conversion-ready bracket. A new conversion during the read discards that tuple and retains the previous sample age. No-ready polls never refresh the data timestamp.
- A new attachment, observed detach or recovered CC status invalidates/reconfigures both monitors. Clearing conversion-ready and waiting for a complete new averaging window prevents a pre-detach conversion from opening a new supply epoch.
Limits and faults¶
The immutable build configuration contains separate per-ear feed operating/trip ceilings, per-ear downstream non-LED reserves, whole-input operating/trip ceilings, the worst-case reserve outside both shunts, voltage window and reverse-current tolerance. All required values default to zero and fail validation. Measurement range is not an operating allowance. Both monitors must remain fresh and valid. The right microphone/logic LDO is upstream of its shunt: its load belongs in the unmonitored reserve, not in a fabricated third current measurement.
The allocation is:
input allowance = min(source allowance, qualified whole-input operating ceiling)
combined LED cap = input allowance - band reserve - downstream ear reserves
ear LED cap[i] = qualified ear-feed operating ceiling[i] - ear reserve[i]
These LED caps include the 13.8 mA idle draw per ear; the compositor subtracts idle before assigning dynamic current. The user's saved combined budget additionally bounds every output pass. Per-ear limiting precedes the combined limiter, and both reserve instantaneous dither rounding. Flashlight, diagnostics and OTA progress use this same path. Existing v1 accumulation and frame goldens remain unchanged.
The normal Type-C advertisements supply 1,500 or 3,000 mA before the qualified caps/reserves. Default Rp supplies no numeric allowance unless the actual powering arrangement establishes one through configuration. A configured known-source override can raise only the advertisement-derived bound, up to 3 A. It never negotiates USB-PD or lifts path limits, reserves, freshness or a fault latch. Requests and active overrides expire on stale/unavailable telemetry; active state also expires on detach/reboot. Override requests are owner messages, never NVS. The two-button gesture is separate pending input work; no new remote override control is exposed by this component.
Overcurrent, out-of-window voltage and excessive reverse current latch black until a confirmed detach or reboot. A source downgrade immediately narrows the feed-forward allowance. Valid readings above an operating cap but below a fault threshold can only fold the allowance down, once per new measurement; they cannot raise it. Foldback is retained until detach. The sum of positive measured branch currents plus the unmonitored reserve is an estimated input draw, not a whole device current measurement. Missing, incoherent or stale readings close the policy without being interpreted as measured zero.
Validation boundary¶
Host tests exercise actual register adapters, every transaction failure position,
calibration reload, conversion/CC coherence, signed endpoints, detach/re-attach,
strict limit validation, source transitions, fault latching, per-ear/all-layer
limits, request expiry, short publication locks and partial startup cleanup.
The s3-v2-qualified-fixture build compiles the opt-in branch with explicitly
synthetic values. Never flash that fixture or treat its constants as qualified.
The optional read-only power.status record and HTTP power object publish source,
reason, allowances, ages, faults and per-ear measurements through the
versioned observation contract.
Both phone clients and the browser distinguish unavailable/stale data from valid
measured zero. The existing power.ready remains the render owner's applied
readiness; telemetry is a separate component observation. Detailed diagnostics live
in Device information/the browser disclosure; no override control is exposed yet.
No target build, host fixture or sanitizer run establishes electrical behaviour,
current-model accuracy, wearable heat, physical USB timing or fault containment.