Commit 4dbabbc2 authored by 时昊's avatar 时昊

feat:修改rtc小时计时错误

parent 50e6466c
......@@ -102,7 +102,7 @@ void RTC_SetTime(RTC_TimeTypeDef* RTC_TimeStruct)
RTC->RTCC1 |= RTC_RTCC1_RWAIT_Msk; // stops SEC to YEAR counters. Mode to read or write counter value
RTC->HOUR |= RTC_ByteToBcd2(RTC_TimeStruct->RTC_Hours);
RTC->HOUR = RTC_ByteToBcd2(RTC_TimeStruct->RTC_Hours);
RTC->MIN = RTC_ByteToBcd2(RTC_TimeStruct->RTC_Minutes);
RTC->SEC = RTC_ByteToBcd2(RTC_TimeStruct->RTC_Seconds);
if(RTC_TimeStruct->RTC_Hours >12)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment