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.

AFE4400 xVAL register bits (SPI SOMI) are sometimes all 0 or all 1

Other Parts Discussed in Thread: AFE4400

Hi, I am directly connecting an AFE4400 to a BLE module via synchronous USART (SPI). SPI communication seems to work. I can set all configuration registers and then I can read them back. But when I am reading data from the 6 measurement registers (regs 42-47) SPI randomly reads all 0 (decimal 0) or all 1 (decimal 16777215) at any random register. The scope shows that SOMI is constantly high or low. This happens in both cases a) when reading after an ADC_RDY interrupt and b) when reading with a timer set at 20 ms. I tried various SPI speeds but this did not change the behavior. 

I am grateful for any hints.

  • Hi Matthew,

    Just a quick question, do you set SPI_READ bit (D0 of CONTROL0 register) before you read the registers?
    Meanwhile few things to try:
    1) Try to read the data registers after falling edge of ADC_RDY.
    2) Use the timings as given in Table 2 of AFE4400 datasheet and see if it still happens.

    Regards,
    Prabin

  • Hi, thank you for the answer

    I am setting the SPI_READ bit before each single register read and then I am clearing it again. I could try setting it once, then reading all 6 registers and then clearing it again. Although at the end I will probably be reading only one register and the problem exists also if reading only one register for each ADC_RDY.

    for 1),  I will check to see how i have configured the interrupt. I actually used the slow timer at 20 ms to exclude any possible issues with wrong or multiple interrupts. Could it be that by chance I am trying to read while the register values are being updated?

    for 2), as far as I know I am actually using the timings of Table 2 (500 Hz PRF) but I will check it again for errors.

    Please note that the described behavior occurs every ca. 100-200 correctly read samples. 

    Greetings, Matthew

  • I believe I found the answer. The issue was with the BLE development board that I am using. It has a (poorly documented) shared pin with a packet trace feature, which happened to be the same having the SPI CLOCK signal. The SPI CLOCK signal had some additional overlayed pulses now and then due to this feature, which I disabled and the pulses stopped appearing.

    Thank you for the help in the first place.
    Matthew