STM32 RTC : update free function

- LSI specific implementation is removed

- Remove RTC clock disable
pull/6217/head
jeromecoutant 2018-02-26 17:41:01 +01:00
parent 107976773c
commit 45cbdc889f
1 changed files with 0 additions and 20 deletions

View File

@ -144,28 +144,8 @@ void rtc_init(void)
void rtc_free(void)
{
#if !MBED_CONF_TARGET_LSE_AVAILABLE
// Enable Power clock
__HAL_RCC_PWR_CLK_ENABLE();
// Enable access to Backup domain
HAL_PWR_EnableBkUpAccess();
// Reset Backup domain
__HAL_RCC_BACKUPRESET_FORCE();
__HAL_RCC_BACKUPRESET_RELEASE();
// Disable access to Backup domain
HAL_PWR_DisableBkUpAccess();
#endif
// Disable LSI and LSE clocks
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSI | RCC_OSCILLATORTYPE_LSE;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
RCC_OscInitStruct.LSIState = RCC_LSI_OFF;
RCC_OscInitStruct.LSEState = RCC_LSE_OFF;
HAL_RCC_OscConfig(&RCC_OscInitStruct);
}
/*