Support needed for RV3028 RTC with Raspberry Pi Integration

Hi Everyone,

Have a Good Day!

We recently purchased an RV3028 RTC module for our product integration, but we are facing some issues with the module. I followed the steps provided on your GitHub page and ran the following commands to remove the hardware clock:

sudo apt-get -y remove fake-hwclock

sudo update-rc.d -f fake-hwclock remove

sudo systemctl disable fake-hwclock

The sample Python file (set-time.py) worked properly when I initially ran it. However, after disconnecting the Raspberry Pi from the network and turning it off for some time, I noticed that the time was not synced when I turned it back on. I tried running the set-time.py file again, but I encountered an error, as shown below:

After executing the sudo rmmod rtc-rv3028 command, the set-time.py file is working properly.

While executing the sudo hwclock -r command, the following error message was displayed:

Link: https://shop.pimoroni.com/products/rv3028-real-time-clock-rtc-breakout?variant=27926940549203

Could you please guide me on how to correctly use the RV3028 RTC module? I am encountering issues while integrating it with my Raspberry Pi

If you have any questions, please let me know.

I have used these on several of my Pi setups. It’s been my experience that once you do the dtoverlay entry in config.txt, set time and get time stop working. They error when run. I don’t think its the same error your getting though? When I get a chance I’ll have a look see on my Pi 400. Also, if your running Bookworm it’s
/boot/firmware/config.txt
instead of
/boot/config.txt

You cannot control the same device from two programs. Once you load the overlay, it takes control of the device and your Python program will fail (in your screenshot you can see this at the very end: “device or resource busy”.

The important thing is: PiOS is an operating system and you must use operating system commands to control date/time once you give an OS-level program (the overlay) control. You usually set the system date with the sudo date comand and then you would use sudo hwclock -systohc to replicate the system date to the hardware RTC.

If you want control from a Python program, you should disable the overlay. But you wont get the correct (system) time automatically during boot.

1 Like