SLUUCP8 June 2024 BQ41Z50
Accessing data flash (DF) is only supported by the ManufacturerBlockAccess() by addressing the physical address. Numeric data items in DF are in little endian byte order.
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 to DF. The size of the DF data block ranges from 1 byte to 32 bytes. All individual numeric data items must be sent in little endian byte order.
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 an SMBus block write with command = 0x44 | ||||
block = | starting address + DF data block | |||
= | 0x00 + 0x40 + data1_LowByte + data1_HighByte + data2_LowByte + data2_HighByte |
To read the DF, send an SMBus block write to the ManufacturerBlockAccess(), followed by the starting address, then send an SMBus block read to the ManufacturerBlockAccess(). The return data contains the starting address followed by 32 bytes of DF data; items are in little endian byte order.
Read from DF example:
Assuming: data1 locates at address 0x4000 and data2 locates at address 0x4002. | ||||
a. Send SMBus write block with command 0x44, block = 0x00 + 0x40 | ||||
b. Send SMBus read block with command 0x44 | ||||
The returned block | = starting address + 32 bytes of DF data | |||
= 0x00 + 0x40 + data1_LowByte + data1_HighByte + data2_LowByte + data2_HighByte.... data31_Byte + data32_Byte |
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. Continue with the read from the DF example. If another SMBus read block is sent with command 0x44, the gauge returns another 32 bytes of DF data, starting with address 0x4020.