I'm working with an AD7124-8 (more specifically with the EVAL-AD7124-8) trying to work with all of its functionalities.
In particular, I'm working with the continuous read mode, with the checksum enabled.
I encountered a problem, in fact the CRC received from the ADC is different from that I calculated locally.
Before I post the details I want to share the configuration of my registers:
- I use channel 0 connected to setup0;
- CHANNEL REGISTER 0: 0x8001
- CONFIGURATION REGISTER 0: 0x867
- ERROR ENABLE REGISTER: 0x44 (SPI_IGNORE_ERR_EN + SPI_CRC_ERR_EN)
- ADC CONTROL REGISTER: 0x8C0 (CONT_READ + Full power mode + continuous conversion mode)
All the other registers are left at their default values.
Then I start reading the data. The value I read comes from a load cell and is coherent with what I expected. However the CRC I receive doesn't coincide.
For example, received the following data: 0x83B708 (24 bit). From page 69 of the datasheet I read that there is an implied read data command of 0x42.
The full sequence I think is 0x4283B708. Hence I calculate the CRC obtaining 0x1D (calculated by a function I made, but also by hand to check the correctness).
But the CRC sent by the AD7124-8 is 0x5A.
I made a lot of readings with SCLK @500Hz and @700Hz, but I always obtain different values.
Is there something missing?
Thank you in advance,
[edited by: filippo_gr at 10:22 AM (GMT -4) on 21 Sep 2021]