main
John Lauer Publish compact v5 electrical checks and six captioned progression review scenes; cooling acceptance remains open ca514b5

STM32G0B1KCT6 USB bring-up image

This adapter compiles for the routed LQFP32 GP package. Output is permanently locked OFF. It is not a released load controller and has not been flashed or tested on hardware. The lab identity below is TinyUSB's example identity, not an Adom-assigned commercial USB identity.

The adapter sets PA5 (MCU_ENABLE), PA4 (ARM_CLK), and PA6 (WDI) low before clock setup. PB3 (FAULT_CLEAR) is open drain and held low. It does not import the Nucleo LED code, because that example toggles our enable pin. Hard-fault and fatal initialization paths deassert enable. USB disconnect/suspend/DTR loss drops protocol ownership. USB attachment follows PB0 VBUS detection. The image never releases the hardware latch or writes a nonzero DAC command.

DUT voltage and case temperature can now be reported as nominal ADC diagnostics when acquisition succeeds. Sensor qualification and assembly qualification remain false. Current can be reported only after a successful INA conversion and while its conservative age is at most 50 ms. Fan RPM is supplied by the PA7/TIM2 input once its pulse history qualifies. The portable protocol and ownership/replay checks run over CDC, with bounded input work and bounded reply buffering. This proves a linkable implementation, not boot timing, interrupt latency, USB compliance, or operation of the board's interlocks. Reset-time pulldowns and physical faults still require bench verification.

Reproduce

Fetch the repositories in dependencies.json at their exact commits. The expected arrangement is the TinyUSB tree with hw/mcu/st/cmsis_device_g0, hw/mcu/st/stm32g0xx_hal_driver, and lib/CMSIS_5. python3 tools/get_deps.py stm32g0 in the pinned TinyUSB checkout fetches these dependencies. The build refuses a different commit or modified tracked dependency files. Upstream licenses are retained in licenses.

The checked compiler is GNU Arm Embedded 13.2.1 from Ubuntu's gcc-arm-none-eabi package version 15:13.2.rel1-2, with binutils-arm-none-eabi 2.42-1ubuntu1+23, libnewlib-arm-none-eabi and libnewlib-dev 4.4.0.20231231-2. Download with apt-get download and extract with dpkg-deb -x into an isolated directory; no system installation is required.

From the project root:

python3 tools/build_stm32_bringup.py \
  --tinyusb /path/to/tinyusb \
  --toolchain-root /path/to/extracted-packages \
  --vid 0xcafe --pid 0x4001 --lab-boot-id lab20261009bringup

Outputs are ELF, HEX, BIN, map, stack-usage files and a hash/command manifest under build/stm32-bringup. The script never flashes a device. Newlib's heap is capped at 8 KB; the linker reserves an 8 KB stack. Measured stack high-water and worst-case execution time are still needed.

The explicitly supplied lab boot ID is not fresh across resets. Production firmware requires an allocation-backed USB VID/PID and verified per-boot identity persistence before enabling any load. Do not deploy this example identity or treat its same-boot sequence counter as reset-safe replay protection.

Remaining adapter work

board-specific ADC/sensor calibration and temperature attachment verification; physical INA226/DAC60501 I2C validation and timing; physical tach timing and ISR-latency verification; physical watchdog/latch handshake; reset/brownout and auxiliary/USB power sequencing; production boot identity; integration of qualified assembly configuration; fault injection and USB reconnect tests on the actual PCB. Only then can a separately reviewed functional adapter enable the load.

Fan tachometer bring-up

PA7 rising edges timestamp the free-running 32-bit TIM2 counter at 1 MHz. The existing decoder requires eight valid periods and assumes two pulses per revolution. The main loop snapshots it with interrupts masked, expires stale history after 15 ms, and requalifies after a main-loop polling gap over 15 ms. This prevents old RPM history from becoming valid again when the microsecond counter wraps. USB replies expose the measured RPM only while qualified.

This is compiled integration, not a measured fan test. Confirm the fan's pulse count, external pull-up, oscillator accuracy, ISR latency under USB traffic, disconnect/stuck-wire behavior and physical stall response on the actual board. No fan drive, load-enable, or assembly qualification is introduced by this input.

ARM acknowledgement freshness

The portable core refuses ARM if the sampled hardware latch is already high. A new ARM sequence requires a verified low latch before the adapter pulses ARM_CLK, then a high acknowledgement within the existing 100 ms timeout. Stale-high latch state cannot authorize a new run. Host core and framed-protocol tests cover this refusal and the normal low-to-high transition. The output-locked MCU image still never executes the functional handshake, and hardware verification remains required.

