第一次使用这个片子,是使用smbus进行配置,
通过命令i2cdetect -r -0 可以检测到设备,
然后想要使能PWRCTL2/BATEN2引脚,以打开下游的电源开关,
但是执行命令:
root@am57xx-evm:~# i2cset -y 0 0x46 0x06 0x0f
root@am57xx-evm:~# i2cdump -y 0 0x46No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 51 04 40 81 18 0f 0f 0f 00 30 00 00 00 00 00 .Q?@?????.0…..
10: 02 40 1c 0e 8a c5 c1 ce 30 16 a6 12 27 2d 03 00 ?@??????0???'-?.
20: 09 04 18 00 00 00 00 00 00 00 00 00 00 00 00 00 ???………….
30: 37 00 33 00 30 00 38 00 30 00 38 00 34 00 39 00 7.3.0.8.0.8.4.9.
40: 46 00 32 00 31 00 46 00 00 00 00 00 00 00 00 00 F.2.1.F………
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: 1e 1e 1e 1e 1e 00 00 00 18 18 18 18 18 00 00 00 ?????…?????…
e0: 04 04 04 04 04 00 00 00 77 77 77 77 77 00 00 00 ?????…wwwww…
f0: 00 00 00 00 81 81 81 81 01 12 00 00 00 00 00 00 ….??????……
之后可以看到0x06寄存器的值已经改变为0x0f了,使能了这个引脚,可是去测量电压,发现这个引脚的电压没有变化
请问要如何使能这个引脚呢?
Kailyn Chen:
是要启用battery charge功能是吗?那么这个引脚需要上拉4.7Kohm到Vcc。
这个引脚即为输入也是输出引脚,上电时,这个引脚是输出,disable/enable power switch, 输出高或低电平取决于 PWRCTL_POL的引脚配置。
ce guo:
回复 Kailyn Chen:
不需要启用battery charge功能,所以这个引脚我们没有添加上拉电阻。
这里已经将PWRCTL_POL引脚拉高了,0x0a寄存器的值为0x30,这就已经是将这个引脚拉高了,而且这个引脚是直接连接上拉电阻的,量取的值也是3.3V,
可是上电默认0x06的值为0,也就是PWRCTL2/BATEN2引脚为0,修改0x06位0x0f,量取PWRCTL2/BATEN2引脚的值仍然为0
请问如果使PWRCTL2/BATEN2引脚输出高电平呢
ce guo:
回复 Kailyn Chen:
ce guo:
回复 Kailyn Chen:
你好,我将R392卸掉,在R393的位置添加了一个4.7K的上拉电阻,
root@am57xx-evm:~# i2cdump -y 0 0x46 No size specified (using byte-data access) 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef00: 00 51 04 40 81 18 04 0f 0f 00 30 00 00 00 00 00 .Q?@?????.0…..10: 02 40 1c 0e 8a c5 c1 ce 30 16 a6 12 27 2d 03 00 ?@??????0???'-?.20: 09 04 18 00 00 00 00 00 00 00 00 00 00 00 00 00 ???………….30: 37 00 33 00 30 00 38 00 30 00 38 00 34 00 39 00 7.3.0.8.0.8.4.9.40: 46 00 32 00 31 00 46 00 00 00 00 00 00 00 00 00 F.2.1.F………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: 1e 1e 1e 1e 1e 00 00 00 18 18 18 18 18 00 00 00 ?????…?????…e0: 04 04 04 04 04 00 00 00 77 77 77 77 77 00 00 00 ?????…wwwww…f0: 00 00 00 00 80 80 a0 80 01 12 00 00 00 00 00 00 ….??????……
显示0x06寄存器的值为0x04,也就是PWRCTL3/BATEN3是被使能的,可是量取该引脚的值,还是低电平
ce guo:
回复 Kailyn Chen:
感谢回复,
我有尝试将PWRCTL_POL引脚悬空,但是还是没有效果啊,PWRCTL1, PWRCTL2, PWRCTL3, PWRCTL4几个引脚的值仍然是低电平,
如我之前所说的,我也尝试在PWRCTL3引脚添加上拉电阻,但是只要取消复位,tusb4041就会将该引脚拉低,这时通过i2c总线读取0x06寄存器,值为0x04,说明PWRCTL3引脚是高电平,但该引脚的实际电压值为0V
直接通过smbus对寄存器进行写入数值,对应引脚不守影响吗?
目前的情况是引脚只输出的低电平,写寄存器内部的值对引脚没有作用,
Zhenting Liu:
回复 ce guo:
您好,想请教你一下,您所使用的读写寄存器的软件是哪款呀,是用smbus协议通过usb上端口进行配置么
ce guo:
回复 Zhenting Liu:
你好,
这款芯片使用i2c对内部寄存器读写,所以使用的是内嵌的i2c命令进行调试的