====== RTC on the Odroid W ======
This page details how to setup the RTC Odroid W on the Raspbian “wheezy” image from http://www.raspberrypi.org/downloads
----
===== Preparations =====
* Odroid W
* uSD-Card => over 2GB or eMMC Module
* RTC Backup battery
===== Configuration =====
- Building the kernel\\ Please refer to [[en:odroidwkernelcompilation | Kernel compilation for odroid-w]]
- With your Odroid W insert a RTC Backup Battery into the battery connector which is BT1.
- Enable I2C by running:sudo vi /etc/modprobe.d/raspi-blacklist.conf
Find the I2C line where the i2c is black listed blacklist i2c-bcm2708
Comment it out by replacing it with the line below #blacklist i2c-bcm2708
- Now you have the RTC Odroid W running with the current date and time the next step is to make it load when the Odroid W boots.\\ Edit the modules file: sudo vi /etc/modules
Add rtc-rc5t619 at the end of the file and save it.
- Next you want to add the RTC Odroid W at boot by editing /etc/rc.local.\\ sudo vi /etc/rc.local\\ Add the following at the bottom of the page above exit 0. echo rc5t619 0x32 > /sys/class/i2c-adapter/i2c-0/new_device
hwclock -s
Save the file and reboot your Odroid W. sudo reboot
If everything worked correctly the RTC Odroid W should be initialised on boot and the current date and time will be loaded into Linux.
- You can check the current time on the RTC Odroid W with: sudo hwclock -r
If this is the first time you have run the RTC Odroid W it will display a date of July 17th 2014.
- If the Odroid W is connected to the internet the correct date and time should be set automatically otherwise you can set the current date and time using: sudo date -s "17 JUL 2014 18:00:00"
You can check the current linux date with the command (date).
- To save the date onto the RTC Odroid W use the following command: sudo hwclock -w
Verify the date has been saved onto the RTC Odroid W with: sudo hwclock -r