2017-08-07 06:08 AM
Hit
I am Using STM32L0 Discovery board, i want to switching the clock configuration from HSI to MSI and Vice vesa in my application .
For LowPower run Mode ,i need MSI clock .During Startup ,Sleep Mode ,and after LowPower run Mode i need to switch From MSI to HSI clock .
Please Help me how to do this .
#clock-configuration2017-08-07 09:38 AM
Using what library?
Review SystemClock_Config() code. Use of HAL_RCC_OscConfig() and HAL_RCC_ClockConfig()
Libraries typically have multiple examples, and use-case demonstrations. Review those.
2017-08-08 12:19 AM
Thanks for your reply . pLEASE find my sysclock_config() below
RCC_OscInitTypeDef RCC_OscInitStruct;
RCC_ClkInitTypeDef RCC_ClkInitStruct;__HAL_RCC_PWR_CLK_ENABLE();
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON; RCC_OscInitStruct.HSICalibrationValue = 16;RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;