0

PCF8523 clock issue with a Raspberry 3B
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

PCF8523 clock issue with a Raspberry 3B

by LingVu on Thu Nov 01, 2018 3:46 am

Hi,

I am currently using the PCF8523 for the Raspberry Pi in my Raspberry Pi 3B+ with the lastest Raspbian Stretch Lite (October 2018). I used this guide to set up: https://learn.adafruit.com/adding-a-rea ... d-test-i2c. Everything worked perfectly fine. After a random amount of time i cannot read the time from the RTC anymore. This error appeared when i type in
Code: Select all | TOGGLE FULL SIZE
hwlock -r
ioctl(RTC_RD_TIME) to /dev/rtc to read the time failed


This issue is repeatable. I have 4 PCF8523 and they have all the same behavior (all on different RPi 3B+ tested). This issue appears to be just with the Raspberry Pi 3B+! I tried it with a Raspberry Pi 3B and the RTC worked fine with it.

Greetings,
Ling

LingVu
 
Posts: 4
Joined: Thu Nov 01, 2018 3:33 am

Re: PCF8523 clock issue with a Raspberry 3B

by adafruit2 on Mon Nov 05, 2018 11:37 pm

thats weird - but we have no idea what it oculd be :/ does it work on reboot?

adafruit2
Site Admin
 
Posts: 17489
Joined: Fri Mar 11, 2005 7:36 pm

Re: PCF8523 clock issue with a Raspberry 3B

by LingVu on Tue Nov 06, 2018 3:02 am

A reboot doesn't help. It looks like that the Raspberry 3B+ corrupts the RTC after a while. I have also tested a DS3231 on the 3B+ and this seemed to work fine.

So what i did:

1. I loaded the latest version of Raspbian Stretch Lite October 2018 into a SD card
2. Set in the RTC without battery into the Pi 3B+ (first 6 Pins, I2c and power)
3. Enable I2c, loading the driver into /boot/config.txt work fine and after a reboot, i2cdetect -y 1 shows me the UU
4. Then i set the time with hwclock -w, set in the battery and disconnect from the internet and reboot
5. After a reboot it seems to work for about 1-2 minutes. Then it corrupts and doesn't have the time anymore.
I can do a hwclock -w again and then it seems to work for the next 2minutes before it stops again. I found this behaviour in 4 PCF 8523 that i have.

LingVu
 
Posts: 4
Joined: Thu Nov 01, 2018 3:33 am

Re: PCF8523 clock issue with a Raspberry 3B

by adafruit2 on Tue Nov 06, 2018 11:10 am

whats in your /boot/config.txt?

adafruit2
Site Admin
 
Posts: 17489
Joined: Fri Mar 11, 2005 7:36 pm

Re: PCF8523 clock issue with a Raspberry 3B

by LingVu on Tue Nov 06, 2018 11:17 am

I added this line:

Code: Select all | TOGGLE FULL SIZE
dtoverlay=i2c-rtc,pcf8523


Everything else is set by default.
after a reboot, "i2cdetect -y 1" shows "UU".

LingVu
 
Posts: 4
Joined: Thu Nov 01, 2018 3:33 am

Re: PCF8523 clock issue with a Raspberry 3B

by adafruit2 on Tue Nov 06, 2018 11:21 am

yeah no idea, especially if it worked before with a pi 3b. nothing changed with the RTC :/ maybe raspberry pi forums has some idea?

adafruit2
Site Admin
 
Posts: 17489
Joined: Fri Mar 11, 2005 7:36 pm

Re: PCF8523 clock issue with a Raspberry 3B

by LingVu on Tue Nov 06, 2018 11:24 am

I wrote 3B+(Plus, the newer version of the Pi). I already tested it with a 3B and this clock works fine with it. For some reason the Plus sign disappeared in the headline.

LingVu
 
Posts: 4
Joined: Thu Nov 01, 2018 3:33 am

Re: PCF8523 clock issue with a Raspberry 3B

by jarchie on Tue Nov 06, 2018 3:55 pm

This is a long shot, but what kind of power supply are you using? I've read that the Raspberry Pi 3 B+, unlike the other models, can sometimes have issues when under-powered. I can't help but wonder if this is related.

Raspberry Pi 3 B+ Review and Performance Comparison
In my first set of performance tests, I was using my standard 5 port USB power supply, which puts out a nominal 2.4A at 5V... but in reality usually serves up 1.8A or so. With the Pi model 2 B and Pi model 3 B, this power supply never really caused an issue, and I never experienced CPU throttling even under load. However, the Pi model 3 B+ had 2x better performance when using a dedicated 2.4A power supply.

jarchie
 
Posts: 547
Joined: Sun Jun 24, 2012 2:16 pm
Location: Santa Cruz, California, United States

Please be positive and constructive with your questions and comments.