← Back to Pull requests

mcux: sdk-ng: RT11xx: fsl_clock: read the PLL numerator as signed #834

Open
unknown opened this pull request with 141 lines diff across 1 files
View on GitHub
unknown unknown commented on Oct 09, 2026 16:07 UTC
Author

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 the uint32_t range, 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/cm7 and frdm_imxrt1152, not run.

The same code is on main of nxp-mcuxpresso/mcux-devices-rt.

Diff: 141 lines (+105 / -36) across 1 files Reviewer: lucien-nxp Review duration: 23281m
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
0.33
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
46%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 46.7% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 32.6% (LOW) · Higher = larger blast radius
32.6%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 46.7% · Lower = rushed or shallow review
46.7%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 17.4% · Safe to merge
17.4%