Skip to content

Commit 45cbdc8

Browse files
committed
STM32 RTC : update free function
- LSI specific implementation is removed - Remove RTC clock disable
1 parent 1079767 commit 45cbdc8

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

targets/TARGET_STM/rtc_api.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -144,28 +144,8 @@ void rtc_init(void)
144144

145145
void rtc_free(void)
146146
{
147-
#if !MBED_CONF_TARGET_LSE_AVAILABLE
148-
// Enable Power clock
149-
__HAL_RCC_PWR_CLK_ENABLE();
150-
151-
// Enable access to Backup domain
152-
HAL_PWR_EnableBkUpAccess();
153-
154-
// Reset Backup domain
155-
__HAL_RCC_BACKUPRESET_FORCE();
156-
__HAL_RCC_BACKUPRESET_RELEASE();
157-
158147
// Disable access to Backup domain
159148
HAL_PWR_DisableBkUpAccess();
160-
#endif
161-
162-
// Disable LSI and LSE clocks
163-
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
164-
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSI | RCC_OSCILLATORTYPE_LSE;
165-
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
166-
RCC_OscInitStruct.LSIState = RCC_LSI_OFF;
167-
RCC_OscInitStruct.LSEState = RCC_LSE_OFF;
168-
HAL_RCC_OscConfig(&RCC_OscInitStruct);
169149
}
170150

171151
/*

0 commit comments

Comments
 (0)