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.

BQ27542-G1: BQ27542-G1 doesn't exist from rom mode but i2c write didnot show any failure

Part Number: BQ27542-G1
Other Parts Discussed in Thread: EV2400, BQSTUDIO

Hi ,

I m using bq27542-G1 fuel guage with Intel edison. I need to read the .bqfs file and then update the firmware of fuel guage. 

I tried unsealing the device, then entering rom mode, then writing some values as given in .bqfs file(didn't write full file) and then exited from rom mode. I m using i2c mode in this

The first time, when i programmed, everything was working fine. 

But after exiting from rom mode, device is not responding for its normal address, ie 0x55. Tried power cycle device, but still it is in rom mode

I executed i2cdetect  command and device address shown is 0x0B(which is the address of fuel guage in rom mode)

I am able to write in rom mode successfully.

What should i do to recover device from rom mode?? 

Should i use bqstudio?? i dont have EV2400 boards or anything like that.

  •   Please check and follow the sequence from bq27542-G1 TRM (Technical Reference Manual) page 111 figure B-5. "ROM Mode Exit Sequence in I2C or HDQ".

     Thanks!

    Phil

  • I am doing the exact same thing. But still device cannot come out of ROM mode.

    Question: Should i write the full bqfs file before exiting ROM mode?? Now i had performed only two  write operation.

  •   Yes. Here are some highlights: Once in ROM mode, the user test setup must be able to open the BQFS or DFFS file and perform each of the I2C or HDQ transactions in strictly the same order as given with the FlashStream file. Once completing all commands within the FlashStream file, the user test system sends the Exit ROM mode procedure (Figure B-5). At least a 250-ms delay must occur before attempting to proceed with I2C or HDQ communication to the target device using the I2C address 0xAA after exiting ROM Mode.

    Phil

  • Hi Phil,

    I wrote some C code to perform i2c transactions. Now i m parsing whole bqfs file. Now another problem arises is i m getting check sum error.
    W: 16 00 04 00 00 00 83 DE
    W: 16 64 65 01
    X: 200
    C: 16 66 00
    W: 16 00 02 00 00 00 EA FF 33 A0 FA 33 12 FB 33 8C FE 33 D1 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 01 02 3F 58 CB 33 FB 00 08 01 00 00 00 00 00 FF AA 0E FB A7 0E FF A6 0E FF A1 0E FF A0 0E FE A3 0E 62 A2 0E D2 FF 3A FF A1 0E 63 A0 0E FF A3 0E
    These instructions are going well. From the next write (ie from W: 16 64 D5 35), i m getting i2c failure . Further write gives i2c failure.
    Further, In compare instruction, the read data is 0x02, instead of 0x00. I believe it is a checksum error.

    Similar issues has been reported before.
    e2e.ti.com/.../221507
    e2e.ti.com/.../158561

    Any suggestions please??
  • i2c write failure issue has been cleared. It was because i2c buffer size was 32 bytes. So when we write 96 bytes, buffer is overflowed and thus throwing off the whole program.

    But checksum error issue is still there. When i read the register (in compare instruction), it doesn't match with the value in bqfs file. Hope it is a checksum error. It happens for all compare instruction. Read data was 0x30, 0xff, 0x34 etc..
  • Any updates??

    i bought a new custom board and tried loading dffs file into it. Upto this command, W: 16 00 03 00 00 i2c write and checksum read was successfull. On the next command , W: 16 64 03 00 we got i2c failure (error : unspecified reason). So the custom code will perform Exit rom mode procedure.
    When we checked the address of the device, it was showing 0x0B. So we run a code that perform exit from ROM mode. Again we checked device address, and it gives 0x55.
    Again we tried loading the same code. First few times , it behaves as mentioned above
    Then it respond only to 0x0B address.
    What should we do next??
    Does this means that fuel gauge is bricked? if so, will it respond to any slave address?
    what procedure should we follow, so as to do this, without bricking fuel gauge?

    Thanks in advance
  • I need more time to study your case and will give answer as soon as I get it.
    Thanks!
    Phil
  • Hi Pavitra,

    How did you extract the flashstream file. Did you use bqstudio to do the extraction.

    Are you able to program the flash back on the device using bqstudio?

    What firmware  version of EV2300 or EV2400 are you using? you might need to update the firmware version.

    thanks

    Onyx

  • Flashstream file was provided by client. They used bqstudio.

    I dont have EV2300 and EV2400. Will try to get one and try above mentioned procedures.

    Is there any other method to verify ?

  • Hi Onyx Ahiakwo,

    I recovered bq27542 using EVM2400 and bqstudio . Now i am getting everything as expected.

    bq27542 firmware update usinf bqfs and dffs are successfully completed.

    Thanks