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: Design questions about OPT3101...

Part Number: OPT3101-SDK
Other Parts Discussed in Thread: OPT3101, , OPT3101EVM, MSP430F5519

Dear Sir,

My customer has some questions for OPT3101, please help.

1. using OPT3101-SDK sample code to set as dealias mode to detect the distant more than 15m, they cannot switch between 2 frequency!!

2. While using OPT3101 EVM and update the firmware with MSP430Flasher.exe via USB, the PC cannot find USB FETs. 

Thanks.

  • Hi Peter,

    Have you taken a look at this FAQ? https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/891035/faq-opt3101-dealias-operation

    It has information on dealias mode and a code sample for the timing registers.

    For the second issue, are you able to send any error codes or screenshots to go along with this?

    Thank you,

    Brent Elliott

  • Hi Brent,

     Peter and I are members of a team, and I will work together to deal with the two problems.

  • Hi Brent,
    We designed our TOF module with reference to OPT3101-EVM, and used the code of sbac203b-OPT3101-SDK-v0.9.1. The module is initialized to non HDR continuous read mode. In this mode, the module work well when the system is separately configured at 10MHz and 8.57MHz, it can measure up to 15m at both frequencies.
    The module is initialized to dealias mode(First, load cross talk and phase offset clibration result at 10MHz to registers; Then, calculate register value of ALPHA1_DEAL_SCAL、BETA1_DEAL_SCAL、PHASE2_OFFSET_HDR0_TX0、PHASE2_OFFSET_HDR1_TX0 at 8.57MHz, and write them to registers) by referring to 1447.OPT3101-Dealiasing.pdf.
    After module initialization, mod_freq print value will change alternately between 0 and 1, but there is almost no current output from the photodiode. The pulse frequency of the photodiode measured with an oscilloscope is always 10MHz.
    What may be the reason? I don't know whether my initialization configuration is correct. Here is my initialization configuration:
    void OPT3101::device::initialize(void){
        // List of registers to initialize OPT3101 device after power-up
        
        this->reg.force_en_slave = 1; // //Since I2C Master bus is floating this register needs to be set to enable device to respond
        
        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 = 0; // //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; // 12=100uA, 14=200uA //Sets maximum ambient support
        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.gpio2_obuf_en = 0;
        //this->reg.gpio2_ibuf_en = 1;
        //this->reg.en_tx1_on_tx0 = 1;
        //this->reg.en_tx2_on_tx0 = 0;
        
        this->reg.num_sub_frames = 63; // //Sub frames count
        this->reg.num_avg_sub_frames = 63; // //Average frames count
        this->reg.xtalk_filt_time_const = 4; // //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 = 63; // //Same as AvgFrame Count
        this->reg.tg_seq_int_mask_end = 63; // //Same as AvgFrame Count
        
        this->reg.illum_dac_h_tx0 = 18; // //High Current settings: [173.6mA:5.6mA X 31], [078.4mA:5.6mA X 14], [067.2mA:5.6mA X 12]
        this->reg.illum_scale_h_tx0 = 0; // //Illum scale for H: 0=5.6mA, 1=4.2mA
        
    
        this->reg.sel_hdr_mode = 1; // //Selecting H Channel by default
        
        this->reg.tx_seq_reg   = 2184; // //Setting TX Switching order
        this->reg.en_tx_switch = 0; // //Enable TX Switching order
        
    
    
        
        //this->reg.override_clkgen_reg = 1;
        //this->reg.dealias_en = 1;
        //this->reg.en_multi_freq_phase = 1;
        //this->reg.dealias_freq = 0;
        //this->reg.ncr_config = 0;
        //this->reg.sub_vd_clk_cnt = 11665;                   // uint16_t(9999*7/6.0);
        //this->reg.tg_illumen_start = 0;                     // uint16_t(0*7/6.0);
        //this->reg.tg_illumen_end = 9916;                    // uint16_t(8500*7/6.0);
        //this->reg.tg_capture_start = 10850;                 // uint16_t(9300*7/6.0);
        //this->reg.tg_capture_end = 11433;                   // uint16_t(9800*7/6.0);
        //this->reg.tg_calc_start = 9916;                     // uint16_t(8500*7/6.0);
        //this->reg.tg_calc_end = 11665;                      // uint16_t(9999*7/6.0);
        //this->reg.capture_clk_cnt = 10033;                  // uint16_t(8600*7/6.0);
        //this->reg.override_clkgen_reg = 1;
        //this->reg.dealias_en = 1;
        //this->reg.en_multi_freq_phase = 1;
        //this->reg.dealias_freq = 0;
        
        this->reg.command0 = 0x100; // Set to fo = 10MHz
        this->reg.command1 = 0x102; // Set to fo to de-alias frequency
        this->reg.command2 = 0x400; // Go to Command0
        
        this->reg.ncr_config = 0;
        this->reg.give_dealias_data = 1;
        this->reg.en_sequencer = 1;
        this->reg.en_processor_values = 1;
        //this->reg.en_dealias_meas = 1; // do it in command1
        
        this->reg.tg_en = 1; // //Enables Timing Generator
        
        this->configurationFlags_xtalkFilterTau =  4; // //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      =  256; // //This is not a register but a settings flag for the SDK
        this->configurationFlags_xtalkSettlingOneTauInDataReadyCounts   =  16; // //This is not a register but a settings flag for the SDK
        this->configurationFlags_frameTimeInMilliSeconds                =  16; // //This is not a register but a settings flag for the SDK
        this->configurationFlags_avgFrameCountExponentOfTwo             =  6; // //This is not a register but a settings flag for the SDK
    }
    
    OPT3101::device::device(void):
    configurationFlags_isTXChannelActive{true,false,false},
    configurationFlags_isRegisterSetActive{false,true} {}
    
    // useless
    OPT3101::calibrationC::calibrationC(void) : calibrationC(true) {
    this->recordLength           = 1; // //This configuration requires 1 crosstalk and other configuration record(s)
    this->registerAddressListSize= 17; // //This configuration requires 17 registers [544] bits to be stored for calibration
    this->EEPROM_connected       =  false; // //This configuration helps configure EEPROM
    this->extTempSensor_connected=  false; // //This configuration helps configure Ext temp sensor
    this->registerAddressList[0] = 0x31; // //Address for register(s) iphase_xtalk_reg_hdr1_tx0
    this->registerAddressList[1] = 0x32; // //Address for register(s) qphase_xtalk_reg_hdr1_tx0
    this->registerAddressList[2] = 0x5e; // //Address for register(s) temp_coeff_xtalk_iphase_hdr1_tx0
    this->registerAddressList[3] = 0x60; // //Address for register(s) temp_coeff_xtalk_qphase_hdr1_tx0
    this->registerAddressList[4] = 0x51; // //Address for register(s) phase_offset_hdr1_tx0,temp_coeff_illum_hdr1_tx0
    this->registerAddressList[5] = 0x48; // //Address for register(s) tmain_calib_hdr1_tx0,tillum_calib_hdr1_tx0
    this->registerAddressList[6] = 0x2d; // //Address for register(s) temp_coeff_main_hdr1_tx0
    this->registerAddressList[7] = 0x52; // //Address for register(s) temp_coeff_illum_hdr1_tx0
    this->registerAddressList[8] = 0x2e; // //Address for register(s) illum_xtalk_reg_scale
    this->registerAddressList[9] = 0x3a; // //Address for register(s) scale_temp_coeff_xtalk
    this->registerAddressList[10] = 0x71; // //Address for register(s) shift_illum_phase
    this->registerAddressList[11] = 0x43; // //Address for register(s) en_phase_corr,en_temp_corr,scale_phase_temp_coeff
    this->registerAddressList[12] = 0xb5; // //Address for register(s) scale_amb_phase_corr_coeff
    this->registerAddressList[13] = 0x0c; // //Address for register(s) amb_phase_corr_pwl_coeff0
    this->registerAddressList[14] = 0xb4; // //Address for register(s) amb_phase_corr_pwl_coeff1,amb_phase_corr_pwl_coeff2,amb_phase_corr_pwl_coeff3
    this->registerAddressList[15] = 0xb8; // //Address for register(s) amb_phase_corr_pwl_x0,amb_phase_corr_pwl_x1
    this->registerAddressList[16] = 0xb9; // //Address for register(s) amb_phase_corr_pwl_x2
    }
    Thank you,
    Cherry Lin
  • Hi Brent,

    For the second problem, the error codes list as follow:

    C:\ti\MSPFlasher_1.3.20>.\MSP430Flasher.exe -w "C:\workspace\proj-OPT3101\OPT3101\software\sbac203b-OPT3101-SDK-v0.9.1\bac203b\release_0p9p1\OPT3101_SDK\Debug\OPT3101_SDK.txt"  -v -e ERASE_MAIN
    * -----/|-------------------------------------------------------------------- *
    *     / |__                                                                   *
    *    /_   /   MSP Flasher v1.3.20                                             *
    *      | /                                                                    *
    * -----|/-------------------------------------------------------------------- *
    *
    * Evaluating triggers...done
    * Checking for available FET debuggers:
    * Couldn't find any connected USB FETs!
    * Powering down...done
    * Disconnecting from device...done
    *
    * ----------------------------------------------------------------------------
    * Driver      : closed (MSP DebugStack not initialized)
    * ----------------------------------------------------------------------------
    */
    
    C:\ti\MSPFlasher_1.3.20>

    The official OPT3101EVM evaluation board of TI can identify two virtual serial ports com4 and com5 when plugged into the USB port of the PC。And then open the Latte software, which can also display the measured waveform and can also modify the configuration normally. But when I want to use MSP430Flasher.exe updating the EVM, the PC cannot recognize USB FETs.

  • Hi Cherry,

    Thank you for the reply. Please give me some time to think about this. I will have a reply by the end of the week.

    Thank you,

    Brent Elliott

  • Hi Cherry,

    Are you able to copy the settings from the post you mentioned and see if you are able to get it working then? Many lines are commented out so I am not clear on what you are running since some of the commented code should be run. (https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/1071173/opt3101-using-dealias-mode)

    Do you have a launchpad that you can use to flash the firmware to and use that as the interface? This is how the SDK is meant to interface with the OPT3101.

    Thank you,

    Brent Elliott

  • Hi Brent,

    Thank you for the reply! 

    I have tested two ways to open or close comments,but both of them work abnormal(Their working logs are the same). Could you give me an example of dealias initialization(No HDR, work in HDR-H channel, continuous reading)?

    Here is my test log:

    1. initialize at 10MHz:

    void OPT3101::device::initialize(void){
    	// List of registers to initialize OPT3101 device after power-up
    
    	this->reg.force_en_slave = 1; // //Since I2C Master bus is floating this register needs to be set to enable device to respond
    
    	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 = 0; // //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; // 12=100uA, 14=200uA //Sets maximum ambient support
    	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 = 63; // //Sub frames count
    	this->reg.num_avg_sub_frames = 63; // //Average frames count
    	this->reg.xtalk_filt_time_const = 4; // //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 	= 63; // //Same as AvgFrame Count
    	this->reg.tg_seq_int_mask_end 	= 63; // //Same as AvgFrame Count
    
        this->reg.illum_dac_h_tx0 = 18; //20;//14; // //High Current settings: [173.6mA:5.6mA X 31], [078.4mA:5.6mA X 14], [067.2mA:5.6mA X 12]
    	this->reg.illum_scale_h_tx0 = 0; // //Illum scale for H: 0=5.6mA, 1=4.2mA
    
    	this->reg.sel_hdr_mode = 1; // //Selecting H Channel by default
    
    	this->reg.tx_seq_reg   = 2184; // //Setting TX Switching order
    	this->reg.en_tx_switch = 0; // //Enable TX Switching order
    
    	this->reg.tg_en = 1; // //Enables Timing Generator
    
    	this->configurationFlags_xtalkFilterTau =  4; // //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      =  256; // //This is not a register but a settings flag for the SDK
    	this->configurationFlags_xtalkSettlingOneTauInDataReadyCounts   =  16; // //This is not a register but a settings flag for the SDK
    	this->configurationFlags_frameTimeInMilliSeconds                =  16; // //This is not a register but a settings flag for the SDK
    	this->configurationFlags_avgFrameCountExponentOfTwo             =  6; // //This is not a register but a settings flag for the SDK
    }

    2. working log at 10MHz:

    -------------------------------
    Starting Main Program Execution
    -------------------------------
    INFO::Resetting Host
    INFO::Validating I2C Transaction
    INFO::I2C Transaction Successful
    INFO::Validating OPT3101 Design ID
    INFO::Design ID 0xc01000100411 Verified
    INFO::Resetting Host
    INFO::Writing Initialization sequence I2C registers
    INFO::Performing Internal Cross talk Measurement...
    INFO::Internal Cross talk Measurement Completed
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -005659,-005627,0,-0005659,-0005627, 0000, 0000,     +00, -128.0000, 26.8
    
    INFO::Cover Photodiode with optical shied for illumination Cross talk measurement
    Press any Key to continue:
    INFO:Performing Illum Crosstalk for TX0 HDR 1
    [DEBUG] measure xtalk h: commonScale=0, xtalkScale=1, shiftIllumPhase=0, I=-5709, Q=-24064, tmain=2480
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -005709,-024064,1,-0011418,-0048128, 2480, 0000,     +54, -128.0000,159.3
    
    INFO:Writing Illum Cross talk for TX0 HDR 1 to Flash location 0x0010
    INFO:Completed Illumination cross talk measurement for all channels
    INFO::Loading Illumination cross talk Set
    INFO:Reading Illum Cross talk from Flash location 0x0010
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -005709,-024064,1,-0011418,-0048128, 2480, 0000,     +54, -128.0000,159.3
    
    [DEBUG] load xtalk from flash: maxIllumXtalkScale=0, xtalkScale=1, shiftIllumPhase=0, I=-5709, Q=-24064, tmain=2480
    [DEBUG] before set xtalk: maxIllumXtalkScale=1, xtalkScale=1, shiftIllumPhase=0, I=-5709, Q=-24064, tmain=2480
    [DEBUG] set xtalk: i_xreg_hdr1_tx0=-5709, q_xreg_hdr1_tx0=-24064, tmain_hdr1_tx0=2480
    Set Target to distance [2100]mm
    Press any Key to continue:
    INFO:Performing Phase Offset for TX0 HDR 1 @ ref Distance 2100mm
    [DEBUG] before measure phase offset: refDistanceInCodes=9181, shiftIllumPhase=0
    [DEBUG] measure phase offset: phaseOffset=9168
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    009168,009181,     0,    18, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),  tIlum(C)
    18349,00486,    0,    0,068, 2480, 0000,     +54, -128.0000
    
    INFO:Writing Phase Offset for TX0 HDR 1 to Flash location 0x0084
    INFO::Loading Phase Offset Set
    INFO:Reading Phase Offset from TX0 HDR 1 to Flash location 0x0084
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    009168,009181,     0,    18, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),  tIlum(C)
    18349,00486,    0,    0,068, 2480, 0000,     +54, -128.0000
    
    INFO::Completed First Time bring up
    INFO::Resetting Host
    INFO::Performing Internal Cross talk Measurement...
    INFO::Internal Cross talk Measurement Completed
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -006126,-006013,0,-0006126,-0006013, 0000, 0000,     +00, -128.0000, 27.9
    
    INFO::Loading Illumination cross talk Set
    INFO:Reading Illum Cross talk from Flash location 0x0010
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -005709,-024064,1,-0011418,-0048128, 2480, 0000,     +54, -128.0000,159.3
    
    [DEBUG] load xtalk from flash: maxIllumXtalkScale=0, xtalkScale=1, shiftIllumPhase=0, I=-5709, Q=-24064, tmain=2480
    [DEBUG] before set xtalk: maxIllumXtalkScale=1, xtalkScale=1, shiftIllumPhase=0, I=-5709, Q=-24064, tmain=2480
    [DEBUG] set xtalk: i_xreg_hdr1_tx0=-5709, q_xreg_hdr1_tx0=-24064, tmain_hdr1_tx0=2480
    INFO::Loading Illumination crosstalk Temperature Coefficient Set
    INFO::Loading Illumination cross talk Set
    INFO:Reading Illum Cross talk from Flash location 0x0010
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -005709,-024064,1,-0011418,-0048128, 2480, 0000,     +54, -128.0000,159.3
    
    [DEBUG] load xtalk from flash: maxIllumXtalkScale=0, xtalkScale=1, shiftIllumPhase=0, I=-5709, Q=-24064, tmain=2480
    [DEBUG] before set xtalk: maxIllumXtalkScale=1, xtalkScale=1, shiftIllumPhase=0, I=-5709, Q=-24064, tmain=2480
    [DEBUG] set xtalk: i_xreg_hdr1_tx0=-5709, q_xreg_hdr1_tx0=-24064, tmain_hdr1_tx0=2480
    [DEBUG] magnitude[0][1] = 159.288243
    [DEBUG] coffQReg[0][1] = -28 = 228
    INFO::Loading Phase Offset Set
    INFO:Reading Phase Offset from TX0 HDR 1 to Flash location 0x0084
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    009168,009181,     0,    18, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),  tIlum(C)
    18349,00486,    0,    0,068, 2480, 0000,     +54, -128.0000
    
    INFO::Loading Phase Temperature coefficient Set
    INFO::Loading Phase Ambient Coefficient Set
    [DEBUG] xtalk calib data view: iphase_xtalk_reg_hdr0_tx0=0, qphase_xtalk_reg_hdr0_tx0=0, tmain_calib_hdr0_tx0=2048
    [DEBUG] xtalk calib data view: iphase_xtalk_reg_hdr1_tx0=-5709, qphase_xtalk_reg_hdr1_tx0=-24064, tmain_calib_hdr1_tx0=2480
    [DEBUG] phase offset data view: phase_offset_hdr0_tx0=0, tmain_calib_hdr0_tx0_offset=2048
    [DEBUG] phase offset data view: en_phase_corr=1, en_temp_corr=1, phase_offset_hdr1_tx0=9168, tmain_calib_hdr1_tx0_offset=2480
    [DEBUG] xtalk temp correct data view: en_temp_xtalk_corr=1, scale_temp_coeff_xtalk=4, temp_coeff_xtalk_iphase_hdr1_tx0=85, temp_coeff_xtalk_qphase_hdr1_tx0=228
    [DEBUG] phase temp correct data view: en_phase_corr=1, temp_coeff_main_hdr1_tx0=1771
    [DEBUG] phase amb correct data view: amb_x0=0, amb_x1=0, amb_x2=0, coeff0=0, coeff1=0, coeff2=0, coeff3=0, scale_coeff=7
    
    |Distmm, Phase,Amplud,SigS,AmbS,HDR|--|Amb,Cntr,Tmain,Tillum   |  Count/Total  |
    |002106,009211,000463,   0,   0,  1|--|068,0x06,  +53,-128.0000|0000016/0010000|

    3. initialize at 8.57MHz:

    void OPT3101::device::initialize(void){
    	// List of registers to initialize OPT3101 device after power-up
    
    	this->reg.force_en_slave = 1; // //Since I2C Master bus is floating this register needs to be set to enable device to respond
    
    	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 = 0; // //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; // 12=100uA, 14=200uA //Sets maximum ambient support
    	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 = 63; // //Sub frames count
    	this->reg.num_avg_sub_frames = 63; // //Average frames count
    	this->reg.xtalk_filt_time_const = 4; // //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 	= 63; // //Same as AvgFrame Count
    	this->reg.tg_seq_int_mask_end 	= 63; // //Same as AvgFrame Count
    
        this->reg.illum_dac_h_tx0 = 18; // //High Current settings: [173.6mA:5.6mA X 31], [078.4mA:5.6mA X 14], [067.2mA:5.6mA X 12]
    	this->reg.illum_scale_h_tx0 = 0; // //Illum scale for H: 0=5.6mA, 1=4.2mA
    
    	this->reg.sel_hdr_mode = 1; // //Selecting H Channel by default
    
    	this->reg.tx_seq_reg   = 2184; // //Setting TX Switching order
    	this->reg.en_tx_switch = 0 ; // //Enable TX Switching order
    
        this->reg.override_clkgen_reg = 1;
        this->reg.dealias_en = 1;
        this->reg.en_multi_freq_phase = 1;
        this->reg.dealias_freq = 0;
        this->reg.ncr_config = 0;
        this->reg.sub_vd_clk_cnt = 11665;                   // uint16_t(9999*7/6.0);
        this->reg.tg_illumen_start = 0;                     // uint16_t(0*7/6.0);
        this->reg.tg_illumen_end = 9916;                    // uint16_t(8500*7/6.0);
        this->reg.tg_capture_start = 10850;                 // uint16_t(9300*7/6.0);
        this->reg.tg_capture_end = 11433;                   // uint16_t(9800*7/6.0);
        this->reg.tg_calc_start = 9916;                     // uint16_t(8500*7/6.0);
        this->reg.tg_calc_end = 11665;                      // uint16_t(9999*7/6.0);
        this->reg.capture_clk_cnt = 10033;                  // uint16_t(8600*7/6.0);
    	
        this->reg.en_sequencer = 0;
        this->reg.en_processor_values = 0;
        this->reg.give_dealias_data = 0;
        this->reg.en_dealias_meas = 0;
    
    	this->reg.tg_en = 1; // //Enables Timing Generator
    
    	this->configurationFlags_xtalkFilterTau =  4; // //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      =  256; // //This is not a register but a settings flag for the SDK
    	this->configurationFlags_xtalkSettlingOneTauInDataReadyCounts   =  16; // //This is not a register but a settings flag for the SDK
    	this->configurationFlags_frameTimeInMilliSeconds                =  16; // //This is not a register but a settings flag for the SDK
    	this->configurationFlags_avgFrameCountExponentOfTwo             =  6; // //This is not a register but a settings flag for the SDK
    }
    

    4. working log at 8.57MHz:

    -------------------------------
    Starting Main Program Execution
    -------------------------------
    INFO::Resetting Host
    INFO::Validating I2C Transaction
    INFO::I2C Transaction Successful
    INFO::Validating OPT3101 Design ID
    INFO::Design ID 0xc01000100411 Verified
    INFO::Resetting Host
    INFO::Writing Dealias Initialization sequence I2C registers
    INFO::Performing Internal Cross talk Measurement...
    INFO::Internal Cross talk Measurement Completed
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -008529,-003017,0,-0008529,-0003017, 0000, 0000,     +00, -128.0000, 29.7
    
    INFO::Cover Photodiode with optical shied for illumination Cross talk measurement
    Press any Key to continue:
    INFO:Performing Dealias Illum Crosstalk for TX0 HDR 1
    [DEBUG] measure xtalk h: commonScale=0, xtalkScale=2, shiftIllumPhase=0, I=4527, Q=-18354, tmain=2480
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +004527,-018354,2,+0018108,-0073416, 2480, 0000,     +54, -128.0000,243.9
    
    INFO:Writing Dealias Illum Cross talk for TX0 HDR 1 to Flash location 0x0148
    INFO:Completed Dealias Illumination cross talk measurement for all channels
    INFO::Loading Dealias Illumination cross talk Set
    INFO:Reading Dealias Illum Cross talk from Flash location 0x0148
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +004527,-018354,2,+0018108,-0073416, 2480, 0000,     +54, -128.0000,243.9
    
    [DEBUG] load dealias xtalk from flash: maxIllumXtalkScale=0, xtalkScale=2, shiftIllumPhase=0, I=4527, Q=-18354, tmain=2480
    [DEBUG] before set xtalk: maxIllumXtalkScale=2, xtalkScale=2, shiftIllumPhase=0, I=4527, Q=-18354, tmain=2480
    [DEBUG] set xtalk: i_xreg_hdr1_tx0=4527, q_xreg_hdr1_tx0=-18354, tmain_hdr1_tx0=2480
    INFO:Reading Illum Cross talk from Flash location 0x0010
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -005709,-024064,1,-0011418,-0048128, 2480, 0000,     +54, -128.0000,159.3
    
    [DEBUG] load xtalk from flash: maxIllumXtalkScale=0, xtalkScale=1, shiftIllumPhase=0, I=-5709, Q=-24064, tmain=2480
    [DEBUG] load dealias xtalk from flash: i1=-5709.000000, q1=-24064.000000, i2=4527.000000, q2=-18354.000000,
    [DEBUG] load dealias xtalk from flash: dealias_alpha1=10.877155, dealias_beta1=5.590495
    Set Target to distance [2100]mm
    Press any Key to continue:
    INFO:Performing Dealias Phase Offset for TX0 HDR 1 @ ref Distance 2100mm
    [DEBUG] before measure phase offset: refDistanceInCodes=9181, shiftIllumPhase=0
    [DEBUG] measure phase offset: phaseOffset=7730
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    007730,009181,     0,    18, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),  tIlum(C)
    16911,00520,    0,    0,068, 2480, 0000,     +54, -128.0000
    
    INFO:Writing Dealias Phase Offset for TX0 HDR 1 to Flash location 0x01bc
    INFO::Loading Dealias Phase Offset Set
    INFO:Reading Dealias Phase Offset from TX0 HDR 1 to Flash location 0x01bc
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    007730,009181,     0,    18, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),  tIlum(C)
    16911,00520,    0,    0,068, 2480, 0000,     +54, -128.0000
    
    INFO::Completed First Time Dealias bring up
    INFO::Resetting Host
    INFO::Performing Internal Cross talk Measurement...
    INFO::Internal Cross talk Measurement Completed
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +003713,-006944,0,+0003713,-0006944, 0000, 0000,     +00, -128.0000, 25.8
    
    INFO::Loading Dealias Illumination cross talk Set
    INFO:Reading Dealias Illum Cross talk from Flash location 0x0148
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +004527,-018354,2,+0018108,-0073416, 2480, 0000,     +54, -128.0000,243.9
    
    [DEBUG] load dealias xtalk from flash: maxIllumXtalkScale=0, xtalkScale=2, shiftIllumPhase=0, I=4527, Q=-18354, tmain=2480
    [DEBUG] before set xtalk: maxIllumXtalkScale=2, xtalkScale=2, shiftIllumPhase=0, I=4527, Q=-18354, tmain=2480
    [DEBUG] set xtalk: i_xreg_hdr1_tx0=4527, q_xreg_hdr1_tx0=-18354, tmain_hdr1_tx0=2480
    INFO:Reading Illum Cross talk from Flash location 0x0010
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -005709,-024064,1,-0011418,-0048128, 2480, 0000,     +54, -128.0000,159.3
    
    [DEBUG] load xtalk from flash: maxIllumXtalkScale=0, xtalkScale=1, shiftIllumPhase=0, I=-5709, Q=-24064, tmain=2480
    [DEBUG] load dealias xtalk from flash: i1=-5709.000000, q1=-24064.000000, i2=4527.000000, q2=-18354.000000,
    [DEBUG] load dealias xtalk from flash: dealias_alpha1=10.877155, dealias_beta1=5.590495
    INFO::Loading Dealias Illumination crosstalk Temperature Coefficient Set
    INFO::Loading Dealias Illumination cross talk Set
    INFO:Reading Dealias Illum Cross talk from Flash location 0x0148
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +004527,-018354,2,+0018108,-0073416, 2480, 0000,     +54, -128.0000,243.9
    
    [DEBUG] load dealias xtalk from flash: maxIllumXtalkScale=0, xtalkScale=2, shiftIllumPhase=0, I=4527, Q=-18354, tmain=2480
    [DEBUG] before set xtalk: maxIllumXtalkScale=2, xtalkScale=2, shiftIllumPhase=0, I=4527, Q=-18354, tmain=2480
    [DEBUG] set xtalk: i_xreg_hdr1_tx0=4527, q_xreg_hdr1_tx0=-18354, tmain_hdr1_tx0=2480
    INFO:Reading Illum Cross talk from Flash location 0x0010
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -005709,-024064,1,-0011418,-0048128, 2480, 0000,     +54, -128.0000,159.3
    
    [DEBUG] load xtalk from flash: maxIllumXtalkScale=0, xtalkScale=1, shiftIllumPhase=0, I=-5709, Q=-24064, tmain=2480
    [DEBUG] load dealias xtalk from flash: i1=-5709.000000, q1=-24064.000000, i2=4527.000000, q2=-18354.000000,
    [DEBUG] load dealias xtalk from flash: dealias_alpha1=10.877155, dealias_beta1=5.590495
    [DEBUG] magnitude[0][1] = 243.924760
    [DEBUG] coffQReg[0][1] = -21 = 235
    INFO::Loading Dealias Phase Offset Set
    INFO:Reading Dealias Phase Offset from TX0 HDR 1 to Flash location 0x01bc
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    007730,009181,     0,    18, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),  tIlum(C)
    16911,00520,    0,    0,068, 2480, 0000,     +54, -128.0000
    
    INFO::Loading Phase Temperature coefficient Set
    INFO::Loading Phase Ambient Coefficient Set
    [DEBUG] xtalk calib data view: iphase_xtalk_reg_hdr0_tx0=0, qphase_xtalk_reg_hdr0_tx0=0, tmain_calib_hdr0_tx0=2048
    [DEBUG] xtalk calib data view: iphase_xtalk_reg_hdr1_tx0=4527, qphase_xtalk_reg_hdr1_tx0=-18354, tmain_calib_hdr1_tx0=2480
    [DEBUG] phase offset data view: phase_offset_hdr0_tx0=0, tmain_calib_hdr0_tx0_offset=2048
    [DEBUG] phase offset data view: en_phase_corr=1, en_temp_corr=1, phase_offset_hdr1_tx0=7730, tmain_calib_hdr1_tx0_offset=2480
    [DEBUG] xtalk temp correct data view: en_temp_xtalk_corr=1, scale_temp_coeff_xtalk=3, temp_coeff_xtalk_iphase_hdr1_tx0=65, temp_coeff_xtalk_qphase_hdr1_tx0=235
    [DEBUG] phase temp correct data view: en_phase_corr=1, temp_coeff_main_hdr1_tx0=1771
    [DEBUG] phase amb correct data view: amb_x0=0, amb_x1=0, amb_x2=0, coeff0=0, coeff1=0, coeff2=0, coeff3=0, scale_coeff=7
    
    |Distmm, Phase,Amplud,SigS,AmbS,ModFreq,HDR|--|Amb,Cntr,Tmain,Tillum   |  Count/Total  |
    |002094,009159,000516,   0,   0,   0,  1|--|068,0x0f,  +53,-128.0000|0000000/0010000|
    |002038,008915,000511,   0,   0,   0,  1|--|068,0x1c,  +53,-128.0000|0000001/0010000|
    |002094,009159,000505,   0,   0,   0,  1|--|068,0x0a,  +53,-128.0000|0000002/0010000|
    |002084,009112,000512,   0,   0,   0,  1|--|068,0x18,  +53,-128.0000|0000003/0010000|
    |002073,009066,000508,   0,   0,   0,  1|--|068,0x05,  +53,-128.0000|0000004/0010000|
    |002093,009155,000510,   0,   0,   0,  1|--|068,0x13,  +53,-128.0000|0000005/0010000|
    |002087,009125,000510,   0,   0,   0,  1|--|068,0x00,  +53,-128.0000|0000006/0010000|
    |002073,009066,000509,   0,   0,   0,  1|--|068,0x0e,  +53,-128.0000|0000007/0010000|

    5. dealias mode initialize:

    void OPT3101::device::initialize(void){
        // List of registers to initialize OPT3101 device after power-up
    
    	this->reg.force_en_slave = 1; // //Since I2C Master bus is floating this register needs to be set to enable device to respond
    
    	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 = 0; // //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; // 12=100uA, 14=200uA //Sets maximum ambient support
    	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.gpio2_obuf_en = 0;
        //this->reg.gpio2_ibuf_en = 1;
        //this->reg.en_tx1_on_tx0 = 1;
        //this->reg.en_tx2_on_tx0 = 0;
    
    	this->reg.num_sub_frames = 63; // //Sub frames count
    	this->reg.num_avg_sub_frames = 63; // //Average frames count
    	this->reg.xtalk_filt_time_const = 4; // //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 	= 63; // //Same as AvgFrame Count
    	this->reg.tg_seq_int_mask_end 	= 63; // //Same as AvgFrame Count
    
        this->reg.illum_dac_h_tx0 = 18; // //High Current settings: [173.6mA:5.6mA X 31], [078.4mA:5.6mA X 14], [067.2mA:5.6mA X 12]
    	this->reg.illum_scale_h_tx0 = 0; // //Illum scale for H: 0=5.6mA, 1=4.2mA
    
    	this->reg.sel_hdr_mode = 1; // //Selecting H Channel by default
    
        this->reg.tx_seq_reg   = 2184; // //Setting TX Switching order
    	this->reg.en_tx_switch = 0; // //Enable TX Switching order
        
        this->reg.override_clkgen_reg = 1;
        this->reg.dealias_en = 1;
        this->reg.en_multi_freq_phase = 1;
        this->reg.dealias_freq = 0;
        this->reg.ncr_config = 0;
        this->reg.sub_vd_clk_cnt = 11665;                   // uint16_t(9999*7/6.0);
        this->reg.tg_illumen_start = 0;                     // uint16_t(0*7/6.0);
        this->reg.tg_illumen_end = 9916;                    // uint16_t(8500*7/6.0);
        this->reg.tg_capture_start = 10850;                 // uint16_t(9300*7/6.0);
        this->reg.tg_capture_end = 11433;                   // uint16_t(9800*7/6.0);
        this->reg.tg_calc_start = 9916;                     // uint16_t(8500*7/6.0);
        this->reg.tg_calc_end = 11665;                      // uint16_t(9999*7/6.0);
        this->reg.capture_clk_cnt = 10033;                  // uint16_t(8600*7/6.0);
        this->reg.override_clkgen_reg = 1;
        this->reg.dealias_en = 1;
        this->reg.en_multi_freq_phase = 1;
        this->reg.dealias_freq = 0;
        
        this->reg.command0 = 0x100; // Set to fo = 10MHz
        this->reg.command1 = 0x102; // Set to fo to de-alias frequency
        this->reg.command2 = 0x400; // Go to Command0
        
        this->reg.ncr_config = 0;
        this->reg.give_dealias_data = 1;
        this->reg.en_sequencer = 1;
        this->reg.en_processor_values = 1;
        this->reg.en_dealias_meas = 1;
        
    	this->reg.tg_en = 1; // //Enables Timing Generator
    
    	this->configurationFlags_xtalkFilterTau =  4; // //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      =  256; // //This is not a register but a settings flag for the SDK
    	this->configurationFlags_xtalkSettlingOneTauInDataReadyCounts   =  16; // //This is not a register but a settings flag for the SDK
    	this->configurationFlags_frameTimeInMilliSeconds                =  16; // //This is not a register but a settings flag for the SDK
    	this->configurationFlags_avgFrameCountExponentOfTwo             =  6; // //This is not a register but a settings flag for the SDK
    }

    6. working log at dealias mode:

    -------------------------------
    Starting Main Program Execution
    -------------------------------
    INFO::Resetting Host
    INFO::Validating I2C Transaction
    INFO::I2C Transaction Successful
    INFO::Validating OPT3101 Design ID
    INFO::Design ID 0xc01000100411 Verified
    INFO::Resetting Host
    INFO::Performing Internal Cross talk Measurement...
    INFO::Internal Cross talk Measurement Completed
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +003639,-006328,0,+0003639,-0006328, 0000, 0000,     +00, -128.0000, 24.3
    
    INFO::Loading Illumination cross talk Set
    INFO:Reading Illum Cross talk from Flash location 0x0010
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -005709,-024064,1,-0011418,-0048128, 2480, 0000,     +54, -128.0000,159.3
    
    [DEBUG] load xtalk from flash: maxIllumXtalkScale=0, xtalkScale=1, shiftIllumPhase=0, I=-5709, Q=-24064, tmain=2480
    [DEBUG] before set xtalk: maxIllumXtalkScale=1, xtalkScale=1, shiftIllumPhase=0, I=-5709, Q=-24064, tmain=2480
    [DEBUG] set xtalk: i_xreg_hdr1_tx0=-5709, q_xreg_hdr1_tx0=-24064, tmain_hdr1_tx0=2480
    INFO::Loading Illumination crosstalk Temperature Coefficient Set
    INFO::Loading Illumination cross talk Set
    INFO:Reading Illum Cross talk from Flash location 0x0010
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -005709,-024064,1,-0011418,-0048128, 2480, 0000,     +54, -128.0000,159.3
    
    [DEBUG] load xtalk from flash: maxIllumXtalkScale=0, xtalkScale=1, shiftIllumPhase=0, I=-5709, Q=-24064, tmain=2480
    [DEBUG] before set xtalk: maxIllumXtalkScale=1, xtalkScale=1, shiftIllumPhase=0, I=-5709, Q=-24064, tmain=2480
    [DEBUG] set xtalk: i_xreg_hdr1_tx0=-5709, q_xreg_hdr1_tx0=-24064, tmain_hdr1_tx0=2480
    [DEBUG] magnitude[0][1] = 159.288243
    [DEBUG] coffQReg[0][1] = -28 = 228
    INFO::Loading Phase Offset Set
    INFO:Reading Phase Offset from TX0 HDR 1 to Flash location 0x0084
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    009168,009181,     0,    18, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),  tIlum(C)
    18349,00486,    0,    0,068, 2480, 0000,     +54, -128.0000
    
    INFO::Loading Phase Temperature coefficient Set
    INFO::Loading Phase Ambient Coefficient Set
    INFO::Loading Dealias Illumination cross talk Set
    INFO:Reading Dealias Illum Cross talk from Flash location 0x0148
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    +004527,-018354,2,+0018108,-0073416, 2480, 0000,     +54, -128.0000,243.9
    
    [DEBUG] load dealias xtalk from flash: maxIllumXtalkScale=0, xtalkScale=2, shiftIllumPhase=0, I=4527, Q=-18354, tmain=2480
    INFO:Reading Illum Cross talk from Flash location 0x0010
          I,      Q,S, ScaledI, ScaledQ,tMain,tIlum,tMain(C),  tIlum(C),Magnitd
    -005709,-024064,1,-0011418,-0048128, 2480, 0000,     +54, -128.0000,159.3
    
    [DEBUG] load xtalk from flash: maxIllumXtalkScale=0, xtalkScale=1, shiftIllumPhase=0, I=-5709, Q=-24064, tmain=2480
    [DEBUG] load dealias xtalk from flash: i1=-5709.000000, q1=-24064.000000, i2=4527.000000, q2=-18354.000000,
    [DEBUG] load dealias xtalk from flash: dealias_alpha1=10.877155, dealias_beta1=5.590495
    INFO::Loading Dealias Phase Offset Set
    INFO:Reading Dealias Phase Offset from TX0 HDR 1 to Flash location 0x01bc
    
    PhOfft,rfDCod,ilmScl,ilmDac, fqCnt
    007730,009181,     0,    18, 16384,
    Phase,Amplt,SigOl,AmbOl,Amb,tMain,tIlum,tMain(C),  tIlum(C)
    16911,00520,    0,    0,068, 2480, 0000,     +54, -128.0000
    
    [DEBUG] xtalk calib data view: iphase_xtalk_reg_hdr0_tx0=0, qphase_xtalk_reg_hdr0_tx0=0, tmain_calib_hdr0_tx0=2048
    [DEBUG] xtalk calib data view: iphase_xtalk_reg_hdr1_tx0=-5709, qphase_xtalk_reg_hdr1_tx0=-24064, tmain_calib_hdr1_tx0=2480
    [DEBUG] phase offset data view: phase_offset_hdr0_tx0=0, tmain_calib_hdr0_tx0_offset=2048
    [DEBUG] phase offset data view: en_phase_corr=1, en_temp_corr=1, phase_offset_hdr1_tx0=9168, tmain_calib_hdr1_tx0_offset=2480
    [DEBUG] xtalk temp correct data view: en_temp_xtalk_corr=1, scale_temp_coeff_xtalk=4, temp_coeff_xtalk_iphase_hdr1_tx0=85, temp_coeff_xtalk_qphase_hdr1_tx0=228
    [DEBUG] phase temp correct data view: en_phase_corr=1, temp_coeff_main_hdr1_tx0=1771
    [DEBUG] phase amb correct data view: amb_x0=0, amb_x1=0, amb_x2=0, coeff0=0, coeff1=0, coeff2=0, coeff3=0, scale_coeff=7
    [DEBUG] dealias data view: alpha0_scale=16, beta0_scale=0, alpha1_scale=10, beta1_scale=5, phase2_of_h0_t0=0, phase2_of_h1_t0=7730
    
    
    |Distmm, Phase,Amplud,SigS,AmbS,ModFreq,HDR|--|Amb,Cntr,Tmain,Tillum   |  Count/Total  |
    |009349,040878,000059,   0,   0,   0,  0|--|068,0x14,  +43,-128.0000|0008728/0010000|

    For the second problem, I don't have a launchpad, I only have a OPT3101 EVM board. I didn't see the document saying that additional launchpad or burners are needed.I thought OPT3101 EVM board could  be directly burned through PC by USB interface.Because no burned pins were found on OPT3101 EVM board.

    Thank you,
    Cherry Lin
  • Hi Cherry,

    I don't have any examples to provide for each type of de-alias initialization since de-alias mode is not covered in the SDK. Can you clarify this code that you have sent? Number 6 says "working log at dealias mode", have you been able to get this mode working, or are you still only seeing 10MHz? Also, have you made any changes from the initialization code that you posted originally? Has it made an impact?

    The OPT3101EVM does not need a launchpad to work with the EVM software, but for use with the SDK, a launchpad is required. This is mentioned in the SDK user's guide.

    Thank you,

    Brent Elliott

  • Hi Brent,

    Could you tell me which registers need to be opened and closed to enable the aliasing mode? Or the main initialization process? This problem is very urgent for us. We really need your help!

    I used "INLAB_STEP_1"  in SDK to calibrate,and used "TESTING_LIVE_VIEW" to watch the data output. I only changed the function of "void OPT3101::device::initialize(void)" and 8.57MHz calibration parameters saving(and loading). I print out the calibration data results under different frequencies (10MHz or 8.57MHz)and save them to different locations of flash. Before each register data use, I print out the data of the register to determine whether the data is correctly written.

    In number 6 "working log at dealias mode", I couldn't be able to get this mode working, I still only seeing 10MHz and  there is almost no current output from the photodiode.

    For the second problem, you mean that MSP430F5503IRGZ on OPT3101EVM is not a launchpad, I need to buy an additional MSP430F5519 launchpad to use the SDK?

    Thank you,
    Cherry Lin
  • Hi Cherry,

    1) Are you able to run a standard calibration with the SDK without issues? What is the problem exactly that you are running into? I cannot tell from the logs what is the issue. Are you able to switch between 10MHz and 8.57MHz and confirm with scope setting is correct?

    2) EVM can be flashed using python firmware updater here: https://www.ti.com/tool/MSP430USBDEVPACK

    Few notes:

    EVM calibrations will be zeroed out and firmware gone making EVM non functional if you ever want to go back to using it as regular EVM

    SDK tool mode is made for launchpad which is easiest way to get started with SDK using plug and play. All other configurations will require you to check the SDK pin mappings match the MSP430 you are compiling for.

    Best,

    Alex

  • Hi Brent,

    1) I can run a standard calibration with the SDK without issues, and I can calibrate normally at 10MHz or 8MHz separately("1. initialize at 10MHz" or "3. initialize at 8.57MHz"of above content). They can measure distances of more than 15m(the data over 15m is wrong) and the emiiter waveform in the oscilloscope are normal(10MHz or 8.57MHz). But when I initialize the sequencer settings to enable de-aliased measurement("5. dealias mode initialize" of above content), the emiiter can't be able to switch between 10MHz and 8.57MHz. There is almost no current output from the emmiter, the pulse frequency of the emmiter measured with an oscilloscope is always 10MHz. However, the software can read that the value of MOD_FREQ register changes alternately between 0 and 1.

    2) The upgrade problem of OPT3101 EVM has been solved well. Thanks a lot!

    Thank you,
    Cherry Lin
  • Hi Cherry,

    In dealias mode init your settings are not matching the e2e post. What is reason for difference?

    deAliasFreq 1
    override_clkgen_reg 0
    dealias_en 1
    en_multi_freq_phase 1
    en_dealias_meas 0
    ncr_config 0
    sub_vd_clk_cnt 11665
    tg_illumen_start 0
    tg_illumen_end 9916
    tg_capture_start 10850
    tg_capture_end 11433
    tg_calc_start 9916
    tg_calc_end 11665
    capture_clk_cnt 10033
    tg_en 1

    Best,

    Alex

  • Hi Brent,

    I found the reason why the emmiter has no current (the reason is not wrong register configuration of dealias). According to the configuration you provided, there will be a normal aliasing frequency output.But the distance data calculated according to the phase is still wrong when the distance is over 15m, whether the calculation formula GIVE_DEALIAS_DATA=1 or GIVE_DEALIAS_DATA=0 is used according to "OPT3101 – De-aliasing to extend the Distance Range" chapter 3 "Output". The register (alpha1_dealias_Scale, beta1_dealias_Scale, phase2_offset_hdr1_tx0, phase2_offset_hdr1_tx0) has been configured okay to ensure that the amplitude of shading is within 50 in the dealias mode.

    I have the following questions:

    1. We used 8.57MHz frequency. Isn't  "override_clkgen_reg = 0; " supposed to be like "override_clkgen_reg = 1;" according to datasheet? However, the module does not work normally according to the latter configuration.

    DEALIAS_FREQ: Select modulation frequency when DEALIAS_EN = 1. This register works only when OVERRIDE_CLKGEN_REG = 1. 0: 10 × (6 / 7) MHz | 1: 10 × (6 / 5) MHz
    DEALIAS_EN: Change the modulation frequency. This register works only when OVERRIDE_CLKGEN_REG = 1.
    NCR_CONFIG: Select second frequency for de-alias operation. 0: 10 × (6 / 7) MHz | 1: 10 × (6 / 5) MHz.

    2. Must frequency correction be enabled for dealias mode?Because I see the following in the datasheet:

    PHASE_OVER_FLOW: PHASE_OUT overflow bit during frequency correction. 0: No overflow | 1: overflow.
    PHASE_OVER_FLOW_F2: Phase overflow of second modulation frequency used for de-alias operation during frequency correction. 0: No overflow | 1: overflow.

    The register data of PHASE_OVER_FLOW and PHASE_OVER_FLOW_F2 are used in distance calculation formula according to "OPT3101 – De-aliasing to extend the Distance Range" chapter 3 "Output".

    Could you provide an initialization sample of the dealias mode containing all the necessary register configurations? I'm not sure if other registers affect the dealias mode.

    3. I found that in the dealias mode, when the distance exceeds 15 meters, the PHASE_OVER_FLOW  and PHASE_OVER_FLOW_F2 register does not change. Is this normal? Which mode does the register(CLIP_MODE_FC, CLIP_MODE_TEMP, CLIP_MODE_OFFSET ) need to work in? Roll mode or clip mode? 

    Thank you,
    Cherry Lin
  • Supplementary questions:

    4. Does the distance calculation formula under different frequencies need to be calculated separately?

    // ======GIVE_DEALIAS_DATA='1'======
    if (host.mod_freq) { // 1=8.75MHz
        host.printf("|%06u,",((this->data[c1].phase*17490)>>16) * 64 / 6);
    } else { // 0=10MHz
        host.printf("|%06u,",((this->data[c1].phase*14989)>>16) * 64 / 6);
    }
    
    host.printf("=%06u,",host.dealias_bin);
    host.printf("=%06u,",host.freq_count_read_reg);
    host.printf("=%02u,",this->data[c1].phaseovl);
    host.printf("=%02u,",this->data[c1].phaseovlf2);
    
    
    
    // ======GIVE_DEALIAS_DATA='0'======
    float dist_mm = 0;
    //dist_mm = (float)host.dealias_bin * 65536 * (float)host.freq_count_read_reg / 16384 + (float)this->data[c1].phaseovl * 65536 + (float)this->data[c1].phase;
    dist_mm = host.dealias_bin * host.freq_count_read_reg * 4 + this->data[c1].phaseovl * 65536 + this->data[c1].phase;
    
    if (host.mod_freq == 1) { // 1=8.75MHz
        //dist_mm = dist_mm * 299792458 / (2 * 8570 * 65536); // in mm
        dist_mm = dist_mm * 0.26688855f;
    } else if (host.mod_freq == 0) { // 0=10MHz // in meter
        //dist_mm = dist_mm * 299792458 / (2 * 10000 * 65536); // in mm
        dist_mm = dist_mm * 0.22872349f;
    }
    
    host.printf("%06u,",(uint32_t)dist_mm);
    host.printf("=%06u,",host.dealias_bin);
    host.printf("=%06u,",host.freq_count_read_reg);
    host.printf("=%02u,",this->data[c1].phaseovl);
    host.printf("=%02u,",this->data[c1].phaseovlf2);
    

    Thanks.

    Cherry Lin

  • Supplementary log:

    // ================== give_dealias_data = 1 ==================
    // 22m, distance okay at 10MHz, distance error at 8.57MHz,
    |Distmm,=dealias_bin,=freq_count_read_reg,=phaseovl,=phaseovlf2, Phase,Amplud,SigS,AmbS,ModFreq,HDR|--|Amb,Cntr,Tmain,Tillum   |  Count/Total  |
    |021312,     =000001,             =016384,      =00,        =00,008736,000139,   0,   0,      0,  1|--|068,0x05,  +60,-128.0000|0000531/0010000|
    |003822,     =000001,             =016384,      =00,        =00,014323,000201,   0,   0,      1,  1|--|068,0x16,  +60,-128.0000|0000532/0010000|
    |021312,     =000001,			  =016384,      =00,        =00,008737,000142,   0,   0,      0,  1|--|068,0x07,  +60,-128.0000|0000533/0010000|
    |021248,     =000001,			  =016384,      =00,        =00,008713,000138,   0,   0,      0,  1|--|068,0x17,  +60,-128.0000|0000534/0010000|
    |003858,     =000001,			  =016384,      =00,        =00,014459,000204,   0,   0,      1,  1|--|068,0x08,  +60,-128.0000|0000535/0010000|
    |021418,     =000001,			  =016384,      =00,        =00,008780,000146,   0,   0,      0,  1|--|068,0x19,  +60,-128.0000|0000536/0010000|
    
    // ================== give_dealias_data = 0 ==================
    // 13m, distance okay
    |Distmm,=dealias_bin,=freq_count_read_reg,=phaseovl,=phaseovlf2, Phase,Amplud,SigS,AmbS,ModFreq,HDR|--|Amb,Cntr,Tmain,Tillum   |  Count/Total  |
    |014229,=000000,=016384,=00,=00,053315,000245,   0,   0,   1,  1|--|069,0x10,  +59,-128.0000|0000353/0010000|
    |013259,=000000,=016384,=00,=00,057971,000334,   0,   0,   0,  1|--|068,0x01,  +60,-128.0000|0000354/0010000|
    |014272,=000000,=016384,=00,=00,053478,000237,   0,   0,   1,  1|--|069,0x12,  +60,-128.0000|0000355/0010000|
    |013222,=000000,=016384,=00,=00,057812,000333,   0,   0,   0,  1|--|068,0x03,  +59,-128.0000|0000356/0010000|
    |014220,=000000,=016384,=00,=00,053282,000250,   0,   0,   1,  1|--|069,0x14,  +59,-128.0000|0000357/0010000|
    |013249,=000000,=016384,=00,=00,057930,000336,   0,   0,   0,  1|--|068,0x05,  +59,-128.0000|0000358/0010000|
    
    //15m, distance error
    |Distmm,=dealias_bin,=freq_count_read_reg,=phaseovl,=phaseovlf2, Phase,Amplud,SigS,AmbS,ModFreq,HDR|--|Amb,Cntr,Tmain,Tillum   |  Count/Total  |
    |015386,=000000,=016384,=00,=00,057650,000203,   0,   0,   1,  1|--|068,0x06,  +60,-128.0000|0002100/0010000|
    |089080,=000005,=016384,=00,=00,061788,000217,   0,   0,   0,  1|--|068,0x17,  +60,-128.0000|0002101/0010000|
    |014206,=000000,=016384,=00,=00,062111,000221,   0,   0,   0,  1|--|068,0x0f,  +60,-128.0000|0002103/0010000|
    |015411,=000000,=016384,=00,=00,057745,000213,   0,   0,   1,  1|--|068,0x00,  +60,-128.0000|0002104/0010000|
    |015472,=000000,=016384,=00,=00,057973,000205,   0,   0,   1,  1|--|068,0x18,  +60,-128.0000|0002106/0010000|
    |014247,=000000,=016384,=00,=00,062291,000220,   0,   0,   0,  1|--|068,0x09,  +60,-128.0000|0002107/0010000|
    |089220,=000005,=016384,=00,=00,062402,000225,   0,   0,   0,  1|--|068,0x01,  +60,-128.0000|0002109/0010000|
    |015498,=000000,=016384,=00,=00,058072,000239,   0,   0,   1,  1|--|068,0x12,  +60,-128.0000|0002110/0010000|
    |015732,=000000,=016384,=00,=00,058947,000250,   0,   0,   1,  1|--|068,0x1c,  +60,-128.0000|0002118/0010000|
    |014698,=000000,=016384,=00,=00,064264,000250,   0,   0,   0,  1|--|068,0x0d,  +60,-128.0000|0002119/0010000|
    |015902,=000000,=016384,=00,=00,059586,000230,   0,   0,   1,  1|--|068,0x1e,  +60,-128.0000|0002120/0010000|
    |103400,=000005,=016384,=00,=00,059749,000189,   0,   0,   1,  1|--|068,0x0e,  +60,-128.0000|0002121/0010000|
    |014741,=000000,=016384,=00,=00,064453,000210,   0,   0,   0,  1|--|068,0x1f,  +60,-128.0000|0002122/0010000|
    |015956,=000000,=016384,=00,=00,059786,000189,   0,   0,   1,  1|--|068,0x10,  +60,-128.0000|0002123/0010000|
    |014823,=000000,=016384,=00,=00,064808,000208,   0,   0,   0,  1|--|068,0x01,  +60,-128.0000|0002124/0010000|
    |016000,=000000,=016384,=00,=00,059951,000202,   0,   0,   1,  1|--|068,0x12,  +60,-128.0000|0002125/0010000|
    |089739,=000005,=016384,=00,=00,064668,000216,   0,   0,   0,  1|--|068,0x03,  +60,-128.0000|0002126/0010000|
    |015135,=000001,=016384,=00,=00,000639,000059,   0,   0,   0,  1|--|068,0x03,  +61,-128.0000|0002219/0010000|
    |089061,=000005,=016384,=00,=00,006023,000068,   0,   0,   1,  1|--|068,0x14,  +61,-128.0000|0002220/0010000|
    |089962,=000006,=016384,=00,=00,000108,000024,   0,   0,   0,  1|--|068,0x05,  +61,-128.0000|0002221/0010000|
    |018530,=000001,=016384,=00,=00,003896,000097,   0,   0,   1,  1|--|068,0x16,  +61,-128.0000|0002222/0010000|
    |016351,=000001,=016384,=00,=00,005954,000219,   0,   0,   0,  1|--|068,0x07,  +61,-128.0000|0002223/0010000|
    
    // 17m, distance okay
    |Distmm,=dealias_bin,=freq_count_read_reg,=phaseovl,=phaseovlf2, Phase,Amplud,SigS,AmbS,ModFreq,HDR|--|Amb,Cntr,Tmain,Tillum   |  Count/Total  |
    |017536,=000001,=016384,=00,=00,011134,000188,   0,   0,   0,  1|--|068,0x13,  +61,-128.0000|0002237/0010000|
    |017726,=000001,=016384,=00,=00,011967,000193,   0,   0,   0,  1|--|068,0x0b,  +61,-128.0000|0002239/0010000|
    |018759,=000001,=016384,=00,=00,004755,000239,   0,   0,   1,  1|--|068,0x1c,  +61,-128.0000|0002240/0010000|
    |018841,=000001,=016384,=00,=00,016842,000036,   0,   0,   0,  1|--|068,0x0d,  +61,-128.0000|0002241/0010000|
    
    // 21m, distance okay
    |Distmm,=dealias_bin,=freq_count_read_reg,=phaseovl,=phaseovlf2, Phase,Amplud,SigS,AmbS,ModFreq,HDR|--|Amb,Cntr,Tmain,Tillum   |  Count/Total  |
    |021509,=000001,=016384,=00,=00,028506,000189,   0,   0,   0,  1|--|068,0x01,  +61,-128.0000|0002305/0010000|
    |021635,=000001,=016384,=00,=00,015528,000610,   0,   0,   1,  1|--|068,0x12,  +61,-128.0000|0002306/0010000|
    |021922,=000001,=016384,=00,=00,030313,000163,   0,   0,   0,  1|--|068,0x03,  +61,-128.0000|0002307/0010000|
    |021814,=000001,=016384,=00,=00,016202,000173,   0,   0,   1,  1|--|068,0x14,  +61,-128.0000|0002308/0010000|
    
    // 30m, distance okay
    |Distmm,=dealias_bin,=freq_count_read_reg,=phaseovl,=phaseovlf2, Phase,Amplud,SigS,AmbS,ModFreq,HDR|--|Amb,Cntr,Tmain,Tillum   |  Count/Total  |
    |028898,=000001,=016384,=00,=00,060809,000071,   0,   0,   0,  1|--|068,0x17,  +60,-128.0000|0002363/0010000|
    |029206,=000001,=016384,=00,=00,062159,000080,   0,   0,   0,  1|--|068,0x07,  +60,-128.0000|0002364/0010000|
    |029506,=000001,=016384,=00,=00,045023,000029,   0,   0,   1,  1|--|068,0x18,  +60,-128.0000|0002365/0010000|
    |028798,=000001,=016384,=00,=00,060375,000058,   0,   0,   0,  1|--|068,0x09,  +60,-128.0000|0002366/0010000|
    
    // 31m, distance error
    |Distmm,=dealias_bin,=freq_count_read_reg,=phaseovl,=phaseovlf2, Phase,Amplud,SigS,AmbS,ModFreq,HDR|--|Amb,Cntr,Tmain,Tillum   |  Count/Total  |
    |003062,=000000,=016384,=00,=00,013389,000959,   0,   0,   0,  0|--|068,0x13,  +60,-128.0000|0002441/0010000|
    |003067,=000000,=016384,=00,=00,011492,000830,   0,   0,   1,  0|--|068,0x04,  +59,-128.0000|0002442/0010000|
    |003125,=000000,=016384,=00,=00,013667,000914,   0,   0,   0,  0|--|068,0x15,  +59,-128.0000|0002443/0010000|
    |003067,=000000,=016384,=00,=00,011494,000847,   0,   0,   1,  0|--|068,0x06,  +59,-128.0000|0002444/0010000|
    |003021,=000000,=016384,=00,=00,013211,000996,   0,   0,   0,  0|--|068,0x17,  +59,-128.0000|0002445/0010000|
    
    // 35m, distance error
    |Distmm,=dealias_bin,=freq_count_read_reg,=phaseovl,=phaseovlf2, Phase,Amplud,SigS,AmbS,ModFreq,HDR|--|Amb,Cntr,Tmain,Tillum   |  Count/Total  |
    |033734,=000001,=016384,=00,=00,060864,000023,   0,   0,   1,  1|--|068,0x10,  +61,-128.0000|0002537/0010000|
    |033135,=000001,=016384,=00,=00,058617,000031,   0,   0,   1,  1|--|068,0x00,  +61,-128.0000|0002538/0010000|
    |015397,=000001,=016384,=00,=00,001783,000049,   0,   0,   0,  1|--|068,0x11,  +61,-128.0000|0002539/0010000|
    |033345,=000001,=016384,=00,=00,059405,000035,   0,   0,   1,  1|--|068,0x02,  +61,-128.0000|0002540/0010000|
    |015116,=000001,=016384,=00,=00,000555,000045,   0,   0,   0,  1|--|068,0x13,  +61,-128.0000|0002541/0010000|
    
    // 36m, distance error
    |Distmm,=dealias_bin,=freq_count_read_reg,=phaseovl,=phaseovlf2, Phase,Amplud,SigS,AmbS,ModFreq,HDR|--|Amb,Cntr,Tmain,Tillum   |  Count/Total  |
    |003283,=000000,=016384,=00,=00,012302,000462,   0,   0,   1,  0|--|068,0x00,  +55,-128.0000|0002790/0010000|
    |003452,=000000,=016384,=00,=00,015093,000571,   0,   0,   0,  0|--|068,0x11,  +55,-128.0000|0002791/0010000|
    |003297,=000000,=016384,=00,=00,012354,000445,   0,   0,   1,  0|--|068,0x02,  +55,-128.0000|0002792/0010000|
    |003429,=000000,=016384,=00,=00,014996,000581,   0,   0,   0,  0|--|068,0x13,  +55,-128.0000|0002793/0010000|
    |003319,=000000,=016384,=00,=00,012438,000466,   0,   0,   1,  0|--|068,0x04,  +55,-128.0000|0002794/0010000|
    
    

    Thanks.

    Cherry Lin

  • Hi Cherry,

    Can you please confirm on my above question about the register settings I sent? Have you tested with those settings and can provide the result?

    Best,

    Alex

  • Hi Brent,

    I am sure it is set completely according to your configuration. 

    I found that:

    When "give_dealias_data = 1",  PHASE_OUT register have different phase value at 10MHz and 8.57MHz for the same distance.

    When "give_dealias_data = 0", the AFE output value  "dealias_bin" near 15~17m and 30~34m is wrong.  It's normal outside this range.

    Thanks.

    Cherry Lin

  • Hi Cherry,

    Will need to follow up on this and get you a response by end of next week.

    Best,

    Alex

  • Hi Cherry,

    Can you share the full SDK folder with code?

    Best,

    Alex

  • Hi Brent,

    Yes, I can send the full sdk folder to you by email. And could you give me your email address?

    Thanks.

    Cherry Lin

  • Hi Cherry,

    I'll send you an email.

    Best,

    Alex

  • Hi Alex,

    Can you tell me how the OPT3101 chip calculates "DEALIAS_BIN"? I found that the internal algorithm of the chip is easy to calculate "DEALIAS_BIN" incorrectly(at around 15m, 17.5m, 30m, 35m, 45m, 52.5m and so on).

    Thanks.

    Cherry Lin

  • Hi Cherry, 

    Thank you for your patience. Part of our team is out due to national holidays, so we're working to help in a timely fashion. You'll have a response from us within 72 hours. 

    Kind regards,
    Nick Z

  • Hi Cherry,

    Are you setting GIVE_DEALIAS_DATA to 1? If so the chip will auto give the combined phase directly so you don't need the bin. If you are looking to use off chip then this bin value would be needed. 

    Regarding your question - figure 4 here may help to illustrate this: https://www.ti.com/lit/an/sbaa303/sbaa303.pdf 

    You can see that the 10MHz and alternate frequency measurements will only align for 1 dealias bin. Using both frequency measurements the correct dealias bin is determined

    Best,

    Alex