RTC: Setting time - protection?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

RTC: Setting time - protection?

跳至解决方案
1,362 次查看
vespaman
Contributor III

Is there any preferred way of setting the RTC registers, so that the operation is 'atomic'?

The 52259 rm is not really helpful on this, but I fear that there may be a second change while I am writing the new time. 

标签 (1)
0 项奖励
回复
1 解答
782 次查看
vier_kuifjes
Senior Contributor I
It might help to write the seconds register first. If you make sure not to write '59' as value, the seconds will not overflow during the write of the other registers.

在原帖中查看解决方案

0 项奖励
回复
1 回复
783 次查看
vier_kuifjes
Senior Contributor I
It might help to write the seconds register first. If you make sure not to write '59' as value, the seconds will not overflow during the write of the other registers.
0 项奖励
回复