mirror of https://github.com/ARMmbed/mbed-os.git
STM32H7: define RCC_LSE_BYPASS to allow using PC_15 as gpio
parent
73b7e450e7
commit
45ac79aa3b
|
@ -170,7 +170,11 @@ void lp_ticker_init(void)
|
|||
|
||||
/* Enable LSE clock */
|
||||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE;
|
||||
#if MBED_CONF_TARGET_LSE_BYPASS
|
||||
RCC_OscInitStruct.LSEState = RCC_LSE_BYPASS;
|
||||
#else
|
||||
RCC_OscInitStruct.LSEState = RCC_LSE_ON;
|
||||
#endif
|
||||
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
|
||||
|
||||
/* Select the LSE clock as LPTIM peripheral clock */
|
||||
|
|
|
@ -65,7 +65,11 @@ void rtc_init(void)
|
|||
#if MBED_CONF_TARGET_LSE_AVAILABLE
|
||||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE;
|
||||
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
|
||||
#if MBED_CONF_TARGET_LSE_BYPASS
|
||||
RCC_OscInitStruct.LSEState = RCC_LSE_BYPASS;
|
||||
#else
|
||||
RCC_OscInitStruct.LSEState = RCC_LSE_ON;
|
||||
#endif
|
||||
|
||||
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
|
||||
error("Cannot initialize RTC with LSE\n");
|
||||
|
|
Loading…
Reference in New Issue