This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BQ40Z50-R1 SMBUS ManufacturerBlockAccess receiving bytes problem

Other Parts Discussed in Thread: BQ40Z50-R1

Hi there,

I am using a BQ40Z50-R1 connecting to a stm32F030R8 MCU with SMBUS.

When I try to use manufacturerBlockAccess (0x44) to read data it always returns wrong data,

but I can successfully read correct data if I read it from Battery Management Studio.

Here is the example command I want to read , 

ManufacturerAccess 0x0000

the Battery Management Studio reads

but the data read from stm32 MCU is 0x1717

also I find no matter which command and the length of the command I want to read, I always get the result 0x17.

does my command go wrong?

here is the command format I send in block write-block read process call

0x44 0x02 0x00 0x00 0x02 P

P stands for the pointer to receiving buffer, 0x02 before P is the length of buffer.

Thanks.

  • Hi Andy,

    The device expert is out of the office today for Thanksgiving. We will respond on Monday. In the interim, please refer to the following app note:

    For more information about PEC and SMBUS please refer to the SMBUS Made Simple App note found here: http://www.ti.com/lit/slua475

    Sincerely,
    Bryan Kahler
  • Hi Andy,

    Please note: 0x00 ManufacturerAccess() is for word read, and 0x44 ManufacturerBlockAccess() is for block writing and reading of data in the Manufacturer Access System (MAC).

    Please ensure you're sending/receiving data in little endian.

    For example, to read the ChemID via ManufacturerBlockAccess()
    1. SMBus block write. In Hex, little endian (Command | data written): 44 | 06 00
    2. SMBus block read. In Hex, little endian (Command | data received): 44 | 06 00 00 01

    In this example, the returned data will be 06 00 (this is the MAC command, 0x0600) followed by 00 01 (this is the Chem ID, 0x0001)

    On your device, the ChemID will differ.

    For more information on how to utilize SMBus with external microcontrollers and code examples, please refer to this reference design: www.ti.com/.../TIDM-SMBUS

    Sincerely,
    Bryan Kahler