File tree Expand file tree Collapse file tree 4 files changed +13
-2
lines changed Expand file tree Collapse file tree 4 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 2929
2929
#define RCC_MCOSOURCE_PLLCLK_NODIV RCC_MCO1SOURCE_PLLCLK
2930
2930
#define RCC_MCOSOURCE_PLLCLK_DIV2 RCC_MCO1SOURCE_PLLCLK_DIV2
2931
2931
2932
- #if defined(STM32L4 )
2932
+ #if defined(STM32L4 ) || defined( STM32WB )
2933
2933
#define RCC_RTCCLKSOURCE_NO_CLK RCC_RTCCLKSOURCE_NONE
2934
- #elif defined(STM32WB ) || defined(STM32G0 )
2935
2934
#else
2936
2935
#define RCC_RTCCLKSOURCE_NONE RCC_RTCCLKSOURCE_NO_CLK
2937
2936
#endif
Original file line number Diff line number Diff line change @@ -113,7 +113,11 @@ void lp_ticker_init(void)
113
113
#else /* MBED_CONF_TARGET_LSE_AVAILABLE */
114
114
115
115
/* Enable LSI clock */
116
+ #if TARGET_STM32WB
117
+ RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_LSI1 ;
118
+ #else
116
119
RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_LSI ;
120
+ #endif
117
121
RCC_OscInitStruct .LSIState = RCC_LSI_ON ;
118
122
RCC_OscInitStruct .PLL .PLLState = RCC_PLL_NONE ;
119
123
Original file line number Diff line number Diff line change @@ -61,7 +61,11 @@ void mbed_sdk_init()
61
61
RCC_OscInitTypeDef RCC_OscInitStruct = {0 };
62
62
63
63
if (__HAL_RCC_GET_RTC_SOURCE () != RCC_RTCCLKSOURCE_NO_CLK ) {
64
+ #if TARGET_STM32WB
65
+ RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_LSI1 ;
66
+ #else
64
67
RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_LSI ;
68
+ #endif
65
69
RCC_OscInitStruct .PLL .PLLState = RCC_PLL_NONE ;
66
70
RCC_OscInitStruct .LSIState = RCC_LSI_ON ;
67
71
if (HAL_RCC_OscConfig (& RCC_OscInitStruct ) != HAL_OK ) {
Original file line number Diff line number Diff line change @@ -74,7 +74,11 @@ void rtc_init(void)
74
74
error ("PeriphClkInitStruct RTC failed with LSE\n" );
75
75
}
76
76
#else /* MBED_CONF_TARGET_LSE_AVAILABLE */
77
+ #if TARGET_STM32WB
78
+ RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_LSI1 ;
79
+ #else
77
80
RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_LSI ;
81
+ #endif
78
82
RCC_OscInitStruct .PLL .PLLState = RCC_PLL_NONE ;
79
83
RCC_OscInitStruct .LSIState = RCC_LSI_ON ;
80
84
if (HAL_RCC_OscConfig (& RCC_OscInitStruct ) != HAL_OK ) {
You can’t perform that action at this time.
0 commit comments