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.

BQ27421-G1: bg27421 I2C does not respond

Part Number: BQ27421-G1


Coulometer debugging, I2C interface, host sent data to the coulometer, but the coulometer did not respond, please help to check whether the sent instructions are correct and what may be the reason, thank you.

void FuelGauge_GpioInig(void)

{

s_IoMuxSetMode(FG_SCL_GPIO, i2c1_SCL_OUT, SIG_OUTPUT, IO_NOPULL);

s_IoMuxSetMode(FG_SDA_GPIO, I2C1_SDA_IN,  SIG_INPUT,  IO_NOPULL);

s_IoMuxSetMode(FG_SDA_GPIO, i2c1_SDA_OUT, SIG_OUTPUT, IO_NOPULL);

//100kHz

s_I2CConfig(I2C1, 100000);

}

void FuelGauge_Test(void)

{

u8 data[3];

u8 dataBuf[2]={0};

u32 addr = 0x55;

data[0] = 0x00;

data[1] = 0x01;

s_I2CSend(I2C1, addr, data, 2);

s_I2CRecv(I2C1, addr, dataBuf, 2);

DBG_HEX("FW_VER:", dataBuf, 2);

 

data[0] = 0x04;//reg

data[1] = 0x05;

s_I2CSend(I2C1, addr, data, 2);

s_I2CRecv(I2C1, addr, dataBuf, 2);

DBG_HEX("Voltage:", dataBuf, 2);

}