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.

OPT9221: USBIO error on custom OPT8241/OPT9221 ToF board-no frame transfer

Part Number: OPT9221
Other Parts Discussed in Thread: OPT8241, , INA226

We have recently produced a 2nd version of a ToF board that is based on TI reference design (OPT8241/OPT9221) and we got the following problem:

Using voxel-sdk (VoxelCLI), we are able to completely configure the controller (OPT9221) / sensor (OPT8241) using I2C registers but when we start the acquisition, we get this error :

ERROR: USBIO: Could not transfer '0' bytes
ERROR: USBIO: Could not transfer '0' bytes
ERROR: USBIO: Could not transfer '0' bytes
WARNING: USBBulkStreamer: Resetting bulk endpoint at 1559249261720459
...

And there is no frame returned

The 1st version of the board was working well. In this 2nd version, we have removed some I2C devices (0x4B main_current, 0x4E illum_current, 0x54 comp_vref, illum_power) that forced us to take care of them in voxel-sdk to permit the complete configuration of the system.

We have tried different versions of the OPT9221 firmware (0.26, 0.31) and the original (0.17) and a customized version of the FX2 firmware with no effect on the USBIO error.

We have also tried to use a programmed pattern (phy_test_enable and mac_test_enable) but got the same USBIO error.

Are the fixed pattern generated by the controller only (it does not come from the sensor)? If it is the case, it means we should focus on the link between the OPT9221 and the FX2.

Could you suggest any lead that would help us pinpoint the problem? Right now, the I2C seems working but we cannot say if the problem is located between the sensor and the controller or between the controller and the FX2.

Thanks for your help.

