ADPD188GG FIFO for Float mode in I2C config is not working

Hi,

I am trying to write a basic PPG detection code on ADPD188GG and hoping to replicate the working of loat mode demo. My setup is based on I2C with polling for float mode measurements. 

Here is what I can see:

  1. The ADPD188 device powers up correctly. I am able to correctly read DEVID (reg 0x08) and I2CS_ID(reg 09)
  2. Set the ADPD188 into program mode by writing 0x01 in MODE (reg 0x10). Read back the MODE to verify, All good!
  3. Write the float mode configuration registers from the WaveTool config file ADPD188GGZ_EVAL_PPG_FloatMode.dcfg. The registers and their config values are given in attached csv file.
  4. Set MODE(reg0x10) to normal sampling by writing 0x02. Readback to confirm the mode is set to running. So far so good! 
  5. In an infinite loop, check for STATUS (reg 0x00) after every 20ms, but status[7:0] always return zero. 

It looks like something is missing in the FIFO configuration for I2C based polling, but the datasheet is not very clear.

A quick response will be highly appreciated.

Thanks

Syed Bilal Hasani

  • I could not attach the CSV file, so pasting it here. It is basically exactly same as ADPD188GGZ_EVAL_PPG_FloatMode.dcfg in WaveTool application.

    Reg, Value
    0x0F, 0x0001
    0x02, 0x0005
    0x06, 0x0000
    0x11, 0x30A0
    0x12, 0x00A0
    0x14, 0x0110
    0x15, 0x0000
    0x18, 0x0000
    0x19, 0x3FFF
    0x1A, 0x3FFF
    0x1B, 0x3FFF
    0x1E, 0x0000
    0x1F, 0x3FFF
    0x20, 0x3FFF
    0x21, 0x3FFF
    0x22, 0x1030
    0x24, 0x1030
    0x25, 0x630C
    0x34, 0x0000
    0x4B, 0x2695
    0x30, 0x0214
    0x31, 0x021A
    0x39, 0x18F0
    0x42, 0x1C25
    0x43, 0xae65
    0x5e, 0x7008
    0x58, 0x0440
    0x3c, 0x3206
    0x54, 0x0AA0
    0x3E, 0x0012
    0x35, 0x0235
    0x36, 0x1427
    0x3b, 0x1D10
    0x44, 0x1C25
    0x45, 0xae65
    0x59, 0x7008
    0x58, 0x0444
    0x23, 0x1530
    0x34, 0x0000
    0x3c, 0x3206
    0x54, 0x0AA0
    0x3F, 0x5F12
    0x5a, 0x9F00

  • 0
    •  Analog Employees 
    on May 26, 2021 5:22 PM

    Syed,  Sorry for the delayed response.  Are you using wave-tool or your own software.  Wavetool automatically controls registers 0x01 0x06 and 0x11.  These are the registers that set up how the interrupt is used.  I did not see 0x01 in your list.  If you are running wavetool it will automatically be set to use the FIFO and set to dump data using the FIFO interrupt instead of polling.  This means that every time you poll for status wavetool has likely already processed the interrupt and has cleared the FIFO.  If you are not using wavetool, you will need to manually adjust register 0x01, 0x06 and 0x11 such that it is set up for polling.

  • Hi, 

    Sorry for the delay to write you back and not explaning my setup clearly. 

    As I mentioned in my post that I am writing a basic code on my MCU that is trying to replicate the working of the wavetool, so I am NOT using wavetool. The ADPD188gg eval board is connected to my MCU via I2C lines with NO EVAL-ADPDUCZ microcontroller board connected. I hope this will clarify the configuration. Feel free to ask if you need any further clarity. 

    My MCU is trying to read the samples from ADPD188gg by polling (NOT by interrupt). I am following the "Polling Method" given on Page 24 of the datasheet. I can connected and read/write config registers correctly (refer to the steps 1-4 in my previous post) but could not see any samples coming in step 5 (FIFO_SAMPLES bits are always zero). Please feel free to ask if you need any further detail. 

    Can you please refer me the correct sequence and values of registers to read PPG data by polling via I2C interface? What value is needed to be set on register 0x01 and what would be timing of setting the value? The "Polling Method" section in datasheet does not mention register 0x01. Can you confirm if there is any config value not correctly set on the registers list I shared? 

    Appreciate your help.

    Thanks

    Syed Bilal Hasani

  • Hi Neal,

    Do you have an update on Bilal's questions from June 2?  Bilal is developing a driver on our own micro/board - not the dev board.  

    "Can you please refer me the correct sequence and values of registers to read PPG data by polling via I2C interface? What value is needed to be set on register 0x01 and what would be timing of setting the value? The "Polling Method" section in datasheet does not mention register 0x01. Can you confirm if there is any config value not correctly set on the registers list I shared?"

    Can you share the sequence and values of writes to 0x01, 0x06 and 0x11 to set it up correctly?

    Thanks,

    David

  • 0
    •  Analog Employees 
    on Jun 8, 2021 8:14 PM

    Hi Syed,

    Using polling mode is straight forward. For your case here it seems something else went wrong.

    Can you try this basic operation first to narrow down the issue:

    Don’t load the complicated float mode CSV file, just do this after reset:

    Write to 0x1 to Register 0x4B, Bit 7 to enable the clock that drives the state machine.
    Write 0x0001 to Register 0x10 to enter program mode.
    Write to the other registers (Slot, PD, sample rate)
    0x11, 0x30A0

    0x14, 0x0110

    0x15, 0x0000

    (the register order is not important while the device is in program mode. )

    Write 0x0002 to Register 0x10 to start normal sampling operation.

    Now check if the fifo_status (register 0) show data count of the FIFO.