Part Number: BQ27Z561
Other Parts Discussed in Thread: BQSTUDIO, EV2400
Hi,
I have few of questions regarding programming bq27z561 using micro-controller. And for that i have stored all four files generated by bqstudio in MCU flash. My overall aim is to get accurate battery information while reading this device.
I am following a method mentioned in Appendix A of slu801.pdf to program bq27z561 via MCU.
Now,
1. For bq.fs when slave device enters in ROM mode I2C operations are performed on slave address 0x16 (0x0B on physical line) but those transactions are failing.
For example,
;--------------------------------------------------------
;Unseal device
;--------------------------------------------------------
W: AA 00 14 04
W: AA 00 72 36
W: AA 00 FF FF
W: AA 00 FF FF
X: 1000
;--------------------------------------------------------
;Go To ROM Mode
;--------------------------------------------------------
W: AA 00 00 0F
X: 1000
(Up to above stage for bq.fs MCU is writing I2C commands to slave device successfully but after device goes in ROM mode all I2C transactions are failing)
write operation in file : W: 16 05 12 00 00 10 00 07 C1 E5 66 19 67 60 67 9B 03 C1 9B FF C0
MCU is writing to slave address 0x16 with data "00 00 10 00 07 C1 E5 66 19 67 60 67 9B 03 C1 9B FF C0" on address "0x1205" (Is this operation correct?)
Can i get some explanation about format for this line : W: 16 05 12 00 00 10 00 07 C1 E5 66 19 67 60 67 9B 03 C1 9B FF C0? like 16 is slave address what is "05 12" .. and rest of the bytes ?
2. For gm.fs file when it comes to compare operation, data from gauge does not match with the gm.fs file data for some lines.
for below operation highlighted bytes are not matching with my device.
;--------------------------------------------------------
;Verify Existing Firmware Version
;--------------------------------------------------------
W: AA 3E 02 00
C: AA 3E 02 00 15 61 00 04 (data matches with my device)
Also, some of the lines in gm.fs file for comparing that does specific address is written correctly is failing.
;--------------------------------------------------------
;Data Block
;--------------------------------------------------------
W: AA 3E C0 42 AC C9 2F 1B 00 00 2F 1B D9 BB 8A 72 AA 9C 8C 74 B0 04 DB FE 28 02 B9 F4 EF 11 B7 2D B7 2D 00 00 (this operation is performed successfully)
W: AA 60 F2 24 (this operation is performed successfully)
X: 200 (after this delay)
W: AA 3E C0 42 (this operation is performed successfully)
C: AA 3E C0 42 AC C9 2F 1B 00 00 2F 1B D9 BB 8A 72 AA 9C 8C 74 B0 04 DB FE 28 02 B9 F4 EF 11 B7 2D B7 2D 00 00 (data highlighted does not match when i read 42C0 address again after above write operation on 4000 address) in this case i got read data as : b8 00 00 20 34 2e 00 20 10 00 00 00 21 00 00 00 bf 8b 00 ....
Am i missing something here? Is it necessary that all the addresses mentioned in gm.fs file must match correctly to achive accurate data for battery info?
3. Is there any sequence i have to follow for programming bq27z561? like among these four files which file should be executed first / step by step? Any prerequisites before each files?
4. Can i get some help to understand file format for .srec & df.fs file such that i can execute I2C write command on bq27z561 slave device?
Note : I am using bqstudio generated gm.fs, bq.fs, df.fs and .srec files (as attached below in zip file) using bq27z561 EVK board.
