Skip to content

Commit 7fcec27

Browse files
committed
Added HSE range validation for STM32g431xB
1 parent 7c87d7c commit 7fcec27

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G431xB/system_clock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ MBED_WEAK uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
8888
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
8989
RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInitStruct = { 0 };
9090

91-
//#if HSE_VALUE != 24000000
92-
//#error Unsupported externall clock value, check HSE_VALUE define
93-
//#endif
91+
#if HSE_VALUE > 48000000 || HSE_VALUE < 4000000
92+
#error Unsupported externall clock value, check HSE_VALUE define
93+
#endif
9494

9595
/* Configure the main internal regulator output voltage */
9696
__HAL_RCC_PWR_CLK_ENABLE();

0 commit comments

Comments
 (0)