hi
I have encounter a trouble, I have write value to registers and read back this value from this registers via SPI interface, and the registers read back value are same as the value has written to them, so the SPI interface is successful.
when I do not connect the LED sensor to AFE4403 and I use the diagnostic function of the device to verify it whether work or not, unfortunately the result is not good,I found that the diagnostic function is not work and the result read from address 30h is equal to 0 all the time, the diagnostic code shows as follows
unsigned long AFE44xx_Diagnostic(void)
{
volatile unsigned long diagResult;
Disable_AFE44xx_DRDY_Interrupt(); // Disable interrupt
AFE44xx_Reg_Write((unsigned char)CONTROL0, DIAG_EN );
Delay_Ms(30); // wait for diagnostic finish
Enable_AFE44xx_SPI_Read();
diagResult = AFE44xx_Reg_Read((unsigned char)DIAG);
Enable_AFE44xx_DRDY_Interrupt();
return diagResult;
}
the code I have demonstrated on AFE4400 platform and it works fine.
I need your help, the problem has bothered me for a long time so that I can not carry out the next work phase ,
thank you