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.

DFI read

Other Parts Discussed in Thread: BQEVSW, BQ27510-G3, BQ27500, BQ27510, BQSTUDIO

Hi,

We need to read the dfi file from dataflash of BQ27510-G3 chip.

Where we get the source code for this?

Please help.


Regards,

Anoop

  • Hello Aju,

    You can use bqEVSW for bq27510-G3 and extract the DFI file from the gauge. On bqEVSW go to the bqEASY tab and manually navigate to step #3, Calibrate, where step 3F corresponds to reading the DFI from the device. Please ensure the device is unsealed and in full access to be able to extract the DFI file.

    Thanks.

  • Hi,

    Thanks for reply.

    We need to read the dfi file from data flash of BQ27510-g3 chip from a microcontroller without using bqEVSW software.

    For that , we need to implement c code by referring  read data flash image flowchart from "Data Flash Programming and Calibrating bq27500 Gas Gauge(SLUA440)" document

    Our query is that any sample C code availabe with ti to read back dfi file from the data flash of  BQ27510-G3.If not ,can we refer above document to implement this logic?

    We already flashed .dfi file size of 1025 bytes in the dataflash of BQ27510-g3 chip

    We are trying to read this file from data flash and compare with the .dfi file of size 1025byte.

    From the above documents,We understood that data flash has a size of 1548 bytes(0x06C0).So how we compare these files of different size.

    Our motive is to ensure and crosscheck that dfi file is properly written in data flash.

    Please help.

    Regards,

    Anoop

  • Hi Anoop,

    The flashstream format is a text script with i2c commands that allow you to parse the data on the chip. There are checksums and compare commands that ensure the integrity of the data being parsed on the chip. Have you review the flash stream format document? See attached.

    7776.slua541.pdf

  • Hi,

    Thanks for reply.Wil check that.

    we see a difference in the ROM mode exit command in below documents

                    In document SLUA449F( Going to Production with the bq275xx), see 0x08 command to exit ROM mode

                    In document SLUA440(Data Flash Programming and Calibrating bq27500 Gas Gauge)see 0x0F command to exit ROM mode

    Can you please clarify?

  • Hi
    0x08 to exit ROM mode.

    thanks
    Onyx
  • Hi,

    We left the attempt to read entire dfi file because it need to put the chip in ROM mode.It may increase the error rate.

    So is there any other mechanism to verify that proper dfi is written in the BQ27510G3 data flash?

    If yes,please share the details.

    Regards,

    Anoop

  • programming the dfi is done in rom mode. After programming the chip before exiting rom mode, you can read back the entire data flash and compare it to what you programmed to verify integrity of the data programmed.
    thanks
    Onyx
  • Hi,

    We sealed the BQ27510 chip.But we cannot unseal it.

    Please find the steps that we done for sealing and unsealing

    1.To seal the device,send 0x0020 to control register.And the device went to sealed mode.

    2.To unseal the chip,we put 0x0414 and 3672 into the control register.But the device cannot unseal.And we cannot access to data flash areas after unseal.

    What we can do to access the dataflash again?

    Regards,

    Anoop

  • Are 0x0414 and 0x3672 the keys that you used to seal the device?
    If so, please swap the byte order to 0x1404 and 0x7236 and try unsealing again.

    See chapter 4.4 in the TRM (www.ti.com/.../sluua97.pdf): "The order of the bytes entered through the Control( ) command is the reverse of what is read from the part"
  • Hi,

    We do not use any key for sealing.

    We just send 0x0020 to control register.

    So How can we unseal the BQ27500 chip?

    We already tried with 0x0414 and 0x3672 and swap the byte order also as you said

    Please help.

    Regards,

    Anoop

  • Hi,

    We have one more query,
    As per the DFI write flow chart(Doc:SLUA449F(Going to Production with the bq275xx),Page no:10),
    By reading the flash register 0x66,we can check the data integrity.
    So this command can used to verify the data flash is corrupt or not
    Please help

    Regards,
    Anoop
  • Please use the guide in chapter 4.1 from the bq27510-G3 TRM instead of SLUA449F to access the data flash. You can use the block checksums to verify integrity.

    www.ti.com/.../sluua97.pdf

  • Please try 0x8000 and 0x8000 or 0x0080 and 0x0080
  • Hi,

    In BQ27510 chip,there is a command to know the chip in selaed or unsealed mode(SS bit in control status register)

    Is there any similar command available in this chip to know the chip in ROM mode(Data flash access mode) or normal mode(battery monitoring mode) 

    Regards,

    Anoop

  • The device address is 0x16 in ROM mode and 0x44 in normal mode so you can use the device address to check mode.
  • Hi,

    Thanks for reply..

    For bq27510 chip,We are using battery monitor i2c address 0xAB for read operation and 0xAA for write operation(#define BMON_I2C_ADDRESS    0x55)

    And using dataflash i2c address 0x17 for read operation and 0x16 for write operation(#define DFI_FLASH_I2C_ADDRESS 0x0b)

    But we cannot understand how we get 0x16 and 0x44 device address.Please clarify.

    Regards,

    Anoop

  • Sorry the 0x44 was a typo. I meant to write 0xAA. This address is the 8-bit extended I2C address so it's 0xAA/0xAB for data access. See 7.5.2.1 in www.ti.com/.../bq27510-g3.pdf. For ROM mode, the I2C base device address (8-bit) is 0x16.
  • Hi,

    Ok.We can use 0x16 device address for access in ROM mode.

    Which register in ROM mode we read and crosscheck to verify that we are in rom mode

    Regards,

    Anoop

  • For device address 0x16.

    You can read register 0. If it ACKs then it is in ROM mode. You don't have to verify the actual content.

  • Hi,

    We are implementing DFI write algorithm based on SLUA449F( "Going to Production with the bq275xx") document for BQ27510-G3 chip.

    So we have following queries.

    1.Based on the Figure 8 Instruction Flash First Two Row Record and Erase Flow(We can see at page number 9 of SLUA449A),After flash erase, send DFI read command 0x66 with data 0x00(Before start writing image).Our issue is that this command return fails in some attempts of DFI write. What is the reason for this?

    2.Is restart is required for the device or chip after DFI write completion to work the bq27510 chip normal?

    3.We have one observation is that battery state of charge is reduced to 8%-9% after DFI write. Suppose take a full charge battery(soc 100%) for DFI write.After DFI write complete, its charge reduced to 92%.Whats is the reason for this?

    Please give clarification for above queries



    Regards,

    Anoop
  • hi,
    1. Try applying some 200ms delay to see if this helps.
    2. A reset is required. Bqstudio and bqEVSW does issue a reset command before exiting ROM mode.
    3. Did you run a successful learning cycle before extracting the DFI? The battery SOC is not supposed to drop like that if everything was done correctly.
    thank
    Onyx