mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-22 05:14:46 -07:00
Revert "Revert Deep Sleep due to BLE issues and other random freezes"
This reverts commit addf909287.
This commit is contained in:
@@ -63,6 +63,10 @@ void furi_hal_clock_init() {
|
||||
LL_RCC_HSI_Enable();
|
||||
while(!HS_CLOCK_IS_READY())
|
||||
;
|
||||
/* Select HSI as system clock source after Wake Up from Stop mode
|
||||
* Must be set before enabling CSS */
|
||||
LL_RCC_SetClkAfterWakeFromStop(LL_RCC_STOP_WAKEUPCLOCK_HSI);
|
||||
|
||||
LL_RCC_HSE_EnableCSS();
|
||||
|
||||
/* LSE and LSI1 configuration and activation */
|
||||
@@ -215,11 +219,14 @@ void furi_hal_clock_switch_to_hsi() {
|
||||
void furi_hal_clock_switch_to_pll() {
|
||||
LL_RCC_HSE_Enable();
|
||||
LL_RCC_PLL_Enable();
|
||||
LL_RCC_PLLSAI1_Enable();
|
||||
|
||||
while(!LL_RCC_HSE_IsReady())
|
||||
;
|
||||
while(!LL_RCC_PLL_IsReady())
|
||||
;
|
||||
while(!LL_RCC_PLLSAI1_IsReady())
|
||||
;
|
||||
|
||||
LL_FLASH_SetLatency(LL_FLASH_LATENCY_3);
|
||||
|
||||
@@ -296,4 +303,4 @@ void furi_hal_clock_mco_disable() {
|
||||
LL_RCC_MSI_Disable();
|
||||
while(LL_RCC_MSI_IsReady() != 0)
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user