cancel
Showing results for 
Search instead for 
Did you mean: 

HSE bypass not working on Nucleo-F334R8

marbel
Associate II

Here is a noodlescratcher for you all.

Take a nucleo-334R8 board. Start a new project with CubeMx. Set it up to be HSE bypass, into the PLL with x9. Just to make it a bit more fun, set the bypassed clocksource to be 7 mhz. Add the MCO and divide it down so you can inspect it with whatever tool you have. Make sure that clock security is NOT enabled. Now start and run your code.

Strangly, the board will work fine even after SystemClock_Config(). When you inspect the MCO at PA8, you will find ~72 mhz there.

Surly it must be the HSI that has "contaminated" the pll... right?

Is there any way to circument this? I tried to stop the HSI with LL_RCC_HSI_Disable(); and the MCO still kept throwing out a 72 mhz clock.

Regards

Martin

1 ACCEPTED SOLUTION

Accepted Solutions

Doesn't the ST-LINK feed in 8 MHz to the OSC_IN pin?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

5 REPLIES 5
TDK
Guru

8 MHz * 9 = 72 MHz. What are you expecting the result to be?

If you feel a post has answered your question, please click "Accept as Solution".
marbel
Associate II

Well, since I have disabled the 8 mhz HSI and not connected anything on the pin for the bypass HSE pin, i expected it to hang somewhere after the start of the PLL.

Doesn't the ST-LINK feed in 8 MHz to the OSC_IN pin?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
TDK
Guru

You can't disable both HSI and HSE. The hardware won't allow that. Gotta have a clock source from one of those.

Seems like you're just using the HSE bypass at 8 MHz.

If you feel a post has answered your question, please click "Accept as Solution".

Yes, that appears to be correct. I assumed that the ST link on the nucleo acted the same was as a stand alone one. Had no idea that the MCO of the ST-link MCU was connected to the target MCU.

Thanks