Host bring-up monitoring

The control panel can retain a confirmed-OFF connection while voltage/current/temperature are unavailable. Firmware replies explicitly report sensor and assembly qualification; the host keeps unknown readings blank and Enable load disabled. Host-to-compiled-C interoperability covers this path. It does not establish USB enumeration on this board. The register driver is now linked to I2C1 through an output-locked diagnostic adapter. Host fake-HAL tests exercise that adapter; physical bus operation remains unverified.

I2C diagnostic acquisition

PB6/PB7 (GP package pins 30/31) use AF6 I2C1 with external pull-ups, matching ST's pin table. A dedicated HSI16 peripheral clock and TIMINGR 0x30444f4f target no more than about 25 kHz before edge/filter effects. This is an initial timing configuration, not verified I2C compliance. Check rise/fall time, capacitance, analog filtering and the actual clock on hardware.

The adapter performs register ID/config/readback checks at startup and permits only zero writes to the DAC data register. It samples the INA periodically; failure is sticky until reset. Main-loop output disable remains unconditional. Transfer timeout arguments are 5 ms, but the pinned ST HAL also has an internal 25 ms BUSY wait. A pre-check rejects an already busy bus. This does not establish a 5 ms overall deadline or measured worst-case execution time; production enabling requires a separately verified nonblocking/bounded control schedule.

The cache timestamps readings from before the averaging interval began, not when they were read. WAIT cannot refresh their age; errors invalidate the cache. Polling and reading expire values older than 50 ms, with unsigned timer-wrap handling. INA voltage is after the protection diode and is deliberately not sent as DUT voltage. The PA1/PA0 ADC adapter supplies nominal diagnostics, but measured calibration and sensor attachment are still required before sensors can be valid.

Fake-HAL tests execute the real adapter, register driver and cache together: GPIO mapping, shifted bus addresses, byte order, timeout arguments, zero-only DAC, invalid startup, stale samples and sticky faults. They do not prove electrical timing, boot behavior or analog accuracy. Current image: 74,004 bytes flash; 24,192 bytes RAM including reservations. No device was flashed.

ADC diagnostic acquisition

PA1 reads DUT voltage through the nominal 100k/10k divider; PA0 reads the 10k pull-up / NTC divider. ADC1 uses PCLK/4, 12-bit readings, 160.5-cycle sampling and one selected channel at a time. It runs peripheral calibration and reads the factory VREFINT calibration to estimate VDDA. Reference settling is given 1 ms; conversion polls use a 2 ms timeout. These settings still need source-impedance, reference, timing and noise verification on the physical PCB.

Temperature diagnostics now use the selected NTCLE428E3103H301A:10 kΩ±3%, with log-resistance interpolation between all30 nominal points in table5 of Vishay document29186,28 April2026. The supported nominal table range is−40 to105 °C; there is no extrapolation. This replaces the earlier NTCLE100 curve. Sensor, pullup, ADC tolerances and case attachment remain uncalibrated. Tests check all30 table nodes,10001 monotonic samples, every12-bit ADC code and unchanged outputs on rejection. They do not certify temperature accuracy, interpolation error between manufacturer points, installed lag or shutdown temperature.

A failed conversion, implausible reference, saturated sensor or out-of-range nominal temperature invalidates ADC diagnostics until reset. Samples expire after 50 ms. The combined reply uses the older available ADC/INA timestamp. sensors_valid remains false even when numbers are available, and assembly qualification remains false. No production enable path was added. The real ADC adapter is also exercised through a fake HAL: channel selection/removal, failure at every HAL operation, saturation and stale/timer-wrap handling. Physical ADC operation remains unverified.

The sensor update was rebuilt separately under build/stm32-ntcle428, preserving the prior bring-up build. Output lock,55 °C nominal policy threshold,5 W ceiling and unqualified sensor/assembly flags remain unchanged. The static tolerance study in mechanical/sensor-trip-budget.json still shows that a55 °C indicated threshold can correspond to a hotter case; the new curve does not resolve that acceptance issue. No device was flashed.

Compact R11 build

Use --firmware-root revisions/compact-r11/firmware --out revisions/compact-r11/build/stm32-locked with the project build tool. This isolates the new tach policy and PA8 fan control from the preserved R10 image. Startup, every loop and fatal handling hold PA8 low: Q5 is off and the external pull-up requests full cooling. No variable-duty timer is enabled. Exact fan frequency and zero-duty behavior still require manufacturer data; the load remains permanently output locked. The build manifest binds this revision's sources and pinned dependencies. No hardware was flashed.