Camera support in QNX on AM62A

Part Number: SK-AM62A-LP

Tool/software:

Hi, I have followed the instructions in the Getting Started Guide to install QNX and the TI SDK.

I would like to run ./run_app_single_cam.sh. Are there instructions on how to hook up an IMX390 to the LP board?

We have a V3Link d-ch adapter board, but the instructions on the Arducam website seem to focus only on Linux:

https://www.arducam.com/wp-content/uploads/2023/10/Arducam_V3Link-Quick_Start_Guide.pdf

Are there equivalent instructions for QNX?

Best regards,

Vincent

  • Hi Vincent,

    In QNX PSDK we support camera sesnors like IMX390 via the fusion UB960 board.

    The AM62A board has CSI port which is connected to the UB960 deserialiser fusion board, and the camera are connected on this deserialiser via the FPD cables.

    The deserialiser directly supported on QNX PSDK 10.0 is https://www.ti.com/product/DS90UB960-Q1

    Are you planning to use the Arducam V3 link with QNX SDK ?

    Regards,

    Shiva

  • Hi Shiva,

    In QNX PSDK we support camera sesnors like IMX390 via the fusion UB960 board.

    Could you send me an URL to this fusion board, along with detailed instructions on how to connect it to the SK-AM62A-LP: https://www.ti.com/tool/SK-AM62A-LP?

    Yes, ideally we would like to use the Arducam V3 link, as that is the fusion board our Linux demo is using. So please let us know if you have instructions for that one.

    Thanks,

    Vincent

  • Hi Vincent,

    By default QNX PSDK 10.0 supports fusion UB960 board for camera support, which is connected to the SK-AM62A-LP through a samtec CSI header. I am not sure if the SK-AM62A-LP you are using has this CSI samtec connector, if not it would need to be soldered.

    You can find the details of fusion board here: https://www.ti.com/lit/ug/spruii1a/spruii1a.pdf?ts=1726030196859&ref_url=https%253A%252F%252Fwww.google.com%252F

    There is a CSI connector at the bottom of this fusion board which connects to the SK-AM62A-LP through the CSI samtec connector.

              

    Regards,

    Shiva

  • On the Arducam V3 link, 10.0 QNX PSDK directly doesn't directly support it, this support is planed for the next 10.1 release. However, I can share the code patches required in PSDK to make the 10.0 PSDK support Arducam V3 link, we have recently tested this.

     

    To use Arducam V3 link with QNX SDK 10.0, following patches are required:

    0654.pdk.diff
    diff --git a/packages/ti/board/src/devices/fpd/ds90ub960.c b/packages/ti/board/src/devices/fpd/ds90ub960.c
    index ede0306d3..bee10fb19 100755
    --- a/packages/ti/board/src/devices/fpd/ds90ub960.c
    +++ b/packages/ti/board/src/devices/fpd/ds90ub960.c
    @@ -706,7 +706,8 @@ void Board_fpdU960GetI2CAddr(uint8_t *chNum,
     #if defined (SOC_AM62A)
             *chNum = 2;
     #endif
    -        *i2cAddr = 0x3DU;
    +        //*i2cAddr = 0x3DU;
    +        *i2cAddr = 0x30U;
         }
         else if (csiInst == BOARD_CSI_INST_1)
         {
    
    imaging.diff
    diff --git a/sensor_drv/src/iss_sensors.c b/sensor_drv/src/iss_sensors.c
    index 03d3cc0..f281c6e 100755
    --- a/sensor_drv/src/iss_sensors.c
    +++ b/sensor_drv/src/iss_sensors.c
    @@ -711,7 +711,7 @@ void getIssSensorI2cInfo(uint8_t *byteOrder, I2C_Handle *i2cHndl)
         *i2cHndl = gISS_Sensor_I2cHandle;
     }
     
    -#if defined(SOC_AM62A)
    +#if 0//defined(SOC_AM62A)
     static int32_t setup_io_expander ( void )
     {
         int32_t status = -1;
    @@ -808,7 +808,7 @@ static int32_t setupI2CInst(uint8_t i2cInst)
                 }
                 gISS_Sensor_I2cHandle = (I2C_Handle)&sensor_fd;
             }
    -        status = setup_io_expander();
    +        //status = setup_io_expander();
             if (status != EOK)
             {
                 issLogPrintf("%s: IO expander config failed(%d)\n", __func__, status);
    

     

    1. Update the I2C address of deserialiser in PDK:

     

    cd $(TOP)/psdkqa/pdk
    patch -p1 < pdk.diff
     

    2. Second change is needed to enbale camera through FPC connecotor instead of CSI samtec:

     

    cd $(TOP)/imaging
    patch -p1 < imaging.diff
     

      With above changes you would have to build the SDK again and reflash the SD card:

     

    cd sdk_builder
    make imaging_scrub;
    make qnx_clean;
    make sdk -jN;

    The connection with Arducam V3 link of AM62A would be same as done in Linux side using FPC connector and FPD cables for camera.

    Regards,

    Shiva

  • Hi Shiva,

    Thank you very much for the info.

    My board does not have a CSI connector, so I am trying to use the Arducam V3 Link procedure.

    After patching the files and rebuilding as you instructed, I reflashed the SD card:

    cd psdkqa/pdk
    patch -p1 < 0654.pdk.diff 
    cd imaging
    patch -p1 < imaging.diff 
    cd sdk_builder/
    make imaging_scrub
    make qnx_clean
    make sdk -j5
    make qnx_fs_create_sd
    make qnx_fs_install_sd
    make qnx_fs_install_sd_test_data


    Then I ran the app and am still seeing errors regarding the de-serializer:

    ./run_app_single_cam.sh
    APP: Init QNX ... !!!
    appIpcInit: IPC: Init QNX ... !!!
    appIpcInit: IPC: Init ... Done !!!
        37.621924 s: REMOTE_SERVICE: Init ... !!!
        37.622059 s: REMOTE_SERVICE: Init ... Done !!!
        37.622112 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
        37.622231 s: FVID2: Init ... !!!
        37.622324 s: FVID2: Init ... Done !!!
        37.622359 s: UDMA: Init ... !!!
        37.624922 s: UDMA: Init ... Done !!!
        37.624983 s:  VX_ZONE_INIT:Enabled
        37.625020 s:  VX_ZONE_ERROR:Enabled
        37.625055 s:  VX_ZONE_WARNING:Enabled
        37.625359 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-0 
        37.625516 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-1 
        37.625676 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-2 
        37.625832 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-3 
        37.625990 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target CAPTURE1 
        37.626145 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target CAPTURE2 
        37.626300 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target CAPTURE3 
        37.626453 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target CAPTURE4 
        37.626513 s:  VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
        37.626590 s:  VX_ZONE_INIT:[tivxHostInitLocal:106] Initialization Done for HOST !!!
        37.626643 s: APP: OpenVX Target kernel init ... !!!
        37.626713 s: APP: OpenVX Target kernel init ... Done !!!
        37.626762 s: CSI2RX: Init ... !!!
        37.626792 s: SCICLIENT: Sciclient_pmSetModuleState module=182 state=2
        37.627058 s: SCICLIENT: Sciclient_pmSetModuleState success
        37.627106 s: SCICLIENT: Sciclient_pmSetModuleState module=185 state=2
        37.627308 s: SCICLIENT: Sciclient_pmSetModuleState success
        37.627838 s: CSI2RX: Init ... Done !!!
        37.627884 s: ISS: Init ... !!!
        37.627921 s: IssSensor_Init ... Done !!!
        37.627963 s: IttRemoteServer_Init ... Done !!!
        37.628000 s: ISS: Init ... Done !!!
    sensor_selection = [0]
    ldc_enable = [0]
    num_frames_to_run = [1000000000]
    is_interactive = [1]
        37.633157 s: ISS: Enumerating sensors ... !!!
    Error writing 0x02 to de-serializer(0x36) register 0x01!
     Deserializer Error: Reg Write Failed for regAddr 0x01, cnt = 0
    Error :  returned 5 while configuring DES 1 
        37.882235 s: ISS: Enumerating sensors ... found 0 : IMX390-UB953_D3
        37.882281 s: ISS: Enumerating sensors ... found 1 : OV2312-UB953_LI
    Select camera port index 0-11 : 
    

    Here is how everything is connected right now:

    Is there anything else I need to do?

    Thanks,

    Vincent

  • Hi Vincent,

    I see the error is related to the address (0x36). The 0x36 address is used for the CSI-1 instance which is not supported on AM62A, so you can ignore this error.

    For Arducam V3 Link de-serializer, i2c address of 0x30 is used, we shouldn't see any errors on 0x30. For some reason 0x36 address is getting configured too and throwing that error, but it's not an issue for us.

    The connections look correct to me , can you please go ahead and select the port 0 and on the app and further choices for LDC.

    I think the demo should work.

    Regards,

    Shiva

  • Hi Shiva,

    Continuing with the demo resulted in a continuous stream of i2c errors:

    AM62A-EVM@QNX:/ti_fs/vision_apps# ./run_app_single_cam.sh 
    APP: Init QNX ... !!!
    appIpcInit: IPC: Init QNX ... !!!
    appIpcInit: IPC: Init ... Done !!!
        55.006741 s: REMOTE_SERVICE: Init ... !!!
        55.006879 s: REMOTE_SERVICE: Init ... Done !!!
        55.006935 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
        55.007054 s: FVID2: Init ... !!!
        55.007148 s: FVID2: Init ... Done !!!
        55.007184 s: UDMA: Init ... !!!
        55.009729 s: UDMA: Init ... Done !!!
        55.009792 s:  VX_ZONE_INIT:Enabled
        55.009828 s:  VX_ZONE_ERROR:Enabled
        55.009863 s:  VX_ZONE_WARNING:Enabled
        55.010173 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-0 
        55.010335 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-1 
        55.010496 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-2 
        55.010655 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-3 
        55.010808 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target CAPTURE1 
        55.010967 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target CAPTURE2 
        55.011123 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target CAPTURE3 
        55.011278 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target CAPTURE4 
        55.011338 s:  VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
        55.011416 s:  VX_ZONE_INIT:[tivxHostInitLocal:106] Initialization Done for HOST !!!
        55.011468 s: APP: OpenVX Target kernel init ... !!!
        55.011538 s: APP: OpenVX Target kernel init ... Done !!!
        55.011580 s: CSI2RX: Init ... !!!
        55.011611 s: SCICLIENT: Sciclient_pmSetModuleState module=182 state=2
        55.011870 s: SCICLIENT: Sciclient_pmSetModuleState success
        55.011917 s: SCICLIENT: Sciclient_pmSetModuleState module=185 state=2
        55.012118 s: SCICLIENT: Sciclient_pmSetModuleState success
        55.012653 s: CSI2RX: Init ... Done !!!
        55.012698 s: ISS: Init ... !!!
        55.012736 s: IssSensor_Init ... Done !!!
        55.012781 s: IttRemoteServer_Init ... Done !!!
        55.012819 s: ISS: Init ... Done !!!
    sensor_selection = [0]
    ldc_enable = [0]
    num_frames_to_run = [1000000000]
    is_interactive = [1]
        55.017745 s: ISS: Enumerating sensors ... !!!
    Error writing 0x02 to de-serializer(0x36) register 0x01!
     Deserializer Error: Reg Write Failed for regAddr 0x01, cnt = 0
    Error :  returned 5 while configuring DES 1 
        55.266945 s: ISS: Enumerating sensors ... found 0 : IMX390-UB953_D3
        55.266989 s: ISS: Enumerating sensors ... found 1 : OV2312-UB953_LI
    Select camera port index 0-11 : 0
    2 registered sensor drivers
    a : IMX390-UB953_D3 
    b : OV2312-UB953_LI 
    Select a sensor above or press '0' to autodetect the sensor : Invalid selection 
    . Try again 
    2 registered sensor drivers
    a : IMX390-UB953_D3 
    b : OV2312-UB953_LI 
    Select a sensor above or press '0' to autodetect the sensor : a
    Sensor selected : IMX390-UB953_D3
    LDC Selection Yes(1)/No(0) : LDC Selection Yes(1)/No(0) : 0
    CAC Selection Yes(1)/No(0) : CAC Selection Yes(1)/No(0) : 0
    Querying IMX390-UB953_D3 
       142.853440 s: ISS: Querying sensor [IMX390-UB953_D3] ... !!!
       142.853540 s: ISS: Querying sensor [IMX390-UB953_D3] ... Done !!!
       142.853588 s: ISS: Initializing sensor [IMX390-UB953_D3], doing IM_SENSOR_CMD_PWRON ... !!!
    IMX390_PowerOn : chId = 0x0 
       142.853671 s: ISS: Initializing sensor [IMX390-UB953_D3], doing IM_SENSOR_CMD_CONFIG ... !!!
     Configuring IMX390 imager 0x40.. Please wait till it finishes 
    Error : I2C Timeout while writing 0x7f to IMX390 register 0xc 
    Error : I2C Timeout while writing 0x1 to IMX390 register 0xd 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0xe 
    Error : I2C Timeout while writing 0x7f to IMX390 register 0x10 
    Error : I2C Timeout while writing 0x1 to IMX390 register 0x11 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x12 
    Error : I2C Timeout while writing 0x20 to IMX390 register 0x18 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x19 
    Error : I2C Timeout while writing 0xc to IMX390 register 0x1a 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x1b 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x38 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x3c 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x3d 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x3e 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x40 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x41 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x42 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x44 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x45 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x46 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x48 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x49 
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x4a 
    

    The display is staying blank as well.

    Best regards,

    Vincent

  • Hi Vincent,

    Thanks for sharing the findings. I have been out of office this week, I will re-test this on my side and update you back by monday.

    Regards,

    Shiva

  • Hi Vincent,

    Thanks for the time. I re-tested this on my setup by applying the same patches I had shared and rebuilding SDK.

    I am not seeing the errors you have reported on mysetup. The error logs related "de-serializer(0x36)" are visible on my setup as well, but these are not fatal as we don't use the 0x36 deserialiser on AM62A.But otherwise the captured frames are continuously displayed on screen after selecting the camera port as 0 and autodetecting the sensor. 

    Can you please recheck the sensor /FPC connections on your setup once? and try power reseting the EVM and Arducam 

    We didn't officially support the Arducam V3 Link with QNX SDK 10.0 hence some cleanup and more testing is required to validate the stability. We will be working on this in parallel.

    I am attachking the working logs from my setup:

     

    AM62A-EVM@QNX:/ti\_fs/vision\_apps# ./run\_app\_single\_cam.sh
    APP: Init QNX ... !!!
    appIpcInit: IPC: Init QNX ... !!!
    appIpcInit: IPC: Init ... Done !!!
    16.681535 s: REMOTE\_SERVICE: Init ... !!!
    16.681670 s: REMOTE\_SERVICE: Init ... Done !!!
    16.681723 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
    16.681864 s: FVID2: Init ... !!!
    16.681958 s: FVID2: Init ... Done !!!
    16.681995 s: UDMA: Init ... !!!
    16.684978 s: UDMA: Init ... Done !!!
    16.685043 s:  VX\_ZONE\_INIT:Enabled
    16.685080 s:  VX\_ZONE\_ERROR:Enabled
    16.685114 s:  VX\_ZONE\_WARNING:Enabled
    16.685530 s:  VX\_ZONE\_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-0
    16.685799 s:  VX\_ZONE\_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-1
    16.686071 s:  VX\_ZONE\_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-2
    16.686345 s:  VX\_ZONE\_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-3
    16.686607 s:  VX\_ZONE\_INIT:[tivxPlatformCreateTargetId:124] Added target CAPTURE1
    16.686873 s:  VX\_ZONE\_INIT:[tivxPlatformCreateTargetId:124] Added target CAPTURE2
    16.687142 s:  VX\_ZONE\_INIT:[tivxPlatformCreateTargetId:124] Added target CAPTURE3
    16.687405 s:  VX\_ZONE\_INIT:[tivxPlatformCreateTargetId:124] Added target CAPTURE4
    16.687465 s:  VX\_ZONE\_INIT:[tivxInitLocal:136] Initialization Done !!!
    16.687544 s:  VX\_ZONE\_INIT:[tivxHostInitLocal:106] Initialization Done for HOST !!!
    16.687598 s: APP: OpenVX Target kernel init ... !!!
    16.687668 s: APP: OpenVX Target kernel init ... Done !!!
    16.687710 s: CSI2RX: Init ... !!!
    16.687741 s: SCICLIENT: Sciclient\_pmSetModuleState module=182 state=2
    16.688014 s: SCICLIENT: Sciclient\_pmSetModuleState success
    16.688060 s: SCICLIENT: Sciclient\_pmSetModuleState module=185 state=2
    16.688270 s: SCICLIENT: Sciclient\_pmSetModuleState success
    16.688922 s: CSI2RX: Init ... Done !!!
    16.688978 s: ISS: Init ... !!!
    16.689022 s: IssSensor\_Init ... Done !!!
    16.689065 s: IttRemoteServer\_Init ... Done !!!
    16.689102 s: ISS: Init ... Done !!!
    sensor\_selection = [0]
    ldc\_enable = [0]
    num\_frames\_to\_run = [1000000000]
    is\_interactive = [1]
    16.692265 s: ISS: Enumerating sensors ... !!!
    Error writing 0x02 to de-serializer(0x36) register 0x01!
    Deserializer Error: Reg Write Failed for regAddr 0x01, cnt = 0
    Error :  returned 5 while configuring DES 1
    16.941487 s: ISS: Enumerating sensors ... found 0 : IMX390-UB953\_D3
    16.941530 s: ISS: Enumerating sensors ... found 1 : OV2312-UB953\_LI
    Select camera port index 0-11 : 0
    2 registered sensor drivers
    a : IMX390-UB953\_D3
    b : OV2312-UB953\_LI
    Select a sensor above or press '0' to autodetect the sensor : Invalid selection
    . Try again
    2 registered sensor drivers
    a : IMX390-UB953\_D3
    b : OV2312-UB953\_LI
    Select a sensor above or press '0' to autodetect the sensor : 0
    Error reading from de-serializer(0x36) register 0x4c!
    Sensor selected : IMX390-UB953\_D3
    LDC Selection Yes(1)/No(0) : LDC Selection Yes(1)/No(0) : 1
    CAC Selection Yes(1)/No(0) : CAC Selection Yes(1)/No(0) : 0
    Querying IMX390-UB953\_D3
    26.558319 s: ISS: Querying sensor [IMX390-UB953\_D3] ... !!!
    26.558403 s: ISS: Querying sensor [IMX390-UB953\_D3] ... Done !!!
    26.558448 s: ISS: Initializing sensor [IMX390-UB953\_D3], doing IM\_SENSOR\_CMD\_PWRON ... !!!
    IMX390\_PowerOn : chId = 0x0
    26.558532 s: ISS: Initializing sensor [IMX390-UB953\_D3], doing IM\_SENSOR\_CMD\_CONFIG ... !!!
    Configuring IMX390 imager 0x40.. Please wait till it finishes
    Error : I2C Timeout while writing 0x0 to IMX390 register 0x46
    28.816016 s: ISS: ERROR: Initializing sensor [IMX390-UB953\_D3] failed !!!
    28.816132 s: ISS: Initializing sensor [IMX390-UB953\_D3] ... Done !!!
    Error initializing sensor IMX390-UB953\_D3
    Test data path is NULL. Defaulting to current folder
    read\_test\_image\_raw : Unable to open file .//img\_test.raw
    app\_create\_viss : sensor\_dcc\_id = 390
    Enabling LDC
    Creating LDC
    Scaler is enabled
    28.860154 s: ISS: Starting sensor [IMX390-UB953\_D3] ... !!!
    
    # ==========================
    Demo : Single Camera w/ 2A
    p: Print performance statistics
    
    s: Save Sensor RAW, VISS Output and H3A output images to File System
    
    e: Export performance statistics
    x: Exit
    
    Enter Choice:
    Unsupported command
    
    # ==========================
    Demo : Single Camera w/ 2A
    p: Print performance statistics
    
    s: Save Sensor RAW, VISS Output and H3A output images to File System
    
    e: Export performance statistics
    x: Exit
    
    Enter Choice: Error writing 0xd8 to de-serializer(0x36) register 0x65!
    Deserializer Error: Reg Write Failed for regAddr 0x65, cnt = 1
    Error writing 0x01 to de-serializer(0x30) register 0x4c!
    29.194027 s: ISS: Starting sensor [IMX390-UB953\_D3] ... Done !!!
    IMX390\_GetWBPrgFxn: sensor\_pre\_gain = 0
    40.725117 s:  VX\_ZONE\_ERROR:[tivxCaptureDequeueFrameFromDriver:884]  CAPTURE: ERROR: Incomplete Frame for Ch0 !!!
    40.874968 s:  VX\_ZONE\_ERROR:[tivxCaptureDequeueFrameFromDriver:884]  CAPTURE: ERROR: Incomplete Frame for Ch0 !!!
    40.941564 s:  VX\_ZONE\_ERROR:[tivxCaptureDequeueFrameFromDriver:884]  CAPTURE: ERROR: Incomplete Frame for Ch0 !!!
    x
    
    ```
    59.010543 s: ISS: Stopping sensor [IMX390-UB953_D3] ... !!!
    59.055029 s: ISS: Stopping sensor [IMX390-UB953_D3] ... Done !!!
    59.059026 s: ISS: Stopping sensor [IMX390-UB953_D3] ... !!!
    59.104028 s: ISS: Stopping sensor [IMX390-UB953_D3] ... Done !!! 
    ```
    # ==========================================================
    Capture Status: Instance|0
    overflowCount: 0
    spuriousUdmaIntrCount: 0
    frontFIFOOvflCount: 0
    crcCount: 0
    eccCount: 0
    correctedEccCount: 0
    dataIdErrorCount: 0
    invalidAccessCount: 0
    invalidSpCount: 0
    strmFIFOOvflCount[0]: 0
    Channel Num | Frame Queue Count | Frame De-queue Count | Frame Drop Count | Error Frame Count |
    0 |              1786 |                 1786 |                2 |                 0 |
    59.112179 s: ISS: De-initializing sensor [IMX390-UB953\_D3] ... !!!
    59.112253 s: ISS: De-initializing sensor [IMX390-UB953\_D3] ... Done !!!
    59.112307 s: APP: OpenVX Target kernel deinit ... !!!
    59.112372 s: APP: OpenVX Target kernel deinit ... Done !!!
    59.112424 s:  VX\_ZONE\_INIT:[tivxHostDeInitLocal:120] De-Initialization Done for HOST !!!
    59.128110 s:  VX\_ZONE\_ERROR:[ownPosixObjectDeInit:302] Deiniting mutex at index: 10 failed
    59.128183 s:  VX\_ZONE\_INIT:[tivxDeInitLocal:206] De-Initialization Done !!!
    59.128236 s: APP ISS: Deinit ... Done !!!
    APP: Deinit ... !!!
    59.128784 s: REMOTE\_SERVICE: Deinit ... !!!
    59.128885 s: REMOTE\_SERVICE: Deinit ... Done !!!
    IPC: Deinit ... !!!
    IPC: Deinit ... Done !!!
    APP: Deinit ... Done !!!

    Regards,

    Shiva

  • Hi Shiva,

    Thank you for the update. I was using a Sensing IMX390 which we used with the Linux SDK, and I found I can see the camera output on the display only if I switch to a D3RCM IMX390 instead. Which camera are you using? 

    I am also getting the same errors as in your trace:

    40.941564 s:  VX\_ZONE\_ERROR:[tivxCaptureDequeueFrameFromDriver:884]  CAPTURE: ERROR: Incomplete Frame for Ch0 !!!

    The display would flicker whenever these messages appear. Is this a known issue?

    And as seen with other vision apps, when I exit, the app does not clean up correctly:

    AM62A-EVM@QNX:/ti_fs/vision_apps# ./run_app_single_cam.sh 
    APP: Init QNX ... !!!
    appIpcInit: IPC: Init QNX ... !!!
    appIpcInit: IPC: Init ... Done !!!
        32.626454 s: REMOTE_SERVICE: Init ... !!!
        32.626594 s: REMOTE_SERVICE: Init ... Done !!!
        32.626650 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
        32.626772 s: FVID2: Init ... !!!
        32.626865 s: FVID2: Init ... Done !!!
        32.626901 s: UDMA: Init ... !!!
        32.629466 s: UDMA: Init ... Done !!!
        32.629528 s:  VX_ZONE_INIT:Enabled
        32.629565 s:  VX_ZONE_ERROR:Enabled
        32.629599 s:  VX_ZONE_WARNING:Enabled
        32.629903 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-0 
        32.630059 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-1 
        32.630216 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-2 
        32.630375 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-3 
        32.630528 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target CAPTURE1 
        32.630688 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target CAPTURE2 
        32.630841 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target CAPTURE3 
        32.631006 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target CAPTURE4 
        32.631065 s:  VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
        32.631146 s:  VX_ZONE_INIT:[tivxHostInitLocal:106] Initialization Done for HOST !!!
        32.631197 s: APP: OpenVX Target kernel init ... !!!
        32.631266 s: APP: OpenVX Target kernel init ... Done !!!
        32.631306 s: CSI2RX: Init ... !!!
        32.631336 s: SCICLIENT: Sciclient_pmSetModuleState module=182 state=2
        32.631596 s: SCICLIENT: Sciclient_pmSetModuleState success
        32.631643 s: SCICLIENT: Sciclient_pmSetModuleState module=185 state=2
        32.631844 s: SCICLIENT: Sciclient_pmSetModuleState success
        32.632386 s: CSI2RX: Init ... Done !!!
        32.632432 s: ISS: Init ... !!!
        32.632468 s: IssSensor_Init ... Done !!!
        32.632510 s: IttRemoteServer_Init ... Done !!!
        32.632546 s: ISS: Init ... Done !!!
    sensor_selection = [0]
    ldc_enable = [0]
    num_frames_to_run = [1000000000]
    is_interactive = [1]
        32.637671 s: ISS: Enumerating sensors ... !!!
    Error writing 0x02 to de-serializer(0x36) register 0x01!
     Deserializer Error: Reg Write Failed for regAddr 0x01, cnt = 0
    Error :  returned 5 while configuring DES 1 
        32.887355 s: ISS: Enumerating sensors ... found 0 : IMX390-UB953_D3
        32.887400 s: ISS: Enumerating sensors ... found 1 : OV2312-UB953_LI
    Select camera port index 0-11 : 0
    2 registered sensor drivers
    a : IMX390-UB953_D3 
    b : OV2312-UB953_LI 
    Select a sensor above or press '0' to autodetect the sensor : Invalid selection 
    . Try again 
    2 registered sensor drivers
    a : IMX390-UB953_D3 
    b : OV2312-UB953_LI 
    Select a sensor above or press '0' to autodetect the sensor : 0
    Error reading from de-serializer(0x36) register 0x4c!
    Sensor selected : IMX390-UB953_D3
    LDC Selection Yes(1)/No(0) : LDC Selection Yes(1)/No(0) : 1
    CAC Selection Yes(1)/No(0) : CAC Selection Yes(1)/No(0) : 0
    Querying IMX390-UB953_D3 
        38.828461 s: ISS: Querying sensor [IMX390-UB953_D3] ... !!!
        38.828562 s: ISS: Querying sensor [IMX390-UB953_D3] ... Done !!!
        38.828608 s: ISS: Initializing sensor [IMX390-UB953_D3], doing IM_SENSOR_CMD_PWRON ... !!!
    IMX390_PowerOn : chId = 0x0 
        38.828692 s: ISS: Initializing sensor [IMX390-UB953_D3], doing IM_SENSOR_CMD_CONFIG ... !!!
     Configuring IMX390 imager 0x40.. Please wait till it finishes 
        40.043880 s: ISS: Initializing sensor [IMX390-UB953_D3] ... Done !!!
    read_test_image_raw : Unable to open file /ti_fs/vision_apps/test_data/img_test.raw
    app_create_viss : sensor_dcc_id = 390 
    Enabling LDC 
    Creating LDC 
    Scaler is enabled
        40.091542 s: ISS: Starting sensor [IMX390-UB953_D3] ... !!!
    
    
     ==========================
     Demo : Single Camera w/ 2A
     ==========================
    
     p: Print performance statistics
    
     s: Save Sensor RAW, VISS Output and H3A output images to File System
    
     e: Export performance statistics
     x: Exit
    
     Enter Choice: 
    Unsupported command 
    
    
    
     ==========================
     Demo : Single Camera w/ 2A
     ==========================
    
     p: Print performance statistics
    
     s: Save Sensor RAW, VISS Output and H3A output images to File System
    
     e: Export performance statistics
     x: Exit
    
     Enter Choice: Error writing 0x01 to de-serializer(0x36) register 0x4c!
     Deserializer Error: Reg Write Failed for regAddr 0x4c, cnt = 0
        40.609972 s: ISS: Starting sensor [IMX390-UB953_D3] ... Done !!!
    IMX390_GetWBPrgFxn: sensor_pre_gain = 0 
        77.169953 s:  VX_ZONE_ERROR:[tivxCaptureDequeueFrameFromDriver:884]  CAPTURE: ERROR: Incomplete Frame for Ch0 !!!
        77.336451 s:  VX_ZONE_ERROR:[tivxCaptureDequeueFrameFromDriver:884]  CAPTURE: ERROR: Incomplete Frame for Ch0 !!!
        77.369748 s:  VX_ZONE_ERROR:[tivxCaptureDequeueFrameFromDriver:884]  CAPTURE: ERROR: Incomplete Frame for Ch0 !!!
    x
    
        80.537088 s: ISS: Stopping sensor [IMX390-UB953_D3] ... !!!
        80.581971 s: ISS: Stopping sensor [IMX390-UB953_D3] ... Done !!!
        80.676890 s: ISS: Stopping sensor [IMX390-UB953_D3] ... !!!
        80.721970 s: ISS: Stopping sensor [IMX390-UB953_D3] ... Done !!!
    ==========================================================
     Capture Status: Instance|0
    ==========================================================
     overflowCount: 0
     spuriousUdmaIntrCount: 0
     frontFIFOOvflCount: 0
     crcCount: 0
     eccCount: 0
     correctedEccCount: 0
     dataIdErrorCount: 0
     invalidAccessCount: 0
     invalidSpCount: 0
     strmFIFOOvflCount[0]: 0
     Channel Num | Frame Queue Count | Frame De-queue Count | Frame Drop Count | Error Frame Count |
               0 |              2395 |                 2395 |                2 |                 0 |
        80.730025 s: ISS: De-initializing sensor [IMX390-UB953_D3] ... !!!
        80.730103 s: ISS: De-initializing sensor [IMX390-UB953_D3] ... Done !!!
        80.730155 s: APP: OpenVX Target kernel deinit ... !!!
        80.730218 s: APP: OpenVX Target kernel deinit ... Done !!!
        80.730269 s:  VX_ZONE_INIT:[tivxHostDeInitLocal:120] De-Initialization Done for HOST !!!
        80.745982 s:  VX_ZONE_ERROR:[ownPosixObjectDeInit:302] Deiniting mutex at index: 10 failed
        80.746055 s:  VX_ZONE_INIT:[tivxDeInitLocal:206] De-Initialization Done !!!
        80.746109 s: APP ISS: Deinit ... Done !!!
    APP: Deinit ... !!!
        80.746645 s: REMOTE_SERVICE: Deinit ... !!!
        80.746755 s: REMOTE_SERVICE: Deinit ... Done !!!
    IPC: Deinit ... !!!
    IPC: Deinit ... Done !!!
    APP: Deinit ... Done !!!
    libkhronos: dlopen() err Library cannot be found, path: '/ti_fs/usr/lib/graphics/am62a/screen-sw.so'
    libkhronos: dlopen() err Library cannot be found, path: 'screen-sw.so'
    libkhronos: Ensure directory containing graphics libraries is appended to LD_LIBRARY_PATH envar.
    AM62A-EVM@QNX:/ti_fs/vision_apps# 

    Using the new camera, I have also tried the app run_app_tidl_cam.sh. I can see the displayed image, but strangely it shows all of the classes instead of just the top 5:

    Do you see the same on your end?

    Best regards,

    Vincent

  • Hi Vincent,

    I am have been using the D3RCM IMX390 camera for QNX SDK, we haven't tested the other IMX390 with QNX SDK.

    Regarding the log:  

         77.169953 s:  VX_ZONE_ERROR:[tivxCaptureDequeueFrameFromDriver:884]  CAPTURE: ERROR: Incomplete Frame for Ch0 !!!

    This is sometimes seen during the demo initalisation part, or if the FDP link is disturbed. Otherwise this log is not expected during the run-time.

    We have run overnight tests with  UB960 board and haven't seen any issues related to this or flickering of display.  We will verify if this log is seen more frequently with the Arducam deserialiser.

    I have also tried the app run_app_tidl_cam.sh. I can see the displayed image, but strangely it shows all of the classes instead of just the top 5:

    Yes, the "app_tidl_cam" demo will take the captured image and continuously keep predicting the top 5 classes based on the classification model- MobileNet_v1. You can find the classes defined in code: 

    "ti-processor-sdk-qnx_am62axx_10_00_00_04/vision_apps/apps/dl_demos/app_tidl_cam/imagenet_class_labels.c"

    As this is very limited set of calsses, normally the classes displayed would look random. This is just an example demo to let users get an overview of how TIDL demos run on C7x, making use of camera+VPAC. Users can update it as per need. You can find the more details about the demo in the PSDK docs: 

    "processor-sdk-qnx-docs_am62axx_10_00_00_04/VisionApps_docs/group_apps_dl_demos_app_tidl_cam.html"

    I have tried pointing the camera to some of the images, the demo prints the classes as:

         

    Regards,

    Shiva

  • Thank you for the help and for improving Arducam support, Shiva. I think this answers my queries regarding the camera.

    Best regards,

    Vincent