fix(bench): ST-LINK_CLI 子进程加 stdin=DEVNULL,闭环不再挂死

- stlink_flash.py::run_cli 与 run_boot_test.py::_run_cmd 调 subprocess.run
  时未给 stdin=DEVNULL:ST-LINK_CLI 编程完成后停在 "run application to
  exit" 等 stdin,stdin 是未关闭管道即永久挂起(编程其实已成功、板子已
  复位运行)→ 闭环误判 flash rc=-1(180s 超时)
- 归档 ADC 1kHz 台架证据 boot_log_data/20261010_prod_adc_tim6_boot_log.txt
  并在 README 清单登记
- 同步 ADC采样节拍设计说明(状态→通过台架验收、新增 §7.1 实测)
  与 继电保护功能复现规划 L1-1
This commit is contained in:
2026-10-10 15:46:21 +08:00
parent 970e574433
commit b80f59cc5d
6 changed files with 112 additions and 7 deletions
@@ -80,7 +80,11 @@ def find_cli(cli_arg, cfg):
def run_cli(cli, args, timeout):
t0 = time.monotonic()
try:
proc = subprocess.run([str(cli)] + args, capture_output=True, timeout=timeout)
# stdin=DEVNULL 必须:ST-LINK_CLI 编程完成后会停在 "run application to exit"
# 等按键,若 stdin 是未关闭的管道/控制台会**永久挂起**(2026-10-10 台架实测:
# 编程已成功、板子已复位运行,CLI 却 180s 不退 → 闭环误判 flash rc=-1)。
proc = subprocess.run([str(cli)] + args, capture_output=True, timeout=timeout,
stdin=subprocess.DEVNULL)
rc = proc.returncode
raw = (proc.stdout or b"") + (proc.stderr or b"")
except subprocess.TimeoutExpired as e: