| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
- Read RF wakeup clock source to automatically choose LSE, LSI, or HSE - Bypasses infinite LSE loop hang on boards without LSE crystal
| Back | FazBrowse Home | New Git URL |
Problem
In custom or cost-optimized STM32WB designs, the external 32.768 kHz LSE crystal is often omitted to save board space and BOM cost (using internal LSI or HSE/1024 instead). However, the library currently unconditionally hangs inside waiting for the LSE oscillator to be ready:
Solution
This PR updates to dynamically read the configured RF Wakeup clock source from the registers (LL_RCC_GetRFWKPClockSource()) and only initialize what is actually selected by the system:
This makes the library universally compatible with any custom LSE-less hardware layout out-of-the-box without requiring any user configuration flags or macros.