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 and I2C repeated start

Other Parts Discussed in Thread: BQ27510

I've been working on a program to read cell state from the bq27510 gas gauge on a Fuel Tank Boosterpack. I'm using the boosterpack with an MSP-EXP430G2 launchpad and currently I'm keeping the I2C clock frequency below 50kHz.

After getting the basic I2C communications working for individual read and write commands I looked into building longer command sequences. Using incremental read I can successfully get the returned values for a series of consecutive commands (eg 0x04 through 0x0B inclusive) in a single I2C packet. The incremental read sequence uses a repeated start to switch from write to read mode, and that works fine in this case.

Next I tried to use another repeated start to chain together accesses to non-consecutive commands in a single packet. I was surprised to find that the gas gauge rejected this. Here are the sequences I tried, as captured by a logic analyser:

[Master] {Slave}

[S] [0xAA] {A} [0x02] {A} [Sr] [0xAB] {A} {0X00} [A] {0x00} [N] [Sr] [0xAA] {A} [0x10] {N} ...

[S] [0xAA] {A} [0x10] {A} [Sr] [0xAB] {A} {0X6C} [A] {0x04} [N] [Sr] [0xAA] {A} [0x02] {N} ...

I reversed the order of the commands in the second attempt to confirm that the issue wasn't specific to command 0x10. In both cases the gauge responded with a NACK when I tried to write the second command.

Does the bq27510 support this use of repeated start, or does it require a stop condition between the two commands if they're not consecutive?