I2c only returns 7F...
 
Notifications
Clear all

I2c only returns 7F/FF

7 Posts
2 Users
1 Likes
236 Views
XANi
 XANi
(@xani)
Active Member
Joined: 7 months ago
Posts: 12
Topic starter  

Hello,

 

on rPi 4 and UPS HV4.0B PPoE (no daemon installed yet) when I try to look at anything I2C I see the board:

 

root@typer-pi:~# i2cdetect -y  3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- 68 69 6a 6b 6c 6d 6e 6f 
70: -- -- -- -- -- -- -- --  

but any read from it just returns 7F:

root@typer-pi:~# i2cdump -y -a 3 0x6b b
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 7f ff 7f 7f 7f ff 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ?.???.??????????
10: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ????????????????
20: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ????????????????
30: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ????????????????
40: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ????????????????
50: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ????????????????
60: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ????????????????
70: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ????????????????
80: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ????????????????
90: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ????????????????
a0: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ????????????????
b0: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ????????????????
c0: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ????????????????
d0: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ????????????????
e0: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ????????????????
f0: 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f 7f ????????????????

 

When I did

 

i2cset -y 3 0x6b 0x07 0x43

to set battery/supercap mode to supercap only it started charging it (it currently only has supercap attached it) and the LED flashed during writing it so I assume it is running but trying to read from any address just returns 7f or sometimes ff. I also tried lowering rpi bus speeds

dtoverlay=i2c-rtc,ds1307
dtparam=i2c_arm=on,i2c_arm_baudrate=25000
dtparam=i2c1_baudrate=25000

but that didn't really do much (not sure if that's working on newer kernels, my OS (Debian) only have i2c-bcm2835 driver

 

 


   
Quote
PiAdmin
(@piadmin)
Member Admin
Joined: 3 years ago
Posts: 81
 

Hi,

Very interesting ... Never reported similar

Let me think little bit and answer to this at the evening

BR Pi Master


   
ReplyQuote
XANi
 XANi
(@xani)
Active Member
Joined: 7 months ago
Posts: 12
Topic starter  

@piadmin I do have a scope with I2C decoder, I can try to capture i2c transaction if you want


   
ReplyQuote
PiAdmin
(@piadmin)
Member Admin
Joined: 3 years ago
Posts: 81
 

Hi,

No, not needed. We just closing the new firmware release, so on the first priority to release with manual.

after that very late today or tomorrow will work on your case and answer

We have here all tools required, including Protocol Analyzer and ICE

BR Pi Master


   
ReplyQuote
XANi
 XANi
(@xani)
Active Member
Joined: 7 months ago
Posts: 12
Topic starter  

Hi @piadmin

 

It appears to be a I2C clock stretching bug again. Most (all ?) of the older methods to set i2c frequency don't work on rPi 4 with modern (Debian 5.10.106-1) kernel but running

 fdtput /boot/firmware/bcm2711-rpi-4-b.dtb /soc/i2c@7e804000 clock-frequency 10000

and rebooting helps:

 

root@typer-pi:~# i2cdump -y -a 3 0x6b b
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 ff 00 00 00 ff 00 43 00 00 00 00 01 00 00 00    .......C....?...
10: 00 03 32 50 01 01 00 00 00 01 05 05 00 00 00 00    .?2P??...???....
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

 

I've written a blogpost about details but I can't post it here as last time I've tried Wordfence plugin here yeeted my post content to oblivion...

 


   
ReplyQuote
PiAdmin
(@piadmin)
Member Admin
Joined: 3 years ago
Posts: 81
 

@xani 

Hi,

You should be able. if not please send it to me so I will publish it.

Thank you

BR Pi Master


   
ReplyQuote
PiAdmin
(@piadmin)
Member Admin
Joined: 3 years ago
Posts: 81
 

Hi,

See here, working normally with former solution:

pi@pimodules:~ $ i2cdump -y -a 1 0x6b b
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 01 0f 00 00 ff 00 6c 00 00 00 00 01 00 00 00 .??....l....?...
10: 00 03 32 50 01 01 00 00 00 01 1e 05 ff 00 00 00 .?2P??...???....
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
pi@pimodules:~ $

BR Pi Master


   
ReplyQuote
Share: