From 56a65431dc830d6234a8a3286fea35664a65aeb1 Mon Sep 17 00:00:00 2001 From: HubretXie Date: Sun, 9 Jun 2019 13:56:44 +0800 Subject: [PATCH] Update drv_rtc.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rtc选用lsi时不工作 --- bsp/stm32/libraries/HAL_Drivers/drv_rtc.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_rtc.c b/bsp/stm32/libraries/HAL_Drivers/drv_rtc.c index 3881fcc4e4..e5a2ba9af5 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_rtc.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_rtc.c @@ -44,16 +44,10 @@ static time_t get_rtc_timestamp(void) static rt_err_t set_rtc_time_stamp(time_t time_stamp) { - RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; RTC_TimeTypeDef RTC_TimeStruct = {0}; RTC_DateTypeDef RTC_DateStruct = {0}; struct tm *p_tm; - HAL_PWR_EnableBkUpAccess(); - PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC; - PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSE; - HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct); - p_tm = localtime(&time_stamp); if (p_tm->tm_year < 100) {