您尚未登录。

楼主 #1 2021-02-04 16:02:23

angelsan
会员
注册时间: 2020-04-02
已发帖子: 139
积分: 131.5

bsp, I2C出错,求教

基于Qinhao 的 bsp linux 3.4,硬件是licheepi_zero。I2C出错,是怎么回事呢?

# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  [   14.707574] sunxi_i2c_do_xfer()985 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x3)
9  a  b  c  d  e  f
00:        [   14.720161] sunxi_i2c_do_xfer()985 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x4)
  -- -- [   14.732414] sunxi_i2c_do_xfer()985 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x5)
-- [   14.742308] sunxi_i2c_do_xfer()985 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x6)
-- [   14.752161] sunxi_i2c_do_xfer()985 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x7)
-- [   14.762065] sunxi_i2c_do_xfer()985 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x8)

离线

#2 2021-10-10 19:21:01

memory
会员
注册时间: 2021-08-11
已发帖子: 443
积分: 419

Re: bsp, I2C出错,求教

root@TinaLinux:/# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  [ 3242.867148] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x3)
9  a  b  c  d  e  f
00:        [ 3242.879533] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x4)
  -- -- [ 3242.891983] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x5)
-- [ 3242.901784] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x6)
-- [ 3242.911960] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x7)
-- [ 3242.921672] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x8)
-- [ 3242.931510] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x9)
-- [ 3242.941949] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0xa)
-- [ 3242.951676] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0xb)
-- [ 3242.961543] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0xc)
-- [ 3242.971487] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0xd)
-- [ 3242.981275] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0xe)
-- [ 3242.990967] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0xf)
--
10: [ 3243.001032] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x10)
-- [ 3243.011542] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x11)
-- [ 3243.021479] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x12)
-- [ 3243.031601] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x13)
-- [ 3243.041369] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x14)
-- [ 3243.051316] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x15)
-- [ 3243.061520] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x16)
-- [ 3243.071495] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x17)
-- [ 3243.081282] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x18)
-- [ 3243.091387] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x19)
-- [ 3243.101331] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x1a)
-- [ 3243.111309] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x1b)
-- [ 3243.121203] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x1c)
-- [ 3243.131154] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x1d)
-- [ 3243.141050] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x1e)
-- [ 3243.151177] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x1f)
--
20: [ 3243.160990] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x20)
-- [ 3243.171459] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x21)
-- [ 3243.181617] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x22)
-- [ 3243.191524] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x23)
-- [ 3243.201307] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x24)
-- [ 3243.211569] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x25)
-- [ 3243.221499] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x26)
-- [ 3243.231454] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x27)
-- [ 3243.241913] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x28)
-- [ 3243.251888] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x29)
-- [ 3243.261685] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x2a)
-- [ 3243.271774] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x2b)
-- [ 3243.281720] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x2c)
-- [ 3243.291655] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x2d)
-- [ 3243.301618] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x2e)
-- [ 3243.312883] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x2f)
--
30: [ 3243.322857] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x30)
-- [ 3243.333569] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x31)
-- [ 3243.343458] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x32)
-- [ 3243.353258] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x33)
-- [ 3243.363298] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x34)
-- [ 3243.373259] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x35)
-- [ 3243.383209] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x36)
-- [ 3243.393165] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x37)
-- [ 3243.403108] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x38)
-- [ 3243.413178] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x39)
-- [ 3243.423326] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x3a)
-- [ 3243.433107] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x3b)
-- [ 3243.443044] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x3c)
-- [ 3243.453214] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x3d)
-- [ 3243.463178] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x3e)
-- [ 3243.472970] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x3f)
--
40: [ 3243.483138] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x40)
-- [ 3243.493582] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x41)
-- [ 3243.503456] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x42)
-- [ 3243.513475] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x43)
-- [ 3243.523415] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x44)
-- [ 3243.533356] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x45)
-- [ 3243.543900] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x46)
-- [ 3243.553863] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x47)
-- [ 3243.563677] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x48)
-- [ 3243.573793] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x49)
-- [ 3243.583693] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x4a)
-- [ 3243.593643] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x4b)
-- [ 3243.603625] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x4c)
-- [ 3243.613653] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x4d)
-- [ 3243.623632] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x4e)
-- [ 3243.633850] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x4f)
--
50: [ 3243.643814] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x50)
-- [ 3243.654191] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x51)
-- [ 3243.664277] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x52)
-- [ 3243.674072] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x53)
-- [ 3243.684005] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x54)
-- [ 3243.694201] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x55)
-- [ 3243.704149] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x56)
-- [ 3243.714011] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x57)
-- [ 3243.724117] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x58)
-- [ 3243.734043] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x59)
-- [ 3243.743797] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x5a)
-- [ 3243.753741] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x5b)
-- [ 3243.763899] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x5c)
-- [ 3243.773897] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x5d)
-- [ 3243.783839] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x5e)
-- [ 3243.793954] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x48, dev addr: 0x5f)
--
60: [ 3243.803807] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x60)
-- [ 3243.814283] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x61)
-- [ 3243.824450] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x62)
-- [ 3243.834537] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x63)
-- [ 3243.844323] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x64)
-- [ 3243.854421] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x65)
-- [ 3243.864803] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x66)
-- [ 3243.874785] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x67)
-- [ 3243.885010] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x68)
-- [ 3243.894708] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x69)
-- [ 3243.904655] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x6a)
-- [ 3243.914818] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x6b)
-- [ 3243.924789] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x6c)
-- [ 3243.935399] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x6d)
-- [ 3243.945588] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x6e)
-- [ 3243.955588] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x6f)
--
70: [ 3243.965428] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x70)
-- [ 3243.975976] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x71)
-- [ 3243.985988] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x72)
-- [ 3243.995966] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x73)
-- [ 3244.005769] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x74)
-- [ 3244.015928] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x75)
-- [ 3244.025892] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x76)
-- [ 3244.035863] sunxi_i2c_do_xfer()1816 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x77)
--
root@TinaLinux:/#

我也遇到了 :(

离线

#3 2021-10-11 09:29:04

jkl
会员
注册时间: 2019-11-18
已发帖子: 263
积分: 146.5

Re: bsp, I2C出错,求教

好像以前遇到过,看看有没有加上拉电阻

离线

#4 2021-10-11 09:52:56

memory
会员
注册时间: 2021-08-11
已发帖子: 443
积分: 419

Re: bsp, I2C出错,求教

jkl 说:

好像以前遇到过,看看有没有加上拉电阻

后来发现,这只是一个警告而已,并不是出错,就是该地址通讯超时。

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn