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.

BQ76952: Stacking Devices in SPI Multi-slave Configuration

Part Number: BQ76952

Ques 1: Can 2 or more ICs be stacked as multi-slaves using SPI interface?

Ques 2: Is Reg1 LDO required to be ON for SPI to work? That is, is SPI block of IC being powered by internal 1.8V regulator or REG1/REG2?

Problem:

I am stacking two BQ76952 ICs and interfacing them to an MCU using SPI.

IC-1 is powered from cells 1-16. IC-2 is powered from 17-19.

Both ICs are interfaced with MCU using a single SPI module and dedicated CS pins. IC-2 is connected through digital isolator.

MCU selects one IC at a time by setting corresponding CS low and sends commands.

The problem is that the MISO line is permanently held HIGH on MCU side and both the ICs cannot communicate. Since I am using series resistors on SPI lines, I can see output waveform on MISO pins of both the ICs, but MISO pin of MCU is held HIGH.

I had assumed that when a SPI slave device is de-selected (CS goes HIGH), its MISO goes into high impedance state so that other slaves can communicate. This is not happening here.

Kindly help with this issue.

I was reluctant to use I2C because of high cost of I2C isolators involved. I also had existing inventory of unidirectional isolators with me that are being used with SPI. My end product is a low cost device.

  • Dear Mrinal,

    I will test this in our labs to see if the device idles high but from what I can see with the datasheet, it looks like it should idle high.  Like I said though, I will confirm whether or not this is valid on a testbench. In the meantime, would you be able to send a diagram of you SPI line or the schematic of the circuit so I could get a better understanding of what the SPI lines look like?

    If it does indeed idle high, a possible solution would be to insert an tri-state driver in series with MISO and tie the control of the it to CS so it would only pass through the value when CS goes low. How much do your SPI isolaters cost (assuming they weren't pre-purchased) versus a typical I2C isolator?

    To answer your questions:

    1. Yes, it should be possible to stack both I2C or SPI
    2. REG1 isn't required to be enabled for SPI to work. This controlled by setting bit 6 of Settings:Configuration:SPI Configuration. When bit 6 is high, it uses REG1 as an output for driving MISO. When it is set to 0, the device uses an internal 1.8V.

    Best,

    Asher Nederveld

  • Thank you for the reply, Asher.

    I have ANDed the MISO of both the ICs and feeding it to my MCU. Its working.

    I have attached a rough block diagram of my earlier connection. (All resistors are 100 ohm) The ICs were pulling their MISO lines HIGH when un-selected. ANDing them solved the issue.

    The cost of 2-channel unidirectional isolators that we have in stock was about $0.2. We had to use 2 such ICs, so total cost is $0.4.

    I2C isolators with the same vendor and same quantity are $1+, more than double, though not very much if SPI issue was unsolvable. We were already using AND ic in our design, so it solved the issue without changing any component. In addition to the tri-state driver, as you suggested, another work around could be to add MOSFETs to convert MISO lines of the ICs into open-drain configuration and then connecting to MCU with a pull-up.

  • Dear Mrinal,

    After testing the device's SPI, it unfortunately does seem that it defaults to idle high. However, I am glad to hear that ANDing the two signals is able to solve the probelm. I hope this doesn't cause too large of an increase of price in your design. That's true, you could use the signals to drive a FET and that would work as well. It'd also probably be cheaper than using a tri-state driver.

    Generally with the BQ769x2, the I2C is recommended for better performance due to having clock stretching and multi-byte reads/writes, but if cost is an issue, I can understand why you would want to use SPI. Besides the hiccup with the MISO idling high, your set-up from the diagram looks good to go. Are you having any other issues with the communication?

    Best,

    Asher Nederveld

  • No. So far, communication is working fine. I am able to get all cell readings.