SLUAA11B February 2020 – August 2021 BQ769142 , BQ76922 , BQ76942 , BQ76952
The SPI interface on the BQ769x2 family can be enabled in the Settings:Configuration:Comm Type register. When changing to SPI mode, the default SPI output logic voltage level is 1.8V since it is referencing the internal voltage regulator of the device. To change the logic level, the REG1 LDO should be enabled and programmed to the desired voltage level and the SPI Configuration register should be programmed to 0x60 to enable the MISO_REG1 bit. Next, the SWAP_COMM_MODE() subcommand should be executed. If using BQStudio, then BQStudio should be restarted so that it can detect the new communication mode.
Some versions of the device will be available that are pre-configured to SPI mode.For information on the different part numbers available, see the device-specific data sheet.
The following examples cover some of the same commands covered in the I2C examples. Some important notes on the SPI interface protocol (with CRC):
All of the examples include multiple writes for each transaction. This method is used by the EV2400 and BQStudio to verify that the commands have been successfully written. This is because some transactions are ignored by the device if the internal oscillator is not running (if the device is in SLEEP mode) or if the processor is busy. Once the data on the MISO pin (which should reflect the data previously written on MOSI) shows the correct data, then it is confirmed the packets have been written successfully. A more detailed description of the SPI interface is available in the device-specific Technical Reference Manual.
There are a couple of differences to be aware of when using the BQ769x2 family in SPI mode versus I2C mode. While I2C mode supports block writes and reads, SPI mode supports only single byte transactions. While I2C mode supports clock stretching for direct commands, SPI mode does not have this feature so it is important to be aware of the direct command timing in addition to subcommand timing.