SLUAAX5 August   2024 BQ25750 , BQ40Z80 , MSPM0L1306

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2The Role of MCU in Smart Battery System
  6. 3Application Example Using BQ25750, BQ40z80, and MSPM0L1306
    1. 3.1 Gauge Setup
    2. 3.2 Charger Setup
    3. 3.3 MCU Setup
    4. 3.4 Communication Protocol
    5. 3.5 MCU Code Example
    6. 3.6 Data Collected
  7. 4Summary
  8. 5References

Communication Protocol

Using the register bit definitions outlined in the data sheet of the charger, the charge current and voltage writes can be verified using a logic analyzer or oscilloscope. For the BQ40Z80 and other SMBus devices, the communications in broadcast mode can be Packet Error Checking (PEC) enabled with the SBS configuration [CPE] bit. If both SBS configuration [HPE] and SBS configuration [CPE] are disabled, then the gauge does not transmit a PEC byte during any communication. The current and voltage are transmitted from the gauge in little endian, so the format of transmission is the following when the SBS configuration [CPE] bit is set:

Target address (write) -> SMBus Command-> Least significant byte -> Most significant byte -> PEC Byte.

For the I2C-based system, the package structure is the same, except the PEC byte is not used for I2C-based systems as there is no PEC enable options for the BQ25750 and no command (rather a register address).

Target address (write) -> Register Address-> Least significant byte -> Most significant byte.

I2C requires a register address whereas SMBus requires an SMBus command that implicitly addresses the correct registers. For multiple byte reads and writes, the SMBus requires the byte count to be transmitted (from target for reads and from host for writes) while I2C only requires the register address and data is transmitted or received (dependent on the read or write bit) until the stop condition. If the device has an 8-bit address and uses TI functions to read and write in I2C or SMbus, then a right shift by one needs to be performed. For more differences such as the clock speeds, data hold times, and DC specifications, refer to the SMBus Compatibility with an I2C Device Application Report.