bobinparis
Posts: 3
Joined: Fri Mar 25, 2016 3:05 pm

Re: [Résolu] PiFace Shim RTC ne se comporte pas en RTC...

Tue Mar 29, 2016 11:51 am

Hi everybody,
It was really painful to have this PiFace RTC working on Raspbian Jessie, we can find a lot of information on internet, but unfortunetely they are now out of date...
I leave here my solution that works fine for me, i wish it can help some of you !

-Update and Upgrade
pi@raspberry:~ $ sudo apt-get update
pi@raspberry:~ $ sudo apt-get –y upgrade
pi@raspberry:~ $ reboot

-Activate i2c
pi@raspberry:~ $ sudo raspi-config
Go to now 'Advanced Options', the "I2C", Enable Yes, Load Kernell Yes
pi@raspberry:~ $ reboot

-Install i2c package
pi@raspberry:~ $ sudo apt-get install i2c-tools

-Delete Fake Hardware Clock
pi@raspberry:~ $ sudo apt-get remove fake-hwclock
pi@raspberry:~ $ sudo apt-get purge fake-hwclock

-Edit /boot/config.txt
pi@raspberry:~ $ sudo nano /boot/config.txt
At the end of the file, add:
dtparam=i2c_arm=on
dtparam=i2c=on
dtoverlay=i2c-rtc,mcp7941x
pi@raspberry:~ $ reboot

-Edit /etc/modules
pi@raspberry:~ $ sudo nano /etc/modules
At the end of the file, add:
i2c-bcm2708
i2c-dev
i2c:mcp7941x
rtc-mcp7941x
pi@raspberry:~ $ reboot

-Edit /etc/rc.local
pi@raspberry:~ $ sudo nano /etc/rc.local
Add in the "IF" function that is already here:
If (...)
/sbin/hwclock -wu
else(...)
/sbin/hwclock -s
fi

exit 0

pi@raspberry:~ $ reboot

-Edit /lib/udev/hwclock-set
pi@raspberry:~ $ sudo nano /liv/udev/hwclock-set
Comment the first if function:
# if [ -e /run/systemd/system ] ; then
# exit 0
# fi

pi@raspberry:~ $ reboot

-Edit /etc/adjtime
pi@raspberry:~ $ sudo nano /etc/adjtime
Replace UTC with LOCAL
pi@raspberry:~ $ reboot

-Finally, you have to set your system date, set your hardware clock with and everything should be fine !!
pi@raspberry:~ $ sudo date –s ‘’25 MAR 2016 15:32:00”
pi@raspberry:~ $ sudo hwclock -w
pi@raspberry:~ $ sudo hwclock –r

Shutdown, unplug your network connection, wait a little, and turn it on !
By the way, sorry for my bad english and raspberry knowledges ! Maybe some instructions are not useful here but it works for me.

Return to “Français”