Charge-disabled diagnostic only. Not production firmware, permission to charge, manufacturing approval or physical test evidence. Existing project files were listed before writing; no previous firmware/bring-up file existed. No schematic, PCB, component or reserved charging-status/power-budget/redesign document was modified.
Final pio run -d /root/work/diagnostic: exit 0, SUCCESS, 2.29 seconds, release build. espressif32 6.9.0; Arduino framework 3.20017.241212+sha.dcc1105b (Arduino ESP32 2.0.17), Xtensa GCC 8.4.0+2021r2-patch5, esptool 4.5.1. RAM 19,228 / 327,680 bytes (5.9%); application flash 297,789 / 3,342,336 bytes (8.9%). Flash denominator is selected application partition, not entire 8MB device. Compiler warnings: application 0, framework/dependencies 0 in final build log. No compiler failure occurred; source review replaced a potentially unsafe HardwareSerial default-TX selection with explicitly RX-only IDF UART before the final successful rebuild.
Host decode tests compiled with clang++ -g -O1 -fsanitize=address,undefined -fno-omit-frame-pointer; output verbatim: PASS decode tests; ASan/UBSan: no findings. Tests cover signed normal/extended TMP102, bus/ADC scaling, ratiometric resistance and invalid excitation/open/short guards. Linked ELF inspection: 42001afc T initVariant confirms the custom early initialization hook is linked strongly. Source readback shows every GPIO41 assignment is zero/LOW, first setup operation LOW, with no command, timer, flag or peripheral that can generate heartbeat. This is software inspection, not an oscilloscope waveform measurement.
Build, flash and console
Unzip, run pio run -e diagnostic. After no-pack/emulator bring-up approval, flash using pio run -e diagnostic -t upload --upload-port /dev/ttyUSB0; monitor UART0 at 115200 8N1. PlatformIO manages all image offsets; do not flash the application BIN alone at address zero. Standard application offset is 0x10000. Manual boot: hold BOOT low, reset EN, then release BOOT after download entry. No hardware connected/flashed/tested here.
Build target esp32-s3-devkitc-1 was confirmed by pio boards: N8, 8MB/no PSRAM. Actual host is U6 ESP32-S3-MINI-1-N8; CPU 240MHz, module clock, flash DIO 80MHz, USB CDC disabled. Manifest selection does not assert devkit connector equivalence. Console J4: 1=3V3 reference, 2=GND, 3=host TX(GPIO43), 4=host RX(GPIO44), 5=EN, 6=BOOT. Use 3.3V UART logic and common ground, never adapter 3V3 as board power. USB19/20 are untouched by application; USB recovery remains a separate hardware/core capability.
Safe boot and complete MCU mapping
Mapping comes from live net memberships, not stale Role Details. U15 Role Details incorrectly describe obsolete channels; live AIN0/1 are grounded and AIN2/3 are probe/excitation. Final hardware reconciliation confirms GPIO40 is CHGR_STAT1_N from BQ24610 STAT1, not NC or an I²C-charger interrupt. GPIO41 remains the inhibited heartbeat input. Documentation was reconciled after the completed hardware/pad corrections; no binary change was required.
Table
GPIO
Connected function
Starter action
0
Host BOOT strap/SW2/J4-6
Untouched
1,2,7,38
Spares
Inputs
3,45,46
No connected application net/straps
Untouched
4,5
SDA/SCL
Wire 100kHz, timeout25ms
6
TMP102 ALERT
Raw input
8,9,10
CAN TX/RX/STB
TX HIGH, RX input, STB HIGH
11,12
Expansion power enable/fault
Enable LOW; fault raw input, no reset
13,14
U4 STAT1/STAT2
Raw input only, no charge-state decode
15,16
Host modem TX/RX
TX detached input; RX-only UART1 115200 8N1
17,18
Modem NRST/BOOT0 through1k
Both LOW; no reset release command
19,20
USB D−/D+
Untouched, CDC not enabled
21
Status LED
LOW
26,34
Unused/reserved module pins
Untouched
33
VBUS_OK/U13 select/hardware status
Raw input; NOT charge authorization
35,36,37
Accessory MOSI/SCK/MISO
Inputs; no SPI clocks
39
Accessory reset
Input; polarity/protocol unspecified
40
CHGR_STAT1_N from BQ24610 STAT1
Input, no interrupt handler or interpretation
41
CHARGE_ENABLE → U31 TRIG
Always LOW
42
Probe excitation
LOW except bounded read then LOW on success/error
43,44
UART0 TX/RX
115200 console
47,48
Accessory CS/IRQ
CS HIGH, IRQ input
EN,3V3,GND
Reset/power/module ground pads
Hardware, no GPIO control
Custom initVariant sets IO41 LOW, CAN STB HIGH, expansion enable LOW, modem reset LOW before setup; first setup operation repeats IO41 LOW. Loop invariants repeat these levels. Reset/ROM/bootloader precede this hook: safety during those intervals comes from physical Q6 DNP, pull-downs and hardware interlocks, not a software claim. Modem can execute before host initialization; for absolutely no RF over the whole boot interval, physically restrain modem NRST or install a verified non-transmitting modem image before powering. Do not let a J5 programmer override reset during this diagnostic. Starter itself never releases modem reset, sends UART commands, loads Wi-Fi/BLE/LoRa stacks, enables CAN, injects or ACKs frames.
Device initialization and read definitions
U22 INA237 0x40 vehicle remote voltage; U23 0x41 backup voltage: require manufacturer reg0x3E=0x5449, preserve ADC_CONFIG low12 bits, select/read back mode9 continuous bus-only. Bus register5 has3.125mV/LSB. Shunt pins grounded; never report current/power/SOC. Failed transactions print unavailable. No invented device-ID register.
U10 TMP102 0x48: config read, shutdown marks unavailable; temperature reg0 signed12/13-bit decoded using temperature-data format marker,0.0625°C/LSB; first report waits300ms. No config/alert writes. Board temperature is not pack temperature. Prior non-default configuration can affect freshness; reset/config must be checked on bench.
U15 ADS1115 0x49: AIN2=probe voltage, AIN3=excitation; single-shot PGA±4.096V/128SPS with comparator disabled; derived words E383/F383; poll OS with50ms deadline and config readback,125µV/LSB. IO42 HIGH20ms settling, then both reads, then LOW. R83 live10k: Rntc=10000×V2/(V3−V2). Prints volts and ohms; external-probe Celsius unsupported pending exact installed curve/cable calibration. Diagnostic plausibility guards are not safety trip thresholds. J6 probe is independent of J3 BAT_NTC; starter has no pack-temperature reading.
U7 modem: live PA2/UART2_TX→host16, PA3/UART2_RX←host15; NRST17, BOOT18 through series resistors. IDF UART1 attaches RX16 only, never a default TX. Passive hex RX diagnostic; silence expected while reset LOW. 115200 baud is an explicit assumption, not verified modem identification. i prints ESP chip identity and modem wiring. AT identity/version/UID queries intentionally unsupported until exact non-T RUI3 image and non-autojoin policy are verified; no generic passthrough. J5:1=3V3ref,2=GND,3=SWDIO,4=SWCLK,5=NRST,6=BOOT0,7=modemTX,8=modemRX. No destructive factory erase or independent modem firmware build is supplied.
U8 CAN / U9 expansion eFuse: STB HIGH disables driver/normal receiver; no TWAI initialization. TX HIGH, RX raw, expansion EN LOW and fault raw only. Intended future baseline classical125kbit/s with endpoint termination; not active in starter. No CAN-FD or vehicle-CAN interface claim.
J7 accessory:1=3V3,2=GND,3=SCK36,4=MOSI35,5=MISO37,6=CS47,7=IRQ48,8=reset39. No fitted SPI controller/PHY/protocol: unsupported, unclocked, no direct vehicle-CAN connection.
U4 BQ25185: hardware permanently CE HIGH, raw STAT13/14 only. U25 BQ24610: resistor-programmed, no I²C or initialization/readback requirements. STAT1 connects GPIO40; PG and STAT2 are intentionally NC. GPIO40 remains uninterpreted input. No obsolete BQ25620 writes/addresses exist in source.
U1, U2/U24, U5, U17, U18/U19/U20, U13, U26/U27, U31, U32/U33 and discrete gates: hardware-only ideal diode/bucks/buck-boost/USB admission/comparators/switching/interlocks; no firmware register interfaces invented. U31 receives no edges. No host sensing of actual CE, charge current, pack NTC or individual hardware permissions; use instruments.
Commands: r readings, i host identity/wiring, ? help; every other byte rejected. No credentials needed. No radio transmit, pack charging or CAN injection by default or by any starter command.
Completion and dependencies
Final read-only U6 net inspection after archive creation confirmed unchanged IO41→CHARGE_ENABLE→U31 TRIG and the sensor/CAN/modem mapping above; IO40 is CHGR_STAT1_N→BQ24610 STAT1 with R95 pull-up. The compiled starter keeps IO40 high-impedance with no interpretation, so no binary change is needed. PG/STAT2 are intentionally NC; production STAT1 decoding is not implemented. The archive README preserves the earlier pending-status snapshot; this document is the newer hardware mapping and does not change the archived source or hashes.
Completed: live mapping/device audit; complete source; final compile; sanitizer decode tests; linked-hook and source-level safety readback; durable archive and project files. Explicit unsupported interfaces: external-probe Celsius, modem AT identification/programming, CAN active reception/injection, future SPI accessory and final charger-status decoding. These are not fabricated implementations. Unattempted: physical flashing, waveform/sensor validation, charging, RF/CAN tests and manufacturing release.
Production work remains: sensing/NTC calibration, bounded telemetry/queue/retry behavior, independent modem image validation/provisioning, secure credentials/update/recovery, CAN protocol, sleep/runtime budget, watchdog/temperature/source/fault policy, STAT1 decoding and all hardware charging release tests. A separate reviewed implementation is required for charging; do not add a hidden enable flag here.