File tree 4 files changed +6
-23
lines changed
libraries/SrcWrapper/src/stm32
4 files changed +6
-23
lines changed Original file line number Diff line number Diff line change @@ -77,12 +77,6 @@ static inline void resetBackupDomain(void)
77
77
78
78
static inline void enableBackupDomain (void )
79
79
{
80
- /* Enable Power Clock */
81
- #ifdef __HAL_RCC_PWR_IS_CLK_DISABLED
82
- if (__HAL_RCC_PWR_IS_CLK_DISABLED ()) {
83
- __HAL_RCC_PWR_CLK_ENABLE ();
84
- }
85
- #endif
86
80
#ifdef HAL_PWR_MODULE_ENABLED
87
81
/* Allow access to Backup domain */
88
82
HAL_PWR_EnableBkUpAccess ();
@@ -110,12 +104,6 @@ static inline void disableBackupDomain(void)
110
104
#ifdef __HAL_RCC_BKP_CLK_DISABLE
111
105
/* Disable BKP CLK for backup registers */
112
106
__HAL_RCC_BKP_CLK_DISABLE ();
113
- #endif
114
- /* Disable Power Clock */
115
- #ifdef __HAL_RCC_PWR_IS_CLK_DISABLED
116
- if (!__HAL_RCC_PWR_IS_CLK_DISABLED ()) {
117
- __HAL_RCC_PWR_CLK_DISABLE ();
118
- }
119
107
#endif
120
108
}
121
109
Original file line number Diff line number Diff line change @@ -53,16 +53,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd)
53
53
const PinMap * map = NULL ;
54
54
#if defined(PWR_CR2_USV )
55
55
/* Enable VDDUSB on Pwrctrl CR2 register*/
56
- #if !defined(STM32WBxx )
57
- if (__HAL_RCC_PWR_IS_CLK_DISABLED ()) {
58
- __HAL_RCC_PWR_CLK_ENABLE ();
59
- HAL_PWREx_EnableVddUSB ();
60
- __HAL_RCC_PWR_CLK_DISABLE ();
61
- } else
62
- #endif
63
- {
64
- HAL_PWREx_EnableVddUSB ();
65
- }
56
+ HAL_PWREx_EnableVddUSB ();
66
57
#endif
67
58
#ifdef STM32H7xx
68
59
if (!LL_PWR_IsActiveFlag_USB ()) {
Original file line number Diff line number Diff line change @@ -105,7 +105,6 @@ GPIO_TypeDef *set_GPIO_Port_Clock(uint32_t port_idx)
105
105
case PortG :
106
106
#if defined(STM32L4xx ) && defined(PWR_CR2_IOSV )
107
107
// Enable VDDIO2 supply for 14 I/Os (Port G[15:2])
108
- __HAL_RCC_PWR_CLK_ENABLE ();
109
108
HAL_PWREx_EnableVddIO2 ();
110
109
#endif
111
110
gpioPort = (GPIO_TypeDef * )GPIOG_BASE ;
Original file line number Diff line number Diff line change @@ -40,6 +40,11 @@ void hw_config_init(void)
40
40
41
41
configHSECapacitorTuning ();
42
42
43
+ #if defined(__HAL_RCC_PWR_CLK_ENABLE )
44
+ /* Enable PWR clock, needed for example: voltage scaling, low power ... */
45
+ __HAL_RCC_PWR_CLK_ENABLE ();
46
+ #endif
47
+
43
48
/* Configure the system clock */
44
49
SystemClock_Config ();
45
50
You can’t perform that action at this time.
0 commit comments