Greetings!
I'm using an AD7616 in SPI serial mode.
I've put the AD7616 into digital interface self-test by writing a 0x86BB to the Channel Register. But When I'm trying to read back the value from the same location it always returns a 0x0 value. Initially, my goal is to run a self-test and read the values as said in the datasheet. So, not using any scope to check the waveforms.
I read many threads on this page but I'm unable to sort them out. Maybe my approach is wrong. The following is the main code.
int main(void){
struct ad7616_dev *dev;
uint32_t* buf = XPAR_PS7_DDR_0_S_AXI_BASEADDR;
Xil_ICacheEnable():
XilDCahceEnable();
Printf("AD7616 Reference Design.\n");
uint16_t reg_data;
ad7616_setup(&dev, &init_param);
ad7616_reset(dev);
ad7616_write(dev, AD7616_REG_CHANNEL, 0x86BB) ;
uint16_t temp = ad7616_read(dev, AD7616_REG_CHANNEL, ®_data)
printf("0x%X", temp);
XilDCahceDisable();
Xil_ICacheDisable();
return 0;
}