Hello TI team
I have a question about configuration when I use OPT3101 in SuperHDR plus monoshot mode I have incorrect behavior, it fires continuously, sending me interruptions without activating the monoshot_bit bit and the emitter led remains on
I perform the configuration from the OPT3101 Configurator Tool software
I attach the code
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 = 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 = 0; // //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.monoshot_mode=3; // //Sets monoshot mode this->reg.dis_glb_pd_refsys=1; // Disables deep sleep PWRDN for blocks //this->reg.dis_glb_pd_temp_sens=1; //this->reg.dis_glb_pd_illum_drv=1 //this->reg.dis_glb_pd_afe=1; //this->reg.dis_glb_pd_afe_dac=1; this->reg.dis_glb_pd_amb_dac=1; this->reg.dis_glb_pd_amb_adc=1; this->reg.dis_glb_pd_osc=1; //this->reg.dis_glb_pd_i2chost_osc=1; this->reg.MONOSHOT_NUMFRAME=2; // //Sets number of frames to me measured per trigger this->reg.powerup_delay=159; // //Power-up delay for every monoshot trigger this->reg.num_sub_frames = 511; // //Sub frames count this->reg.num_avg_sub_frames = 511; // //Average frames count this->reg.xtalk_filt_time_const = 1; // //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 = 511; // //Same as AvgFrame Count this->reg.tg_seq_int_mask_end = 511; // //Same as AvgFrame Count this->reg.command0 = 0x108; // //Set Channel 1 this->reg.command1 = 0xB02; // //COMP1. this->reg.command2 = 0x100; // //Set Channel 0 this->reg.command3 = 0xC00; // //COMP1_INV this->reg.compare_reg1 = 26000; // //ThresholdH this->reg.compare_reg2 = 4312; // //ThresholdH this->reg.mux_sel_compin = 0; // //Selects Amplitude for Comparison this->reg.en_tx1_on_tx0 = 1; // //Setting TX1 register and connect to TX0 this->reg.en_processor_values = 1; // //Enables processor values this->reg.en_sequencer = 1; // //Enables the Sequencer this->reg.hdr_thr_high = 25500; // //High Threshold this->reg.hdr_thr_low = 4812; // //Low Threshold this->reg.en_adaptive_hdr = 1; // //Enables adaptive HDR feature this->reg.illum_dac_h_tx0 = 2; // //High Current settings [011.2mA:5.6mA X 02] this->reg.illum_scale_h_tx0 = 0; // //Illum scale for H [011.2mA:5.6mA X 02] this->reg.illum_dac_l_tx0 = 1; // //High Current settings [002.8mA:2.8mA X 01] this->reg.illum_scale_l_tx0 = 2; // //Illum scale for H [002.8mA:2.8mA X 01] 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.tg_en = 1; // //Enables Timing Generator this->configurationFlags_xtalkFilterTau = 1; // //This is not a register but a settings flag for the SDK this->configurationFlags_monoshotMode = true; // //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 = 2; // //This is not a register but a settings flag for the SDK this->configurationFlags_frameTimeInMilliSeconds = 128; // //This is not a register but a settings flag for the SDK this->configurationFlags_avgFrameCountExponentOfTwo = 9; // //This is not a register but a settings flag for the SDK }
The question arises, is it possible to configure OPT3101 in SuperHDR mode plus monoshot mode?
If so, I did something wrong in the configuration, another comment made the configuration of monoshot not in the initialize() function since it affects the lighting and internal crosstalk loading, so I made that configuration at the end of all the configurations and loading of calibration values