Skip to content

Diagnosing PiFace-RTC hardware #5

@gav-

Description

@gav-

Hi, I can't locate another contact method to obtain hardware support for a PiFace-RTC, so I am posting here. I have been unsuccessful in getting mine to function, most recently attempted on latest raspbian on both a Pi2 B, and an older Pi rev1 B.

The problem is that is impossible to read or write to the RTC, but it does appear to be detected.

root@raspi:/home/pi# tail -n 6 /etc/rc.local 
modprobe i2c-dev
# Calibrate the clock (default: 0x47). See datasheet for MCP7940N
i2cset -y 0 0x6f 0x08 0x47
modprobe i2c:mcp7941x
echo mcp7941x 0x6f > /sys/class/i2c-dev/i2c-0/device/new_device
hwclock -s

root@raspi:/home/pi# hwclock -s
hwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Invalid argument

root@raspi:/home/pi# hwclock -w
hwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Input/output error
hwclock: ioctl(RTC_SET_TIME) to /dev/rtc0 to set the time failed.: Input/output error

root@raspi:/home/pi# i2cdetect -y 0
     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: -- -- -- -- -- -- -- --                

root@raspi:/home/pi# echo 0x6f > /sys/class/i2c-dev/i2c-0/device/delete_device 
root@raspi:/home/pi# i2cdump -y 0 0x6f b
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: b3 02 01 39 01 01 01 80 47 01 00 00 00 01 01 01    ???9????G?...???
10: 01 03 00 00 01 01 01 01 34 00 01 21 34 00 01 21    ??..????4.?!4.?!
20: ef 31 48 26 38 bc 11 40 25 11 19 86 23 51 46 8d    ?1H&8??@%???#QF?
30: 8d 40 20 07 12 93 99 00 2f 02 09 24 9b ca 02 24    ?@ ????./??$???$
40: 90 a0 4a 21 09 0a 20 4e a0 02 82 39 24 11 a1 1a    ??J!?? N???9$???
50: c4 cc 06 32 00 00 1c 41 36 88 a1 60 42 30 86 40    ???2..?A6??`B0?@
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
80: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
90: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
a0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
b0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
c0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
d0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
e0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
f0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX    

Any help in diagnosing this issue would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions