I am trying to write to Data Flash as described in section 5.5.1, Modify WRTEMP of OpConfigB Register, of SLUUA96. The Data Flash does not change after I follow the given procedure.
I am communicating to the fuel gauge from Ubuntu Linux through i2c-dev. I send the following i2c transfers with a 100us delay after each transfer:
Write 0, 0x14, 0x04
Write 0, 0x72, 0x36
Write 0x61, 0
Write 0x3e, 0x40
Write 0x3f, 0
(Wait at least 100 microseconds *)
Write 0x4b, 0xef
Write 0x60, 0x32
Write 0, 0x41, 0
(Wait at least 100 milliseconds)
Write 0, 0x20, 0
* At this point the values are:
0x40: 0x61
0x41: 0x67
0x42: 0x4
0x43: 0x2e
0x44: 0x0
0x45: 0x6e
0x46: 0x14
0x47: 0x1
0x48: 0x4
0x49: 0x0
0x4a: 0x0
0x4b: 0x6f
0x4c: 0x3c
0x4d: 0x9
0x4e: 0x0
0x4f: 0x14
0x50: 0x4
0x51: 0x0
0x52: 0x0
0x53: 0x0
0x54: 0x0
0x55: 0x0
0x56: 0x0
0x57: 0x0
0x58: 0x0
0x59: 0x0
0x5a: 0x0
0x5b: 0x0
0x5c: 0x0
0x5d: 0x0
0x5e: 0x0
0x5f: 0x0
0x60: 0xb2
The value in 0x4b changes after writing 0xef to that location. The value in 0x60 does not change.
Am I missing anything necessary to set the Data Flash values?
Thank you for your help,
Lyle