mcux: sdk-ng: lpc546xx: fix clock rate getters #841
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 196 lines diff across 2 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.316
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #841"
general
weight: 0.35
zejiang0jason
Three clock rate getters in the LPC54628 and LPC54608
fsl_clock.cdo not match the clock selector encodings:| Getter | Selector | Returned | Selects |
|---|---|---|---|
|
CLOCK_GetFlexCommClkFreq()| FCLKSEL = 2 | system PLL | audio PLL ||
CLOCK_GetDmicClkFreq()| DMICCLKSEL = 1 |fro_hf|fro_hf_div(FROHFCLKDIV ignored) ||
CLOCK_GetDmicClkFreq()| DMICCLKSEL = 2 | system PLL | audio PLL ||
CLOCK_GetDmicClkFreq()| DMICCLKSEL = 4, 5 | main clock, watchdog osc | reserved ||
CLOCK_GetAsyncApbClkFreq()| ASYNCAPBCLKSELA = 2 | 0 | audio PLL |References:
SELfield descriptions inmcux/mcux-sdk-ng/devices/LPC/LPC54000/periph/PERI_SYSCON.handPERI_ASYNC_SYSCON.h.fsl_clock.h, e.g.kAUDIO_PLL_to_FLEXCOMM6 = MUX_A(CM_FXCOMCLKSEL6, 2),kAUDIO_PLL_to_DMIC = MUX_A(CM_DMICCLKSEL, 2),kAUDIO_PLL_to_ASYNC_APB = MUX_A(CM_ASYNCAPB, 2).LPC54S018/drivers/fsl_clock.calready returnsCLOCK_GetAudioPllOutFreq()for FCLKSEL = 2.Zephyr reads these through
clock_control_get_rate():i2s_mcux_flexcommderives its bit clock divider from the FlexComm rate,dmic_mcuxchecks the PDM clock range and derives the oversampling ratio from the DMIC rate, and the CTIMER3/4 counters use the async APB rate.ASYNCAPBCLKSELA = 3 (FlexComm 6 clock) still returns 0: switching the async APB bridge to it stalled the bus on hardware, so its rate could not be verified.