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.

BQ40Z50-R2: How to write to Data Flash using my own software?

Part Number: BQ40Z50-R2
Other Parts Discussed in Thread: BQ40Z50, BQSTUDIO

Hi,

We are in production and we have to modify various dataflash data but using our own

automated software.

There is a document SLUA743 which shows using the BQ Studio to access to the flash data.

I have tried it using BQ Studio and it works, BUT when using my own software following the same

procedure, it does not work.  I am using the Microchip MCP2221 I2C/SMBus interface. 

I was able to use this chip to talk to BA34z100 and other TI device that supports I2C bus.

For example, in order to access to Manufacture Data, address 0x406C, the instruction is:

Write (0x44, 6C, 40) with 0x44 is the base address, then read (0x44, (32 bytes)), but I am reading back what seems to be

false data.  My guess is I am not reading back the correct address.

I am able to communicate with the BQ40Z50 since I am getting proper acknowledge and

there is no error.  It's just that I am not getting the proper data.

My guess is before using the command 0x44 to read the data flash, there is some other

commands I need to execute but it is not described in the instructions of the document SLUA743.

Thanks.

  • Could someone help?  Thanks.

  • Hi,
    The protocol for bq40z50 should be standard SMBus, and from your description looks like you are sending the correct commands., so I am not sure why the returned data is not correct. If you can provide a log of the commands and response it may be useful to debug this further.
    Another way you could resolve this issue would be to use a bus sniffing tool like the Total Phase Ardvark and execute the commands in bqStudio and duplicate them on your processor.
    The only thing to note is that bqStudio does use PEC and the LAST byte will be the PEC. You don't have to use PEC, but it is recommended.
    Regards,
    Swami