variants: unoq: fix flash verify performance regression #755
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 323 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.346
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #755"
general
weight: 0.35
facchinm
Since cf856640 the UNO Q flash script stops the CPU with "reset halt". The CPU then stays on the 4 MHz reset clock, and the OpenOCD checksum of the loader takes 5 s on every upload. This PR uses "reset init" instead. It halts at the same place and then sets the 160 MHz clock. The loader verify drops from 5.0 s to 0.2 s.
Why it was fast before cf856640
The old script ran "reset" and then "halt". Between the two commands the loader ran and switched the system clock to the PLL. So the checksum algorithm ran at 160 MHz. "reset halt" stops at the reset vector, before the loader sets the clock.
"reset init" halts the CPU
"reset init" stops at the same place as "reset halt": the PC is at z_arm_reset, and msp is the initial stack pointer from the vector table (0x2000a8b0). No instruction has run, so the fix of cf856640 stays. The reset-init event then runs clock_config, which sets the PLL.
How to test
The script resets the CPU in three ways. For each one it prints the PC, the clock source (RCC_CFGR1.SWS: 0 = MSI 4 MHz, 3 = PLL 160 MHz) and the time of a full
flash verify_imageof the loader.why.cfg:Run it on an UNO Q with the 1.1.0 loader, connected over USB:
Result: