File tree 1 file changed +3
-10
lines changed
1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 35
35
*
36
36
******************************************************************************
37
37
*/
38
+ #include "backup.h"
38
39
#include "clock.h"
39
40
#include "stm32yyxx_ll_cortex.h"
40
41
@@ -98,6 +99,8 @@ void enableClock(sourceClock_t source)
98
99
RCC_OscInitTypeDef RCC_OscInitStruct = {0 };
99
100
RCC_OscInitStruct .PLL .PLLState = RCC_PLL_NONE ;
100
101
102
+ enableBackupRegister ();
103
+
101
104
switch (source ) {
102
105
case LSI_CLOCK :
103
106
#ifdef STM32WBxx
@@ -118,16 +121,6 @@ void enableClock(sourceClock_t source)
118
121
}
119
122
break ;
120
123
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
131
124
if (__HAL_RCC_GET_FLAG (RCC_FLAG_LSERDY ) == RESET ) {
132
125
#ifdef __HAL_RCC_LSEDRIVE_CONFIG
133
126
__HAL_RCC_LSEDRIVE_CONFIG (RCC_LSEDRIVE_LOW );
You can’t perform that action at this time.
0 commit comments