element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experts, Learning and Guidance
  • Technologies
  • More
Experts, Learning and Guidance
Ask an Expert Forum PiFace Shim RTC problem : don't keep time on reboot
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Experts, Learning and Guidance to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 0 replies
  • Subscribers 302 subscribers
  • Views 213 views
  • Users 0 members are here
  • piface_real_time_clock
Related
See a helpful answer?

Be sure to click 'more' and select 'suggest as answer'!

If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!

PiFace Shim RTC problem : don't keep time on reboot

patdef
patdef over 9 years ago

I try to use the piFace Shim RTC board on my raspberry pi 2 B v1.1

but I 've some problem with it :

 

  • I download the install script from github :

https://raw.github.com/piface/PiFaceRealTimeClock/master/installpifacerealtimeclock.sh

 

  • I remove the fake-hwclock package with aptitude

sudo aptitude purge fake-hwclock

 

  • I run the piface script

chmod +x intall-piface-real-time-clock.sh

sudo ./intall-piface-real-time-clock.sh

 

sudo reboot

 

  • I set the current time :

sudo hwclock --set --date="2016-03-17 13:52:00"

sudo hwclock -s

 

  • check the current time :

date

jeudi 17 mars 2016, 13:54:04 (UTC+0000)

it's ok :

 

  • then reboot :

sudo reboot

 

but I then have a failure message on boot

[FAILED] Failed to start /etc/rc.local Compatibility.

See 'systemctl status rc-local.service' for details

 

  • So do I :

systemctl status rc-local.service

and I get :

● rc-local.service - /etc/rc.local Compatibility

   Loaded: loaded (/lib/systemd/system/rc-local.service; static)

  Drop-In: /etc/systemd/system/rc-local.service.d

           └─ttyoutput.conf

   Active: failed (Result: exit-code) since jeu. 1970-01-01 00:00:22 UTC; 32min ago

 

Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.

 

  • I check some point :

sudo i2cdetect 1

0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:      -- -- -- -- -- -- -- -- -- -- -- -- --

10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- UU

70: -- -- -- -- -- -- -- --                   

 

 

 

lsmod :

Module             Size  Used by
binfmt_misc        6236  1
rtc_ds1307         9402  0
cfg80211         389253  0
rfkill            16036  1 cfg80211
evdev             10278  1
ftdi_sio          30941  2
usbserial         21779  5 ftdi_sio
snd_bcm2835       19802  0
snd_pcm           73442  1 snd_bcm2835
bcm2835_gpiomem    2860  0
snd_timer         18792  1 snd_pcm
i2c_bcm2708        4920  0
bcm2835_rng        1763  0
snd               50779  3 snd_bcm2835,snd_timer,snd_pcm
uio_pdrv_genirq    2944  0
uio                7753  1 uio_pdrv_genirq
i2c_dev            5671  0
ipv6             338574  30

 

  • date:

jeudi 1 janvier 1970, 00:10:03 (UTC+0000)

 

  • sudo hwclock -r

hwclock: The Hardware Clock registers contain values that are either invalid (e.g. 50th day of month) or beyond the range we can handle (e.g. Year 2095).

 

  • check the presence of /dev/rtc

ls /dev/rtc*

lrwxrwxrwx 1 root root 4 janv.  1 00:37 /dev/rtc -> rtc0

crw------- 1 root root 254, 0 janv.  1 00:37 /dev/rtc0

 

  • check the value of the mcp7941x

sudo i2cdump -y -f -r 0-6 1 0x6f c

0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f0123456789abcdef
00: 95 36 00 2d 01 01 66                          ?6.-??f  

So we can see there is really a problem with the value of the rtc

 

  • then set the time correctly:

sudo hwclock --set --date="2016-03-17 14:10:00"

sudo hwclock -s

 

  1. check the current time :

date

jeudi 17 mars 2016, 14:10:04 (UTC+0000)

it's ok

 

  1. verify the rtc register :

sudo i2cdump -y -f -r 0-6 1 0x6f c

0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f0123456789abcdef
00: c2 10 14 2d 17 23 16                          ?R?-?#?  

 

Now it's Ok !

 

  • I even check the battery of the piface shim rtc, and the 3.3V is good.

 

But the problem is still the same on the next reboot.

So I wonder what can I do ?

Is anybody here who can help me ?

  • Sign in to reply
  • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube