RTC: Setting time - protection?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

RTC: Setting time - protection?

ソリューションへジャンプ
888件の閲覧回数
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 解決策
308件の閲覧回数
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 返信
309件の閲覧回数
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 件の賞賛