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.

AFE4404 returning zeros

Other Parts Discussed in Thread: AFE4404

Hi,

Our AFE4404 custom boards are returning zeros in the ADC registers similar to this problem.

I've attached a CSV file of the I2C logic analyser output, unfortunately my colleague isn't available today but I'll post the analog waveform later.

We don't have any connection to the ADC_RDY pin so I was just polling register 0x2C but it keeps returning zero as shown in the csv dump. Any ideas why it's not working?

Saleae Export.csv.zip

  • Hi Arthur,

    Can you please read 0x1D instead of 0x2C? If the read value matches the value written in 0x1D, it proves that the MCU's firmware for reading is fine.
    Also note that before reading 0x1D, you have to set 0x00<0> (i.e. REG_READ) bit and after you read 0x1D, you have to reset 0x00<0>.

    Regards,
    Prabin
  • Apologies for the delay in replying.

    Reading 0x1D I get 0b001111110000000000000000...(0x3F000000)

    The value written was 0x9C3F - we'll try to get another logic analyser dump of this test. Any advice on what's happening?

    best regards,
    Arthur
  • Hi Arthur,

    Looking at the data, I can clearly see that you are missing the MSB byte. I feel, somehow the logic analyzer is looking at the wrong time window.
    Can you please share analog waveforms ( from oscilloscope) for register write and read to 0x1D?

    Regards,
    Prabin
  • Hi Prabin,

    Thanks very much for your help.

    It turns out, that a missing parentheses before a cast (integer to byte for I2C communication) was discarding values for the registers (the MSB bytes for all register values were getting removed). In addition, our receive code also had the incorrect byte order.

    The AFE4404 is working now. Thanks very much for your help.

    best regards,
    Arthur