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.

[FAQ] INA229: Registers are reading incorrectly

Part Number: INA229
Other Parts Discussed in Thread: INA239

Why is it when I try reading a register, it appears that I'm actually reading a completely different register? For example, I read 0x3F but I get the results from register 0x3E instead.

  • A common error with this device that causes read/write values to be different than expected is to be using the incorrect SPI MODE. The INA229 uses CPOL = 0 (The clock is low (inactive) when idle and data is sampled on the falling edge) and CPHA = 1 (Data is shifted on the rising clock edge).

    The 4 modes for SPI are

    • SPI Mode 0 (CPOL=0, CPHA=0): Idle low, data sampled on rising edge, shifted on falling edge
    • SPI Mode 1 (CPOL=0, CPHA=1): Idle low, data sampled on falling edge, shifted on rising edge
    • SPI Mode 2 (CPOL=1, CPHA=0): Idle high, data sampled on rising edge, shifted on falling edge
    • SPI Mode 3 (CPOL=1, CPHA=1): Idle high, data sampled on falling edge, shifted on rising edge

    Both of our SPI current sensors, the INA229 and INA239, use SPI Mode 1