Closed wyojustin closed 6 years ago
Good news: I rejiggered the code to only request time from the ds3231 every 10 minutes (rather than several times per second) . so the problem is reduced by a factor of 1000 for the long term fix, this looks like it is in the right area:
Clock is now working fine. Issue closed.
HW: ClockIOT First 5 complete protos (and no LED protos) SW: ClockIOT (9/26/2018)
Problem: When DS3231 is set, and subsequently read, the values can be very different.
OUTPUT: CASE 1, the absolute difference between ntp and ds3231 is greater than 5 seconds, so update ds3231. After update the incorrect value is read. A second later, the ds3231 is off my a large value, so reset it again with same result
abs diff: 111011100111111110110110000 master: 1011011101010110001110000000001 backup: 1010100001101110001111001010001 backout wrong: 1010100001101110001111001010001 SET THE BACKUP to master: 1011011101010110001110000000001 got: 1010100001101110001111001010001
abs diff: 111011100111111110110110001 master: 1011011101010110001110000000010 backup: 1010100001101110001111001010001 backout wrong: 1010100001101110001111001010001 SET THE BACKUP to master: 1011011101010110001110000000010 got: 1010100001101110001111001010001