How long after increasing the clock rate do I need to wait?
Further to my previous question on the STM32L432KC at https://community.st.com/s/question/0D50X0000BAFA5fSQH/what-is-the-difference-between-these-two-clock-configurations
I am successfully increasing the clock rate from the reset rate of 4MHz to my desired rate of 80MHz (the maximum) using MSIClk synced to the LSE via the PLL. Part of that is waiting for the PLL to get lock - all of the status bits show everything is good to go.
Soon after, I configure USART1 to 115,200 bps (using PClk) and transmit a welcome banner. Unfortunately, the first few characters, from 0 to 5 of them, are corrupt. Once everything settles the data is perfect, but not the first few characters.
I added a simple `for (int i=0;i<10000;++i) asm(" NOP; ");` between setting the clock and sending the banner, and it's always perfect. If I reduce `10000` to `2000` it's often all right, but occasionally the first character is corrupt.
Is there a guaranteed way to know that the clock has stabilised before trying to use it?
