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.

OPT3101-SDK: Performing Illum Crosstalk

Part Number: OPT3101-SDK
Other Parts Discussed in Thread: OPT3101

Hi , 

I had a problem with Illum Crosstalk :

       Without masking photodiode ,why do I always get  0.0  when Performing Illum Crosstalk?

I'm checking the SDK source code but can't find the reason.

  • 在那边的论坛我回复不了,请帮我转发回复,谢谢! 

     这是一个新的设计。

    软件在main.cpp 调用dev.perUnitFactoryUpdateIllumXtalk();进行测试的。

    void OPT3101::device::initialize(void)
    {
        // List of registers to initialize OPT3101 device after power-up
    
        this->reg.force_en_slave = 1; // add code!!!
    
        this->reg.tg_ovl_window_start = 7000; // //Overload flab observation window
        this->reg.en_temp_conv = 1;           // //Enables the internal
    
        this->reg.clip_mode_fc = 1;     // //Enables Clip mode for Frequency correction
        this->reg.clip_mode_temp = 0;   // //Disables Clip mode for Temp coff phase correction
        this->reg.clip_mode_offset = 0; // //Disables Clip mode for phase offset correction
        this->reg.iq_read_data_sel = 3; // //Enables 16 bit frame counter
        this->reg.iamb_max_sel = 14;    // //Sets maximum ambient support
        this->reg.en_temp_corr = 1;     // //Enables Temperature Correction
        this->reg.gpio1_obuf_en = 1;    // //Enabled output buffer on GPIO1 pin
        this->reg.gpo1_mux_sel = 2;     // //select dig_gpo_0 on gpio1
        this->reg.dig_gpo_sel0 = 9;     // //Select Data Ready on dig_gpo_0
    
        this->reg.num_sub_frames = 255;       // 255;   !!!     // //Sub frames count
        this->reg.num_avg_sub_frames = 127;    // 127;  !!!  // //Average frames count
        this->reg.xtalk_filt_time_const = 3;  // //Crosstalk filter time constant
        this->reg.tg_seq_int_start = 9850;    // //Sequence Start
        this->reg.tg_seq_int_end = 9858;      // //Sequence End
        this->reg.tg_seq_int_mask_start = 127; // !!! 127 //Same as AvgFrame Count
        this->reg.tg_seq_int_mask_end = 127;   // !!! 127 //Same as AvgFrame Count
    
        this->reg.hdr_thr_high = 25500; // //High Threshold
        this->reg.hdr_thr_low = 5875;   // //Low Threshold
        this->reg.en_adaptive_hdr = 1;  // 1 !!! //Enables adaptive HDR feature
    
        this->reg.illum_dac_h_tx0 = 31;  // //High Current settings [173.6mA:5.6mA X 31]
        this->reg.illum_scale_h_tx0 = 0; // //Illum scale for H [173.6mA:5.6mA X 31]
    
        this->reg.illum_dac_l_tx0 = 31;  // //High Current settings [043.4mA:1.4mA X 31]
        this->reg.illum_scale_l_tx0 = 3; // //Illum scale for H [043.4mA:1.4mA X 31]
    
        this->reg.illum_dac_h_tx1 = 31;  // //High Current settings [173.6mA:5.6mA X 31]
        this->reg.illum_scale_h_tx1 = 0; // //Illum scale for H [173.6mA:5.6mA X 31]
    
        this->reg.illum_dac_l_tx1 = 31;  // //High Current settings [043.4mA:1.4mA X 31]
        this->reg.illum_scale_l_tx1 = 3; // //Illum scale for H [043.4mA:1.4mA X 31]
    
        this->reg.illum_dac_h_tx2 = 31;  // //High Current settings [173.6mA:5.6mA X 31]
        this->reg.illum_scale_h_tx2 = 0; // //Illum scale for H [173.6mA:5.6mA X 31]
    
        this->reg.illum_dac_l_tx2 = 31;  // //High Current settings [043.4mA:1.4mA X 31]
        this->reg.illum_scale_l_tx2 = 3; // //Illum scale for H [043.4mA:1.4mA X 31]
    
        this->reg.tx_seq_reg = 2340; // //Setting TX Switching order
        this->reg.en_tx_switch = 1;  // 1 charge!!! //Enable TX Switching order
    
        this->reg.sel_tx_ch = 0;
    
    
        this->reg.ILLUM_DC_CURR_DAC = 4;  //!!! add , bias current x 0.5mA
    
        this->reg.tg_en = 1; // //Enables Timing Generator
    
        this->configurationFlags_xtalkFilterTau = 3;   // //This is not a register but a settings flag for the SDK
        this->configurationFlags_monoshotMode = false; // //This is not a register but a settings flag for the SDK
        this->configurationFlags_xtalkSettlingOneTauInMilliSeconds =
            512; // //This is not a register but a settings flag for the SDK
        this->configurationFlags_xtalkSettlingOneTauInDataReadyCounts =
            8;                                                   // //This is not a register but a settings flag for the SDK
        this->configurationFlags_frameTimeInMilliSeconds = 64;   // //This is not a register but a settings flag for the SDK
        this->configurationFlags_avgFrameCountExponentOfTwo = 7; // //This is not a register but a settings flag for the SDK
    
        // tx2 xtalk compensation
        // this->reg.EN_CTALK_FB_CLK=1;
        // this->reg.EN_CALIB_CLK=1;
        // this->reg.calib_curr1_en_I=1;
        // this->reg.calib_curr1_gain_sel=0;
        // this->reg.calib_curr1_DAC_I=4;
        // this->reg.calib_curr1_inv_CLK_I=0;
    }

    void OPT3101::device::perUnitFactoryUpdateIllumXtalk()
    {
    
        this->reset(); ///* Resets the device calling OPT3101::device::reset method
    
        host.printf("INFO::Writing Initialization sequence I2C registers\r\n");
        this->initialize(); ///* Initializes the OPT3101 device by calling OPT3101::device::initialize method
        host.printf("INFO::Device Initialization Completed\r\n");
        this->measureAndCorrectInternalCrosstalk(&this->calibration->internalCrosstalk[0]); ///* Calls method OPT3101::device::measureAndCorrectInternalCrosstalk with argument OPT3101::calibrationC::internalCrosstalk
        this->calibration->internalCrosstalk[0].report(); ///* Calls the method OPT3101::crosstalkC::report for debug and data analysis
    
        this->measureIllumCrosstalkSet(false);
        this->loadIllumCrosstalkSet(false); ///* Calls the OPT3101::device::loadIllumCrosstalkSet with false argument so that method to load all illum crosstalk settings from the OPT3101::device::crosstalk::illumCrosstalk member
    
        // this->calibrationSession_perUnitFactoryCalibrationWriteRegisterDataToNonVolatileMemory(); ///* Calls the OPT3101::device::calibrationSession_perUnitFactoryCalibrationWriteRegisterDataToNonVolatileMemory to store the calibration data to a non-volatile memory
    }
    
       

  • 您好,E2E已经给出回复:代码正在检查中。

    建议是先检查硬件,PCB layout和电源,然后检查I2C通讯是否正常,是否已经上拉?另外验证发射器和光电二极管的极性。

    另外如果是自己的板子,应该是自己编写的代码,可能会存在初始化的问题,可以简单叙述下工作原理方便美国工程师验证是否通讯正常。

    I am reviewing your settings. I always check hardware first. My first thought is to verify the PCB and supplies, then check communications, I see you have pull up resistors. Verify they are being pulled up. I am going to suggest verifying the polarity of the emitter and the photodiode just in case. I will need time to go through these settings and see what else comes to mind. Verify you can talk to the part correctly by reading out some registers and check the values. 

    If this is your own board, I assume you have written your own code to talk the the OPT3101. You may have an initiliazition issue. Let me know how some of this works and I will see if I can find something simple to verify that you are communicating. 

  •   

    这个是我的测试系统简图 , 我在检查我的PCB硬件问题,IIC通讯通过示波器观察到正确的波形和数据。

    This is the schematic diagram of my test system. I am checking my PCB hardware problem.

    The IIC communication is observing the correct waveform and data through the oscilloscope.

    其他的硬件问题正在进行排查,等物料采购回来,把SFH4556   ,   SFH203PFA  换成 EVM中对应的器件来确认 。 

    Other hardware problems are under investigation. When the materials are purchased back, SFH4556 and SFH203PFA will be replaced with the corresponding devices in EVM for confirmation.

    我有一个EVM  但是MCU是M430F5503 , 因为ROM的限制, 我无法将SDK编译到这个MCU上进行验证。

  • 收到您的反馈,我去E2E上跟进下。