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.

RTOS/AFE4404: How do I create a power on self test (POST) for the AFE4404?

Part Number: AFE4404

Tool/software: TI-RTOS

I would like to test the AFE4404 on power up, how do I go about doing that? I didn't find any notes on the topic in the datasheet.

I am just want to make sure I can 1) talk to the AFE4404 2) the AFE4404 is behaving correctly

Cheers,

Roman

  • Hi Roman,

    One quick way is to disconnect the PD using "PD_DISCONNECT" bit and give input using Offset Cancellation DAC. The output should be,
    Output = Offset DAC current * 2 * Rf.

    Regards,
    Prabin
  • Thank you!

    I tried to implement your method but I'm having some difficulties.

    Here's the code:

        set_up_afe4404();
        init_ti();
        apply_led_currents(0, 0, 0);
    
        reg_write(0x31, 0x000400);  // disable the photodiode
        reg_write(0x21, 0x000003);  // set the feedback resistor to 50 KOhms
        reg_write(0x3a, 0x000020);  // set the current offset to be 0.47 uA for LED1
    
        reg_write(0x00, 0x000001);
        uint32_t pd_disconnect = reg_read(0x31);
        uint32_t tia_gain = reg_read(0x21);
        uint32_t i_offset = reg_read(0x3a);
        reg_write(0x00, 0x000000);
    
        Task_sleep(1000000/Clock_tickPeriod);
    
    //    reg_write(0x23, 0x000200);  // enable the internal osc
    
        while (1) {
            uint32_t led1val = reg_read(0x2c);
    
            double voltage = (led1val * 1.2) / 2097152;
            System_printf("ADC code: %x voltage: %f\n", led1val, voltage); System_flush();
            Task_sleep(2000/Clock_tickPeriod);
        }

    I calculated that I should have 47 mV = (2) (50kohms) (0.47 uA)

    but I keep getting:

    ADC code: e3e4 voltage: 0.0333
    ADC code: e3f9 voltage: 0.0333
    ADC code: e402 voltage: 0.0333
    ADC code: e36d voltage: 0.0333
    

    The ADC codes keep changing and the number isn't what I calculated it to be.

    Am I using the wrong approach?

  • Hi Roman,

    I feel the difference between the calculated and measured value might be due to in accuracy of offset DAC and Rf.
    Can you increase the Rf to 500KOhm and try once again?

    Regards,
    Prabin