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
if (__HAL_RCC_GET_FLAG (RCC_FLAG_LSIRDY ) == RESET ) {
@@ -113,16 +116,6 @@ void enableClock(sourceClock_t source)
113
116
}
114
117
break ;
115
118
case LSE_CLOCK :
116
- /* Enable Power Clock */
117
- #ifndef STM32H7xx
118
- if (__HAL_RCC_PWR_IS_CLK_DISABLED ()) {
119
- __HAL_RCC_PWR_CLK_ENABLE ();
120
- }
121
- #endif
122
- #ifdef HAL_PWR_MODULE_ENABLED
123
- /* Allow access to Backup domain */
124
- HAL_PWR_EnableBkUpAccess ();
125
- #endif
126
119
if (__HAL_RCC_GET_FLAG (RCC_FLAG_LSERDY ) == RESET ) {
127
120
#ifdef __HAL_RCC_LSEDRIVE_CONFIG
128
121
__HAL_RCC_LSEDRIVE_CONFIG (RCC_LSEDRIVE_LOW );
You can’t perform that action at this time.
0 commit comments