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.

Programming the bq27510-G1

Other Parts Discussed in Thread: BQ27510-G1, BQ27541

Hi-

I'm attempting to program a bq27510-G1 chip with new data.

I've created .bqfs and .dffs files with flashstream and am attempting to program the .dffs file into a device. All goes well through the first 221 lines of the file, then near the end, the last compare fails. Here's what the compare record looks like:

C: 16 04 A6 A7 A4 F9

The actual data returned by the device is:

0xda, oxfe, 0x46, 0x55

... obviously not a good compare.

Any idea what I'm doing wrong?

Thanks

jim

 

  • I'm having a similar problem but for the bq27541.  My program fails very close to the end at a compare command:

    For dffs line "C: 16 66 00", I read back a 0x02 instead of 0x00.  I'd appreciate any hints.

    Thanks.

  • Marius,

    A response of 0x02 means the flash write failed.  You can get more info on what is happening in the Flashstream file by referring to SLUA449.

  • Any ideas of why the writing failed?  I can otherwise talk successfully to the part, and programming the first 217 lines of the dffs file works.  The failure seems to appear shortly after the first long write in line 209. See below (section of dffs file starting at line 209, for bq27541 v200.  The dffs file was generated from the default bq27541 v200 .senc file):

    W: 16 04 59 A2 0E BD A5 0E 0B A4 0E CA FF 3A FE A1 0E 6B A0 0E FE A3 0E 6B A2 0E CA FF 3A C2 FF 3A D6 FF 33 FF AF 0E 01 4F 03 3F 11 0C CD FF 30 D4 FF 35 2F 10 0C D4 FF 35 FF FF 23 01 AF 14 01 4F 03 3F 11 0C C5 FF 30 CC FF 35 2F 10 0C CC FF 35 FF FF 23 FF DF 0B C4 FF 33 69 F2 39 FE AF 16 E5 FF 00
    W: 16 64 A2 2E
    X: 2
    C: 16 66 00

    The writes seem to work, but there seems to be a conflict with what I read elsewhere (file "I2C and HDQ update using bqfs.pdf", bundled with the flashstream program), that a write line can be at most 96 bytes long.  Well, in this case flashstream output a line that is 97 bytes long, not counting the first byte - device address 0x16).

    My program, after putting the device address on the bus sends all 97 remaining bytes.

  • That line does actually have only 96 bytes.  Don't forget that the initial 04 is actually the register to which you are writing the subsequent 96 bytes, so don't count it.

    On which line does the fail actually occur for you?  Is it the compare on line 212, line 218, or 222?

  • Fails on line 212:  "C: 16 66 00"

  • Is there a way to split the 1+96 bytes long write from line 209 into 3 writes of up to 33 bytes long?  The driver that came with the I2C bridges used in our test equipment has a buffer of 33 bytes.  Therefore, the 96 byte write is split into 3 sections with the device address being sent between them.

  • Yes, you can. I'm using your example:

    W: 16 04 59 A2 0E BD A5 0E 0B A4 0E CA FF 3A FE A1 0E 6B A0 0E FE A3 0E 6B A2 0E CA FF 3A C2 FF 3A D6 FF 33 FF AF 0E 01 4F 03 3F 11 0C CD FF 30 D4 FF 35 2F 10 0C D4 FF 35 FF FF 23 01 AF 14 01 4F 03 3F 11 0C C5 FF 30 CC FF 35 2F 10 0C CC FF 35 FF FF 23 FF DF 0B C4 FF 33 69 F2 39 FE AF 16 E5 FF 00

    W: 16 64 A2 2E

    X: 2

    C: 16 66 00

    Will become:

    W: 16 04 59 A2 0E BD A5 0E 0B A4 0E CA FF 3A FE A1 0E 6B A0 0E FE A3 0E 6B A2 0E CA FF 3A C2 FF 3A D6 FF

    W: 16 24 33 FF AF 0E 01 4F 03 3F 11 0C CD FF 30 D4 FF 35 2F 10 0C D4 FF 35 FF FF 23 01 AF 14 01 4F 03 3F

    W: 16 44 11 0C C5 FF 30 CC FF 35 2F 10 0C CC FF 35 FF FF 23 FF DF 0B C4 FF 33 69 F2 39 FE AF 16 E5 FF 00

    W: 16 64 A2 2E

    X: 2

    C: 16 66 00

  • If you use a recent version of Flashstream to generate the file then there is a command-line option -psize:NUM that allows you to split the lines automatically into any packet size you like.

    The latest version of Flashstream is v28 and recent versions of bqCONFIG and GaugeStudio also can export flashstream files with such options.

    Just type Flashstream.exe from the command line to see the available options.

    You can download the Flashstream bundle from the Files under my profile.