SLVAG35 August   2026 BQ78702B , BQ78706 , BQ79718B-Q1 , BQ79731-Q1 , BQ79731B-Q1

 

  1.   1
  2.   Abstract
  3. 1Introduction to I2C Features for AFE and BJB
  4. 2I2C Hardware Overview for AFE and BJB
  5. 3Hands-On Practice with I2C Communication Commands
    1. 3.1 EEPROM Write Operation
    2. 3.2 EEPROM Read Operation
      1. 3.2.1 Reading One Byte from Any Register Address
      2. 3.2.2 Continuously Reading Multiple Bytes from Any Address
  6. 4Conclusion
  7. 5References

Introduction to I2C Features for AFE and BJB

Figure 1-1 shows the I2C application block diagram from the BQ79718 datasheet; this architecture is also applicable to BQ78706 and BQ79731. Each AFE in the daisy chain can connect to multiple I2C slave nodes.

 BQ797xx I2C Application DiagramFigure 1-1 BQ797xx I2C Application Diagram

I2C data transmission and reception mainly rely on the I2C_CTRL, I2C_WR_DATA, and I2C_RD_DATA registers, prior to which GPIO functional configuration (I2C enable) must be completed. The MCU writes data into the AFE register I2C_WR_DATA via the daisy chain, and the read-back data is stored in I2C_RD_DATA. I2C_CTRL configures SEND, RECEIVE, START, STOP, NACK, and initiates I2C communication.

 AFE and BJB I2C Related RegistersFigure 1-2 AFE and BJB I2C Related Registers

I2C_WR_DATA: Stores data to be written into the EEPROM.

I2C_RD_DATA: Stores data read from the EEPROM.

I2C_CTRL: START, NACK, and STOP before and after data in the I2C protocol are configured through this register. It also defines whether the current communication is transmit or receive, and initiates I2C communication.

 I2C_CTRL Register Definition  I2C_CTRL Register DefinitionFigure 1-3 I2C_CTRL Register Definition

The host node (AFE or BJB) controls START and STOP to inform the EEPROM of communication start and end.

After receiving 8bit data, the slave node (EEPROM) pulls SDA low for 1bit (ACK) to inform the host that data reception is complete and the next byte can be sent.

 Mapping Between I2C Communication Protocol and RegistersFigure 1-4 Mapping Between I2C Communication Protocol and Registers

For detailed I2C communication protocols, please refer to the application report Understanding the I2C Bus.

The EEPROM read communication process is divided into the following 7 steps:

  • Step 1: The MCU places data into the AFE register I2C_WR_DATA via the daisy chain.
  • Step 2: The MCU writes I2C_CTRL[I2C_GO] =1 to command the AFE to perform I2C communication.
  • Step 3: Upon receiving the command, the AFE begins I2C communication with the EEPROM.
  • Step 4: Send the I2C read command.
  • Step 5: Data returned via I2C is stored in I2C_RD_DATA.
  • Step 6: The MCU reads the data from the AFE register.
  • Step 7: The MCU reads the FAULT_SYS register of the AFE to verify that no anomalies occurred during this communication.

 7-Step Flowchart of I2C EEPROM Read CommunicationFigure 1-5 7-Step Flowchart of I2C EEPROM Read Communication