main
John Lauer Review insulating stack clip and verify fan-fault software timing 870b84b

Fan-fault shutdown review

The portable tachometer and load-policy modules pass 240 combined host cases covering every scheduler phase at 1–15 ms polling intervals, both normally and across the 32-bit millisecond clock wrap. These tests use synthetic sensor values and the actual C modules. They do not measure MCU or analog shutdown timing.

The tachometer accepts eight consecutive periods of 3000–6000 µs (two pulses per revolution), rejects bad periods, and invalidates a reading strictly more than 15000 µs after the last edge. In this test, the load policy latches FAN fault and commands zero DAC/disabled output at the first subsequent policy poll: greater than 15 ms and no later than 15 ms plus the assumed polling interval after the last pulse. The STM32 adapter additionally discards qualification after a polling gap greater than 15 ms. The policy's 250 ms last-tach fallback is not the normal missing-pulse detector.

tests/test_fan_shutdown.c supplements the existing noise, recovery, latch, stale sample, protocol and timer-wrap tests. tools/check_firmware.sh passed with address/undefined-behavior sanitizers and 25 Python tests on this review. The existing fan demonstration separately checks that returning pulses do not restart a faulted load.

What still needs measurement

  • Worst-case foreground/interrupt latency under USB traffic and failed I2C transactions; a host scheduler bound is not an MCU deadline guarantee.
  • Time from the last physical tach pulse to enable deassertion, DAC clearing and measured drain-current decay.
  • Temperature-sensor attachment, lag, tolerance, calibration and the peak case/junction temperature during each fault.
  • Fan unplug/stall, tach wire open/short/noise, and blocked airflow while RPM remains apparently healthy.
  • Independent hardware protection and power-on/reset behavior with a qualified assembly.

The current STM32 bring-up image unconditionally keeps the load off and sets assembly qualification false. No production enable path was added or flashed. A spinning fan cannot prove installed airflow. The full-power still-air thermal failure remains open; these software tests do not waive it or establish a safe transient thermal margin.