2020-09-26 06:40 AM
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
Solved! Go to Solution.
2020-09-26 10:43 AM
Doesn't the ST-LINK feed in 8 MHz to the OSC_IN pin?
2020-09-26 07:41 AM
8 MHz * 9 = 72 MHz. What are you expecting the result to be?
2020-09-26 10:37 AM
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.
2020-09-26 10:43 AM
Doesn't the ST-LINK feed in 8 MHz to the OSC_IN pin?
2020-09-26 10:50 AM
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.
2020-09-26 11:14 AM
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