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.

BQ27421-G1: Never achieves FC nor QMAX_UP

Part Number: BQ27421-G1
Other Parts Discussed in Thread: BQ25606, BQSTUDIO

I'm trying to finalise the firmware and configuration of a design using BQ27421-G1 with LP953450 Polymer Li-ion Battery and BQ25606 Charger.

The battery appears to be charging and working just fine and I2C communications to the host processor are working reliably.

The charger is configured for a peak charging rate of ~ 0.4A

The battery is rated at 1800mAh at a nominal 3.7V, charge 4.2V

At power on, if ITPOR is set I configure the following specs:

    design_capacity = 1800
    design_energy = 6660
    terminate_voltage = 3300
    taper_rate = 500

where taper_rate is from 1800 / (0.1 × 36 mA) = 500

I've been trying to then follow the learning details from the quick start guide ( www.ti.com/.../sluuah7b.pdf ) to get some optimum settings for the part.

However, QMAX_UP is never set, nor is RES_UP. I was trying to follow recommended routines of charging from ~ 30 % to full then discharging back down to termination.

After trying this a few times I realised FC flag was never getting set when the battery was charged, I've been focusing on this now for a couple of days with no progress.

I've left if fully charged/charging overnight, where the current drops well below the taper current, the voltage is over the threshold and the capacity values are generally stable. Still no FC

Both capacity and remaining do change slightly over time, I'm logging all the regs below ever 5 seconds to look for changes.

I've tried setting bits 1 and 2 of State:Update_Status as the Technical Reference says these should be set when running a learning cycle, though the quick start never mentions this. The behavior above didn't change with these set however.

I've also tried running a hard reset and then not setting my battery specs, ie, not changing any settings on the part at all. Leaving it on the charger like this still never results in FC set, nor are QMAX_UP or RES_UP.

Eventually if the current is low long enough the chip does enter sleep state, but FC is still never set.

Snapshot of registers while full, changing essentially finished:

voltage: 4.179
current (mA): 19
SOC(%): 100
SOH(%): 90
capacity: 1676
remaining: 1662

'FLAGS':
OT: Over-Temperature: False
UT: Under-Temperature: False
FC: Full charge: False
CHG: Fast charging allowed: False
OCVTAKEN: OCV in relax mode: False
ITPOR: Has Reset: False
CFGUPMODE: Config Update: False
BAT_DET: Battery insert: True
SOC1: SOC1 Set Threshold: False
SOCF: SOCF Set Threshold: False
DSG: Discharging: False

'STATUS':
SHUTDOWNEN: Shutdown Enable: False
WDRESET: Watchdog Reset: False
SS: Sealed: False
CALMODE: Calibration: False
CCA: CC Auto Cal: False
BCA: Calibration Active: False
QMAX_UP: Qmax Updated: False
RES_UP: Resistance Updated: False
INITCOMP: Initialised: True
HIBERNATE: Hibernate Requested: False
SLEEP: Sleep Mode: False
LDMD: Constant-power model: True
RUP_DIS: Ra Update Disabled: True
VOK: V ok for Qmax Update: True

'STATE':
Qmax_Cell_O: 16384
Update_Status: 0
Reserve_Cap-Ah: 0
Load_Select/Mode: 129
Q_Invalid_MaxV: 3803
Q_Invalid_MinV: 3752
Design_Capacity: 1800
Design_Energy: 6660
Default_Design_Cap: 1340
Terminate_Voltage: 3300
Temp_Rise: 20
Temp_Time_Constant: 1000
SOCI_Delta: 1
Taper_Rate: 500
Taper_Voltage: 4100
Sleep_Current: 62
V_at_Chg_Term: 255
Avg_I_Last_Run: -1
Avg_P_Last_Run: -1
Delta_Voltage: -1

'R_a':
R_a0_0: 16486
R_a0_1: 102
R_a0_2: 99
R_a0_3: 107
R_a0_4: 72
R_a0_5: 59
R_a0_6: 62
R_a0_7: 63
R_a0_8: 53
R_a0_9: 47
R_a0_10: 60
R_a0_11: 70
R_a0_12: 140
R_a0_13: 369
R_a0_14: 588

