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.

BQ76940: BQ76940006DBTR

Part Number: BQ76940

Hi there. I designed a PCB based on TI reference for BQ76940. The Altium designer project is attached.

As you can see, I'm trying to host the chip with an stm32f103 microcontroller. Since I didn't find any libraries compatible with my MCU and IDE (Keil V5) I tried to rewrite the Arduino library by SparkFun. I successfully managed to connect to the chip via I2C and read the SYS_STAT register. Another thing that you should know is that I wasn't so sure of my design so I didn't want to test the board with a real LFP battery pack since they are expensive and dangerous! So I used 15 75 ohm resistors in series connected to a 27V power supply and I am planning to change the OV and UV threshold to match my "Battery simulator" and then test the board and the program. The problem I have is with the DEVICE_XREADY situation! No matter what I do, I get 0x20 as soon as the chip is booted and I can't reset the bit. The datasheet indicates that DEVICE_XREADY happens due to excessive transients in the circuit which I don't see anything to cause that So I only can think of three things:

1. The code is not properly written to write a register (I used the HAL library standard functions and I had to use the address 0x30 instead of 0x18 to connect to the chip, I attached the code too) here is what I do:

while(1)

{

RegisterAddress[0] = bq796x0_SYS_STAT;
recievedPack[0] = 0xDF; //Some random number in this format xx0x-xxxx
HAL_I2C_Master_Transmit(&hi2c2, bqI2CAddress, RegisterAddress, sizeof(RegisterAddress), MAX_I2C_TIME); //bqI2CAddress = 0x030 (="0x18")
HAL_I2C_Master_Receive(&hi2c2, bqI2CAddress, recievedPack, 1, MAX_I2C_TIME); //MAX_I2C_TIME = 10
HAL_UART_Transmit(&huart2, recievedPack, 1, 10); //Here I receive 0x20 when I boot the chip with the boot switch
if(recievedPack[0] & bq796x0_DEVICE_XREADY) //bq796x0_DEVICE_XREADY = 1 << 5
{
HAL_Delay(1000); //Wait for a sec then try to rewrite the SYS_STAT register
recievedPack[0] &= ~(bq796x0_DEVICE_XREADY); //Write 0 in the DEVICE_XREADY bit : xx0x-xxxx
HAL_I2C_Master_Transmit(&hi2c2, bqI2CAddress, RegisterAddress, 1, MAX_I2C_TIME);
HAL_I2C_Master_Transmit(&hi2c2, bqI2CAddress, recievedPack, 1, MAX_I2C_TIME);

//here I tried to use the "write without the repeated start" mode but I got nowhere


//recievedPack[1] |= bq796x0_DEVICE_XREADY;
// recievedPack[1] &= ~(bq796x0_DEVICE_XREADY);
// recievedPack[0] = bq796x0_SYS_STAT;
// HAL_I2C_Master_Transmit(&hi2c2, bqI2CAddress, recievedPack, sizeof(recievedPack), MAX_I2C_TIME);

}

HAL_Delay(200);

}

2. The resistors in series don't simulate the battery pack good enough. 

3. The chip is damaged and I should change it with a new chip. (Actually, this might be possible since the LDO voltage is 3.8! Is there any way I can be sure of it?)

Any hint on what to do or how to find the source of the error is appreciated. 

Thank you, 

Best regards, 

Arash.BQ76940.rar

  • your question will be answered here over the weekday.
  • Hi Arash,
    The 75 ohm resistors should work well for a voltage divider for simulating cells, but will get hot. 27V for 15 cells only gives 1.8V per cell. The part should still wake up and operate, but note that it is below the recommended operating voltage per cell.
    XREADY can be caused by noise disrupting the communication during normal operation, but XREADY at boot typically indicates the part did not start up completely. Check application of power to the power pins, VSS, VC5X (those 2 are likely good since you can communicate), VC10X and BAT.
    After the boot attempt there should be 3.3V across the capacitors for CAP1 (this is probably OK since you can communicate), CAP2, and CAP3. If one is missing, this will explain the permanent XREADY.
    XREADY can also be caused by residual voltage on the TS2 or TS3 pins. Be sure they are pulled down to the local group reference with a thermistor or similar pull down resistance.

    1. To clear the XREADY or other status register bit, write a 1 to the bit. See the bq76940 data sheet note under Table 7-3. SYS_STAT (0x00). Again if power is not correct it will not be able to clear.
    2. The resistors should be good. Simulation resistors of 100 to 1000 ohm are common, the lower resistance is better but they do generate a lot of heat.
    3. 3.8V is above the 3.6V abs max and the part could be damaged. It may continue to function but you should replace it before trusting its performance. You should find the cause of the high voltage. If your MCU has pullups on SCL and SDA to both 5V and REGOUT, the 5V supply will pull up the REGOUT voltage. Since SCL and SDA have 3.6V abs max use the REGOUT pull ups if suitable or a level shift circuit as needed. Check the system design for other situations like this which might cause a similar situation. Your design may not have a 5V supply in which case check for other leakage paths, or excess voltage to REGSRC.