Other Parts Discussed in Thread: BQSTUDIO
Hello,
I'm trying to implement the .df.fs file I got as an output of my learning cycle into my embedded system. I understand how the file is interpreted, but am having issues entering and reading/writing in ROM mode in order to read and write to offsets. I'll preface this post by stating that I have our embedded system communicating properly with the fuel gauge in normal (non-ROM) mode and every command read and write is working. From my .df.fs file, I have this command to implement:
;Go To ROM Mode
;--------------------------------------------------------
W: AA 00 00 0F
X: 1000
Which is interpreted to mean: i2c write to address 0xaa, offset 0x00, the two data bytes 0x00 and 0x0F. I can perform this command just fine (it's not much different than the other Battery Control commands). My first question is how do I know I entered ROM mode? If I do a Standard Command such as Voltage (0x08, 0x09) should I get a response? I do get a response, which makes me think I am not entering ROM mode correctly. Are there a command I can perform to ensure I entered ROM mode correctly?
After this command I proceed to my first ROM mode command:
W: 16 00 03 00 00
I2C write to address 0x16, offset 0x00, the three data bytes 0x03, 0x00, and 0x00. Is the address 0x16 an eight bit address? I'm assuming so, because 0xAA in the previous example is the eight bit address of the actual fuel gauge 7-bit I2C address 0x55. When I perform this I2C write (or a read) to address 0x16, I get a NACK from the fuel gauge.
A little assistance would be appreciated. Thank you,
Rob