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.

BQ27542EVM: BQ27542-G1

Part Number: BQ27542EVM

Tool/software:

Hi,

    I want to read data from Manufacturer Info Block A use below function, But i only get 0x00 and 0xFF,

So,how can i get correct data from Manufacturer Info Block A, should I do something else before I read sn?

thanks!

/*
return sn string ,format char *[]
example sn=2100013314211A04
*/
static int bq27xxx_battery_read_sn(struct bq27xxx_device_info *di ,char *bat_sn)
{
int ret;
ret = bq27xxx_read_block(di, BQ27XXX_DM_DATA, bat_sn, BQ27XXX_DM_SZ);
if (ret < 0){
goto out;
}

return 0;

out:
dev_err(di->dev, "bq27xxx_battery_read_sn(): bus error reading chip memory: %d\n", ret);
return ret;
}

  • TI doesn't maintain open source drivers so I can't comment on how the code that you use works.

    If you want to read Manufacturer Info Block A from the bq27542, you'll have to perform the following steps:

    1. Unseal the gauge. If the gauge is sealed, you'll have to write the unseal keys (which are secret and not known by TI but chosen by the customer for the golden image) to Control(). See 16.2.3 in the TRM https://www.ti.com/lit/ug/sluub65b/sluub65b.pdf

    2. Write 0x3A to command 0x3E and the Block number (0 = Block A, 1 = Block B) to command 0x3F.

    3. Read 32 bytes from command 0x40++. This is the data from Manufacturer Info Block A or B depending on Block number.