cancel
Showing results for 
Search instead for 
Did you mean: 

Wait for HSI/PLL/Sysclk etc etc ready - Why???

RexG
Associate II

I am new to Arm but old to assembly coding (inc Toshiba 32 bit CISC - now extinct).. Just completed RCC startup code for a STM32F344 chip by looking at the 1124 pages (!) of the RM0364 manual and the CUBE LL start up code (!!!). The CUBE code has waits for: Flash latency/HSI clk/LSI clk/PLL  clk/Sysclk ready (at min). As all the waits involve the CPU in reading flash correctly to perform the wait loop, I wondered why wait?? The CPU might as well be doing something useful while it is waiting - and save some space while doing it. So I cut out all the waits. Works fine- amd code a lot smaller/neater. Yes of course everything has to settle down by the time the UART starts up and reads 250,000 baud sensibly but that is a long way down the track.

So why wait?? .

10 REPLIES 10
RexG
Associate II

I have after countless faultless restarts with no waiting for HSI/Sysclk/PLL clock ready, it seems practically that these waits are redundant. But as they exist in St's LL code I will leave them in just to be sure!,