RTC: Setting time - protection?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RTC: Setting time - protection?

Jump to solution
838 Views
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. 

Labels (1)
0 Kudos
1 Solution
258 Views
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.

View solution in original post

0 Kudos
1 Reply
259 Views
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 Kudos