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.

LM98722: Random values read from ADC

Part Number: LM98722

Hello,

I'm using an LM98722 with a CIS sensor, which reacts accordingly to the signals generated by the AFE but the output of the ADC seems to be just random noise. When I activate a test pattern on the output I got a correct value so I know the reading of the 2*8bits is OK.

Output of the CIS sensor is directly connected to the OSR input (mode 1), its value is between VRef (=0.9V) and VRef+1.2V. VRef is also connected to VCLP to serve as the black level reference. I tried to tie OSR to VRef and I still get random values instead of 0 or something close. Same with intermediate voltages. 

Here is my configuration : 

	afe_write(0x1F,0x00); // Page 0 
    
    afe_write(0x00,0x26); // Registers unlocked (state machine stopped)
    wait(500);
    afe_write(0x01,0x48);//Software reset : state machine + registers
    wait(500);
  
    afe_write(0x1F,0x00); // Page 0 
    afe_write(0x00,0x26); //
    afe_write(0x02,0x44); //
    afe_write(0x03,0x80); // 
    afe_write(0x04,0x0F); // 
    afe_write(0x05,0xE0); // .
    //afe_write(0x06,0x07);//test pattern
  
    afe_write(0x1F,0x02); // Page 2
    afe_write(0x00,0x04);
    afe_write(0x01,0x01);//calibration active for 1 line 0xFF == infinite calibration
    afe_write(0x02,0x0D);
    afe_write(0x06,0x00);
    afe_write(0x07,0x00);
    afe_write(0x08,0x04);
    afe_write(0x09,0x00);
    afe_write(0x10,0x08);//mode CISa
    afe_write(0x0A,0x7C);
    afe_write(0x0B,0x28);
    afe_write(0x0C,0xFC);
    afe_write(0x0D,0x28);//line length MSB
    afe_write(0x0E,0xFF);//line length LSB
    afe_write(0x1B,0x01);//enable clock multiplication
    afe_write(0x1C,0x00);//
    afe_write(0x1D,0x03);//
  
  
    afe_write(0x1F,0x03); // Page 3
    afe_write(0x00,0x14);
  
    afe_write(0x1F,0x04); // Page 4
    afe_write(0x00,0x01);
  
    afe_write(0x1F,0x05); // Page 5
    afe_write(0x00,0x08);
  
    afe_write(0x1F,0x06); // Page 6
    afe_write(0x0C,0x00);
    afe_write(0x0D,0x00);
    afe_write(0x0E,0x00);
    afe_write(0x0F,0x1F);
    afe_write(0x10,0xFF);
    afe_write(0x11,0xFF);
  
    afe_write(0x1F,0x07); // Page 7
    afe_write(0x0C,0xFF);
  
    afe_write(0x1F,0x08); // Page 8
    afe_write(0x02,0x40);
    afe_write(0x04,0x04);//SH2 for CLKOUT
    afe_write(0x05,0x04);
    afe_write(0x08,0xA2);
  
    afe_write(0x1F,0x00); // Page 0
    
    while(!(rafe_read(0)&0x80)) {
      //PLL not locked
      wait(100);
      read_val = afe_read(0);
    }
    afe_write(0x00,0x27);//master
    //afe_write(0x00,0x25);//slave

Do you see any obvious reason for my problem ?

Thank you.

  • Hi,

    Thank you for your questions. Let me review them and feedback to you by June 11th.

    regards

    Shinya

  • Hi,

    Based on your description, test pattern works but observed the random value/noise with Analog input. I would like to suggest to check the key analog signals. OSR, VREFT, VREFB, VCLP, VA,VD. They should be stable DC voltage. And may better to disable auto calibration related functions like page 38.

    regards

    Shinya

  • Hi,

    thanks for your answer, I'll check that asap and I'll let you know.

  • Hi, 

    Thanks,

    regards

    Shinya

  • Hi,

    sorry for anwsering this late...

    I've checked all the analog signals, they're all stable.

    Concerning the auto calibration functions, from what I understand, no calibration sequence will be executed until I set the correct bit or apply a logic high at the CAL input. So I can put any values in the calibration registers in page 2, it won't affect the results until I activate the calibration sequence, right ? 

    By the way, I spotted another problem, maybe it is related ? I'm using the on-chip crystal driver with a 2MHz crystal and both my pixel frequency (PHIC1 output) and ADC frequency (SH2/CLKOUT output) are 5,556MHz. Mode 1 is used so PIXCLK = ADCCLK, and no clock multiplication is performed (lines 30-32 in the previous code excerpt are commented out). Crystal is connected to INCLK+ and INCLK- with 18pF capacitors to ground, as seen is the datasheet. 

    Any idea ? Could this be related to my ADC problem ?

    Best regards,

    Mehdi.

  • Hi,

    thank you for your post. Let me review this and feedback to you by July 2nd.

    regards

    Shinya

  • Hi,

    Thank you for sharing your update.

    Acc to datasheet 7.4.12.3, CAL register bit at Page 0, Register 0x01h, Bit 5, or CAL input pin is to start calibration process. Before starting, I also think it is possible to program registers on page 2.

    I do not have idea about your ADC issue and clock multiplication settings.

    regards

    Shinya

  • Hi,

    thanks for your answer.

    I tried to directly feed a clock signal into the driver instead of using a crystal, the generated output signals are much cleaner but it doesn't solve my issue with the ADC...

    I might be a hardware problem, I'll try to test another driver.

    Thank you for your help,

    regards,

    Mehdi.

  • Hi,

    Thank you for the update. Let me close this thread. 

    regards

    Shinya