Pierre Cottin

  • Hi Pierre, 

    Can you share the full error log? 

    If you have removed some I2C components, you'd have to change the register programmer, as well as change the FX2 firmware. 

    Modify the programmer: https://github.com/3dtof/voxelsdk/blob/master/TI3DToF/boards/TintinCDK/TintinCDKCamera.cpp#L39 as well as the functions for INA226 initialization. 

    You need to modify the FX2 firmware as well, with these I2C writes disabled (see vendorcommand.c). 

    It's most likely an issue with the link between the FX2 and the host, but we'll find out more once you share the full log. 

    Suramya

  • Thanks Suramya for your answer.

    I have attached the full log of VoxelCLI at startup below. I have compared the two version of boards with the exact same configuration and I got the same log except that the most recent (without the I2C devices) does not produce frames. I have also checked the I2C transactions (with a sniffer) at power up and they are identical for both boards.

    As you mention, we had to modify different sections in the voxel source code to prevent accessing to the removed devices. That's why VoxelCLI starts smoothly.

    On the FX2 side, it looks like if the DLL does not request a transaction related to the INA226, the FX2 should work correctly. So there would be no need to modify the FX2 firmware. Am I right?

    INFO: CameraSystem: Successfully loaded factory from library C:\Program Files\voxelsdk-0.6.10_install_no544b4e+\bin\\..\lib\voxel\calculuscdk.dll
    INFO: CameraSystem: Successfully loaded factory from library C:\Program Files\voxelsdk-0.6.10_install_no544b4e+\bin\\..\lib\voxel\haddockcdk.dll
    INFO: CameraSystem: Successfully loaded factory from library C:\Program Files\voxelsdk-0.6.10_install_no544b4e+\bin\\..\lib\voxel\rts5825camera.dll
    INFO: CameraSystem: Successfully loaded factory from library C:\Program Files\voxelsdk-0.6.10_install_no544b4e+\bin\\..\lib\voxel\tintincdk.dll
    INFO: CameraSystem: Successfully loaded factory from library C:\Program Files\voxelsdk-0.6.10_install_no544b4e+\bin\\..\lib\voxel\voxel14.dll
    INFO: CameraSystem: Successfully loaded factory from library C:\Program Files\voxelsdk-0.6.10_install_no544b4e+\bin\\..\lib\voxel\voxeld.dll
    INFO: ParameterDMLParser: Found register map with name 'OPT9221' (vPG1P0)
    INFO: HardwareSerializer: Received 4102 bytes from hardware in 0.178277 s
    INFO: DepthCamera: Setting parameter 'amplitude_post_scale'
    INFO: DepthCamera: Setting parameter 'amplitude_scale'
    INFO: DepthCamera: Setting parameter 'amplitude_threshold'
    INFO: DepthCamera: Setting parameter 'bin_col_count'
    INFO: DepthCamera: Setting parameter 'bin_row_count'
    INFO: DepthCamera: Setting parameter 'binning_en'
    INFO: DepthCamera: Setting parameter 'blk_blank_size'
    INFO: DepthCamera: Setting parameter 'blk_blank_skip'
    INFO: DepthCamera: Setting parameter 'blk_header_en'
    INFO: DepthCamera: Setting parameter 'blk_size'
    INFO: DepthCamera: Setting parameter 'calib_prec'
    INFO: DepthCamera: Setting parameter 'coeff_illum'
    INFO: DepthCamera: Setting parameter 'coeff_sensor'
    INFO: DepthCamera: Setting parameter 'col_end'
    INFO: DepthCamera: Setting parameter 'col_rdout_dir'
    INFO: DepthCamera: Setting parameter 'col_start'
    INFO: DepthCamera: Setting parameter 'cols_to_merge'
    INFO: DepthCamera: Setting parameter 'comp_mod_ref_inv'
    INFO: DepthCamera: Setting parameter 'cos_f1_q0_coeff'
    INFO: DepthCamera: Setting parameter 'cos_f1_q1_coeff'
    INFO: DepthCamera: Setting parameter 'cos_f1_q2_coeff'
    INFO: DepthCamera: Setting parameter 'cos_f1_q3_coeff'
    INFO: DepthCamera: Setting parameter 'cos_f1_q4_coeff'
    INFO: DepthCamera: Setting parameter 'cos_f1_q5_coeff'
    INFO: DepthCamera: Setting parameter 'cos_f2_q0_coeff'
    INFO: DepthCamera: Setting parameter 'cos_f2_q1_coeff'
    INFO: DepthCamera: Setting parameter 'cos_f2_q2_coeff'
    INFO: DepthCamera: Setting parameter 'cos_f2_q3_coeff'
    INFO: DepthCamera: Setting parameter 'cos_f2_q4_coeff'
    INFO: DepthCamera: Setting parameter 'cos_f2_q5_coeff'
    INFO: DepthCamera: Setting parameter 'data_latency'
    INFO: DepthCamera: Setting parameter 'ddr_calibration_intr_dis'
    INFO: DepthCamera: Setting parameter 'ddr_controller_intr_dis'
    INFO: DepthCamera: Setting parameter 'dealias_16bit_op_enable'
    INFO: DepthCamera: Setting parameter 'dealias_en'
    INFO: DepthCamera: Setting parameter 'dealiased_ph_mask'
    INFO: DepthCamera: Setting parameter 'debug_frame_number_en'
    INFO: DepthCamera: Setting parameter 'delay_fb_coeff_1'
    INFO: DepthCamera: Setting parameter 'delay_fb_corr_mode'
    INFO: DepthCamera: Setting parameter 'delay_fb_dc_corr_mode'
    INFO: DepthCamera: Setting parameter 'demod_static_pol'
    INFO: DepthCamera: Setting parameter 'device'
    INFO: DepthCamera: Setting parameter 'disable_offset_corr'
    INFO: DepthCamera: Setting parameter 'disable_temp_corr'
    INFO: DepthCamera: Setting parameter 'easy_conf_en'
    INFO: DepthCamera: Setting parameter 'fb_error_cnt_threshold'
    INFO: DepthCamera: Setting parameter 'fb_ready_en'
    INFO: DepthCamera: Setting parameter 'fb_ready_pol'
    INFO: DepthCamera: Setting parameter 'fe_last_cycle'
    INFO: DepthCamera: Setting parameter 'fe_pol'
    INFO: DepthCamera: Setting parameter 'filt_coeff_x_im_f1'
    INFO: DepthCamera: Setting parameter 'filt_coeff_x_im_f2'
    INFO: DepthCamera: Setting parameter 'filt_coeff_x_re_f1'
    INFO: DepthCamera: Setting parameter 'filt_coeff_x_re_f2'
    INFO: DepthCamera: Setting parameter 'filt_coeff_y_im_f1'
    INFO: DepthCamera: Setting parameter 'filt_coeff_y_im_f2'
    INFO: DepthCamera: Setting parameter 'filt_coeff_y_re_f1'
    INFO: DepthCamera: Setting parameter 'filt_coeff_y_re_f2'
    INFO: DepthCamera: Setting parameter 'filt_en'
    INFO: DepthCamera: Setting parameter 'filt_scale'
    INFO: DepthCamera: Setting parameter 'frame_sync_delay'
    INFO: DepthCamera: Setting parameter 'freq_ratio'
    INFO: DepthCamera: Setting parameter 'frequency_scale'
    INFO: DepthCamera: Setting parameter 'frm_blank_size'
    INFO: DepthCamera: Setting parameter 'frm_header_en'
    INFO: DepthCamera: Setting parameter 'frm_trailer_en'
    INFO: DepthCamera: Setting parameter 'hd_pol'
    INFO: DepthCamera: Setting parameter 'hdr_phase_corr_1'
    INFO: DepthCamera: Setting parameter 'hdr_phase_corr_2'
    INFO: DepthCamera: Setting parameter 'hdr_scale'
    INFO: DepthCamera: Setting parameter 'illum_en_early'
    INFO: DepthCamera: Setting parameter 'illum_fb_inv'
    INFO: DepthCamera: Setting parameter 'illum_mod_early'
    INFO: DepthCamera: Setting parameter 'illum_n_dis_pol'
    INFO: DepthCamera: Setting parameter 'illum_ovtemp_intr_dis'
    INFO: DepthCamera: Setting parameter 'illum_ovtemp_thresh'
    INFO: DepthCamera: Setting parameter 'illum_p_dis_pol'
    INFO: DepthCamera: Setting parameter 'illum_static_pol'
    INFO: DepthCamera: Setting parameter 'ind_freq_data_en'
    INFO: DepthCamera: Setting parameter 'ind_freq_data_sel'
    INFO: DepthCamera: Setting parameter 'init_2'
    INFO: DepthCamera: Setting parameter 'init_3'
    INFO: DepthCamera: Setting parameter 'init_4'
    INFO: DepthCamera: Setting parameter 'init_5'
    INFO: DepthCamera: Setting parameter 'intg_duty_cycle'
    INFO: DepthCamera: Setting parameter 'iq_scale'
    INFO: DepthCamera: Setting parameter 'ka'
    INFO: DepthCamera: Setting parameter 'kb'
    INFO: DepthCamera: Setting parameter 'lvds_pll_lock_intr_dis'
    INFO: DepthCamera: Setting parameter 'ma'
    INFO: DepthCamera: Setting parameter 'mac_test_enable'
    INFO: DepthCamera: Setting parameter 'major'
    INFO: DepthCamera: Setting parameter 'master_pll_lock_intr_dis'
    INFO: DepthCamera: Setting parameter 'mb'
    INFO: DepthCamera: Setting parameter 'minor'
    INFO: DepthCamera: Setting parameter 'mix_volt'
    INFO: DepthCamera: Setting parameter 'mod_freq1'
    INFO: DepthCamera: Setting parameter 'mod_freq2'
    INFO: DepthCamera: Setting parameter 'mod_m1'
    INFO: DepthCamera: Setting parameter 'mod_m2'
    INFO: DepthCamera: Setting parameter 'mod_m_frac1'
    INFO: DepthCamera: Setting parameter 'mod_m_frac2'
    INFO: DepthCamera: Setting parameter 'mod_n1'
    INFO: DepthCamera: Setting parameter 'mod_n2'
    INFO: DepthCamera: Setting parameter 'mod_pll_update'
    INFO: DepthCamera: Setting parameter 'mod_ps1'
    INFO: DepthCamera: Setting parameter 'mod_ps2'
    INFO: DepthCamera: Setting parameter 'modulation_hold'
    INFO: DepthCamera: Setting parameter 'normal_frm_intg_scale'
    INFO: DepthCamera: Setting parameter 'op_clk_edge'
    INFO: DepthCamera: Setting parameter 'op_clk_freq'
    INFO: DepthCamera: Setting parameter 'op_cs_pol'
    INFO: DepthCamera: Setting parameter 'op_data_arrange_mode'
    INFO: DepthCamera: Setting parameter 'op_mode'
    INFO: DepthCamera: Setting parameter 'op_overflow'
    INFO: DepthCamera: Setting parameter 'op_overflow_intr_dis'
    INFO: DepthCamera: Setting parameter 'op_serial_width'
    INFO: DepthCamera: Setting parameter 'op_underflow'
    INFO: DepthCamera: Setting parameter 'op_underflow_intr_dis'
    INFO: DepthCamera: Setting parameter 'output_mode'
    INFO: DepthCamera: Setting parameter 'padding_en'
    INFO: DepthCamera: Setting parameter 'phase_aux_en'
    INFO: DepthCamera: Setting parameter 'phase_aux_pol'
    INFO: DepthCamera: Setting parameter 'phase_corr_1'
    INFO: DepthCamera: Setting parameter 'phase_corr_2'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff0_0'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff0_1'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff0_10'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff0_11'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff0_12'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff0_13'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff0_14'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff0_15'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff0_2'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff0_3'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff0_4'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff0_5'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff0_6'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff0_7'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff0_8'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff0_9'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff1_0'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff1_1'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff1_10'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff1_11'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff1_12'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff1_13'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff1_14'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff1_15'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff1_2'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff1_3'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff1_4'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff1_5'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff1_6'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff1_7'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff1_8'
    INFO: DepthCamera: Setting parameter 'phase_lin_coeff1_9'
    INFO: DepthCamera: Setting parameter 'phase_lin_corr_en'
    INFO: DepthCamera: Setting parameter 'phase_lin_corr_period'
    INFO: DepthCamera: Setting parameter 'phy_test_enable'
    INFO: DepthCamera: Setting parameter 'pix_cnt_max'
    INFO: DepthCamera: Setting parameter 'pixel_data_size'
    INFO: DepthCamera: Setting parameter 'pvdd'
    INFO: DepthCamera: Setting parameter 'quad_cnt_max'
    INFO: DepthCamera: Setting parameter 'quad_hop_en'
    INFO: DepthCamera: Setting parameter 'quad_hop_offset1'
    INFO: DepthCamera: Setting parameter 'quad_hop_offset2'
    INFO: DepthCamera: Setting parameter 'ramp_pat'
    INFO: DepthCamera: Setting parameter 'row_end'
    INFO: DepthCamera: Setting parameter 'row_start'
    INFO: DepthCamera: Setting parameter 'rows_to_merge'
    INFO: DepthCamera: Setting parameter 'saturation_threshold'
    INFO: DepthCamera: Setting parameter 'scratch1'
    INFO: DepthCamera: Setting parameter 'scratch2'
    INFO: DepthCamera: Setting parameter 'scratch3'
    INFO: DepthCamera: Setting parameter 'sensor_ovtemp_intr_dis'
    INFO: DepthCamera: Setting parameter 'sensor_ovtemp_thresh'
    INFO: DepthCamera: Setting parameter 'shutter_dis'
    INFO: DepthCamera: Setting parameter 'sin_f1_q0_coeff'
    INFO: DepthCamera: Setting parameter 'sin_f1_q1_coeff'
    INFO: DepthCamera: Setting parameter 'sin_f1_q2_coeff'
    INFO: DepthCamera: Setting parameter 'sin_f1_q3_coeff'
    INFO: DepthCamera: Setting parameter 'sin_f1_q4_coeff'
    INFO: DepthCamera: Setting parameter 'sin_f1_q5_coeff'
    INFO: DepthCamera: Setting parameter 'sin_f2_q0_coeff'
    INFO: DepthCamera: Setting parameter 'sin_f2_q1_coeff'
    INFO: DepthCamera: Setting parameter 'sin_f2_q2_coeff'
    INFO: DepthCamera: Setting parameter 'sin_f2_q3_coeff'
    INFO: DepthCamera: Setting parameter 'sin_f2_q4_coeff'
    INFO: DepthCamera: Setting parameter 'sin_f2_q5_coeff'
    INFO: DepthCamera: Setting parameter 'slave_mode'
    INFO: DepthCamera: Setting parameter 'software_reset'
    INFO: DepthCamera: Setting parameter 'standby'
    INFO: DepthCamera: Setting parameter 'standby_pin_en'
    INFO: DepthCamera: Setting parameter 'standby_pin_pol'
    INFO: DepthCamera: Setting parameter 'sub_frame_cnt_max'
    INFO: DepthCamera: Setting parameter 'sync_mode'
    INFO: DepthCamera: Setting parameter 'sysclk_in_freq'
    INFO: DepthCamera: Setting parameter 'tg_dis'
    INFO: DepthCamera: Setting parameter 'tillum_calib'
    INFO: DepthCamera: Setting parameter 'tillum_slv_addr'
    INFO: DepthCamera: Setting parameter 'tsensor_calib'
    INFO: DepthCamera: Setting parameter 'unambiguous_range'
    INFO: DepthCamera: Setting parameter 'vco_freq1'
    INFO: DepthCamera: Setting parameter 'vco_freq2'
    INFO: DepthCamera: Setting parameter 'vd_active'
    INFO: DepthCamera: Setting parameter 'vd_pol'
    INFO: CameraSystem: Successfully refreshed parameters for TintinCDKCamera(0::0451:9105::000000000002).
    INFO: ToFCameraBase: Starting with 320x240@1.5fps
    _dealiasedPhaseMask = 0, _dealiasedPhaseMaskInPhaseOffset = 0
    voxel:TintinCDKCamera(0::0451:9105::000000000002)> ERROR: USBIO: Could not transfer '0' bytes
    ERROR: USBIO: Could not transfer '0' bytes
    ERROR: USBIO: Could not transfer '0' bytes
    WARNING: USBBulkStreamer: Resetting bulk endpoint at 1559772107526735
    ERROR: USBIO: Could not transfer '0' bytes
    ERROR: USBIO: Could not transfer '0' bytes
    ERROR: USBIO: Could not transfer '0' bytes
    WARNING: USBBulkStreamer: Resetting bulk endpoint at 1559772113536691
  • Pierre, 

    Looks like the initialization was alright - however, 1.5 fps could cause a problem. Could you try a higher fps? Lower the pix_cnt_max. 

    Suramya

  • I have reduced pix_cnt_max to 100000 and get 15Hz but still no frame (USBIO error). We have also confirmed that the I2C transactions are exactly the same when both versions of the board are programmed with the same FX2 firmware and OPT9221 firmware, with the same profile, serial number and voxel-sdk software. The only difference is that the old one with "all" the I2C devices produces frames and not the new one.

    I have also confirmed that the sensor produces proper modulation signals for the illuminator and VD_FR is also active. We have also probed the control signals between the FX2 and the controller (READY, CS,...) and they do not switch as expected (or as on the old version).

    The only explanation seems to be hardware related like a bad solder on the controller.

    If you have other suggestions, it would be great.

    Thanks.