I have put RTC (Model is SHIM RTC Realtime Clock Accessory Board) at my RPI.

I need to test if it is working or not.

Is there any command which is checking if it is working or not?

I am using RPI 3B+ and Raspbian Buster.

  • 1
    timedatectl should report RTC state – Milliways Sep 30 '19 at 22:10

Googling "SHIM RTC Realtime Clock Accessory Board" we can find a picture and tell that there is a MCP7940N RTC chip onboard, with connects via I2C. So first, related: Using the MCP7940N RTC with the Pi 3B+

To check if it's detected by the Pi, you should be able to use the i2cdetect -y 1 command and see 'UU' for the address 0x6f.

To use it with Rasbian, following these directions you should add

# Enable i2c real-time clock

to /boot/config.txt. You may also need to run sudo sh -c "echo mcp7940x 0x6f > /sys/class/i2c-adapter/i2c-1/new_device" after a reboot. Then run hwclock --systohc to set the clock. On reboot it should automatically use the date and time from the RTC.

To test if it's working correctly start up the Pi without any internet access (unplugging Ethernet and disabling WiFi). The time should be set correctly.

  • 1
    Your procedure is concise, clear, and complete. I have been using the other RTC, DS3231 and I think your instructions is also useful for me. Cheers. – tlfong01 Oct 1 '19 at 6:19
  • This is correct configuration, now it is working. – Jakov Kusić Oct 3 '19 at 10:26

timedatectl will show the current status of the clock and RTC (if fitted)

      Local time: Tue 2019-10-01 12:16:29 AEST
  Universal time: Tue 2019-10-01 02:16:29 UTC
        RTC time: Tue 2019-10-01 02:16:30
       Time zone: Australia/Sydney (AEST, +1000)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no

If the RTC is missing or not correctly installed it will show RTC time: n/a

  • Great way to easily check it. – Jakov Kusić Oct 3 '19 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.