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.

BQ40Z50-R2: BTP and CB

Part Number: BQ40Z50-R2
Other Parts Discussed in Thread: BQSTUDIO

I have some further questions related to BQ40Z50-R2, about BTP and CB.

1.BTP: we are trying to use this function in one of our new project. Based on my understanding, this function is used for depleted battery warning. In the fuel gauge description:

OperationStatus()[BTP_INT] is set when:

– Current > 0 and RemCap > “clear” threshold (“charge set threshold”). This threshold is initialized at reset from Settings.BTP.Init Charge Set.

– Current ≤ 0 and RemCap < “set” threshold (“discharge set threshold”). This threshold is initialized at reset from Settings.BTP.Init Discharge Set

What does this first condition mean? When the battery is charging, and RemCap > “clear” threshold (175mAh) by default, the BTP_INT will be set? So in normal use case, do we need to set this “clear” threshold to a very high value?

For the second condition, it is easy to understand. However, after reset by writing into 0x4A and BTP_INT cleared, it will change to 1 automatically, without any action, after about 5 minutes. The remaining capacity is 300mAh, and the threshold is 150mAh. So in this case it should not be triggered.

Please help us to understand the mechanism of this function, and let us know how this should be set.

 

2. CB: if we disable the CB (bit 0 = 0), other settings won’t impact the CB function, right? So 0x00 and 0x1a are the same?

Thank you much for your help! 

Sincerely,

 

Chen

  • The BTP is merely an indicator to the gauge to set an interrupt when the capacity thresholds are exceeded in one or another direction. You can choose to use it if you want an indication when the battery reaches a particular threshold, set by default to 150mAh for set and 175mAh for clear thresholds. The use of this is to indicate to the host that a significant remaining capacity threshold has been exceeded in either direction.

    This merely came from a Microsoft requirement that their batteries indicate when a particular threshold is met. At this threshold the gauge will send an interrupt on a pin connected to the MCU which takes action based on it.

    For disabling CB set CB to 0. If you disable CB, CBR will also be disabled. Yes, 0x00 and 0x1a are the same.
  • Hello Batt:

    Thanks for the reply. The CB is resolved.

    For BTP, I still have some questions. In your reply, it stated as "either direction", so what this "either direction" means? So the interrupt can be triggered either low capacity and high capacity?

    Back to my question, here is a screenshot from bqStudio.

    1. The remaining capacity is 300mAh, and 150mAh is the threshold. But BTP_INT is triggered. Based on the description from the spec, "OperationStatus()[BTP_INT] is set when:– Current ≤ 0 and RemCap < “set” threshold (“discharge set threshold”= 150mAh)" and the battery did't stay in this range, and BTP_INT should not be set.

    2. I tried to clear this by write BTPDischargeSet(), which will reset the flag as: ”When either BTPDischargeSet() or BTPChargeSet() commands are received,OperationStatus()[BTP_INT] will clear and the pin will be deasserted.”

    However, after it cleared for a little moment (within 2 mins), the flag would be set again. The battery still have 299mAh left.

    3. The BTP threshold is set as below: 

    So theoretically the BTP_INT should be set if RemCap <150mAh, and recover if RemCap>175mAh?

    4. In the technical reference, it also stated: 

    OperationStatus()[BTP_INT] is set when: – Current > 0 and RemCap > “clear” threshold (“charge set threshold”). This threshold is initialized at reset from Settings.BTP.Init Charge Set.

    So the BTP_INT will be set if the battery is charging (current > 0), and RemCap > 175mAh? I am not sure if I understand this correctly. 

    Please share your advise on the topics. Thank you very much!

    Chen

  • Either direction refers to either charge or discharge. BTP asserts either way whenever any threshold is crossed, it is direction independent. It's up to the host to control the BTP writes to reset the flag in the register.

    First, let's say you are at 300mAh, now program both your thresholds to any value below, set = 150, clear = 175. Then reset the gauge. Now your BTP flag will remain cleared

    Then on dsg, if you cross below 150mAh with a dsg I, then BTP gets set (using set threshold). Now, you can choose to write a different lower threshold to reset it (say 100mAh). Once it crosses the newer threshold it will set again. If not, it will remain cleared.

    Now, when you start charge then BTP gets set when remcap exceeds the clear threshold with a chg I. Again you can reset it with a higher threshold written (say 200mAh) at which point the interrupt and register will set again.

    The whole point of this exercise is for the host to have some arbitrary value at which it wants to trigger an interrupt in either direction.
  • Hello Batt:

    Thank you very much for your detailed reply. Here are still some confusions.

    1. During DSG or idle, the battery should not trigger BTP_INT: RemCap 300mAh, set =150. However, the flag was set, and after manually cleared, it was automatically set again, as shown below:

    BTP_INT cleared manually:

    Reset automatically after about 1 minute, the battery was idle, without any CHG or DSG:

    Do you have any experience on this? Any settings were wrong?

    2. Based on the explanation in the Technical Reference/Spec:"Required for WIN8 OS, the battery trip point (BTP) feature indicates when the RSOC of a battery pack has depleted to a certain value set in a DF register. The BTP feature allows a host to program two capacity-based thresholds that govern the triggering of a BTP interrupt on the BTP_INT pin and the setting or clearing of the OperationStatus()[BTP_INT] on the basis of RemainingCapacity().

    So why do we want to trigger the BTP_INT during charging, and RemCap > clear threshold? Is there any typo error here? I think it make sense if BTP_INT is set if Current >0 and RemCap < clear threshold, which leaves some hysteresis of the flag clear. Please confirm.

    Thank you very much!

    Chen

  • I can't see how it set without a log. We want to trigger BTP during charging as it might be a state wherein you would like the charger to boost the charging rate or for any other reason.

    No, you will trigger a BTP pulse if you are charging and remcap is > clear threshold. Set will influence BTP on the way down while clear triggers it on the way up in chg.