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.

BQ25638: how to read and write a 16-bit register

Part Number: BQ25638
Other Parts Discussed in Thread: BQ25630

Tool/software:

Hey, When a register says "REG0x02" for example, would I need to write to reg 0x01 (low byte) and reg0x02 (high byte)? 

I don't think it says anything about this in our datasheet. Same question applies to BQ25630 which I assume will be the same 

I'm using a MCP2221 to talk with this chip, saleae confirms I2C transfers look good, plus ACKs

Say I want to program reg0x02 to the default value of 0x0640. Would I program reg0x01 = 0x40 , and reg0x02 = 0x06 ? 

  • I think this answers my question, I read back:

    2025-06-08 13:43:28,546 | INFO | Read reg 0x01 = 0xFF
    2025-06-08 13:43:28,562 | INFO | Read reg 0x02 = 0x40
    2025-06-08 13:43:28,573 | INFO | Read reg 0x03 = 0x06

    after a power reset so reg 0x02 = {0x06} reg 0x03 ( high byte) and {0x40} reg 0x02(low byte) 

  • Hey Cameron,

    Please refer to the image below and page 43 of the datasheet:

    REG02 (address: 0x02) is the entire 16 bit register as shown. 

    Out of that, the bits [11:6] shown in yellow stand for the ICHG setting, the other bits are reserved.

    so to set a specific ICHG setting, you can write the required binary (or hexadecimal) value to the bits [11:6]

  • Right, but I just want to confirm register 0x02 is the bottom eight bits and register 0x03 is the top eight bits 

    I think my reading of the default values confirmed it