RTC: Setting time - protection?

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

RTC: Setting time - protection?

Jump to solution
1,364 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
Reply
1 Solution
784 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
Reply
1 Reply
785 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
Reply