Post Go back to editing

AD-96TOF1-EBZ with Nvidia Jetson Xavier NX : Regarding aditof-demo app crash and recorded data processing

Hi Analog Team,


We have successfully flashed the Nvidia Jetson Xavier NX SD card release image using Etcher and we are also able to build the aditof-demo app( Note: Done git pull before building demo app). We can see both Depth and IR view in live mode through the HDMI display. 

But we are getting an app crash while playing the recorded file. Please find the attached snapshot of the error.

We could find the recorded data file in the Xavier home directory and tried to view the same using the vooya application in Linux. 
But the quality is not as expected while comparing with the live view through the HDMI display. 
  1. Is there any post-processing methods used in the aditof-demo app for getting better quality in the UI? 
  2. Is any fix available for the app crash mentioned above?



Inserted recorded data
[edited by: sree_devi at 4:07 AM (GMT -4) on 31 Aug 2021]
Parents Reply
  • 1. As a conclusion, the EEPROM is flashed from Xavier using the .bin file mentioned earlier so that EEPROM will have the firmware for three modes. As per the user selection of modes from UI like aditof-demo, the Xavier will read the corresponding setting from EEPROM and will program the addi9036 and the camera will be calibrated for the selected mode. After this, if there is no change in mode settings we can disconnect the EEPROM. Is this correct? Programming of ADDI9036 means that the data from EEPROM is writing into some registers in addi9036?


    2. We are trying to interface AD-96TOF1-EBZ EVB with Qualcomm 610 which is having a different approach for camera integration. There we use some XML files for configuring the camera from userspace. The kernel and drivers are Qualcomm property. Let us know if you have done the integration of the EVB with Qualcomm chipset qcs610 or with the related chipsets like qcs605,qcs410..etc.If done please share your input here.

Children
  • 1. After the addi9036 is programmed the EEPROM is not accessed anymore. Programming means writing addi9036 registers using the data in the EEPROM.

    2. Unfortunately we haven't done any porting to Qualcomm processors. But the assumption is that the addi9036 v4l2 Linux driver should work either as is or can be used as starting point to incorporate any changes required by the Qualcomm proprietary camera system.

  • Thank you for the valuable input.

    1. We could find one driver file in location aditof_sdk/misc/nvidia/jetson/kernel_src/kernel/kernel-4.9/drivers/media/i2c/addi9036.c. Is this common for all jetson platform for nano, xavier nx/agx .etc ?


    2. We are trying to integrate the EVB to QCS610 by eliminating the use of EEPROM.

    From aditof-SDK we could able to find function  "aditof::Status Camera96Tof1::setMode" from file aditof_sdk/sdk/src/cameras/ad-96tof1-ebz/camera_96tof1.cpp is setting the AFE registers with values that is read from EEPROM (firmware according to the mode) and after that writing register set for VC ID with following values for both depth and IR.

    afeRegsAddr[5] = {0x4001, 0x7c22, 0xc3dc, 0x4001, 0x7c22};
    afeRegsVal[5] = {0x0006, 0x0004, 0xe4, 0x0007, 0x0004};

    Also the above mentioned driver is using the following registers for powering up and power down

    addi9036_power_up[] = {
    { 0xc4c0, 0x001c },
    { 0xc4c3, 0x001c },
    { 0xc4d7, 0x0000 },
    { 0xc4d5, 0x0002 },
    { 0xc4da, 0x0001 },
    { 0xc4f0, 0x0000 },
    { 0xc427, 0x0003 },
    { 0xc427, 0x0001 },
    { 0xc427, 0x0000 },
    { 0xc426, 0x0030 },
    { 0xc426, 0x0010 },
    { 0xc426, 0x0000 },
    { 0xc423, 0x0080 },
    { 0xc431, 0x0080 },
    { 0x4001, 0x0007 },
    { 0x7c22, 0x0004 }
    };

    addi9036_power_down[] = {
    { 0xc022, 0x0001 },
    { 0x4001, 0x0006 },
    { 0x7c22, 0x0004 },
    { 0xc431, 0x0082 },
    { 0xc423, 0x0000 },
    { 0xc426, 0x0020 },
    { 0xc427, 0x0002 },
    { 0xc4c0, 0x003c },
    { 0xc4c3, 0x003c },
    { 0xc4d5, 0x0003 },
    { 0xc4da, 0x0000 },
    { 0xc4d7, 0x0001 },
    { 0xc4f0, 0x0001 }
    };

    powering up reg with values -> firmware from EEPROM(AFE registers and values) -> Register set for VC ID

    Are these the involved registers for bringing up the camera to work in a specific mode? Have we missed any setting here? It would be helpful if you could share the registers and values in each firmware so that we can eliminate EEPROM usage.

  • 1. Yes, that driver is common for all the NVIDIA platforms.

    2. Writing the firmware into the addi9036 for a certain mode is done here: https://github.com/analogdevicesinc/aditof_sdk/blob/master/sdk/src/cameras/ad-96tof1-ebz/camera_96tof1.cpp#L292

    The easiest way to get all the register writes for a mode is to save the contents of the "firmwareData" vector into a file. This vector contains consecutive register [address, value] pairs.

    The power up and power down register settings are correct and should be used in addition to the register settings that are done for a certain mode.

    The other register writes you mentioned are useful only if setting the output of the addi9036 to ir only / depth only and changing the VC IDs. By default addi9036 is configured to output both depth and ir, both on VC 0.

  • Hi,

    We need some details like sensorIdRegAddr and sensoid for integrating in to Qualcomm architecture which we couldn't find the same in the "CCD TOF Signal Processor with Programmable Timing and V-Driver ADDI9036" datasheet. Could you please provide the documents having these details?

  • The ADDI9036 does not have an ID register. A workaround would be read any other register and compare the reading to the register's default value since the reading is done only once before the addi9036 is programmed. 

  • shall we use 0xc100 reg with default value 0x11?

  • 0xc00  should be fine, but the default value is 0x0001

  • Hi,

    We have seen the kernel configurations from file https://github.com/analogdevicesinc/aditof_sdk/blob/master/misc/nvidia/xaviernx/kernel_src/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules/tegra194-camera-addi9036.dtsi

    Here the addi9036 is mentioned as 

    mode_type = "bayer";
    pixel_phase = "bggr";

    The output of addi9036 is yuv422 right ?

  • ADDI9036 output format is RAW12, which is equivalent to 12bit Bayer.

  • 1 .We are getting an error like "failed to get the frame" even after the device is connected to Xavier nx ( from dmesg).



    Have you faced any such issues before?






    2. What are all the lines in between evb and xaviernx? only MIPI2 lane and I2C sda &scl  ?
    We have seen in linux addi9036 driver, GPIO0 is setting value to 0 in addi9036_power_on function ?