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.

BQ27750: trying to communicate with a BeagleBone and Debian

Part Number: BQ27750

I have a bq27750EVM, and I have had some communication with Battery Management Studio in Windows, but now I am trying to get it to work with my target system, which is a PocketBeagle running Debian with kernel 4.14.108-ti-r124.  I have tried 2 different things.  The first is to connect the EVM with the Debian kernel and use i2cdetect to see if the device shows up on the i2c bus -- it doesn't.  Then, I spun a new kernel enabling support for the bq27XXX series, and I still see nothing.  I do see other devices on the i2c bus, and I have probed with a scope the SDA and SCL pins on the EVM and seen activity when I do an i2cdetect.  Should i2cdetect actually show the bq27750 address in its scan or is this an invalid way to see if the bq27750 is communicating?  I can go back and check my kernel settings, but I would like to see some sign of life.

dev@beaglebone:/sys/class/i2c-dev/i2c-2/power$ i2cdetect -y -r 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
dev@beaglebone:/sys/class/i2c-dev/i2c-2/power$
  • Hi Paul,

    See my comments below.

    a)  Press the Wake button to wake up the gauge device before you do an i2cdetect.

    b)  Check your PocketBeagle schematic and make sure the are pull-up resistors on the SDA and SCL pins. 

    Andy

  • Andy,

    Thanks.  Actually, I applied the charger, and now I have device 0x55 showing up -- I have not been able to find the I2c address in the datasheet, but I assume that is now the bq27750.  Having done that, I then "echo bq27xxx 0x55 > new_device" which seems to add a device, but none of the files under "power" seem to show anything useful.  

    dmesg: [ 486.448872] i2c i2c-2: new_device: Instantiated device bq27xxx at 0x55

    Is something useful supposed to show up somewhere?  Things like battery status or power consumption, or do I have to read the registers manually?  How do I know if it is actually working?  I have built another kernel to enable i2c debugging, which I can try tomorrow.

    Paul

  • Hi Paul,

    If I remember correctly, the driver code you are using is from the open-source community and not maintained by TI.

    To the best of my knowledge on the Linux driver,  I would suggest you debug the probe function and the code that registers the gauge.

    Andy

  • Andy,

    That's kind of a bummer.  After doing some searching it seems the Linux driver is not working on my system, and I just don't know how much patience I have to try to debug kernel drivers and all in the ever changing undocumented Linux world.  It looks like I can read the i2c registers directly, so I may go ahead and do that for the few parameters I am interested in.  I really just want to know charging/discharging, expected run time, and % capacity.

    I'm going to go ahead and mark this resolved since I can communicate with the IC, but I wish the documentation for Linux were more complete.

    Thanks,

    Paul