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.

INA228: Unable to set EN_ALERT bit (MASK_ENABLE[14]) on multiple devices

Part Number: INA228


Tool/software:

Hi TI team,

I'm working with the INA228 and trying to use the ALERT pin to wake up an ESP32 from sleep when a bus undervoltage condition is detected.

According to the datasheet, I need to:

  1. Set the undervoltage limit (BUVL, register 0x0F)

  2. Enable the alert function in ALERT_ENABLE (register 0x06, bit 3 = VBUS_UV)

  3. Enable the corresponding bit in MASK_ENABLE (register 0x03, bit 3 = VBUS_UV)

  4. Globally enable the ALERT pin by setting bit 14 (EN_ALERT) in MASK_ENABLE

The I2C write to MASK_ENABLE appears successful (endTransmission() returns 0), but when I read the register back, only bit 3 is set. Bit 14 remains cleared.

Here’s a minimal working example of the write:

// Write 0x4008 to MASK_ENABLE (0x03)
Wire.beginTransmission(0x40);
Wire.write(0x03); // MASK_ENABLE
Wire.write(0x40); // MSB: bit 14 = EN_ALERT
Wire.write(0x08); // LSB: bit 3 = VBUS_UV
Wire.endTransmission();

// Read it back
Wire.beginTransmission(0x40);
Wire.write(0x03);
Wire.endTransmission(false);
Wire.requestFrom(0x40, 2);
uint16_t mask = (Wire.read() << 8) | Wire.read(); // Always returns 0x0008

I have tried this on 6 separate INA228 chips from the same reel, and all show the same behavior: EN_ALERT is never set, even though VBUS_UV is.

Other writes to INA228 registers work fine, and I've verified the same I2C code works with 16-bit writable registers on other devices (like MPU6050). So this appears to be specific to INA228.

Questions:

  • Is there any condition under which bit 14 (EN_ALERT) in MASK_ENABLE cannot be set?

  • Are there known silicon revisions or errata that could cause this behavior?

  • Does the INA228 require any other register configuration (e.g. CONFIG, ALERT_LATCH, etc.) before EN_ALERT becomes writable?

Any help or insight would be greatly appreciated. Thank you!

Best regards

  • Hello Anders,

    It seems you may be looking at the wrong datasheet, or have said the wrong device. Here is a link to the INA228 datasheet: https://www.ti.com/lit/ds/symlink/ina228.pdf

    To configure the ALERT on the INA228, you do the following:

    1. Set the limit in the register. (Reg 0x0F for BUVL)

    And that is it. The INA228 can have multiple alerts, so you can configure limits for all alerts you want to use, then you can look at bits 2-7 of the DIAG_ALRT register (reg 0x0B) to see which alert tripped the alert pin. The INA228 does not have a MASK_ENABLE register. 

    Regards,

    Mitch