I am interfacing a Raspberry PI4 with RTC DS1307 IC.
The conditions that I checked are mentioned below:
- First install
i2c-detectlibrary in Pi4 and check whether my RTC interfaces properly or not with cmd:
sudo i2c-detect -y 1
- It shows the address of RTC(68)
- Then I will go to
/etc/modulesand in the last line I added
- After this, I reboot the PI, and then I will check for
sudo i2c-detect -y 1and the address of RTC will changed from '68' to 'UU'
- Then I will check for
sudo timedatectl statuscommand, and it will shows the following output:
Local time: Mon 2022-08-01 13:32:14 IST Universal time: Mon 2022-08-01 08:02:14 UTC RTC time: Mon 2022-08-01 08:02:14 Time zone: Asia/Kolkata (IST, +0530) System clock synchronized: yes NTP service: active RTC in local TZ: no
- Now using
sudo hwclock -w, I wrote the current timing in RTC and using
sudo hwclock -rI checked the RTC Time and it shows proper timing.
- Also in
/boot/config.txt, I also added
dtoverlay=i2c-rtc,ds1307to enable RTC, and in
sudo hwclock -sto enable synchronisation of RTC at booting of RPi.
Now my problem is following
When I shutdown my RPi4, and power off the switch for approximately one day, then after restart the RPi without internet, it will gives the delay of 10 to 12 sec. The RTC was running on 32.768 kHz and its battery source was fine. What is the issue for this delay...???