使用stm32编程AFE4404,寄存器能够正常读写,且在使用内部时钟时,ADC_RDY中断正常发出,42-47寄存器正常读取(值看不出来正常否,驱动的SFH7050不亮灯
电路仿照评估板,TX_SUP接5v,RX_SUP,IO_SUP接3.3v

寄存器初始化:
u8 AFE4404_Reg_Init(void)
{
u8 initcode = 0;
AFE4404_Disable_Read();
initcode += reg_write(1, 100); // AFE_LED2STC
initcode += reg_write(2, 399); // AFE_LED2ENDC
initcode += reg_write(3, 802); // AFE_LED1LEDSTC
initcode += reg_write(4, 1201); // AFE_LED1LEDENDC
initcode += reg_write(5, 501); // AFE_ALED2STC
initcode += reg_write(6, 800); // AFE_ALED2ENDC
initcode += reg_write(7, 902); // AFE_LED1STC
initcode += reg_write(8, 1201); // AFE_LED1ENDC
initcode += reg_write(9, 0); // AFE_LED2LEDSTC
initcode += reg_write(10, 399); // AFE_LED2LEDENDC
initcode += reg_write(11, 1303); // AFE_ALED1STC
initcode += reg_write(12, 1602); // AFE_ALED1ENDC
initcode += reg_write(13, 409); // AFE_LED2CONVST
initcode += reg_write(14, 1468); // AFE_LED2CONVEND
initcode += reg_write(15, 1478); // AFE_ALED2CONVST
initcode += reg_write(16, 2537); // AFE_ALED2CONVEND
initcode += reg_write(17, 2547); // AFE_LED1CONVST
initcode += reg_write(18, 3606); // AFE_LED1CONVEND
initcode += reg_write(19, 3616); // AFE_ALED1CONVST
initcode += reg_write(20, 4675); // AFE_ALED1CONVEND
initcode += reg_write(21, 401); // AFE_ADCRSTSTCT0
initcode += reg_write(22, 407); // AFE_ADCRSTENDCT0
initcode += reg_write(23, 1470); // AFE_ADCRSTSTCT1
initcode += reg_write(24, 1476); // AFE_ADCRSTENDCT1
initcode += reg_write(25, 2539); // AFE_ADCRSTSTCT2
initcode += reg_write(26, 2545); // AFE_ADCRSTENDCT2
initcode += reg_write(27, 3608); // AFE_ADCRSTSTCT3
initcode += reg_write(28, 3614); // AFE_ADCRSTENDCT3
initcode += reg_write(54, 401); // AFE_LED3LEDSTC
initcode += reg_write(55, 800); // AFE_LED3LEDENDC
initcode += reg_write(29, 39999); // AFE_PRPCOUNT
initcode += reg_write(30, 0x000103); // AFE_CONTROL1 TimerEN = 1; NUMAV = 3
initcode += reg_write(32, 0x008003); // AFE_TIA_SEP_GAIN (LED2) ENSEPGAIN = 1; LED2/LED3 gain = 50K
initcode += reg_write(33, 0x000003); // AFE_TIA_GAIN (LED1) LED1/LED1AMB gain = 50K
initcode += reg_write(58, 0x000000); // AFE_DAC_SETTING_REG
initcode += reg_write(34, 0x0030CF); // LED3 - 3.125mA; LED2 - 3.125mA; LED1 - 12.5mA
// initcode += reg_write(34, 0x03ffff); // LED3 ; LED2 ; LED1 - 50mA
// initcode += reg_write(35, 0x124018); // DYN1, LEDCurr, DYN2, Ext CLK, DYN3, DYN4 //0x000200); - 0x200 Osc mode //AFE_CONTROL2
initcode += reg_write(35, 0x124218); // DYN1, LEDCurr, DYN2, in CLK, DYN3, DYN4 //0x000200); - 0x200 Osc mode //AFE_CONTROL2
initcode += reg_write(49, 0x000020); // ENABLE_INPUT_SHORT
initcode += reg_write(57, 0); // CLKDIV_PRF
initcode += reg_write(50, 5475); // AFE_DPD1STC
initcode += reg_write(51, 39199); // AFE_DPD1ENDC
AFE4404_Enable_Read();
return initcode;
}
AFE4404读写时序:

为什么不亮灯呢Orz