Skip to content

Commit c47c0fa

Browse files
committed
chore(wb0): manage HSI
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 828a53a commit c47c0fa

File tree

1 file changed

+7
-0
lines changed
  • libraries/SrcWrapper/src/stm32

1 file changed

+7
-0
lines changed

libraries/SrcWrapper/src/stm32/clock.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,21 @@ void enableClock(sourceClock_t source)
121121
#endif
122122
break;
123123
case HSI_CLOCK:
124+
#if defined(__HAL_RCC_HSI_ENABLE)
124125
__HAL_RCC_HSI_ENABLE();
126+
#endif
127+
#if defined(__HAL_RCC_HSI_CONFIG)
128+
__HAL_RCC_HSI_CONFIG(RCC_HSI_ON);
129+
#endif
125130
if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET) {
126131
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
127132
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
133+
#if !defined(STM32WB0x)
128134
#if defined(STM32MP1xx)
129135
RCC_OscInitStruct.HSICalibrationValue = 0x00;
130136
#else
131137
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
138+
#endif
132139
#endif
133140
}
134141
break;

0 commit comments

Comments
 (0)