2011-03-08 06:08 AM
stm32f101 changing cpu clock on the fly
2011-05-17 05:27 AM
What about the USART/SPI? Do I need to reconfigure them after changing clock speed? (As I do for systick prescaler) How can I do it quickly?
Since they are tied to the PCLK's of course you are going to have to change them if their source changes. Just update the baud rate registers. Which will obviously be easier if you just touch the registers rather than using the library. You could either use precomputed constants if you only have two speeds, or calculate them on the fly if you want a more variable clock speed.