cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP151: How do we change crystal HSE from 24MHz to 8MHz?

Dat Tran
Senior II

Hi, we would like to change from 24MHz to 8MHz which is available in our stock, I see in device tree, file stm32mp151.dtsi

clocks {

clk_hse: clk-hse {

#clock-cells = <0>;

compatible = "fixed-clock";

clock-frequency = <24000000>;

};

.....

I changed clock-frequency = <8000000>;

Is that enough or I do have to set some other config? If there is some other places need to change, could you tell me which ones should be, please?

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

Hi,

This is usually enough... but...

You should adapt some PLL settings due to new HSE frequency.

You must also change USB clock source to PLL4R as 8 MHz is not supported in direct (in CubeMx, USB PLL should receive either precise 19.2, 24, 26, 30 or 38.4 MHz). Changing PLL4 frequency could impact other clocks and so your global clock tree.

I encourage you to use CubeMx to generate the device tree for clocking with HSE = 8MHz.

Regards,

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
PatrickF
ST Employee

Hi,

This is usually enough... but...

You should adapt some PLL settings due to new HSE frequency.

You must also change USB clock source to PLL4R as 8 MHz is not supported in direct (in CubeMx, USB PLL should receive either precise 19.2, 24, 26, 30 or 38.4 MHz). Changing PLL4 frequency could impact other clocks and so your global clock tree.

I encourage you to use CubeMx to generate the device tree for clocking with HSE = 8MHz.

Regards,

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Dat Tran
Senior II

Yes, I use STM32CubeMX generate the clock configuration and get it working.