Can you suggest what might be wrong, what's missing from my efforts to run a learning cycle?

Thanks,
Andrew

  • Your sleep current seems kind of high. Can you set sleep current to 0 and re-run the learning cycle?

    You need FC to be set.

  • Thanks for the suggestion. I was never actually setting the sleep current so it surprised me that it wasn't at the default value.

    I tried to set it to zero as suggested, but it wasn't changing.
    Long story short I found a few bugs in my driver code; values in the second register block (ie above 31) weren't being read or written correctly, and I had also had a bug in my CRC code.

    With them fixed, I was able to see the correct default values in the higher registers.

    However, this still doesn't appear to have resolved my FC issue.

    I've tried discharging a bit then charging back to full a few times, with `STATE:Update Status` set to both 0 and 0x03 and still never get the FC flag set.


    Do you know if the gauge needs to be sealed for this work?
    Is there a way to verify that the CRC is indeed set to the right value?
    Do I need to discharge below a certain level before re-charging to make this work?


    Current Regs:

     voltage: 4.209
     current: 23
     percent: 100
     health: 89
     capacity: 1681
     remaining: 1681

    FLAGS:
     OT: Over-Temperature: False
     UT: Under-Temperature: False
     FC: Full charge: False
     CHG: Fast charging allowed: False
     OCVTAKEN: OCV in relax mode: False
     ITPOR: Has Reset: False
     CFGUPMODE: Config Update: False
     BAT_DET: Battery insert: True
     SOC1: SOC1 Set Threshold: False
     SOCF: SOCF Set Threshold: False
     DSG: Discharging: False

    STATUS:
     SHUTDOWNEN: Shutdown Enable: False
     WDRESET: Watchdog Reset: False
     SS: Sealed: False
     CALMODE: Calibration: False
     CCA: CC Auto Cal: False
     BCA: Calibration Active: False
     QMAX_UP: Qmax Updated: False
     RES_UP: Resistance Updated: False
     INITCOMP: Initialised: True
     HIBERNATE: Hibernate Requested: False
     SLEEP: Sleep Mode: False
     LDMD: Constant-power model: True
     RUP_DIS: Ra Update Disabled: True
     VOK: V ok for Qmax Update: True

    STATE:
     Qmax_Cell_O: 16384
     Update_Status: 0
     Reserve_Cap-Ah: 0
     Load_Select/Mode: 129
     Q_Invalid_MaxV: 3803
     Q_Invalid_MinV: 3752
     Design_Capacity: 1800
     Design_Energy: 6660
     Default_Design_Cap: 1340
     Terminate_Voltage: 3300
     Temp_Rise: 20
     Temp_Time_Constant: 1000
     SOCI_Delta: 1
     Taper_Rate: 500
     Taper_Voltage: 4100
     Sleep_Current: 0
     V_at_Chg_Term: 4190
     Avg_I_Last_Run: -50
     Avg_P_Last_Run: -50
     Delta_Voltage: 1

    CHG_TERM
     TCA_Set_percent: 99
     TCA_Clear_percent: 95
     FC_Set_percent: -1
     FC_Clear_percent: 98
     DODatEOC_Delta_T: 50

    R_a:
     R_a0_0: 102
     R_a0_1: 102
     R_a0_2: 99
     R_a0_3: 107
     R_a0_4: 72
     R_a0_5: 59
     R_a0_6: 62
     R_a0_7: 63
     R_a0_8: 53
     R_a0_9: 47
     R_a0_10: 60
     R_a0_11: 70
     R_a0_12: 140
     R_a0_13: 369
     R_a0_14: 588

    Are there some other settings I'm not reading out that might help?

    Thanks,
    Andrew

  • Please check chapter 6.4.2.2 in the TRM. The gauge must be in the correct state to detect charge termination (and run the learning cycle).

    Your taper rate setting is C/50. The default quit current threshold is 250 0.1Hr rate (not mA - this is a mistake in the TRM. The current thresholds for state changes are all 0.1Hr rate, just like the taper rate. bqStudio shows the correct units).

    What happens is that during charge, when the current drops below C/25 (=1800/25 = 72mA) for 60 seconds, the gauge will transition out of charge state and enter relax state, hence it will never run the charge termination detection algorithm and therefore you will never see FC = 1.

    Please change all three state change threshold rates, "Dsg Current Threshold", "Chg Current Threshold" and "Quit Current" to values that reflect your system (see 6.4.2.2 for how this relates to gauging states).

  • Thanks, this does sound like a step in the right direction. It would certainly help if the quick start guide mentions these, I'd missed them previously.

    If I understand correctly, the quit current threshold should be below taper current to ensure it's still in charge mode as it tapers down?
    The defaults for discharge and charge thresholds should be fine for me application as is, however I've set them a bit closer to actual thresholds.

    I'm still not getting FC set however.

    My test procedure today has been:

    *** Initiate a hard reset, check regs

    BATTERY DETAILS
      date:      2015-01-02T03:03:25                 |   voltage:                   0.0
      current:                     0                 |   percent:                     0
      health:                   None                 |   capacity:                    0
      remaining:                   0                 |   temperature:            -273.0
    FLAGS
      OT: Over-Temperature:        0                 |   UT: Under-Temperature:       0
      FC: Full charge:             0                 |   CHG: Fast charging allowed:  1
      OCVTAKEN: OCV in relax mode: 0                 |   ITPOR: Has Reset:            1
      CFGUPMODE: Config Update:    0                 |   BAT_DET: Battery insert:     0
      SOC1: SOC1 Set Threshold:    1                 |   SOCF: SOCF Set Threshold:    1
      DSG: Discharging:            1
    STATUS
      SHUTDOWNEN: Shutdown Enable: 0                 |   WDRESET: Watchdog Reset:     0    
      SS: Sealed:                  0                 |   CALMODE: Calibration:        0    
      CCA: CC Auto Cal:            0                 |   BCA: Calibration Active:     0    
      QMAX_UP: Qmax Updated:       0                 |   RES_UP: Resistance Updated:  0    
      INITCOMP: Initialised:       0                 |   HIBERNATE: Hibernate Requested: 0    
      SLEEP: Sleep Mode:           0                 |   LDMD: Constant-power model:  1   
      RUP_DIS: Ra Update Disabled: 1                 |   VOK: V ok for Qmax Update:   0    
    STATE
      Qmax_Cell_O:             16384                 |   Update_Status:               0
      Reserve_Cap-Ah:              0                 |   Load_Select/Mode:          129
      Q_Invalid_MaxV:           3803                 |   Q_Invalid_MinV:           3752
      Design_Capacity:          1340                 |   Design_Energy:            4960
      Default_Design_Cap:       1340                 |   Terminate_Voltage:        3200
      Temp_Rise:                  20                 |   Temp_Time_Constant:       1000
      SOCI_Delta:                  1                 |   Taper_Rate:                100
      Taper_Voltage:            4100                 |   Sleep_Current:              10
      V_at_Chg_Term:            4190                 |   Avg_I_Last_Run:            -50
      Avg_P_Last_Run:            -50                 |   Delta_Voltage:               1
    CHG_TERM
      TCA_Set_percent:            99                 |   TCA_Clear_percent:          95
      FC_Set_percent:             -1                 |   FC_Clear_percent:           98
      DODatEOC_Delta_T:           50
    CURRENT_THRESH
      Dsg_Current_Threshold:     167                 |   Chg_Current_Threshold:     100
      Quit_Current:              250                 |   Dsg_Relax_Time:             60
      Chg_Relax_Time:             60                 |   Quit_Relax_Time:             1

    *** Set variables

    taper_current = 50

    charge_current = 160
    discharge_current = 80
    quit_current = 20

    *** Set regs

    state.Design_Capacity = 1800
    state.Design_Energy = 6660
    state.Terminate_Voltage = 3300
    state.Taper_Rate = 1800 * 10 / 50 = 360
    state.Sleep_Current = 0

    current_thresh.charge_current = 1800 * 10 / 160  = 112
    current_thresh.discharge_current = 1800 * 10 / 80 = 225
    current_thresh.quit_current = 1800 * 10 / 20 = 900

    BATTERY DETAILS
      date:      2015-01-02T03:03:45                 |   voltage:                 4.109
      current:                  -144                 |   percent:                   100
      health:                   None                 |   capacity:                 1195
      remaining:                1195                 |   temperature: 22.30000000000001
    FLAGS
      OT: Over-Temperature:        0                 |   UT: Under-Temperature:       0
      FC: Full charge:             0                 |   CHG: Fast charging allowed:  0
      OCVTAKEN: OCV in relax mode: 1                 |   ITPOR: Has Reset:            0
      CFGUPMODE: Config Update:    0                 |   BAT_DET: Battery insert:     1
      SOC1: SOC1 Set Threshold:    0                 |   SOCF: SOCF Set Threshold:    0
      DSG: Discharging:            1
    STATUS
      SHUTDOWNEN: Shutdown Enable: 0                 |   WDRESET: Watchdog Reset:     0    
      SS: Sealed:                  0                 |   CALMODE: Calibration:        0    
      CCA: CC Auto Cal:            0                 |   BCA: Calibration Active:     0    
      QMAX_UP: Qmax Updated:       0                 |   RES_UP: Resistance Updated:  0    
      INITCOMP: Initialised:       0                 |   HIBERNATE: Hibernate Requested: 0    
      SLEEP: Sleep Mode:           0                 |   LDMD: Constant-power model:  1   
      RUP_DIS: Ra Update Disabled: 1                 |   VOK: V ok for Qmax Update:   1   
    STATE
      Qmax_Cell_O:             16384                 |   Update_Status:               0
      Reserve_Cap-Ah:              0                 |   Load_Select/Mode:          129
      Q_Invalid_MaxV:           3803                 |   Q_Invalid_MinV:           3752
      Design_Capacity:          1800                 |   Design_Energy:            6660
      Default_Design_Cap:       1340                 |   Terminate_Voltage:        3300
      Temp_Rise:                  20                 |   Temp_Time_Constant:       1000
      SOCI_Delta:                  1                 |   Taper_Rate:                360
      Taper_Voltage:            4100                 |   Sleep_Current:               0
      V_at_Chg_Term:            4190                 |   Avg_I_Last_Run:            -50
      Avg_P_Last_Run:            -50                 |   Delta_Voltage:               1
    CHG_TERM
      TCA_Set_percent:            99                 |   TCA_Clear_percent:          95
      FC_Set_percent:             -1                 |   FC_Clear_percent:           98
      DODatEOC_Delta_T:           50
    CURRENT_THRESH
      Dsg_Current_Threshold:     225                 |   Chg_Current_Threshold:     112
      Quit_Current:              900                 |   Dsg_Relax_Time:             60
      Chg_Relax_Time:             60                 |   Quit_Relax_Time:             1

    *** Discharge at ~120mA until under 95%

    BATTERY DETAILS
      date:      2015-01-02T03:36:51                 |   voltage:                 4.076
      current:                  -122                 |   percent:                    94
      health:                     88                 |   capacity:                 1660
      remaining:                1555                 |   temperature:              22.0
    FLAGS
      OT: Over-Temperature:        0                 |   UT: Under-Temperature:       0
      FC: Full charge:             0                 |   CHG: Fast charging allowed:  1
      OCVTAKEN: OCV in relax mode: 1                 |   ITPOR: Has Reset:            0
      CFGUPMODE: Config Update:    0                 |   BAT_DET: Battery insert:     1
      SOC1: SOC1 Set Threshold:    0                 |   SOCF: SOCF Set Threshold:    0
      DSG: Discharging:            1
    STATUS
      SHUTDOWNEN: Shutdown Enable: 0                 |   WDRESET: Watchdog Reset:     0    
      SS: Sealed:                  0                 |   CALMODE: Calibration:        0    
      CCA: CC Auto Cal:            0                 |   BCA: Calibration Active:     0    
      QMAX_UP: Qmax Updated:       0                 |   RES_UP: Resistance Updated:  0    
      INITCOMP: Initialised:       1                 |   HIBERNATE: Hibernate Requested: 0    
      SLEEP: Sleep Mode:           0                 |   LDMD: Constant-power model:  1   
      RUP_DIS: Ra Update Disabled: 1                 |   VOK: V ok for Qmax Update:   1   
    STATE
      Qmax_Cell_O:             16384                 |   Update_Status:               0
      Reserve_Cap-Ah:              0                 |   Load_Select/Mode:          129
      Q_Invalid_MaxV:           3803                 |   Q_Invalid_MinV:           3752
      Design_Capacity:          1800                 |   Design_Energy:            6660
      Default_Design_Cap:       1340                 |   Terminate_Voltage:        3300
      Temp_Rise:                  20                 |   Temp_Time_Constant:       1000
      SOCI_Delta:                  1                 |   Taper_Rate:                360
      Taper_Voltage:            4100                 |   Sleep_Current:               0
      V_at_Chg_Term:            4190                 |   Avg_I_Last_Run:            -50
      Avg_P_Last_Run:            -50                 |   Delta_Voltage:               1
    CHG_TERM
      TCA_Set_percent:            99                 |   TCA_Clear_percent:          95
      FC_Set_percent:             -1                 |   FC_Clear_percent:           98
      DODatEOC_Delta_T:           50
    CURRENT_THRESH
      Dsg_Current_Threshold:     225                 |   Chg_Current_Threshold:     112
      Quit_Current:              900                 |   Dsg_Relax_Time:             60
      Chg_Relax_Time:             60                 |   Quit_Relax_Time:             1

    *** Charge again. Starts at ~330mA
    Note the SOC immediately drops from 94 to 85 as the charger kicks in

    BATTERY DETAILS
      date:      2015-01-02T03:37:00                 |   voltage:                 4.149
      current:                   334                 |   percent:                    85
      health:                     88                 |   capacity:                 1658
      remaining:                1398                 |   temperature: 22.30000000000001
    FLAGS
      OT: Over-Temperature:        0                 |   UT: Under-Temperature:       0
      FC: Full charge:             0                 |   CHG: Fast charging allowed:  1
      OCVTAKEN: OCV in relax mode: 1                 |   ITPOR: Has Reset:            0
      CFGUPMODE: Config Update:    0                 |   BAT_DET: Battery insert:     1
      SOC1: SOC1 Set Threshold:    0                 |   SOCF: SOCF Set Threshold:    0
      DSG: Discharging:            0
    STATUS
      SHUTDOWNEN: Shutdown Enable: 0                 |   WDRESET: Watchdog Reset:     0    
      SS: Sealed:                  0                 |   CALMODE: Calibration:        0    
      CCA: CC Auto Cal:            0                 |   BCA: Calibration Active:     0    
      QMAX_UP: Qmax Updated:       0                 |   RES_UP: Resistance Updated:  0    
      INITCOMP: Initialised:       1                 |   HIBERNATE: Hibernate Requested: 0    
      SLEEP: Sleep Mode:           0                 |   LDMD: Constant-power model:  1   
      RUP_DIS: Ra Update Disabled: 1                 |   VOK: V ok for Qmax Update:   1   
    STATE
      Qmax_Cell_O:             16384                 |   Update_Status:               0
      Reserve_Cap-Ah:              0                 |   Load_Select/Mode:          129
      Q_Invalid_MaxV:           3803                 |   Q_Invalid_MinV:           3752
      Design_Capacity:          1800                 |   Design_Energy:            6660
      Default_Design_Cap:       1340                 |   Terminate_Voltage:        3300
      Temp_Rise:                  20                 |   Temp_Time_Constant:       1000
      SOCI_Delta:                  1                 |   Taper_Rate:                360
      Taper_Voltage:            4100                 |   Sleep_Current:               0
      V_at_Chg_Term:            4190                 |   Avg_I_Last_Run:            -50
      Avg_P_Last_Run:            -50                 |   Delta_Voltage:               1
    CHG_TERM
      TCA_Set_percent:            99                 |   TCA_Clear_percent:          95
      FC_Set_percent:             -1                 |   FC_Clear_percent:           98
      DODatEOC_Delta_T:           50
    CURRENT_THRESH
      Dsg_Current_Threshold:     225                 |   Chg_Current_Threshold:     112
      Quit_Current:              900                 |   Dsg_Relax_Time:             60
      Chg_Relax_Time:             60                 |   Quit_Relax_Time:             1

    *** a few hours later, the current is gradually dropping past the taper threshold, no change in other flags

    BATTERY DETAILS
      date:      2015-01-02T04:36:29                 |   voltage:                 4.208
      current:                    40                 |   percent:                   100
      health:                     88                 |   capacity:                 1670
      remaining:                1670                 |   temperature: 24.60000000000003
    FLAGS
      OT: Over-Temperature:        0                 |   UT: Under-Temperature:       0
      FC: Full charge:             0                 |   CHG: Fast charging allowed:  0
      OCVTAKEN: OCV in relax mode: 1                 |   ITPOR: Has Reset:            0
      CFGUPMODE: Config Update:    0                 |   BAT_DET: Battery insert:     1
      SOC1: SOC1 Set Threshold:    0                 |   SOCF: SOCF Set Threshold:    0
      DSG: Discharging:            0
    STATUS
      SHUTDOWNEN: Shutdown Enable: 0                 |   WDRESET: Watchdog Reset:     0    
      SS: Sealed:                  0                 |   CALMODE: Calibration:        0    
      CCA: CC Auto Cal:            0                 |   BCA: Calibration Active:     0    
      QMAX_UP: Qmax Updated:       0                 |   RES_UP: Resistance Updated:  0    
      INITCOMP: Initialised:       1                 |   HIBERNATE: Hibernate Requested: 0    
      SLEEP: Sleep Mode:           0                 |   LDMD: Constant-power model:  1   
      RUP_DIS: Ra Update Disabled: 1                 |   VOK: V ok for Qmax Update:   1   
    STATE
      Qmax_Cell_O:             16384                 |   Update_Status:               0
      Reserve_Cap-Ah:              0                 |   Load_Select/Mode:          129
      Q_Invalid_MaxV:           3803                 |   Q_Invalid_MinV:           3752
      Design_Capacity:          1800                 |   Design_Energy:            6660
      Default_Design_Cap:       1340                 |   Terminate_Voltage:        3300
      Temp_Rise:                  20                 |   Temp_Time_Constant:       1000
      SOCI_Delta:                  1                 |   Taper_Rate:                360
      Taper_Voltage:            4100                 |   Sleep_Current:               0
      V_at_Chg_Term:            4190                 |   Avg_I_Last_Run:            -50
      Avg_P_Last_Run:            -50                 |   Delta_Voltage:               1
    CHG_TERM
      TCA_Set_percent:            99                 |   TCA_Clear_percent:          95
      FC_Set_percent:             -1                 |   FC_Clear_percent:           98
      DODatEOC_Delta_T:           50
    CURRENT_THRESH
      Dsg_Current_Threshold:     225                 |   Chg_Current_Threshold:     112
      Quit_Current:              900                 |   Dsg_Relax_Time:             60
      Chg_Relax_Time:             60                 |   Quit_Relax_Time:             1

    As it charges, current keeps dropping until about 19mA before cutting to 0.

    Shortly after this OCVTAKEN occasionally toggles, so it's now in relax mode as expected. On this test OCVTAKEN never toggled during the charging phase as it had been previously (supporting the theory of the issue with the chresholds).

    SLEEP mode also goes true eventually in this 0 current state (did not earlier during while current flowing).

    I've tried using bqstudio this morning to confirm my values, but as far as I can tell it won't show generated registers without writing them to a live connected chip? I don't have any supported adapters / eval boards currently to do this.

    Should it matter if Update_Status is set to 0 or 3 during this initial charge, as far as FC is concerned?

    Thanks,

    Andrew

  • Update status does not matter.

    OCV Taken is only true if you let it "relax" after charge.

  • Ok I'll stop testing update status for now.

    OCVTaken appears to be true pretty much immediately after the chip is reset (as soon as ITPOR is cleared) and stays true the entire time it's discharging and charging until the charge current drops to zero. At that point it goes to false, then true, about every 18 seconds from then on (still on charger, current == 0)

    Not much is said about OCVTaken in the manual, is this something that would affect FC detection? It doesn't sound like it.

  • Sorry I accidentally hit the resolved button, it's not actually resolved I'm still very blocked by this

  • There are two calculations for Taper Rate in your posts:

    1.

    At power on, if ITPOR is set I configure the following specs:

        design_capacity = 1800
        design_energy = 6660
        terminate_voltage = 3300
        taper_rate = 500

    where taper_rate is from 1800 / (0.1 × 36 mA) = 500

    2.

    state.Taper_Rate = 1800 * 10 / 50 = 360

    Your log info shows a current of 40mA when you expect FC = 1 (but FC = 0). Given that your calculations are inverse of each other (one has a taper rate of C/50 for a taper current of 36mA and the other has a taper rate of C/36 for a taper current of 50mA), I want to make sure that this rate is correct.

    Taper rate has to be C/36 (taper rate = 360) for FC = 1 with a 40mA current. Please double check what was actually written to taper rate. 500 or 360?.

    Note that the current must drop below 50mA (with a taper rate setting of 360) for at least 80 seconds and it must not drop below C/90 (20mA) during these 80 seconds for the gauge to detect charge termination. If it drops below 20mA during that time, it will exit discharge mode and invalidate this charge for a full charge.

  • Thanks Dominik,

    When I first posted this question yes, I had my taper current at 36ma

    In my response to your previous suggestion regarding the charge/discharge/quite thresholds I did indeed increase the taper current threshold to 50mA as well as dropping the quit current to 20mA, I thought this larger margin would help.

    I also chaged my test procedure to do a hard reset via i2c command before each of these tests to ensure I'm starting from a consistent state.

    These thresholds can be seen in the regs printed out in each section of that large post.

    During the charging cycle of that test, it dropped below 50mA at 04:31:32
    The 40mA snapshot was taken at 4:36:29
    It didn't get down to 20mA (quit threshold) until 04:53:09

    As such there was 20 minutes between 50mA and 20mA during which FC never set.

    Here's a plot of the current from that test I reported on Mar 31, 2020 9:11 PM

  • Would it be possible to log the following info every 5 seconds (or faster but no more than once a second):

    time, current, voltage, temperature, control_status, flags,remaining capacity unfiltered&filtered, full charge capacity unfiltered&filtered

    from start of charge to after the charger turns off the current?

    If you attach that together with a complete list of everything you configure in the gauge then I can run this through our gauge sim to investigate this more. With everything you provided so far, the FC bit should be set so I need to dig into this deeper but to do this, I need this log file.

  • That sounds good, I'll add the extra register logs to my firmware and run a discharge/charge cycle today. I'll post it and the other details requested later today.

    Thanks,

    Andrew

  • Thanks for the assistance Dominik, Kang,

    The problem has been found and fixed.

    In the process of adding the extra registers logging I added a log in the soft reset function to ensure it was being called correctly to exit CFGUPMODE during initial configuration.

    On the next run, I saw soft reset being called regularly, a number of times every few seconds!

    It turns out my driver was entering and exiting CFGUPMODE every time it was reading Extended Data Classes as well as when writing to them.
    As such every time I was logging the registers, it was running a soft reset.

    As soon as I removed this for the read function, the first cycle of discharge to 90%, charge back to 100% there it is - there's a properly set FC

    Thanks again for all the help, there has been a few days in the last week I've been at an absolute loss, the suggestions have prompted quite a few fixes and improvement which have all lead to this resolution.

  • Thanks for the update!