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.

Compiler/BQ35100: BQ35100 getting started

Part Number: BQ35100
Other Parts Discussed in Thread: BQSTUDIO

Tool/software: TI C/C++ Compiler

Hi,

I am trying to communicate with BQ35100 from my custom board with the help of a micro controller. BQ35100 is interfaced using I2C protocol with the micro controller. I followed the driver from "SLUA801.pdf" document. My development is on windows platform. when i tried to get the fw version, i am getting 0x0000 as reply from the device and for control status command also reply  is 0x0000. when i tried to read the response for the command CMD_VOLTAGE i am getting as 0x0020. How can validate the response which is coming from the sensor. It would be really helpful if any supporting document or getting started with bq35100 by interfacing with microcontroller document is provided. Do we have supporting driver files in "C" for this interfacing BQ35100 with any micro controller. 

Thanks,

Suyodhana

  • Suyodhana,

    That document you are referencing is the best thing we provide. What i recommend is use bqStudio advanced comm screen to verify the reads and registers you should be getting. 

    I will note when dealing with micor controllers the address of 0xAA is often not correct because most expect a right shift. please try to use 0x55 instead. 

    I should not be doing this but here is a very basic "Gauge Start" command function using the TI TIVA C micro controller. 

    //Send Gauge Start Command
    void gaugeStart() {
    Serial.println("Gauge Start CMD");
    Wire.beginTransmission(0x55);
    Wire.write(0x3E);
    Wire.write(0x11);
    Wire.write(0x00);
    Wire.endTransmission();
    return;
    }

    Here is an example of a read that is 2 bytes long

    uint16_t read16bit_fromGauge(int adrs, int command) {

    //Write address before the read
    Wire.beginTransmission(adrs);
    Wire.write(command);
    Wire.endTransmission(false);

    uint16_t val = 0;
    int count = 2;
    Wire.requestFrom(adrs, 2); // request 2 bytes from slave device
    while (Wire.available()) // slave may send less than requested
    {
    uint16_t c = Wire.read(); // receive a byte as character
    if (!--count)
    {
    c <<= 8;
    }
    val |= c;
    }
    return val;
    }

    From here i will be unable to provide further code or debug the example provided. If you are unable to get the correct result using bqstudio i can assist there.

    Thanks,

    Eric Vos

  • Hi Eric,

    Thanks for the valuable information. It helped me greatly to move ahead.  As per the given inputs, i am able to read response for the commands Device type, internal temperature, firmware version and voltage. Since i am using a custom board in which microcontroller is interacting with BQ35100 over i2c, i don't have any provision to connect to BQstudio. My next challenge is to update the battery related parameters in to BQ35100 and get the data regarding State of health, End of Service, battery status and Battery alert with out using BQstudio. may i know how to configure BQ35100 and get the above data. 

    Thanks,

    Suyodhana  

  • Suyodhana,

    My best recommendation is to look int the TRM for the exact command you are wanting. i suggest you use bqStudio and an EVM to get yourself familiar with the device. 

    Step 1 will be to get realistic MeasuredZ values. 

    To update gauges inside a system i would look into .bq.fs files 

    http://www.ti.com/lit/an/slua541a/slua541a.pdf 

    Thanks,

    Eric Vos

  • Thanks for your support Eric. 

    Thanks,

    Suyodhana