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.

BQ27Z746: How to Initialize BQ27Z746

Part Number: BQ27Z746
Other Parts Discussed in Thread: BQSTUDIO, BQ27426, EV2400

Tool/software:

Hi,

i am using BQ27Z746 for my battery application. i have to read the battery percentage and to trigger an alarm for OV, OC, UV, UC protection. Below are my queries, please clarify.

Q1. what are the registers need to be initialized for the above application and where can i find the specific register address?

Q2. Can i set the parameters like Design capacity, Design Voltage, Terminating voltage etc. without BQSTUDIO by directly writing using I2C write function during initialization? Please refer the attached image.

Q3. which document shall i refer to get the proper register address and its explanation regarding the purpose it is being used?

Q4. Do i need Evaluation kit to use BQSTUDIO or it can be interfaced to BQ27Z746 using jumpers on my project PCB?

waiting for the answers........

Thanks,

Sumit.

  • Hello, 

    Please refer to Data Memory -> Protections for the addresses of the firmware based protection parameters. 

    Yes you can set these parameters without using bqStudio. You can do this by writing to the correct register and I2C address using a host.

    You can refer to the BQ27Z746 TRM for the register addresses.

    It is recommended to use an EVM for testing and evaluation just so that if you have questions, we can reproduce your configuration on our EVMs. 

    Regards, 

    Jonny. 

  • Hi Jonny,

    Please clarify below questions.

    1. What are the registers need to be initialized if i have to read the battery percentage using BQ27Z746 via I2C? Please provide sample code for BQ27Z746.

  • Hello Sumit, 

    Please refer to the BQ27426 Quick-Start Guide for the minimum parameters you need to configure to get SOC. Additionally, there is not sample code for this, the closest we have is the BQ27XXXSW-LINUX material. 

    Regards, 

    Jonny. 

  • Hi Jonny,

    can you please let me know how to enter into the UNSEALED mode, according to TRM to set the DESIGN CAPACITY, I need to set bit 14 of register 0x00. I tried writing 0x4000, but not able to write the DESIGN CAPACITY at target address 0x3C successfully. I am able to successfully read and write the Terminating Voltage at target address 0x34.

    Please share your answer ASAP, it's very urgent.

    Thanks, and regards,

    Sumit.

  • Hello Sumit, 

    You can refer to this FAQ for the commands needed to unseal the gauge with the default keys. 

    Regards, 

    Jonny. 

  • Hi Jonny,

    Hope you are doing well!!

    Try to understand my question, i know which command need to be sent to change the mode to Unseal mode, but still i am unable to write Design capacity. Till now whatever the resources you have provided is not even relevant to my query. You are just pushing links which is not working for me.

    Please have a look to the code snippet and let me know if I am doing it correct or not.

    //unsealing Fuel guage

    txBuffer[0] = 0x00;
    txBuffer[1] = 0x40;
    I2C_MasterWrite(BQ27441_I2C_ADDRESS, 0x00, txBuffer, 2);

    //setting design capacity as 1500mAh.

    txBuffer[0] = 0x05;
    txBuffer[1] = 0xDC;
    I2C_MasterWrite(BQ27441_I2C_ADDRESS, 0x3C, txBuffer, 2);

    Please verify.

    Thanks, &regards,

    Sumit.

  • Hello Sumit, 

    My apologies for the confusion. I was sending you the previous FAQ so that you could have the proper steps to unseal the gauge. It looks like from what you have shared, that what you are writing to the gauge to unseal it is incorrect. For the default key, you will need to send the two halves of the unseal key within a 4 second interval. From what you have provided, you are trying to write only one half of the unseal key to the gauge. Assuming you are using the default key, you would need to write to device address(0x55, 7 bit)-> Write Control() command(0x00) ->  low-byte Unseal Key in little endian ( 0x14, 0x04). Then within 4 seconds of writing the first half of the unseal key, you would need to write the second half by doing a write to device address(0x55, 7 bit)-> Write Control() command(0x00) ->  high-byte Unseal Key in little endian ( 0x72, 0x36). 

     

    If the gauge is not unsealed then you will not be able to write other values to the gauge, which would explain why you are unable to successfully change the design capacity. 

    Regards, 

    Jonny. 

  • Hi Jonny,

    thank you for your continuous support.

    According to TRM of BQ27Z746, the device is shipped in Full Access mode from TI, so in my opinion, no need to unseal it before writing any data using standard command. I have read the 0x00 to check if it is in full access mode or not and the result i get is 0x0902 which means it is in full access mode according to section 16.1.1 of BQ27Z746-R1 SLUUCW8 – OCTOBER 2023.

    I tried writing the security key provided by you to register 0x00 but not able to change the Design capacity.

    txBuffer[0] = 0x14;
    txBuffer[1] = 0x04;
    I2C_MasterWrite(BQ27441_I2C_ADDRESS, 0x00, txBuffer, 2);
    txBuffer[0] = 0x72;
    txBuffer[1] = 0x36;
    I2C_MasterWrite(BQ27441_I2C_ADDRESS, 0x00, txBuffer, 2);

    Please help, my project is already delayed.

    Thanks, and regard,

    Sumit.

  • Hi Jonny,

    thank you for your continuous support.

    According to TRM of BQ27Z746, the device is shipped in Full Access mode from TI, so in my opinion, no need to unseal it before writing any data using standard command. I have read the 0x00 to check if it is in full access mode or not and the result i get is 0x0902 which means it is in full access mode according to section 16.1.1 of BQ27Z746-R1 SLUUCW8 – OCTOBER 2023.

    I tried writing the security key provided by you to register 0x00 but not able to change the Design capacity.

    txBuffer[0] = 0x14;
    txBuffer[1] = 0x04;
    I2C_MasterWrite(BQ27441_I2C_ADDRESS, 0x00, txBuffer, 2);
    txBuffer[0] = 0x72;
    txBuffer[1] = 0x36;
    I2C_MasterWrite(BQ27441_I2C_ADDRESS, 0x00, txBuffer, 2);

    //writing design capacity as

    txBuffer[0] = 0x05;
    txBuffer[1] = 0xDC;
    I2C_MasterWrite(BQ27441_I2C_ADDRESS, 0x3C, txBuffer, 2);

    //reading design capacity but getting default value.
    I2C_MasterRead(BQ27441_I2C_ADDRESS, 0x3C, i2c_rxBuffer, 2);

    If i am reading battery percentage and getting 100% from register 0x2C.

    According to the TRM default value in Design Capacity is 5300mAh and my battery full- capacity is 1500mAh, it must return 28%. Am i understanding correct?

    This read-word function returns the predicted remaining battery capacity as a percentage of FullChargeCapacity().

    16.1.18 0x2C/2D RelativeStateOfCharge()—RSOC

    Please help, my project is already delayed.

    Thanks, and regard,

    Sumit.

  • Hello Sumit, 

    Yes, if the gauge is in full access mode then you should be able to edit the gauge parameters. What is the location which you are trying to write Design Capacity to? Are you able to do this using bqStudio? 

    Regards, 

    Jonny. 

  • Hi Jonny,

    Thank you for your swift response.

    i am writing Design Capacity to address 0x3C.

    No i am not using BQstudio, as in earlier conversation itself i asked you regarding the same.

    Does BQstudio works only with evaluation board?

    where did you find security code, does it related to reset?

  • Hello Sumit, 

    I believe I answered your question previously regarding using a board other than an EVM to communicate with bqStudio. In short, the answer is that bqStudio can communicate and work with your custom board. To be able to do this, you will need an EV2400 and access to your board's I2C lines. 

    Regards, 

    Jonny. 

  • Hi Jonny,

    Hope you are doing well!!

    we have purchased EV2400 and installed BQstudio in our machine.

    I tried writing Design Capacity to the BQ27Z746 using Data memory with the help of write all command and read back using Advanced comm tab from register 0x3C and it was successful.

    After this i tried reading Battery percentage from register 0x2E(SOH), but every time i am getting the same value, this value is not changing either the battery is full charged or discharged to a certain level.

    Please answer below query:

    1. what are the parameters need to be configured before reading the battery percentage?

    thanks, and regards,

    Sumit.

  • Hello Sumit, 

    You are attempting to read the State of Health register, not the Relative State of Charge register. Please read from the 0x2C register for the State of Charge. 

    Regards, 

    Robert. 

  • Hi Robert,

    I am reading register 0x2C also and getting 00 which is not changing at any time.

  • Hello Sumit, 

    This should change when you are charging/discharging. Is gauging enabled, ManufacturingStatus()[GAUGE_EN]? 

    Regards, 

    Robert. 

  • fuelgaugeTI.gg.csvSDS 503450.pdf

    Hi Robert,

    Attached .csv file exported from the BQstudio and Battery datasheet for your reference. Please go through it and let us know if we have configured anything incorrect. Also, what are the parameters required to be configured to get the exact battery percentage.

    Yes, we have enabled Gauge.

  • Hello Sumit, 

    Thank you for providing this, it looks like you have not yet successfully completed the learning cycle for the gauge. In order for you to obtain accurate SOC estimations, you must first successfully perform a learning cycle. Please follow the steps in the Achieving the Successful Learning Cycle document

    Regards, 

    Robert.