> RTC->TR |= _Time_Value;
TR 和 RD 寄存器的行为并不像您预期的那样,它们不是“类内存”寄存器,到目前为止不是。
特别是,在初始化期间,当 RTC_ISR.INIT 设置为 1 时,它们会读取时间/日期的冻结值。
这就是为什么你不能 |= 进入它们的原因。
将要写入的值组装到一个辅助变量中,并执行一次写入。
> RTC->TR |= _Time_Value;
TR 和 RD 寄存器的行为并不像您预期的那样,它们不是“类内存”寄存器,到目前为止不是。
特别是,在初始化期间,当 RTC_ISR.INIT 设置为 1 时,它们会读取时间/日期的冻结值。
这就是为什么你不能 |= 进入它们的原因。
将要写入的值组装到一个辅助变量中,并执行一次写入。
举报