fix(mcu): MCU-A6 — recovery handlers for AD9523_CLOCK and FPGA_COMM

attemptErrorRecovery() previously fell through to the default log-only
branch for both ERROR_AD9523_CLOCK and ERROR_FPGA_COMM. checkSystemHealth
keeps re-firing the same error every pass with no recovery action ever
attempted, so the system limps along until escalation kicks in.

ERROR_AD9523_CLOCK: AD9523_RESET_ASSERT, 10 ms settle, then re-run
configure_ad9523() (releases reset, selects REFB, reprograms, waits for
lock). On second failure we log and let the next health pass re-fire so
a transient brown-out on the 100 MHz reference does not drop straight
into Emergency_Stop.

ERROR_FPGA_COMM: pulse PD12 LOW->10 ms->HIGH (matches the boot reset
pattern). PA rails left untouched at runtime; brief adar_tr_x undefined
window is acceptable vs. losing the radar entirely.

Added test_mcu_a6_recovery_dispatch (11 cases) covering both new
handlers, all existing routes, the default branch, a pre-fix regression
check, and an explicit assertion that RF_PA_OVERCURRENT escalates
upstream (handleSystemError) rather than recovering inline. MCU
regression now 80/80.
This commit is contained in:
Jason
2026-04-28 09:26:35 +05:45
parent 1317a91e01
commit 4a102e30fe
3 changed files with 172 additions and 0 deletions
@@ -69,6 +69,7 @@ TESTS_STANDALONE := test_bug12_pa_cal_loop_inverted \
test_mcu_a1_cooling_hysteresis \
test_mcu_a7_emergency_persist \
test_mcu_a5_pa_cal_gate \
test_mcu_a6_recovery_dispatch \
test_gap3_iwdg_config \
test_gap3_temperature_max \
test_gap3_idq_periodic_reread \
@@ -171,6 +172,9 @@ test_mcu_a7_emergency_persist: test_mcu_a7_emergency_persist.c
test_mcu_a5_pa_cal_gate: test_mcu_a5_pa_cal_gate.c
$(CC) $(CFLAGS) $< -o $@
test_mcu_a6_recovery_dispatch: test_mcu_a6_recovery_dispatch.c
$(CC) $(CFLAGS) $< -o $@
# Gap-3 safety tests -- mock-only (needs spy log for GPIO sequence)
test_gap3_emergency_stop_rails: test_gap3_emergency_stop_rails.c $(MOCK_OBJS)
$(CC) $(CFLAGS) $(INCLUDES) $< $(MOCK_OBJS) -o $@