• This topic has 4 replies, 2 voices, and was last updated 5 years ago by Mike.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #38681

    Mike
    Participant

    I’m running a BBB rev C with OSBo v1.1 and can’t seem to read or write to the RTC reliably. I’ve tried with the latest Debian image, the latest Ubuntu image and the OSBo Ubuntu image. They all do the same thing. I am able to load the rtc-ds1307 module in each of them successfully but when I try to read or write to the RTC, I get usually get an error. If I keep trying the read (or write) over and over again sometimes it will work.

    The error is usually one of these:
    hwclock: ioctl(RTC_RD_TIME) to /dev/rtc1 to read the time failed: Invalid argument
    hwclock: ioctl(RTC_RD_TIME) to /dev/rtc1 to read the time failed: Input/output error

    When I dmesg | grep -i rtc I can see errors logged. Those are one of:
    rtc-ds1307 1-0068: read error -110
    rtc-ds1307 1-0068: read error -121
    rtc-ds1307 1-0068: read error -5

    I’ve attached the output of a number of commands showing much more detail for the two distros that I still have bootable (Debian on the eMMC and OSBo Ubuntu on uSD)

    I need help figuring the problem out. At this point I can’t even determine if it is a hardware or software problem.

    #38719

    Ray
    Keymaster

    That’s a bit odd. All OSBo boards are fully tested including RTC test — we test 1) if RTC exists on the I2C bus, 2) a time can be set on the RTC, and 3) if the RTC remembers the time. Of course this is using a tester and not a BeagleBone board so the issue you are seeing might be software related (i.e. RTC software module or setup). I will try to follow your steps and see if I can reproduce the errors.

    #38728

    Mike
    Participant

    Thanks Ray. I agree it is odd. Any suggestions you have to help narrow the cause down would be appreciated.

    #38752

    Mike
    Participant

    I spent a brief bit of time this evening documenting how to reproduce the problem. It is simple for me to reproduce. I re-loaded a fresh copy of the OSBo Ubuntu image onto a uSD card. Here’s the entire transcript of all I did after booting it.

    login as: ubuntu
    [email protected]’s password:
    Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.8.13-bone56 armv7l)

    * Documentation: https://help.ubuntu.com/
    Last login: Sat Jun 27 00:15:32 2015 from 192.168.1.103
    [email protected]:~$ sudo su
    [sudo] password for ubuntu:
    [email protected]:/home/ubuntu# echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
    [email protected]:/home/ubuntu# dmesg | grep -i rtc
    [ 0.000000] Kernel command line: console=tty0 console=ttyO0,115200n8 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait fixrtc
    [ 2.040391] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
    [ 2.047851] 44e3e000.rtc: already running
    [ 2.584010] [drm] Cannot find any crtc or sizes – going 1024×768
    [ 2.720847] omap_rtc 44e3e000.rtc: setting system clock to 2015-06-27 00:16:27 UTC (1435364187)
    [ 152.593546] rtc-ds1307 1-0068: rtc core: registered ds1307 as rtc1
    [ 152.593616] rtc-ds1307 1-0068: 56 bytes nvram
    [email protected]:/home/ubuntu# hwclock -f /dev/rtc1 -r
    Sat 27 Jun 2015 12:19:36 AM UTC -0.271957 seconds
    [email protected]:/home/ubuntu# hwclock -f /dev/rtc1 -r
    hwclock: ioctl(RTC_RD_TIME) to /dev/rtc1 to read the time failed: Input/output error
    [email protected]:/home/ubuntu# hwclock -f /dev/rtc1 -r
    hwclock: ioctl(RTC_RD_TIME) to /dev/rtc1 to read the time failed: Input/output error
    [email protected]:/home/ubuntu#

    #39209

    Mike
    Participant

    This problem is resolved. It turns out I had a hardware problem with my OSBo. I sent it in to Ray and he replaced a defective switching regulator. He found that the RTC worked just fine if the BBB was powered by 5VDC. However, when powered by 24VAC, it showed the symptoms I described. It turns out the switching regulator was outputting too much ripple voltage that affected the RTC. He replaced the switching regulator and the RTC is now functioning well under 24VAC.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.