-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[microtvm][Zephyr] Add project overlay to overwrite device tree configs #12741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
areusch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mehrdadh
guberti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…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