Xinyuan-LilyGO / TTGO_TWatch_Library

MIT License
855 stars 282 forks source link

RTC not remembering time after synchronization TTGO T-Watch S3 #200

Closed mistrjirka closed 10 months ago

mistrjirka commented 10 months ago

I have the TTGO T-Watch S3 and I have an issue of time being kept while the watch is off. What I did: Uploaded the examples/peripheral/RTC_TimeSynchronization -> this worked I have the correct time Uploaded the examples/peripheral/RTC_TimeLib -> this also worked but now I have the time that was during the synchronization (the RTC didn't keep the correct time during the upload now the watch is a bit behind) After rebooting the watch loads the old time (the time of the synchronization).

My wild theory is that the battery of the RTC is dead/disconnected so it saves time for the synchronization and when the watch is rebooted it loses power it loads the time when it was last synchronized.

What are my options?

lewisxhe commented 10 months ago

Sorry, because the RTC charging voltage is not set, the RTC battery cannot be charged, it has been fixed.

https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library/commits/t-watch-s3 https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library/commit/27e64b8323709502f30d81fc7f45b156e1000730

lewisxhe commented 10 months ago

The first time you need to charge the RTC continuously for about 30 minutes, the backup battery will be charged to a normal level, and it can last for a period of time after power off.

mistrjirka commented 10 months ago

Thank you for quick response and hopefully fix. I will compile the new version and report back.

mistrjirka commented 10 months ago

Hi, I tested it. I downloaded the patch compiled and uploaded the synchronization example to the watch. I let it charge for an hour. Then I tried the timelib example. The time shown after reboot is the time of the last moment when the synchronization example was running (I let it from 7 pm-8 pm charge and whenever I try to get time from the watch it just shows 8 pm).

I did a few other experiments. I looked at the library and found the method isEanbleButtonBatteryCharge (I suppose the Eanble is just misspelt enable) and this returns true during runtime. I found also the getButtonBatteryVoltage which returns 3300, the weird thing is that it returns 3300 even when I turn off the charging of the button battery. Shouldn't it show the real voltage of the battery?

lewisxhe commented 10 months ago
  1. I updated the T-Watch dependency library SensorLib, please update
  2. I updated the example, please pull it again and test it.

Reason: If the backup battery is completely dead, the initialization of the RTC will fail and the time cannot be obtained.

lewisxhe commented 10 months ago

image

If it still doesn't work, if you have a multimeter, please check whether the voltage of these two points is normal.

mistrjirka commented 10 months ago
  1. I updated the T-Watch dependency library SensorLib, please update
  2. I updated the example, please pull it again and test it.

Reason: If the backup battery is completely dead, the initialization of the RTC will fail and the time cannot be obtained.

Thanks I will try that. In the worst case scenario where the battery is completely dead. How hard is it to replace the battery? is is possible with ts100? Or should I rather contact customer support?

mistrjirka commented 10 months ago
  1. I updated the T-Watch dependency library SensorLib, please update

    1. I updated the example, please pull it again and test it.

Reason: If the backup battery is completely dead, the initialization of the RTC will fail and the time cannot be obtained.

I am really happy to report that the new code works! Thank you so much for the amazing support and quick updates.