Other Parts Discussed in Thread: INA229
We use the INA229 in continuous conversion mode (MODE = 0xF).
Alerts are latched (ALATCH = 1) to make sure the MCU does not miss a fault condition.
We are also using the averaged value for the alert (SLOWALERT = 1), although the problem is reproducible without.
When the ALERT pin is pulled low, the MCU enters a loop where it reads the DIAG_ALRT register until the BUSUL bit is cleared. Since we are using the latched alert, reading the DIAG_ALRT clears the BUSUL bit, which is to be expected, so we also have to check that the CNVRF bit is set, otherwise we might just be reading the cleared bit form the previous read.
However, after a few iterations or reading the DIAG_ALRT register, we read CNVRF = 1 and BUSUL = 0, despite VBUS still being underlimit.
1. My assumption is that latched alerts are set after each conversion completion, is this actually the case?
2. If 1. is correct, is there a period during which CNVRF is set but BUSUL is not calculated yet, and reading the register at that moment would return incoherent data?
Note that disabling the latched alerts fixes the problem, however that's not a good solution in our application because the MCU does not have an interrupt for the ALERT pin and a fault condition of short duration may be missed.