2010-11-18 08:42 PM
Switching between the system clock sources
2011-05-17 05:15 AM
I think you are one of a handful using the STM32L
The sequence will likely go Enable HSI Wait for HSI to start Switch to HSI Wait for HSI to become source Disable other clocks (MSI, etc) There should be examples of this, or other clock switches, in the STM32L or other STM32 series parts. The reverse sequence will likely go Enable MSI Wait for MSI to start Switch to MSI Wait for MSI to become source Disable other clocks (HSI, etc)2011-05-17 05:15 AM
Just do it. But do understand that some processors and debuggers can do bad stuff.
I’m a “just do it�? kind of guy. But that cost me $49+s/h on a non-ST demo board. I stopped the clock leaving the debugger no way to recover. Thereafter I first prove that I can read a push button on the demo board and loop waiting until it is released before going on. If I kill something real bad I can boot with the button pressed and stop things before my code messes up. It’s only a little code and can be left in production code. Pull the pin up. Then when needed ground the pin. Program then waits before any clock changing.2011-05-17 05:15 AM
Hello clive1,
Thank you for replying. :) Will give it a try later.