Hi you guys,
I am trying to read out the ADC value ( LEDCNTRL register - 0x22 adress ) converted by AFE. The setting of AFE registers that I programmed is based on the GUI as below.
But it seems to be that the ADC value doesn't change as much as it is expected when I change the brightness lighting to the SFH7050 sensor, therefore I think it doesn't work properly OR I missed something necessary to make it work.
This is my setting, and I am sure that the AFE registers have already been set successfully.
#define AFE4403_CONTROL0 0x000000
#define AFE4403_LED2STC 0x0017C0
#define AFE4403_LED2ENDC 0x001F3E
#define AFE4403_LED2LEDSTC 0x1770
#define AFE4403_LED2LEDENDC 0x1F3F
#define AFE4403_ALED2STC 0x000050
#define AFE4403_ALED2ENDC 0x0007CE
#define AFE4403_LED1STC 0x000820
#define AFE4403_LED1ENDC 0x000F9E
#define AFE4403_LED1LEDSTC 0x0007D0
#define AFE4403_LED1LEDENDC 0x000F9F
#define AFE4403_ALED1STC 0x000FF0
#define AFE4403_ALED1ENDC 0x00176E
#define AFE4403_LED2CONVST 0x000006
#define AFE4403_LED2CONVEND 0x0007CF
#define AFE4403_ALED2CONVST 0x0007D6
#define AFE4403_ALED2CONVEND 0x000F9F
#define AFE4403_LED1CONVST 0x000FA6
#define AFE4403_LED1CONVEND 0x00176F
#define AFE4403_ALED1CONVST 0x001776
#define AFE4403_ALED1CONVEND 0x001F3F
#define AFE4403_ADCRSTSTCT0 0x000000
#define AFE4403_ADCRSTENDCT0 0x000005
#define AFE4403_ADCRSTSTCT1 0x0007D0
#define AFE4403_ADCRSTENDCT1 0x0007D5
#define AFE4403_ADCRSTSTCT2 0x000FA0
#define AFE4403_ADCRSTENDCT2 0x000FA5
#define AFE4403_ADCRSTSTCT3 0x001770
#define AFE4403_ADCRSTENDCT3 0x001775
#define AFE4403_PRPCOUNT 0x001F3F
#define AFE4403_CONTROL1 0x000101
#define AFE4403_SPARE1 0x000000
#define AFE4403_TIAGAIN 0x000000
#define AFE4403_TIA_AMB_GAIN 0x004002
#define AFE4403_LEDCNTRL 0x0114FF
#define AFE4403_CONTROL2 0x000000
#define AFE4403_SPARE2 0x000000
#define AFE4403_SPARE3 0x000000
#define AFE4403_SPARE4 0x000000
#define AFE4403_RESERVED1 0x000000
#define AFE4403_RESERVED2 0x000000
#define AFE4403_ALARM 0x000000
#define AFE4403_LED2VAL 0x000000
#define AFE4403_ALED2VAL 0x000000
#define AFE4403_LED1VAL 0x000000
#define AFE4403_ALED1VAL 0x000000
#define AFE4403_LED2_ALED2VAL 0x000000
#define AFE4403_LED1_ALED1VAL 0x000000
#define AFE4403_DIAG 0x000000
#define AFE4403_CONTROL3 0x008000
#define AFE4403_PDNCYCLESTC 0x000000
#define AFE4403_PDNCYCLEENDC 0x000000
Thanks all very much !