Part Number:OPT3101-SDKOther 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.
Kailyn Chen:
Hello, I have posted your questions to E2E forum, please pay attention to their reply:
https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/1311776/opt3101-sdk-performing-illum-crosstalk
,
chen:
万分感谢!
,
chen:
在那边的论坛我回复不了,请帮我转发回复,谢谢!
这是一个新的设计。
软件在main.cpp 调用dev.perUnitFactoryUpdateIllumXtalk();进行测试的。
void OPT3101::device::initialize(void) {// List of registers to initialize OPT3101 device after power-upthis->reg.force_en_slave = 1; // add code!!!this->reg.tg_ovl_window_start = 7000; // //Overload flab observation windowthis->reg.en_temp_conv = 1;// //Enables the internalthis->reg.clip_mode_fc = 1;// //Enables Clip mode for Frequency correctionthis->reg.clip_mode_temp = 0;// //Disables Clip mode for Temp coff phase correctionthis->reg.clip_mode_offset = 0; // //Disables Clip mode for phase offset correctionthis->reg.iq_read_data_sel = 3; // //Enables 16 bit frame counterthis->reg.iamb_max_sel = 14;// //Sets maximum ambient supportthis->reg.en_temp_corr = 1;// //Enables Temperature Correctionthis->reg.gpio1_obuf_en = 1;// //Enabled output buffer on GPIO1 pinthis->reg.gpo1_mux_sel = 2;// //select dig_gpo_0 on gpio1this->reg.dig_gpo_sel0 = 9;// //Select Data Ready on dig_gpo_0this->reg.num_sub_frames = 255;// 255;!!!// //Sub frames countthis->reg.num_avg_sub_frames = 127;// 127;!!!// //Average frames countthis->reg.xtalk_filt_time_const = 3;// //Crosstalk filter time constantthis->reg.tg_seq_int_start = 9850;// //Sequence Startthis->reg.tg_seq_int_end = 9858;// //Sequence Endthis->reg.tg_seq_int_mask_start = 127; // !!! 127 //Same as AvgFrame Countthis->reg.tg_seq_int_mask_end = 127;// !!! 127 //Same as AvgFrame Countthis->reg.hdr_thr_high = 25500; // //High Thresholdthis->reg.hdr_thr_low = 5875;// //Low Thresholdthis->reg.en_adaptive_hdr = 1;// 1 !!! //Enables adaptive HDR featurethis->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 orderthis->reg.en_tx_switch = 1;// 1 charge!!! //Enable TX Switching orderthis->reg.sel_tx_ch = 0;this->reg.ILLUM_DC_CURR_DAC = 4;//!!! add , bias current x 0.5mAthis->reg.tg_en = 1; // //Enables Timing Generatorthis->configurationFlags_xtalkFilterTau = 3;// //This is not a register but a settings flag for the SDKthis->configurationFlags_monoshotMode = false; // //This is not a register but a settings flag for the SDKthis->configurationFlags_xtalkSettlingOneTauInMilliSeconds =512; // //This is not a register but a settings flag for the SDKthis->configurationFlags_xtalkSettlingOneTauInDataReadyCounts =8;// //This is not a register but a settings flag for the SDKthis->configurationFlags_frameTimeInMilliSeconds = 64;// //This is not a register but a settings flag for the SDKthis->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 methodhost.printf("INFO::Writing Initialization sequence I2C registers\r\n");this->initialize(); ///* Initializes the OPT3101 device by calling OPT3101::device::initialize methodhost.printf("INFO::Device Initialization Completed\r\n");this->measureAndCorrectInternalCrosstalk(&this->calibration->internalCrosstalk[0]); ///* Calls method OPT3101::device::measureAndCorrectInternalCrosstalk with argument OPT3101::calibrationC::internalCrosstalkthis->calibration->internalCrosstalk[0].report(); ///* Calls the method OPT3101::crosstalkC::report for debug and data analysisthis->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 }
,
Annie Liu:
已将您的回复转到那个帖子中,您可关注那个帖子了解进展。
https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/1311776/opt3101-sdk-performing-illum-crosstalk
,
Kailyn Chen:
您好,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.
,
chen:
这个是我的测试系统简图 , 我在检查我的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上进行验证。
,
Kailyn Chen:
收到您的反馈,我去E2E上跟进下。