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.

BQ27532-G1: Flags() command doesn't show BAT_DET correctly

Part Number: BQ27532-G1
Other Parts Discussed in Thread: BQ24250, , BQSTUDIO, EV2400

Hi,

I am using BQ27532-G1 and bq24250 together on our board, and trying to do the BATTERY DETECTION and charging/ discharging check.

But every time i checked the Flags() command's return value for BAT_DET, it was alway set, even i only connect the board with USB(no battery). And the DSG bit of flag() is always 0 no matter the battery is charged or discharged. And in the test, the "OpConfig B" was configured to be 0x4A. 

But if i set the "BIT bit of OpConfig B" to be 0 and use BAT_INSERT and BAT_REMOVE command, then i could see the corresponding change of BAT_DET bit.

I thought it might because some variable in module's flash are not configured well. But the manual also says the BAT_DET and DSG bits are quite independent to these configuration. So, Can someone help me with this? 

Thanks,

Shiping

  • Also i check the "Voltage and AverageCurrent" command's return value and they looked meaningful.
  • Hi Shiping
    Can you send a screeen shot of your registersscreen of bqstudio? Also, do you have a 10k resistor from BI/Tout pin to ground?

    thanks
    Onyx
  • Hi Onyx,

    Thanks for your reply, i don't use EV2300 and EV2400 so i think can't use bqstudio to show you the screenshot.

    But i have some register value i write into flash in code here.

    // "Configuration","Data","CC Threshold","315","mAh"
    BATTERY_writeDataFlash(Bq_SubclassId_Data, 0, Bq_DataType_I2, 315);
    // "Configuration","Data","Design Capacity","350","mAh"
    BATTERY_writeDataFlash(Bq_SubclassId_Data, 2, Bq_DataType_I2, BATTERY_MAH_NOMINALMAX);
    // "Configuration","Data","SOH LoadI","-75","mA"
    BATTERY_writeDataFlash(Bq_SubclassId_Data, 5, Bq_DataType_I2, (uint32_t)-75);



    // "Configuration","Discharge","SOC1 Set Threshold","50","mAh"
    BATTERY_writeDataFlash(Bq_SubclassId_Discharge, 0, Bq_DataType_U2, 50);
    // "Configuration","Discharge","SOC1 Clear Threshold","75","mAh"
    BATTERY_writeDataFlash(Bq_SubclassId_Discharge, 2, Bq_DataType_U2, 75);
    // "Configuration","Discharge","Final Voltage","3000","mV"
    BATTERY_writeDataFlash(Bq_SubclassId_Discharge, 4, Bq_DataType_U2, 3000);



    // "Configuration","Registers","Op Config","1970","Flag"
    BATTERY_writeDataFlash(Bq_SubclassId_Registers,0,Bq_DataType_H2,0x1970);
    // "Configuration","Registers","OpConfig B","6a","Flag"
    BATTERY_writeDataFlash(Bq_SubclassId_Registers,4,Bq_DataType_H1,0x6a);



    // "Gas Gauging","IT Cfg","Load Mode","0","Num"
    BATTERY_writeDataFlash(Bq_SubclassId_ItCfg, 1, Bq_DataType_U1, 0);
    // "Gas Gauging","IT Cfg","Terminate Voltage","3000","mV"
    BATTERY_writeDataFlash(Bq_SubclassId_ItCfg, 51, Bq_DataType_I2, 3000);
    // "Gas Gauging","IT Cfg","Reserve Cap-mAh","10","mAh"
    BATTERY_writeDataFlash(Bq_SubclassId_ItCfg, 66, Bq_DataType_I2, 10);
    // "Gas Gauging","IT Cfg","Max Allowed Current","750","mAh"
    BATTERY_writeDataFlash(Bq_SubclassId_ItCfg, 87, Bq_DataType_I2, 750);
    // "Gas Gauging","IT Cfg","Max Current Interrupt Step","250","mA"
    BATTERY_writeDataFlash(Bq_SubclassId_ItCfg, 90, Bq_DataType_I2, 250);



    //"Gas Gauging","Current Thresholds","Dsg Current Threshold","10","mA"
    BATTERY_writeDataFlash(Bq_SubclassId_CurrentThresholds, 0, Bq_DataType_I2, 10);
    //"Gas Gauging","Current Thresholds","Chg Current Threshold","50","mA"
    BATTERY_writeDataFlash(Bq_SubclassId_CurrentThresholds, 2, Bq_DataType_I2, 50);
    //"Gas Gauging","Current Thresholds","Quit Current","25","mA"
    BATTERY_writeDataFlash(Bq_SubclassId_CurrentThresholds, 4, Bq_DataType_I2, 25);



    //"Gas Gauging","State","Qmax Cell 0","350","mAh"
    BATTERY_writeDataFlash(Bq_SubclassId_State, 1, Bq_DataType_I2, BATTERY_MAH_NOMINALMAX);
    //"Gas Gauging","State","T Rise","20","Num"
    BATTERY_writeDataFlash(Bq_SubclassId_State, 12, Bq_DataType_U2, 20);

    //"Calibration","Data","CC Offset","-1541","Counts"
    BATTERY_writeDataFlash(Bq_SubclassId_CalibrationData, 8, Bq_DataType_I2, (uint32_t)-1541);

    //"Charger","Charger Info","Reg 01 Default","1c","Hex"
    BATTERY_writeDataFlash(Bq_SubclassId_ChargerInfo, 3, Bq_DataType_H1, 0x1C);
    //"Charger","Charger Info","CDPLimit Default","24","Hex"
    BATTERY_writeDataFlash(Bq_SubclassId_ChargerInfo, 14, Bq_DataType_H1, 0x24);

    //"Charger","Charger Control Configuration","Charger Options","34","Flag"
    BATTERY_writeDataFlash(Bq_SubclassId_ChargerControlCfg, 0, Bq_DataType_H1, 0x34);

    // Configuration,Registers,SOC Delta,0,%
    BATTERY_writeDataFlash(Bq_SubclassId_Registers,2,Bq_DataType_U1,0);
    // Configuration,Registers,OpConfig E,53,Flag
    BATTERY_writeDataFlash(Bq_SubclassId_Registers,7,Bq_DataType_H1,0x53);

    //Configuration,Power,Sleep Current,50,mA
    BATTERY_writeDataFlash(Bq_SubclassId_Power,2,Bq_DataType_I2,50);
    //Configuration,Power,Hibernate I,40,mA
    BATTERY_writeDataFlash(Bq_SubclassId_Power,9,Bq_DataType_U2,40);

    Also our design is similar with bq27532-G1's reference design using 18.2kohm resistor from BI/OUT to ground, is that ok?

    Anything else i could check?

    Thanks,
    Shiping
  • Hi,

    I checked the BI/TOUT pin's voltage with battery connected/ disconnected, and find it is always low even when there is no battery connected.

    Here is our schematic design, could you help me check it? There might be some problem in hardware part i think.

  • Also, may i ask what is Flags()'s DSG bit based on, anything i need to configure to let it function? From the manual i feel it doesn't based on anything, but when i only connect the battery with board the DSG bit just won't be set, so just wanna know if there any test i could do about it.