mcux: sdk-ng: RT11xx: fsl_clock: read the PLL numerator as signed #834
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.33) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 141 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.296
Real PR Conversation Timeline
1 comments
"Review active on #834"
general
weight: 0.35
lucien-nxp
CLOCK_GetAvPllFreq()(RT1150, RT1160, RT1170) converts the AUDIO/VIDEO PLL numerator register to double as an unsigned value, but the numerator (MFN) is a signed 30-bit field (RM rev. 5, 15.9.5.4.3: "Signed number"; AN14420, section 2). With bit 29 set the numerator is negative and the function reports a frequency the PLL does not run at; a negative numerator also gives a value beyond theuint32_trange, whose conversion is undefined.The fix masks the 30-bit field and sign-extends it, in the three identical copies, and lists the change in the patch list of
mcux/README.Testing on a MIMXRT1170-EVKB, AUDIO_PLL set up by the SAI driver (DIV_SELECT 32, post divider /2):
| NUM / DENOM | Before | After |
|---|---|---|
| 0x30000000 / 0x3E800000 (bit 29 set) | 393216000 Hz | 380928000 Hz |
| 0x18000000 / 0x1F400000 | 393216000 Hz | 393216000 Hz |
380.928 MHz matches the ENET_1G 1588 timer clocked from that PLL and locked to a PTP time transmitter (it needed a +3.2 % correction). Built for
mimxrt1160_evk/mimxrt1166/cm7andfrdm_imxrt1152, not run.The same code is on
mainof nxp-mcuxpresso/mcux-devices-rt.