Post Go back to editing

No output in FIFO

Category: Hardware
Product Number: ADPD188BI

Hai i am using the ADPD188BI on a custom board.we have a total of 2 boards in which one board is working fine i am able to read the data from the FIFO buffer , but on the other board the FIFO value will be either 0 or FFFF. After initialization when it is in Normal mode Both boards led's are blinking which indicate that sampling is happening also interrupt is getting from gpio0. I am not able to understand why one board is showing different values.I will attach the initialization code is there anything more i should add in the function.

Thanks in advance for your support.

 
int adpd188bi_init_smoke_detector(void)
{
    int      ret;
    uint16_t reg_data;

    /* ------------------------------------------------------------------ */
    /* Step 3 - Write recommended smoke-detector configuration (Table 26)  */
    /* ------------------------------------------------------------------ */

    /* 0x11 - FIFO format: 32-bit sum for both Time Slot A and B */
    ret = adpd188_reg_write(0x11, 0x30A9);
    if (ret != 0)
        return -1;

    /* 0x12 - Sampling rate: 16 Hz */
    ret = adpd188_reg_write(0x12, 0x0200);
    if (ret != 0)
        return -1;

    /* 0x14 - Blue LED -> Slot A, IR LED -> Slot B, combine PDET1+PDET2 */
    ret = adpd188_reg_write(0x14, 0x011D);
    if (ret != 0)
        return -1;

    /* 0x15 - No inter-sample decimation/averaging */
    ret = adpd188_reg_write(0x15, 0x0000);
    if (ret != 0)
        return -1;

    /* 0x17 - Slot A integrator chop sequence: inv, norm, norm, inv */
    ret = adpd188_reg_write(0x17, 0x0009);
    if (ret != 0)
        return -1;

    /* 0x18 - Slot A, Channel 1: no ADC offset */
    ret = adpd188_reg_write(0x18, 0x0000);
    if (ret != 0)
        return -1;

    /* 0x19-0x1B - Slot A, Channels 2-4: unused */
    ret = adpd188_reg_write(0x19, 0x3FFF);
    if (ret != 0)
        return -1;

    ret = adpd188_reg_write(0x1A, 0x3FFF);
    if (ret != 0)
        return -1;

    ret = adpd188_reg_write(0x1B, 0x3FFF);
    if (ret != 0)
        return -1;

    /* 0x1D - Slot B integrator chop sequence: inv, norm, norm, inv */
    ret = adpd188_reg_write(0x1D, 0x0009);
    if (ret != 0)
        return -1;

    /* 0x1E - Slot B, Channel 1: no ADC offset */
    ret = adpd188_reg_write(0x1E, 0x0000);
    if (ret != 0)
        return -1;

    /* 0x1F-0x21 - Slot B, Channels 2-4: unused */
    ret = adpd188_reg_write(0x1F, 0x3FFF);
    if (ret != 0)
        return -1;

    ret = adpd188_reg_write(0x20, 0x3FFF);
    if (ret != 0)
        return -1;

    ret = adpd188_reg_write(0x21, 0x3FFF);
    if (ret != 0)
        return -1;

    /* 0x22 - LED3 (IR) coarse current */
    ret = adpd188_reg_write(0x22, 0x3539);
    if (ret != 0)
        return -1;

    /* 0x23 - LED1 (Blue) coarse current */
    ret = adpd188_reg_write(0x23, 0x3536);
    if (ret != 0)
        return -1;

    /* 0x24 - LED2 (unused) */
    ret = adpd188_reg_write(0x24, 0x1530);
    if (ret != 0)
        return -1;

    /* 0x25 - Default LED drive trim (all three LEDs) */
    ret = adpd188_reg_write(0x25, 0x630C);
    if (ret != 0)
        return -1;

    /* 0x30 - Slot A: 3 us LED pulse width */
    ret = adpd188_reg_write(0x30, 0x0320);
    if (ret != 0)
        return -1;

    /* 0x31 - Slot A: 4 pulses, 15 us LED period offset */
    ret = adpd188_reg_write(0x31, 0x040E);
    if (ret != 0)
        return -1;

    /* 0x35 - Slot B: 3 us LED pulse width */
    ret = adpd188_reg_write(0x35, 0x0320);
    if (ret != 0)
        return -1;

    /* 0x36 - Slot B: 4 pulses, 15 us LED period offset */
    ret = adpd188_reg_write(0x36, 0x040E);
    if (ret != 0)
        return -1;

    /* 0x39 - Slot A: AFE integrator timing window */
    ret = adpd188_reg_write(0x39, 0x22F0);
    if (ret != 0)
        return -1;

    /* Verify the AFE window write back (Slot A) */
    ret = adpd188_reg_read(0x39, &reg_data);
    if (ret != 0)
        return -1;

    /* 0x3B - Slot B: AFE integrator timing window */
    ret = adpd188_reg_write(0x3B, 0x22F0);
    if (ret != 0)
        return -1;

    /* Verify the AFE window write back (Slot B) */
    ret = adpd188_reg_read(0x3B, &reg_data);
    if (ret != 0)
        return -1;

    /* 0x3C - Power down Channel 2, Channel 3, and Channel 4 */
    ret = adpd188_reg_write(0x3C, 0x31C6);
    if (ret != 0)
        return -1;

    /* 0x42 - Slot A: 200 kOhm TIA gain */
    ret = adpd188_reg_write(0x42, 0x1C34);  /*newly added*/
    if (ret != 0)
        return -1;

    /* 0x43 - Slot A: full analogue signal path (TIA -> BPF -> INT -> ADC) */
    ret = adpd188_reg_write(0x43, 0xADA5);
    if (ret != 0)
        return -1;

    /* 0x44 - Slot B: 200 kOhm TIA gain */
    ret = adpd188_reg_write(0x44, 0x1C34);  /*newly added*/
    if (ret != 0)
        return -1;

    /* 0x45 - Slot B: full analogue signal path (TIA -> BPF -> INT -> ADC) */
    ret = adpd188_reg_write(0x45, 0xADA5);
    if (ret != 0)
        return -1;

    /* 0x58 - Chop math: subtract 1st & 4th pulse, add 2nd & 3rd pulse */
    ret = adpd188_reg_write(0x58, 0x0544);
    if (ret != 0)
        return -1;

    /* 0x54 - Photodiode cathode reverse-bias ~250 mV for both slots */
    ret = adpd188_reg_write(0x54, 0x0AA0);
    if (ret != 0)
        return -1;


    return 0;
}


  • It would be good to compare your schematic to that of the CN0583 reference design.  Are VDD1 and VDD2 both connected to 1.8V?  They are not connected internally to each other.  Additionally make sure that there is enough capacitance on the supply such that the voltage is not allowed to drop below 1.6V or so.  However if the LED is blinking this would indicate that the system did not self reset.