I have a custom board with a AD7124-8 chip and I am trying to get the SPI comms working. The AD7124 is using default configurations, which includes CRC checks on SPI operations. I have started by attempting to read the ID register, but the SPI read operation fails the CRC check.
I am using the AD "no-OS" driver, so it reads registers via a call to "AD7124_ReadRegister".
When the attempt is made to read the ID register, the no-OS driver first does a read of the Error register to check whether a CRC calculation is underway (via a call to "AD7124_WaitForSpiReady"). The result from this error register read operation is actually what is failing the CRC check (as a result of which, the original call to read the ID register fails with a return result of -2 = "COMM_ERR").
I have captured the SPI traffic during the read of the error register. It looks ok to me - there is an initial byte of 0x46, which is a write to the communications register indicating a read request of the ID register, followed by 3 bytes for the error register vales and a final byte for the CRC. The error register seems to be full of zero values, which I am presuming is correctly saying that there are no errors. But the CRC in the fifth byte is zero also, which obviously fails against the CRC calculated over all five bytes.
Is anyone able to provide suggestions on things I could check to try to resolve this ?