Booting C2 Wireless Stack sets RCC->CR HSERDY bit
SBSFU 2.4.0 initializes CPU2 in all cases (for a good reason, locking the AES Key used for decryting the firmware image(s) )
When trying to set a HSE tune value (neccessary for proper Bluetooth connectivity) in the application (and also in my loader), the procedure hangs on stopping HSE and waiting for the HSERDY bit to become reset.
I tracked it down to the very moment the PWR->CR4, PWR_CR4_C2BOOT is set.
The HSEON bit is not set at any time I could observe it. From RM0434: "This bit cannot be reset if the HSE oscillator is used directly or indirectly as the system
clock."
So while HSERDY is set after C2BOOT i can still set HSEON to 1 and 0 as I wish (without influence on HSERDY). Only after I select HSE as a system clock source, I can't reset HSEON anymore. This lets me believe that the HSERDY bit staying on is indeed a bug, and not caused by it accidentially being selected as a clock source.
Does CPU2 / BLE Wireless Stack initialize HSE? Why does it make HSERDY stick to be SET?
Is it safe to ignore that HSERDY is set (and setting a HSE tune value)?