I am developing a power control unit which permanently checks the available battery capacity of an Li-Ion battery pack. The main CPU is a LPC 4357. The BQ34Z100 is connected via I2C interface. During the production process the CPU will get a command to write the Golden Image to the BQ34Z100. The Golden Image (df-file) is part of the LPC4357 code. The original TI-Golden Image file is converted by a script to a c-file.
For writing the Golden Image the code provided in SLUA801 is taken. The adaption to the low layer drivers is implemented in the file flashStreamParserLib.c which is included in the original TI gauge.c file.
Standard access to the registers seams to be no problem, so this driver interface seams to be ok.
Writing the original TI-DF file by BQ-Studio works fine. (The BQ-Studio does not provide a trace function, so the actual behavior of the BQ-Studio is a little bit hidden) Writing the Golden Image by the LPC4357 leads to a stop after the first line written. The memory location 0x66 which always should be 0x00 indicates 0x02. This seams to be an error indication. I searched the documents for the error codes specified for memory location 0x66 but with no success.
After the BQ34Z100 indicated the error, it dies. The BQ34Z100 does no longer answer commands sent via I2C. This makes the debu
Please let me know the document where the “ERROR-REGISTER 0x66” is described. Also, all other ideas are welcome.
Trace output of my software:
flashStreamParserLib.c: processing line 13 (with 15 characters):<\r><\n>
W: 16 64 03 00<\n><\r><\n>
flashStreamParserLib.c: processing line 14 (with 6 characters):<\r><\n>
X: 20<\n><\r><\n>
flashStreamParserLib.c: processing line 15 (with 12 characters):<\r><\n>
C: 16 66 00<\n><\r><\n>
flashStreamParserLib.c: processing line 16 (with 309 characters):<\r><\n>
W: 16 00 02 00 00 00 EA FF 33 B1 FA 33 6C FB 33 95 FE 33 AD FE 33 FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F 16 00 3F 58 CB 33 C3 00 08 11 00 00 00 00 00 FF AA 0E FB A7 0E FF A6 0E FF A1 0E FF A0 0E FE A3 0E 61 A2 0E DE FF 3A 65 FF 3A E2 FF 33 FF AF 0E<\n><\r><\n>
flashStreamParserLib.c: processing line 17 (with 15 characters):<\r><\n>
W: 16 64 1A 37<\n><\r><\n>
flashStreamParserLib.c: processing line 18 (with 5 characters):<\r><\n>
X: 2<\n><\r><\n>
flashStreamParserLib.c: processing line 19 (with 12 characters):<\r><\n>
C: 16 66 00<\n><\r><\n>
Read: 02<\r><\n>
->difference in compare<\r><\n>
FAILED