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.

problems with i2c access to the bq27501

Other Parts Discussed in Thread: BQ27501, BQ27510

I'm trying to get the software written for accessing the bq27501 chip through i2c. The datasheet information regarding the i2c interface isn't very good, however, slua467a.pdf that seems to help.

The problem I'm having is that I'm not able to read the chip firmware version (or anything in the control register for that matter) despite following the app note documentation. All I'm reading is 0xFF00 from anything in the control register. I can read other registers just fine, so I don't know what I'm doing wrong.

Additionally Figure 2 in slua467 describing the command sequence has a discrepancy with the instructions in the paragraph above it. There a line stating "The gauge issues a NO ACKNOWLEDGE" - but the figure shows that it does. Any insight into the matter would be appreciated. Thanks.

 

  • Hi Ben,

    I am not sure why control register command is not working. I would suggest use Beagle or Aardvark to record the command/data and compare with your code.

    The figure 2 in SLUA467 is showing low byte first and high byte second so after  high byte, it issue a "N".

    Hope this helps.

     

    Ming

  • I found the problem issue. I wasn't waiting the necessary time (66us) between issuing the subcommand and the subsequent read command. I'm assuming the state machine on the chip wasn't ready with the requested subcommand data. For what it's worth, the datasheet for bq27501 was missing the diagram showing the timing requirements. I had to look it up in the bq27510.

    -Ben

  • Ben,

    I am glad you found the problem. We will look into the bq27501 DS

    Ming