Does not detect RTC (ds1307)

When I connect the rtc it does not detect the 68 address (I2C Tool).

I have test with 2 RTC diferent,and with the BBB I have no problem.

Anybody knows what could be the problem? Thanks

Do you have pull-up resistors?

— Graham

I’m working with the RTC (MCP794110) at the moment, but on a “BB-X15 - like” custom board platform.

I’m not sure I follow. your post… What’s the I2C tool? Are you talking about attaching the RTC to the BBB via the I2C tool or a problem with reading the RTC on the BBB? Pardon my ignorance but does the BBB come with an RTC (e.g. MCP794110) installed? The BB-X15 does…

Did you enable the I2C bus the RTC is attached to in the dev. tree? On my platform, I had to enable the I2C bus (I2C3) in the dev. tree before the drivers for the RTC would load.

Then with some “new” RTC’s on some of my boards, but not all, I got "unable to read the hardware clock, I think, when the kernel is attempting to set the system clock from the hardware clock (see the following):

ebian@BeagleBoard-X15:~$ dmesg|grep rtc
[ 1.551522] rtc-ds1307 2-006f: rtc core: registered mcp7941x as rtc0
[ 1.551652] rtc-ds1307 2-006f: 64 bytes nvram
[ 1.554511] omap_rtc 48838000.rtc: rtc core: registered 48838000.rtc as rtc2
[ 1.558261] palmas-rtc 48070000.i2c:tps659038@58:tps659038_rtc: rtc core: registered 48070000.i2c:tps659 as rtc1
[ 1.997160] rtc-ds1307 2-006f: hctosys: unable to read the hardware clock.

From what I’ve read on posts involving the RTC the following messages:

  1. “unable to read the hardware clock” message and the
  2. hwclock: ioctl(RTC_RD_TIME) to /dev/rtc to read the time failed: Invalid argument.

are due to the RTC’s time being not initialized or (?invalid?). I’ve been able to work-around this by setting the clock, but initially I get warning #2 when I initialize the clock with a valid date/time. I’m wondering if anyone can confirm if this is the correct fix for this scenario…

Also, when PTC builds the BB-X15, and the BBB manufacture builds the BBB’s (assuming BBB’s have a RTC installed), do they ensure that the RTC is correctly initialized prior to shipping to the distributors ?

Also, I saw something really weird on my board with an uninitialized RTC:

On one of my boards with an uninitialized RTC, the RTC kernel message (“hctosys: unable to read the hardware clock”) went away when I “hot plugged” a USB<->serial converter into one of our USB ports on our board. The USB HUB isn’t connected to the I2C3 bus…

Does the USB hub device driver or the USB bus driver initialize the RTC if it’s uninitialized??? What could this be due to?

I’m running kernel 4.4.110-ti-r142 and debian 8.10 for the BB-X15…


This is the screen when I connect a new beaglebone green with an rtc.

If I burn the latest image, the beaglebone does not detect the rtc.

try as root...

sudo hwclock.....


The kernel driver isn’t seeing the RTC. If it did, it would have claimed the I2C address and there would be “UU” in it’s place instead of the address. You’re either missing the correct kernel driver for your RTC or the device tree isn’t set up for this scenario. I don’t use any RTC parts so I can’t help further.

Also, hwclock needs an RTC device like “/dev/rtc0”. You’re pointing it to the I2C bus device. That’s why the “invalid IOCTL” message.