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.

bq20z65-R1 SMBus Address Question

Other Parts Discussed in Thread: BQ20Z65-R1, BQ20Z60-R1, BQEVSW

Hello,

Section 2.3.11 (pg. 56) " The bq20z60-R1/bq20z65-R1 uses address 0x16 on the SMB for communication."

However, the bqEVSW talks to it using SMB address 0x17.

In the datasheet, there is an example of how to read from the dataflash that uses both address 0x16 and 0x17 (below). Read complete Gas Gauging-IT Config subclass (SubclassID = 80) into RAM:

 

• Write Subclass ID

SMB Slave Address (0x16)

– SMB CMD 0x77 with 0x0050 as data (=80 decimal)

• Read Subclass (two blocks are needed, because it is over 32 bytes long)

SMBSlave Address (0x16)

– SMB CMD 0x78 receiving 32 bytes of data

– SMB CMD 0x79 receiving 32 bytes of data

Overwrite offset 45 of received data with 8.7 V:

• Update offset 45 of second block with 0x21fc (=8700 decimal)

Write the complete subclass back to the bq20z60-R1/bq20z65-R1:

• Write Subclass ID

SMB Slave Address (0x16)

– SMB CMD 0x77 with 0x0050 as data

• Write Subclass

SMB Slave Address (0x17)

– SMB CMD 0x78 with 32 bytes of data

– SMB CMD 0x79 with 32 bytes of data

 

Alternatively, only the required block rather than the full subclass can be accessed.

Read required block of Gas Gauging-IT Config subclass (SubclassID = 80) into RAM:

• Write Subclass ID

SMB Slave Address (0x17)

– SMB CMD 0x77 with 0x0050 as data (=80 decimal)

• Read Subclass (second block is needed, because its offset is 45)

SMB Slave Address (0x16)

– SMB CMD 0x79 receiving 32 bytes of data

Overwrite offset (45 – 32 = 13) of received data with 8.7 V:

• Update offset 45 with 0x21fc (=8700 decimal)

Write the updated block back to the bq20z60-R1/bq20z65-R1:

• Write Subclass ID

SMB Slave Address (0x17) SMB CMD 0x77 with 0x0050 as data

• Write Subclass

SMB Slave Address (0x17)

– SMB CMD 0x79 with 32 bytes of data

 

 

 

 

Which address should I use when talking to the device?

  • The address field in the Pro screen doesn't have the same meaning you would normally expect. All this does is control whether there is PEC or not. I believe 0x17 is with PEC and 0x16 is without PEC. Usually, we just keep it at 0x17 for everything.

  • Hi Chase,

    Thanks for the quick response.

    Is the example in the guide just a mistake then?  I couldn't see any rhym of reason for when 0x16 is used vs. 0x17, it should be alright if I just make it 0x17 and stick with it?

    Thanks,

    Nick

  • The address field in EVSW is confusing because it doesn't have anything to do with the read/write address of the gauge. It just controls the PEC function in the EV2300.

    If you are using the EVSW Pro screen to send the data flash read/write commands, then you don't need to worry about the device address. The EVSW will take care of that since it constructs the packets itself. However, if you are writing your own code to read and write data flash you will need to use the 0x16 or 0x17 address depending on whether you are reading or writing from/to the gauge.

  • Hi Chase,

    I am actually writing my own code which is why I'm trying to get absolutely clear on this, sorry if its repetative.  Does that mean I should use 0x16 to Read and 0x17 to Write?  The example from the datasheet doesn't seem to follow this:

    Writing: (in order of example)
    SMB Slave Address (0x16)
    SMB Slave Address (0x16)
    SMB Slave Address (0x17)
    SMB Slave Address (0x17)
    SMB Slave Address (0x17)
    SMB Slave Address (0x17)

    Read: (In order of example)
    SMB Slave Address (0x16)
    SMB Slave Address (0x16)

     

    Are the first two writes to 0x16 simply a mistake in the documentation?  Is it also a mistake that the documentation doesn't mention having to talk to address 0x17?

    Thanks,

    Nick

  • The attached document explains it better than I can.

    SMBus made simple_v6.doc