Post Go back to editing

Reading data from FIFO

Hi Analog Team,

We are interfacing ADPD4100 with nRF52840 MCU.

We have set dcfg Register Basic Configuration as:-

  {0x00B4, 0x0010},
// {0x0009, 0x0094}, // 72 frequency adj
// {0x000B, 0x02EA}, //02CA 1mhz freq adj
{0x0100, 0x0100}, // 40DA
{0x000D, 0x03EB}, // setting the sampling rate // 2710 C350 20HZ C8=5khz ,
{0x000f, 0x0006}, // (1Mhz internal low freq osc)
//{0x0020, 0x0002}, // INP sleep in1 is connected to vc1
{0x0022, 0x0003}, // gpio config pin output invert
{0x0023, 0x0002}, // gpio 0 is int x
{0x0014, 0x8000}, // interrupt enable th_fifi
{0x0021, 0x0000}, // in1 connected to the single ended
{0x0006, 0x003B}, // setting the size of fifo thrshoul
{0x0101, 0x40DA}, // setting the analog path
{0x0102, 0x0001}, // IN1 connected to channel1
{0x0103, 0x5002}, // precondition with TIAVref and vc1 sel tia +215mv
{0x0104, 0x03C0}, // 13C2// AFE trim Vref 1,265 &madulatevref1.265 ,channel1 200k
{0x0105, 0x0F0F}, //
//{0x0106, 0x1919}, //
{0x0107, 0x0108}, // number of 4 pulses
{0x0108, 0x0000}, // mode selection
{0x0109, 0x0210}, // led pulse 2micro width, offset 16microsec
{0x010A, 0x0003}, // integrator clock width 3 microsec
{0x010B, 0x0206}, // int offset 16us and led width 2us 0210
{0x010C, 0x0201},
{0x010D, 0x0099}, // CHOPE MODE 99
{0x010E, 0x0000},
{0x0110, 0x0004}, // 3 bytesom
{0x0010, 0x0000}, // time slot A enable * 

Note : We are following the Driver provided on this link : adpd-drivers/adpd40xx at master · analogdevicesinc/adpd-drivers (github.com)

After doing basic configuration the led's on the adpd4100 module are glowing. Now we are trying to extract Data from the FIFO. Some random data is coming and also not refreshing. We are not able to understand the main cause.

We followed this link main.cpp firmware for FIFO reading :- adpd-drivers/main.cpp at master · analogdevicesinc/adpd-drivers (github.com)

We tried reading status of fifo using FIFO_ STATUS register, we are receiving 2200(hex) value.

Questions :- 

1.) Please suggest what wrong i may be doing from the Firmware side ?

2.) Pls share something on how to read data from the FIFO ?

Thank You 



Added details
[edited by: SloneShrub at 1:26 PM (GMT -5) on 15 Dec 2021]
  • Hi,

    In the device configuration IR is selected that's why the LED glow is not able observe over sensor.

    Please change the "0x105" register value as "008F" to select the Green LED.

    Your current configuration is 1000Hz sampling rate. Can you reduce sample rate and check whether you are able to get the data continuously.

    To set 50Hz sample rate use the below register values.

    000B 02B2 # 1MHz trim - trim your own clock
    000C 0012 # 32kHz trim - trim your own clock
    000D 4E20 # 50 Hz
    000F 0006 # enable 1MHz osc

    Regards,

    Optical Support Team.

  • Hi,

    I did make the above settings, but no luck Led's still not glowing.

    Below the Log when we enter to Go Mode :-

    <info> app: Transfer completed .
    <info> app: receive data 0
    <info> app: receive data 0
    <info> app: Transfer completed .
    <info> app: receive data 40
    <info> app: receive data DA
    <info> app: Transfer completed .
    <info> app: receive data 1
    <info> app: receive data 8
    <info> app: Transfer completed .
    <info> app: receive data 0
    <info> app: receive data 8F
    <info> app: Transfer completed .
    <info> app: receive data 0
    <info> app: receive data 0
    <info> app: Transfer completed .
    <info> app: receive data 0
    <info> app: receive data 0
    <info> app: Transfer completed .
    <info> app: receive data 0
    <info> app: receive data 4
    <info> app: Transfer completed .
    <info> app: receive data 0
    <info> app: receive data 0
    <info> app: Transfer completed .
    <info> app: receive data 0
    <info> app: receive data 0
    <info> app: Transfer completed .
    <info> app: receive data 40
    <info> app: receive data DA
    <info> app: Transfer completed .
    <info> app: receive data 1
    <info> app: receive data 1
    <info> app: Transfer completed .
    <info> app: receive data 0
    <info> app: receive data 0
    <info> app: Transfer completed .
    <info> app: receive data 0
    <info> app: receive data 0
    <info> app: Transfer completed .

    Please tell if i can use adi_adpdssm_setOperationMode for interfacing with nRF52840 MCU ?

     

  • Hi,

    We can use the "adi_adpdssm_setOperationMode " API for "nRF52840" MCU. The example code is developed on nRF52840 MCU using MbedOS.

    Is it possible for you to import example project on Online Mbed complier and run the example application as it is.

    Regards,

    Optical Support Team.

  • mBed OS support is not for nRF52840.

    We have not worked on mbed compiler, please suggest what might be the reason ?

    I can share you the Driver files and main.c for your reference. Please share you emial-id.

    Thank You

  • Hi,

    You can send the driver and main file to "satishkumar.kandasamy@analog.com".

    I will check and get back to you.

    Regards,

    Optical Support Team.

  • Hi satishkumar,

    I have shared you files on mail.

    Thankyou & regards

    Vinay

  • Hi satishkumar,

    I am getting some random data on terminal

    app : (tick, adpd_ch1);

    Please review the attached text file log of the data on the terminal.

    Thank YouData_pattern.txt

  • Hi Analog team,

    Please respond to my query

    Thank You

  • Hi Analog team,

    After putting finger onto the sensor i am getting below data :-

    <info> app: 2837,309919744

    <info> app: 2838,309919744

    <info> app: 2839,310312960

    <info> app: 2840,295305216

    <info> app: 2841,306446336

    <info> app: 2842,302383104

    <info> app: 2843,289800192

    <info> app: 2844,299368448

    <info> app: 2845,297795584

    <info> app: 2846,296419328

    <info> app: 2847,294912000

    <info> app: 2848,294846464

    <info> app: 2849,291438592

    <info> app: 2850,286982144

    <info> app: 2851,283574272

    <info> app: 2852,277413888

    <info> app: 2853,271515648

    <info> app: 2854,264372224

    <info> app: 2855,257818624

    <info> app: 2856,252379136

    <info> app: 2857,244908032

    <info> app: 2858,238354432

    <info> app: 2859,231931904

    <info> app: 2860,221577216

    <info> app: 2861,220659712

    <info> app: 2862,214564864

    <info> app: 2863,208994304

    <info> app: 2864,203816960

    <info> app: 2865,199032832

    <info> app: 2866,194707456

    <info> app: 2867,185532416

    <info> app: 2868,183894016

    <info> app: 2869,174784512

    <info> app: 2870,165150720

    <info> app: 2871,163315712

    <info> app: 2872,155779072

    <info> app: 2873,149749760

    <info> app: 2874,142802944

    <info> app: 2875,137035776

    <info> app: 2876,183894016

    <info> app: 2877,242417664

    <info> app: 2878,265551872

    <info> app: 2879,262733824

    <info> app: 2880,148111360

    <info> app: 2881,137756672

    Please review it and suggest whether i am getting correct data or what is expected data ?

    Thankyou & Regards

    Vinay