MAX17261 ALERT Pin Occasionally Stuck Low - Status Register Not Clearing Consistently
Hi
I am using the MAX17261 fuel gauge IC and my MCU is STM32U5G7VJTXQ. According to fuel gauge's datasheet, the ALERT pin (active low pin) is asserted under the following conditions:
- SOC change
- SOC crossing minimum or maximum thresholds
- Voltage crossing minimum or maximum thresholds
- Other configured alert sources
I have implemented the initialization sequence as recommended in the device’s Software Implementation Guide .
Expected Behaviour
Whenever an alert condition occurs:
- The ALERT pin is asserted low.
- The corresponding bit in the STATUS register is set.
- The MCU detects the alert via an interrupt (triggered on a rising/falling edge).
- In the interrupt handler, the STATUS register is read and cleared.
- Once cleared, the ALERT pin should de-assert, allowing subsequent alerts to generate new interrupts.
Observed Issue
For most cases, the behavior works as expected - each SOC change triggers an alert, the MCU receives the interrupt, and the STATUS register is cleared in the interrupt handler.
However, occasionally, the STATUS register does not get cleared successfully, even though the clear operation is performed in the interrupt handler. When this happens:
- The ALERT pin remains asserted low.
- No further interrupts are received by the MCU, since the interrupt is edge-triggered.
- The system effectively stops receiving any further alerts.
This issue is rare and non-deterministic. So far, I have observed it only three times, and I have not been able to reliably reproduce the issue, which makes debugging difficult.
Questions
- Are there known corner cases where the STATUS register may fail to clear?
- Is there a recommended sequence for reading and clearing STATUS bits to ensure proper ALERT de-assertion?
- Are there any best practices recommended to handle such rare ALERT-stuck conditions?
Any insights or suggestions for diagnosing or mitigating this issue would be greatly appreciated.
Thank you!
