未验证 提交 42248d81 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #3036 from Linjieqiang/fix_stm32hal_rtc_error

bsp: fix stm32 rtc hal library error.
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册