[microtvm][Zephyr] Add project overlay to overwrite device tree configs#12741
[microtvm][Zephyr] Add project overlay to overwrite device tree configs#12741mehrdadh merged 3 commits intoapache:mainfrom
Conversation
guberti
left a comment
There was a problem hiding this comment.
LGTM - thanks for this change!
|
@mehrdadh Nice findings, I wonder if you would like to upstream it to Zephyr also so other projects could pick this up? |
| &rcc { | ||
| clock-frequency = <DT_FREQ_M(120)>; | ||
| }; |
There was a problem hiding this comment.
That is not correct.
You should update the PLL configuration accordingly:
&pll {
div-m = <2>;
mul-n = <30>;
div-p = <7>;
div-q = <2>;
div-r = <2>;
clocks = <&clk_hsi>;
status = "okay";
};
Note that the impacts of effects on bus configurations have to be tested.
There was a problem hiding this comment.
@erwango Thanks a lot. Do you mind to tell how exactly one finds the params (M, N, P, Q, and R) for the PLL? I see them in the clock tree in RM0432 rev. 9 (Arm Reference Manual), Figure 16, but could not find any formula about how to relate them to the 120 MHz freq.
There was a problem hiding this comment.
@erwango Thanks a lot. Do you mind to tell how exactly one finds the params (M, N, P, Q, and R) for the PLL? I see them in the clock tree in RM0432 rev. 9 (Arm Reference Manual), Figure 16, but could not find any formula about how to relate them to the 120 MHz freq.
Core freq = Input freq (HSI: 16MHz) / M(2) * N(30) / R(2)
…gs (apache#12741) * add nucleo overlay
…gs (apache#12741) * add nucleo overlay
…gs (#12741) * add nucleo overlay
This PR adds a mechanism to overwrite device tree configs in zephyr project. It also adds an overlay for nucleo_l4r5zi board to change processor frequency from 80MHz which is the default to 120MHz.
cc @alanmacd @areusch @gromero @guberti