bsp: fix stm32 rtc hal library error.

This commit is contained in:
LinJieqiang 2019-09-04 10:08:34 +08:00
parent 03f8762e28
commit dce37d0b4b

View File

@ -110,6 +110,9 @@ static rt_err_t rt_rtc_config(struct rt_device *dev)
#endif
HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct);
/* Enable RTC Clock */
__HAL_RCC_RTC_ENABLE();
RTC_Handler.Instance = RTC;
if (HAL_RTCEx_BKUPRead(&RTC_Handler, RTC_BKP_DR1) != BKUP_REG_DATA)
{