SLUUD50 October 2024 BQ27Z758
Accessing data flash (DF) is only supported by the AltManufacturerAccess() by addressing the physical address.
To write to the DF, send the starting address, followed by the DF data block. The DF data block is the intended revised DF data to be updated. The size of the DF data block ranges from 1 byte to 32 bytes. All individual data must be sent in little endian.
Write to DF example:
Assuming: data1 locates at address 0x4000 and data2 locates at address 0x4002. | ||||
Both data1 and data2 are U2 type. | ||||
To update data1 and data2, send a block write with command = 0x3E | ||||
block = | starting address + DF data block | |||
= | 0x00 + 0x40 + data1_LowByte + data1_HighByte + data2_LowByte + data2_HighByte | |||
To read the DF, send a block write to the AltManufacturerAccess() followed by the starting address, then send a block read to the AltManufacturerAccess(). The return data contains the starting address followed by 32 bytes of DF data in little endian.
Read from DF example: | ||||
Taking the same assuming from the read DF example, to read DF: | ||||
a. Send the write block with command 0x3E, block = 0x00 + 0x40 | ||||
b. Send the read block with command 0x3E | ||||
The returned block | = a starting address + 32 bytes of DF data | |||
= 0x00 + 0x40 + data1_LowByte + data1_HighByte + data2_LowByte + data2_HighByte.... data32_LowByte + data32_HighByte | ||||
The gauge supports an auto-increment on the address during a DF read. This greatly reduces the time required to read out the entire DF. To trigger auto-increment on the address during DF reads, follow the example above, but read from AltManufacturerAccess() through MACDataLength() for a total of 36 bytes. If another read block is performed starting from AltManufacturerAccess(), the gauge returns another 32 bytes of DF data, starting with address 0x4020.