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.

BQ34Z100-G1: Is there a way to clear an ALERT without having to disable the bit causing the alert

Part Number: BQ34Z100-G1
Other Parts Discussed in Thread: BQ76952, , BQ34Z100

I have a design with a host MCU communicating with a BQ34Z100-G1 (and also a BQ76952). The ALERT pin on the BQ34Z100-G is connected to the MCU to allow the gauge to wake the MCU on events.

If I set the Alert Configuration to enable assertion of the ALERT line for say, EOD (End of Discharge), I correctly get the ALERT pin asserted when the event happens. The problem that I see is that there seems to be no way to clear the alert, except for completely disabling the bit in the Alert Configuration register. 

If the ALERT condition cannot be cleared, then it is no notification will be received if some other event occurs, such as BATLOW, as the ALERT line is continuously held low?

If I disable the EOD bit in the Alert Configuration, then ALERT will be deasserted, but then I would need to poll until the EOD bit clears in Flags() before re-enabling the Alert Configuration bit to ensure the MCU gets alerted on the next EOD event. Since the EOD flag might not clear until a long time in the future, polling for that long is undesirable.

In contrast the BQ76952 has separate ALERT status registers, which latch on an event, and can be cleared by the host MCU when they have been read. The ALERT will not be re-raised until the event happens again (clears and sets again). This is much neater to deal with from the MCU side.

  • Hello,

    The EOD_ALERT gets cleared automatically once the Remaining Capacity is greater or equal to the SOC1 Clear Threshold. The gauge then will check if Terminate discharge is True, and set it to FALSE. 

    Once Terminate Discharge is FALSE, the gauge will do a Remaining Capacity Check where it will clear End of Discharge Alert to FALSE, hence the flag should clear automatically.

    Regards,
    Jose Couso

  • Thanks, but the issue I am describing is not a problem with the flags not clearing when they should. 

    The problem is that, as far as I can tell, there is no way to acknowledge to the device that you have responded to the ALERT line being pulled low. This means that from an MCU point of view, the ALERT will remain fixed at low level until the Flag is cleared automatically.

    This means that it is impossible to receive any other ALERT signals that could occur during the time it takes for the flag to be cleared automatically (as the ALERT line is already held low by the previous event). This time might be very long.

    This also makes it impossible to use a shared interrupt line for more than one device, as the BQ34Z100 will hold the ALERT line low and prevent any other devices from signalling an ALERT to the MCU during this time.

  • Hello Henrik,

    Have you looked at section 3.10 in TRM? According to TRM, when the Alert Configuration pin is set to mode 2 (EOD), this is a dual purpose pin. 

    See the reference schematic in the BQ34Z100-G1 Wide Range Fuel Gauge with Impedance TrackTm Technology Data Sheet (SLUSBZ5) for filter implementation details if host alert sensing requires a continuous signal. Please see figure 8.4 in datasheet



    Regards,
    Jose Couso

  • Hi Jose,

    Let me try to rephrase the question, and maybe my needs can become clearer.

    • I have no need to use the ALERT pin for anything else than to signal ALERTs from the gauge to the MCU.
    • I want the MCU to be notified for several different events, including but not limited to, Full Charge, Bat Low, Bat High, Overtemperature, Undertemperature, Remaining Capacity Alarm
    • If any of these events is triggered ALERT will be asserted low (ALERT configuration = 0)
    • If any other alert occurs, no ALERT will be detectable by the MCU, as the ALERT pin is _already_ held low by the previous event.

    Consider the following scenario

    1. The gauge is configured to signal on ALERT on RCA and EOD.
    2. Discharging starts
    3. Remaining Capacity threshold is reached, and Remaining capacity alarm (RCA) is triggered.
    4. ALERT pin is asserted by the RCA event.
    5. MCU reads the gauge information over i2c. There is no way for the MCU to acknowledge to the gauge that it has responded to the alert. ALERT stays asserted low.
    6. Discharging continues.
    7. End of discharge threshold is reached and triggers and EOD event.
    8. Since ALERT is already asserted by the RCA condition, no signal will be detected on the ALERT pin. The ALERT pin will have been held permanently low since entering RCA condition.
    9. MCU has no way to know that EOD was reached, except to continuously poll the gauge over i2c communications.

    This is my current understanding of how the gauge works. What is needed some method to acknowledge the RCA event to allow the gauge to deassert the ALERT pin, without having to charge the battery. It could also be acceptable if the gauge at least toggles the ALERT so that a pulse is generated whenever a new event occurs so that the pulse can be detected by the MCU.

    Additionally, this behaviour makes it impossible to share the input pin on the MCU between devices, as the gauge will block any other device from signalling ALERT events if the gauge holds the ALERT line low all the time. This can be worked around by assigning an exclusive pin to the gauge, but might be difficult in low pin count MCUs.

  • Hello Henrik,

    Thanks for the explanation of the scenario.

    I've looked in the firmware and RCA is getting clear with EOD condition. In other words, there's no a RCA check and EOD check, RCA will get clear when EOD flag clears. This explains why ALERT pin is being kept low. 

    To recap, the condition for RCA and EOD to clear is:

    The EOD_ALERT gets cleared automatically once the Remaining Capacity is greater or equal to the SOC1 Clear Threshold. The gauge then will check if Terminate discharge is True, and set it to FALSE.

    EOD also clears when XDSG in safety status clears.

    Regards,
    Jose Couso

  • RCA and EOD alerts also get set at the same time.