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.

BQ40Z50: R3 firmware, system driver error

Part Number: BQ40Z50

Tool/software:

Our customer tried to read 0x0002 firmware version from the gauge, they're using the existing driver from e2e forum but get an read error.

Is there any idea about this? thanks.

fg_write_word(bq, bq->regs[BQ_FG_REG_MBA], 0x0200), succeed,

fg_mac_read_blockFailed to send firmware version subcommand:-5

the driver they're using:

int ret;

    u8 buf[36];

    ret = fg_write_word(bq, bq->regs[BQ_FG_REG_MBA], FG_MAC_CMD_FW_VER);

    if (ret < 0) {

        bq_err("Failed to send firmware version subcommand:%d\n", ret);

        return ret;

    }

    mdelay(2);

    ret = fg_mac_read_block(bq, bq->regs[BQ_FG_REG_MBA], buf, 11);

    if (ret < 0) {

        bq_err("Failed to read firmware version:%d\n", ret);

        return ret;

    }