hello,
I'm developping a driver in C language to control a fuel guage BQ27510.
I have no problem to read the standard/sub/extend command and to write the standard command. but I can't write data on "data flash" with the extend command.
the function is this one :
if(!(FuelGauge_WriteExtendedCmd(BQ27510_EXTCMD_BLOCKDATACONTROL, &dataCtrl, 1)))
return false;
if(!(FuelGauge_WriteExtendedCmd(BQ27510_EXTCMD_DATAFLASHCLASS, &classId, 1)))
return false;
if(!(FuelGauge_WriteExtendedCmd(BQ27510_EXTCMD_DATAFLASHBLOCK, &Block, 1)))
return false;
ValCheckSum = FuelGauge_CalcChecksum (DataBlock, sizeWrite);
if(!(FuelGauge_WriteExtendedCmd(BQ27510_EXTCMD_BLOCKDATA, DataBlock, sizeWrite)))
return false;
if(!(FuelGauge_WriteExtendedCmd(BQ27510_EXTCMD_BLOCKDATACHECKSUM, &ValCheckSum, 1)))
return false;
with : dataCtrl = 0x00, Block = 0x00, classId = 58, sizeWrite = 32 and DataBlock is my data on 32 bytes. the IC is in full access mode.
I try to write on the manufacturer Info block A but it doesn't work.
Could someone help me to find the mistake ?
thanks