If the returned date and time is not correct, or “hwclock” returns an error, use the “-w”
option to set the hardware clock to the current time:
$
sudo hwclock -w
Then recheck the time stored in the hardware clock to ensure it matches. Linux may have
failed to automatically update the hardware clock after the last reboot if its internal
registers contained invalid values.
If the RTC still doesn’t work, you should check if the Pi sees the RTC chip on the I
2
C bus.
Run these two commands:
$
sudo modprobe -r rtc_ds1307
$
sudo i2cdetect 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1.
I will probe address range 0x03-0x77.
Continue? [Y/n]
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 6f
70: -- -- -- -- -- -- -- —
You should see “6f” in the address list. This is the address of the RTC.
If the RTC address is detected, double check your software installation for issues at the
Linux modules level.
Run the “lsmod” command to list the loaded modules and check that “i2c_dev” and
“i2c_bcm2708” are both listed.
If the RTC address is not detected, the cause could be a hardware problem, on the Iono
board or the Raspberry Pi. If you have another Pi or Iono board, try swapping them to
isolate the faulty board.
SPI configuration
Enable the SPI interface to use Iono's analog inputs A/D converter.
Run the "raspi-config" configuration utility:
$
sudo raspi-config
Select: "Interfacing Options" > "SPI" > "Yes"
Reboot to make changes effective.
1-Wire configuration
If you want to use TTL1 as a bus line for 1-Wire devices, enable the 1-Wire interface:
$
sudo raspi-config
Select: "Interfacing Options" > "1-Wire" > "Yes"
If you want to use TTL1 for other purposes make sure it is disabled.
23
Iono Pi User Guide