2026-02-15 9:24 PM
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:
I have implemented the initialization sequence as recommended in the device’s Software Implementation Guide .
Expected Behaviour
Whenever an alert condition occurs:
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:
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
Any insights or suggestions for diagnosing or mitigating this issue would be greatly appreciated.
Thank you!
2026-02-16 7:12 AM
This sounds like a race of some sort (or maybe an unnoticed transaction failure).
Try re-reading the STATUS register after writing it
Are you writing STATUS to =0, or only clearing the bits you're interested in?
2026-02-16 7:37 AM
Hi,
I'm reading the status register on every second. That's how I noticed, the bits are not getting cleared.
Initially I was clearing the bits corresponding to the alert generated, but this too created the same issue. So now I'm clearing the entire status register, when an alert is raised. But even this too is failing.
2026-02-16 7:51 AM
@Gowri_M wrote: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?
None of this has anything to do with ST or STM32.
These all relate to the MAX17261, which is an AD product - nothing to do with ST.
You need to go to AD for support with their product:
https://www.analog.com/en/support.html
https://ez.analog.com/search?engineerzone%5Bquery%5D=MAX17261
https://www.analog.com/en/products/max17261.html
2026-02-16 9:05 AM - edited 2026-02-16 9:19 AM
If, in response to re-reading, you write STATUS=0 (again), does it "stick" then? Supposing that you (eventually) succeed, I suspect that will be your workaround.
I didn't find an Errata sheet for the MAX17261. If you're convinced that your status-clearing transaction isn't silently failing, then, as Andrew points out, you probably need to ask Maxim (ADI).
[Edit: I notice that BegoonLab's driver in Github (here) includes a write-verify function (3 retries). Maybe they know something we don't.]
2026-02-16 9:45 AM - edited 2026-02-16 9:46 AM
@Gowri_M wrote:Any insights or suggestions for diagnosing or mitigating this issue would be greatly appreciated.