TI中文支持网
TI专业的中文技术问题搜集分享网站

如何利用 ManufacturerBlockAccess() 读出BQ40Z50R1的数据

BQ40Z50R1芯片手册里有这样的描述:

Example: Read Chemical ID() (0x0006) via ManufacturerBlockAccess()
1. Send Chemical ID() to ManufacturerBlockAccess().
(a) SMBus block write. Command = 0x44. Data sent = 06 00 (data must be sent in Little Endian)
2. Read the result from ManufacturerBlockAccess().
(a) SMBus block read. Command = 0x44. Data read = 06 00 00 01 (each data entity is returned in
Little Endian).
(b) The first 2 bytes, “06 00”, is the MAC command.
(c) The second 2 bytes, “00 01”, is the chem ID returning in Little Endian. That is 0x0100, chem ID
100.

我是这样写的  s->0x16->0x44->0x06->0x00->p

然后  s->0x16->0x44->sr->0x17->xx-> xx-> xx ->xx->P
但是数据不对。
guangyou sheng:

回复 Richard Tang:

是的,还是对SMBus block write 不熟悉造成的。 发送完命令(0x44)之后,要发送数据长度

应该这样写的  s->0x16->0x44->0x02->0x06->0x00->p

然后  s->0x16->0x44->sr->0x17->xx(返回的数据长度)-> xx-> xx ->xx->xx->P

赞(0)
未经允许不得转载:TI中文支持网 » 如何利用 ManufacturerBlockAccess() 读出BQ40Z50R1的数据
分享到: 更多 (0)