File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 3535 *
3636 ******************************************************************************
3737 */
38+ #include "backup.h"
3839#include "clock.h"
3940#include "stm32yyxx_ll_cortex.h"
4041
@@ -98,6 +99,8 @@ void enableClock(sourceClock_t source)
9899 RCC_OscInitTypeDef RCC_OscInitStruct = {0 };
99100 RCC_OscInitStruct .PLL .PLLState = RCC_PLL_NONE ;
100101
102+ enableBackupRegister ();
103+
101104 switch (source ) {
102105 case LSI_CLOCK :
103106#ifdef STM32WBxx
@@ -118,16 +121,6 @@ void enableClock(sourceClock_t source)
118121 }
119122 break ;
120123 case LSE_CLOCK :
121- /* Enable Power Clock */
122- #if !defined(STM32H7xx ) && !defined(STM32WBxx )
123- if (__HAL_RCC_PWR_IS_CLK_DISABLED ()) {
124- __HAL_RCC_PWR_CLK_ENABLE ();
125- }
126- #endif
127- #ifdef HAL_PWR_MODULE_ENABLED
128- /* Allow access to Backup domain */
129- HAL_PWR_EnableBkUpAccess ();
130- #endif
131124 if (__HAL_RCC_GET_FLAG (RCC_FLAG_LSERDY ) == RESET ) {
132125#ifdef __HAL_RCC_LSEDRIVE_CONFIG
133126 __HAL_RCC_LSEDRIVE_CONFIG (RCC_LSEDRIVE_LOW );
You can’t perform that action at this time.
0 commit comments