Use HSE/HSI/CSI state defined in board config file.

This commit is contained in:
iabdalkader 2020-02-19 19:16:01 +02:00
parent c7bb9fb6ad
commit 35b4e34253

View File

@ -214,13 +214,13 @@ void SystemClock_Config(void)
/* Enable HSE Oscillator and activate PLL with HSE as source */ /* Enable HSE Oscillator and activate PLL with HSE as source */
#if defined(OMV_OSC_HSE_STATE) #if defined(OMV_OSC_HSE_STATE)
RCC_OscInitStruct.HSEState = RCC_HSE_ON; RCC_OscInitStruct.HSEState = OMV_OSC_HSE_STATE;
#endif #endif
#if defined(OMV_OSC_HSI_STATE) #if defined(OMV_OSC_HSI_STATE)
RCC_OscInitStruct.HSIState = RCC_HSI_OFF; RCC_OscInitStruct.HSIState = OMV_OSC_HSI_STATE;
#endif #endif
#if defined(OMV_OSC_CSI_STATE) #if defined(OMV_OSC_CSI_STATE)
RCC_OscInitStruct.CSIState = RCC_CSI_OFF; RCC_OscInitStruct.CSIState = OMV_OSC_CSI_STATE;
#endif #endif
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;