SLUUCG7 April 2024 BQ76922
The I2C serial communications interface in the BQ76922 device acts as a responder device and supports rates up to 400kHz with an optional CRC check. If the OTP was not programmed, the BQ76922 initially powers up by default in 400kHz I2C mode. The OTP setting can be programmed on the manufacturing line, then when the device powers up, it automatically enters the selected mode per OTP setting. The host can also change the I2C speed setting while in CONFIG_UPDATE mode, then the new speed setting takes effect upon exiting CONFIG_UPDATE mode. Alternatively, the host can write the 0x29E7 SWAP_TO_I2C() subcommand to change the communications interface to I2C fast mode (Settings:Configuration:Comm Type = 8) immediately, without needing to enter CONFIG_UPDATE mode. The 0x29BC SWAP_COMM_MODE() subcommand can be sent to transition the device to the communications mode selected by the setting in Settings:Configuration:Comm Type.
The I2C device address is set by default as 0x10 (write), 0x11 (read), which can be changed by programming Settings:Configuration:I2C Address with the desired write address.
The communications interface includes optional timeout capability, which can be enabled based on the Comm Type setting. The Comm Type settings with timeouts should only be used if the bus will be operating at 100kHz or 400kHz. If Comm Type= 0x1E (100kHz mode with timeouts enabled), then the device resets the communications interface logic if a clock is detected low longer than a tTIMEOUT of 25ms to 35ms, or if the cumulative clock low responder extend time exceeds ≈25ms, or if the cumulative clock low controller extend time exceeds 10ms. If Comm Type= 0x09 (400kHz mode with timeouts enabled), then the device resets the communications interface logic if a clock is detected low longer than tTIMEOUT of 5ms to 20ms. The bus also includes a long-term timeout if the SCL pin is detected low for more than 2 seconds, which applies whether the Comm Type setting includes timeouts or not.
Figure 9-1 shows an I2C write transaction. Block writes are allowed by sending additional data bytes before the stop. The I2C logic auto-increments the register address after each data byte.
When enabled, the CRC is calculated as follows:
The CRC polynomial is x8 + x2 + x + 1, and the initial value is 0.
When the responder detects a bad CRC, the I2C responder will NACK the CRC, which causes the I2C responder to go to an idle state.
Figure 9-2 shows a read transaction using a repeated start.
Figure 9-3 shows a read transaction where a repeated start is not used; for example, if not available in hardware. For a block read, the controller ACKs each data byte except the last and continues to clock the interface. The I2C block auto-increments the register address after each data byte.
When enabled, the CRC for a read transaction is calculated as follows:
The CRC polynomial is x8 + x2 + x + 1, and the initial value is 0.
When the controller detects a bad CRC, the I2C controller NACKs the CRC, which causes the I2C responder to go to an idle state.
When the host sends a read transaction, the device may clock stretch while it fetches the data and prepares to send it. However, when subcommands that require the device to fetch data and load it into the 0x40–0x5F transfer buffer are sent, the device does not clock stretch during this time. The timing required for the device to fetch the data depends on the specific subcommand and any other processing underway within the device, so it varies during operation. When sending a subcommand, wait long enough for the device to fetch the data, then read 0x3E/0x3F again. If the initial subcommand is echoed back from this read, then the fetched data is available and can be read from the transfer buffer.
The approximate time required to complete an operation based on the particular command or subcommand is shown below.
Command/Subcommand Address | Command/Subcommand Name | Time to Complete Operation (Approximate) |
---|---|---|
0x00 | Control Status() | 50 μs |
0x02–0x07 | Safety Alert() and Safety Status() | 50 μs |
0x0A–0x11 | PF Alert() and PF Status() | 50 μs |
0x12 | Battery Status() | 50 μs |
0x14–0x1D | Cell Voltages() | 50 μs |
0x34 | Stack Voltage() | 50 μs |
0x36 | PACK Pin Voltage() | 50 μs |
0x38 | LD Pin Voltage() | 50 μs |
0x3A | CC2 Current() | 50 μs |
0x62 | Alarm Status() | 50 μs |
0x64 | Alarm Raw Status() | 50 μs |
0x66 | Alarm Enable() | 50 μs |
0x68 | Internal Temperature() | 50 μs |
0x6A–0x72 | Thermistor Temperatures() | 50 μs |
0x0001 | DEVICE_NUMBER() | 400 μs |
0x0002 | FW_VERSION() | 400 μs |
0x0003 | HW_VERSION() | 400 μs |
0x0004 | IROM_SIG() | 8500 μs |
0x0005 | STATIC_CFG_SIG() | 450 μs |
0x0009 | DROM_SIG() | 650 μs |
0x000E | EXIT_DEEPSLEEP() | 500 μs |
0x000F | DEEPSLEEP() | 500 μs |
0x0010 | SHUTDOWN() | 500 μs |
0x001C | PDSGTEST() | 550 μs |
0x001D | FUSE_TOGGLE() | 500 μs |
0x001E | PCHGTEST() | 900 μs |
0x001F | CHGTEST() | 550 μs |
0x0020 | DSGTEST() | 550 μs |
0x0022 | FET_ENABLE() | 500 μs |
0x0024 | PF_ENABLE() | 500 μs |
0x0030 | SEAL() | 500 μs |
0x0053 | SAVED_PF_STATUS() | 500 μs |
0x0057 | MANUFACTURING STATUS() | 500 μs |
0x0070 | MANU_DATA() | 660 μs |
0x0071–0x0076 | DASTATUS1-6() | 660 μs |
0x0080 | CUV_SNAPSHOT() | 660 μs |
0x0081 | COV_SNAPSHOT() | 660 μs |
0x0082 | RESET_PASSQ() | 600 μs |
0x0083 | CB_ACTIVE_CELLS() | 560 μs |
0x0084 | CB_SET_LVL() | 480 μs |
0x0085–0x0086 | CBSTATUS1-2() | 575 μs |
0x008A | PTO_RECOVER() | 500 μs |
0x0090 | SET_CFGUPDATE() | 2000 μs |
0x0092 | EXIT_CFGUPDATE() | 1000 μs |
0x0093 | DSG_PDSG_OFF() | 550 μs |
0x0094 | CHG_PCHG_OFF() | 550 μs |
0x0095 | ALL_FETS_OFF() | 550 μs |
0x0096 | ALL_FETS_ON() | 500 μs |
0x0097 | FET_CONTROL() | 495 μs |
0x0098 | REG1_CONTROL() | 450 μs |
0x0099 | SLEEP_ENABLE() | 500 μs |
0x009A | SLEEP_DISABLE() | 500 μs |
0x009B | OCDL_RECOVER() | 500 μs |
0x009C | SCDL_RECOVER() | 500 μs |
0x009D | LOAD_DETECT_RESTART() | 500 μs |
0x009E | LOAD_DETECT_ON() | 500 μs |
0x009F | LOAD_DETECT_OFF() | 500 μs |
0x00A0 | OTP_WR_CHECK() | 580 μs |
0x2800–0x2812 | GPO HI and LO Subcommands | 500 μs |
0x2857 | PF_FORCE_A() | 500 μs |
0x29A3 | PF_FORCE_B() | 800 μs |
0x29BC | SWAP_COMM_MODE() | 500 μs |
0x29E7 | SWAP_TO_I2C() | 500 μs |
0x7C40 | SWAP_TO_HDQ() | 500 μs |
0xF081 | READ_CAL1() | 630 μs |