2022-11-09 02:07 PM
2022-11-09 08:39 PM
Sheesh. OK, I'll spell it out in more detail. Presuming the STM32WB data sheet specs the LSE startup time the same as the F429, they give only a "typical" startup time at some nominal voltage and temperature. Because "actual" startup time depends on factors that ST has no control over - crystal, caps, PCB routing, voltage, temperature, ambient moisture(!), etc. The 5 second delay in the HAL code is probably a SWAG (simple? wild *** guess) as to what might be "more then enough" time for the oscillator to start under MOST circumstances. It may be possible to design a board and select components where 5 seconds is not sufficient.
2022-11-09 02:24 PM
Don't know about the WB series chips, but the F429 data sheet specs LSE startup time at 2 seconds typical (search your data sheet for "LSE oscillator characteristics"), with no "max" given, since that depends on external caps and xtal. The LSE is a very low power oscillator and can take a (relative to the HSI clock) long time to start. 5 seconds does not seem unreasonable as an estimated max time if the WB chips have the same "2 seconds typical" startup spec.
2022-11-09 04:07 PM
You didn't answer the question -- why? What's going on that takes two and a half times longer on a stm32wb55?
2022-11-09 04:33 PM
My wild guess - might be thermal calibration/stabilization?
2022-11-09 08:29 PM
Any value in DS may be misleading, as impact of the mcu on oscillator startup is almost negligible, and as Bob said above,depends mostly on crystal itself, its circuitry and, very importantly, physical layout.
It's like a child swing, the very small power feedback circuitry adds an extremely small push each cycle to the crystal, which literally mechanically oscillates, so it takes time until oscillations with adequate amplitude build up. Several seconds are entirely normal.
JW
2022-11-09 08:39 PM
Sheesh. OK, I'll spell it out in more detail. Presuming the STM32WB data sheet specs the LSE startup time the same as the F429, they give only a "typical" startup time at some nominal voltage and temperature. Because "actual" startup time depends on factors that ST has no control over - crystal, caps, PCB routing, voltage, temperature, ambient moisture(!), etc. The 5 second delay in the HAL code is probably a SWAG (simple? wild *** guess) as to what might be "more then enough" time for the oscillator to start under MOST circumstances. It may be possible to design a board and select components where 5 seconds is not sufficient.
2022-11-10 03:26 AM
there we go. thank you
2022-11-10 03:32 AM
The reason i get like this is that there is so much inane comment noise in the ST source, and then things like this get swept under the rug. A simple comment there about what's going in would be far more helpful.