2

For a project I am using the ST M41T81 RTC but because of the parts shortage, I updated the firmware to support both the M41T81 and LS1208 RTC chips. The reason I am using the LS1208 is because the pins on the IC line up and do the tasks I need it to.

Both chips use a 32.768 kHz external crystal and both rely on a 5.5 V, 0.33 F super capacitor to hold the charge when the device is not plugged in.

If I unplug the device with the M41T81 RTC and then plug it in after 5 minutes, the time is correct. If I do the same with the ISL1208 RTC, the time lags behind. This does not happen to the ISL1208 RTC if power is being supplied to the Vdd pin. Any tips on where I should be looking would help.

Edit 9/13/22:

For example the time programmed is 03:00:00 (HH:MM:SS) on the device. If I wait 5 minutes, the time will be 03:05:00. Now if I program 03:00:00 on the device and turn off the Vdd power supply for 5 minutes. When I check the time after power is back, the time will read 03:04:20.

I am not using any trimming values during the initial config. In the data sheet, the 32 kHz external crystal has a load capacitance of 12.5pF. The device has that set to default for the analog trimming.

enter image description here

ChassakAPT
  • 21
  • 4
  • 1
    Are you using Analog Trimming Register, Digital Trimming Register, or Temperature Compensation features? If so, are those calibrated for Vdd or Vbat operation? – Ben Voigt Sep 12 '22 at 20:34

1 Answers1

0

UPDATE:

I finally found the problem! During my Initial config function, I was setting the WRTC to high before touching the Control and Status registers. Even though when I set the time in another function, I would set this bit to high and drop it to low after I finished writing to the RTC registers, that didn't fix the problem. I guess you can't have this bit to high on startup or the time will get inaccurate in battery mode. Hopefully no one else will have this same problem as me and they update the datasheet.

enter image description here

ChassakAPT
  • 21
  • 4