we have a problem with device ID reading when i interface with SAML21 xplained board with ad7124-8 evaluation board
i was getting a device id is 0x02 which is not correct, since device id for 7124-8 is 0x12.In samL21 i configured spi for 1Mz
and read and write seems proper.After resetting the device by sending 64 consecutive bits i was reading the read register
which was 0x02.
Here is the snippet of the code.
spi_select_slave(&spi_master_instance, &slave, true); // chip select low api for sam L21
AD7124_Setup(ad7124_handler, AD7124_SLAVE_ID, (ad7124_st_reg *)&ad7124_regs);//adc set up will call adc reset function.
regs = ad7124_handler->regs;
ret = AD7124_ReadRegister(ad7124_handler,®s[AD7124_ID]); // Reading the register
adcID = regs[AD7124_ID].value;