This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AFE4404: 通讯可以读出寄存器,初始化后不能亮灯

Part Number: AFE4404

初始如下

void AFE4404_Reg_Init(void)
{
// usart_tx_dma_send(test_uart,3);
//AFE4404_Reg_Write(0x00, 0x000000); /*CONTROL0*/
// usart_tx_dma_send(test_uart,2);
AFE4404_Reg_Write(0x01, 0x000320); /*LED2STC*/
AFE4404_Reg_Write(0x02, 0x000F9F); /*LED2ENDC*/
AFE4404_Reg_Write(0x03, 0x001F42); /*LED1LEDSTC*/
AFE4404_Reg_Write(0x04, 0x002EE1); /*LED1LEDENDC*/
AFE4404_Reg_Write(0x05, 0x0012C1); /*ALED2STC*/
AFE4404_Reg_Write(0x06, 0x001F40); /*ALED2ENDC*/
AFE4404_Reg_Write(0x07, 0x002262); /*LED1STC*/
AFE4404_Reg_Write(0x08, 0x002EE1); /*LED1ENDC*/
AFE4404_Reg_Write(0x09, 0x000000); /*LED2LEDSTC*/
AFE4404_Reg_Write(0x0A, 0x000F9F); /*LED2LEDENDC*/
AFE4404_Reg_Write(0x0B, 0x003203); /*ALED1STC*/
AFE4404_Reg_Write(0x0C, 0x003E82); /*ALED1ENDC*/
AFE4404_Reg_Write(0x0D, 0x000FA9); /*LED2CONVST*/
AFE4404_Reg_Write(0x0E, 0x001F47); /*LED2CONVEND*/
AFE4404_Reg_Write(0x0F, 0x001F51); /*ALED2CONVST*/
AFE4404_Reg_Write(0x10, 0x002EEF); /*ALED2CONVEND*/
AFE4404_Reg_Write(0x11, 0x002EF9); /*LED1CONVST*/
AFE4404_Reg_Write(0x12, 0x003E97); /*LED1CONVEND*/
AFE4404_Reg_Write(0x13, 0x003EA1); /*ALED1CONVST*/
AFE4404_Reg_Write(0x14, 0x004E3F); /*ALED1CONVEND*/
AFE4404_Reg_Write(0x15, 0x000FA1); /*ADCRSTSTCT0*/
AFE4404_Reg_Write(0x16, 0x000FA7); /*ADCRSTENDCT0*/
AFE4404_Reg_Write(0x17, 0x001F49); /*ADCRSTSTCT1*/
AFE4404_Reg_Write(0x18, 0x001F4F); /*ADCRSTENDCT1*/
AFE4404_Reg_Write(0x19, 0x002EF1); /*ADCRSTSTCT2*/
AFE4404_Reg_Write(0x1A, 0x002EF7); /*ADCRSTENDCT2*/
AFE4404_Reg_Write(0x1B, 0x003E99); /*ADCRSTSTCT3*/
AFE4404_Reg_Write(0x1C, 0x003E9F); /*ADCRSTENDCT3*/
AFE4404_Reg_Write(0x1D, 0x009C3F); /*PRPCOUNT*/
AFE4404_Reg_Write(0x1E, 0x000103); /*CONTROL1*/

AFE4404_Reg_Write(0x20, 0x008003); /*TIAGAIN*/
AFE4404_Reg_Write(0x21, 0x000003); /*TIA_AMB_GAIN*/
AFE4404_Reg_Write(0x22, 0x0030CF); /*LEDCNTRL*/
AFE4404_Reg_Write(0x23, 0x124218); /*CONTROL2*/
AFE4404_Reg_Write(0x29, 0x000000); /*CLKDIV1*/
AFE4404_Reg_Write(0x2A, 0x000000); /*LED2VAL*/
AFE4404_Reg_Write(0x2B, 0x000000); /*ALED2VAL*/
AFE4404_Reg_Write(0x2C, 0x000000); /*LED1VAL*/
AFE4404_Reg_Write(0x2D, 0x000000); /*ALED1VAL*/
AFE4404_Reg_Write(0x2E, 0x000000); /*LED2-ALED2VAL*/
AFE4404_Reg_Write(0x2F, 0x000000); /*LED1-ALED1VAL*/
AFE4404_Reg_Write(0x31, 0x000020); /*CONTROL3*/
AFE4404_Reg_Write(0x32, 0x00515F); /*PDNCYCLESTC*/
AFE4404_Reg_Write(0x33, 0x00991F); /*PDNCYCLEENDC*/
AFE4404_Reg_Write(0x34, 0x000000); /*PROG_TG_STC*/
AFE4404_Reg_Write(0x35, 0x000000); /*PROG_TG_ENDC*/
AFE4404_Reg_Write(0x36, 0x000FA1); /*LED3LEDSTC*/
AFE4404_Reg_Write(0x37, 0x001F40); /*LED3LEDENDC*/
AFE4404_Reg_Write(0x39, 0x000000); /*CLKDIV2*/
AFE4404_Reg_Write(0x3A, 0x000000); /*OFFDAC*/

//AFE4404_Enable_Read();
AFE4404_Reg_Write(0x00, 0x000001);
}

主程序里一直读0x2A,0x2B,0x2C寄存器的值,始终是00 00 00 00 1F 00 00 00 0A,灯也不亮,请问是读之前还要有什么操作吗

  • 您好,参考这篇FAQ,其中有介绍AFE4404 上电后的操作步骤:

    https://e2e.ti.com/support/data-converters-group/data-converters/f/data-converters-forum/369445/afe4400-afe4490-afe4403-afe4404-faqs

    After powering up the AFE,

    1. issue a reset to the AFE by applying a 25-µs to 50-µs duration active low pulse on the RESETZ pin.

    2. the AFE has a CLK pin. Depending on the clock mode determined for the application, apply an external 4MHz - 60MHz clock (default mode after reset) on the CLK pin or program the OSC_ENABLE bit for selecting the internal oscillator clock. In external clock mode, a programmable internal division ratio between 1 to 12 must be set so that the divided clock is between 4 MHz to 6 MHz.

    3. configure the AFE for LED on/off, sampling, conversion and ADC reset timing edges, LED currents, TIA gain and Cf setting and PRP_COUNT. 

    4. monitor the ADC_RDY pin. The periodicity of the ADC_RDY pulses will occur at the pulse repetition frequency configured.

    按照上述步骤验证下,LED是否开启。