This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BQ27510: Issue entering ROM mode for calibration

Part Number: BQ27510
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 

  • Hi Rob,

    Have you reviewed our app note below? It has sample code that guides you on programming the flash stream file. Let me know if app note is not clear enough.

    thanks

    Onyx

  • Onyx,

    Yes I have that App note and understand what the flash stream file as asking to do with it's commands. However, after I follow the command to enter ROM mode, and write to address 0x16 I get a NACK. Should I be getting an ACK from the device in ROM mode? How can I test I entered ROM mode correctly?

    Thanks.

    Rob

  •  

    Using the GDK, Advanced Comm I2C tab, I am trying to duplicate exactly what the .df.fs tells to me to.

    Below is the .df.fs portion I am trying to duplicate (the very beginning):

    ;--------------------------------------------------------
    ;Verify Existing Firmware Version
    ;--------------------------------------------------------
    W: AA 00 01 00
    C: AA 00 10 05
    W: AA 00 02 00
    C: AA 00 00 04
    ;--------------------------------------------------------
    ;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
    ;--------------------------------------------------------
    ;Data Block
    ;--------------------------------------------------------
    W: 16 00 03 00 00
    W: 16 64 03 00
    X: 20
    C: 16 66 00

    Below see the screenshot of the Transaction Log, from GDK:

    Every command being sent to address 0xAA receives an ACK. The red commands, being sent to address 0x16 get a NACK back from the device. The writes are not implemented, and no data is sent back during the read/compare command. 

    I'm assuming the ROM mode I2C address is incorrect. Can you please look into this?

    There is also the possibility that, despite the NACK, the writes are working, but if that is the case, I can never actually execute the read/compare command, as I need to get data back from the device.

    Also, it appears the Enter ROM command works (it's not red, a NACK is not received). However, when I send a dummy command (W: AA 00 01 11) that is not mapped to a valid command in the datasheet, it also appear black and say it was executed successfully. Therefore, I cannot rule out the fact that the Enter ROM command is indeed incorrect. 

    Can you please help me figure out why these ROM mode commands are not working?

    Thanks,

    Rob

  • ,

    Using a program to probe all the available devices on the I2C communication bus, I can confirm that no new addresses appear after the Enter ROM command. I can also confirm that the address of the BQ27510 (7b 0x55) does not change. Something is incorrect with either the Enter ROM command, or the ROM mode I2C address.

    Please advise, thanks.

    Rob

  •  

    Do you have any update on these issues?

    Thanks,

    Rob

  • Hi Rob

    The addresses are different in rom and firmware mode-AA for firmware mode and 16 for RoOM. The fact that you are getting an NACK after sending the commands to the ROM address means that you are not in ROM mode. Check to make sure your device is not sealed as that is the main reason you will not be able to enter ROM mode. Can you take a screen shot of the register window and attach here. Are you able to program the flashstream file using bqstudio?

    thanks

    Onyx