Quantcast
Channel: Power management forum - Recent Threads
Viewing all articles
Browse latest Browse all 35901

Interfacing bq2085 with i.Mx6 freescale processor

$
0
0

Hi all,


I have a battery from UltraLife, in which they are using bq2085 for battery monitoring. This bq2085 chip gives me an SMBUS interface to know the Battery voltage and charge status every thing.

I have checked all the battery parameters with EV2300 module and evaluation software on my Host machine.


In my project i should get these parameters through i.Mx6 processor, which is having SMBUS interface.

Now am not able to read from my battery status through SMBUS after interfacing with the processor. i could open the i2c device and set as slave. when i perform write operation it is failing to write.

Sample code:

if ((i2c = open("/dev/i2c­1",O_RDWR)) < 0)

    {

        qDebug()<<"Failed to open the bus.";

        return;

    }

addr =0x16;//bq2085 slave address

if (ioctl(i2c,I2C_SLAVE,addr) < 0)

    {

        qDebug()<<"Failed to acquire bus access and/or talk to slave.\n";

        return;

    }

buf =8; //Register corresponds to temperature of the  battery

write(i2c,buf,1) this function is returning -1, which means not able to write.


Viewing all articles
Browse latest Browse all 35901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>