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.

SK-TDA4VM: Issue in ISP tuning

Part Number: SK-TDA4VM

Hi,
I am trying to do ISP tuning for imx415 camera on SK-TDA4VM. Before that we just want to check test pattern from UB960.

So we used vx_app_single_cam.out to check test pattern of UB960 deserializer, but it gives us I2C write failed issue, We enabled log message in RTOS and trying to get details for the failure. The log is given below.

root@tda4vm-sk:/opt/vision_apps# ./vx_app_single_cam.out   
APP: Init ... !!!
MEM: Init ... !!!
MEM: Initialized DMA HEAP (fd=4) !!!
MEM: Init ... Done !!!
IPC: Init ... !!!
IPC: Init ... Done !!!
REMOTE_SERVICE: Init ... !!!
REMOTE_SERVICE: Init ... Done !!!
   142.542233 s: GTC Frequency = 200 MHz
APP: Init ... Done !!!
   142.547303 s:  VX_ZONE_INIT:Enabled
   142.547327 s:  VX_ZONE_ERROR:Enabled
   142.547333 s:  VX_ZONE_WARNING:Enabled
   142.548232 s:  VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!!
   142.550476 s:  VX_ZONE_INIT:[tivxHostInitLocal:93] Initialization Done for HOST !!!

 Single Camera Demo - (c) Texas Instruments 2019
 ========================================================

 Usage,
  ./vx_app_single_cam.out --cfg <config file>

Defaulting to interactive mode 
IttCtrl_registerHandler: command echo registered at location 0 
IttCtrl_registerHandler: command iss_read_2a_params registered at location 1 
IttCtrl_registerHandler: command iss_write_2a_params registered at location 2 
IttCtrl_registerHandler: command iss_raw_save registered at location 3 
IttCtrl_registerHandler: command iss_yuv_save registered at location 4 
IttCtrl_registerHandler: command iss_read_sensor_reg registered at location 5 
IttCtrl_registerHandler: command iss_write_sensor_reg registered at location 6 
IttCtrl_registerHandler: command dev_ctrl registered at location 7 
IttCtrl_registerHandler: command iss_send_dcc_file registered at location 8 
 NETWORK: Opened at IP Addr = 192.168.5.102, socket port=5000!!!
   142.564186 s: ISS: Enumerating sensors ... !!!
[MCU2_0]    142.564452 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_ENUMERATE 
[MCU2_0]    146.231748 s: Fusion1 Board configuration
[MCU2_0]    182.220716 s: Error writing to TCA6408 register 0x3 
[MCU2_0]    182.420436 s: RE-SETTING FUSION2 DE-SER !!!!!!
[MCU2_0]    182.420536 s: rawtestpat_PowerOn Error : initFusion2_UB97x returned 0xffffffff 
[MCU2_0]    182.420583 s: 
[MCU2_0]    182.420605 s: 
[MCU2_0]    182.420625 s: Entered ub960 cfg script
[MCU2_0]    182.420651 s: 
[MCU2_0]    182.420669 s: 
[MCU2_0]    182.420700 s: UB960 i2c address check: 30
[MCU2_0]    182.420727 s: UB960 config start 
[MCU2_0]    182.420767 s: reg addr = 1, reg value = 2
[MCU2_0]    200.327654 s: Error writing 0x2 to UB960 register 0x1 
[MCU2_0]    200.327720 s:  UB960 Error: Reg Write Failed for regAddr 1, cnt = 0
[MCU2_0]    200.327756 s: End of UB960 config 
[MCU2_0]    200.327798 s: Error : ub960_cfgScript returned -1 while configuring DES 0 
[MCU2_0]    200.327834 s: 
[MCU2_0]    200.327853 s: 
[MCU2_0]    200.327871 s: Entered ub960 cfg script
[MCU2_0]    200.327895 s: 
[MCU2_0]    200.327913 s: 
[MCU2_0]    200.327942 s: UB960 i2c address check: 36
[MCU2_0]    200.327968 s: UB960 config start 
[MCU2_0]    200.328006 s: reg addr = 1, reg value = 2
   218.234431 s: ISS: Enumerating sensors ... found 0 : IMX390-UB953_D3
   218.234466 s: ISS: Enumerating sensors ... found 1 : AR0233-UB953_MARS
   218.234488 s: ISS: Enumerating sensors ... found 2 : AR0820-UB953_LI
   218.234493 s: ISS: Enumerating sensors ... found 3 : UB9xxx_RAW12_TESTPATTERN
   218.234498 s: ISS: Enumerating sensors ... found 4 : UB96x_UYVY_TESTPATTERN
   218.234504 s: ISS: Enumerating sensors ... found 5 : GW_AR0233_UYVY
Select camera port index 0-11 : [MCU2_0]    218.234071 s: Error writing 0x2 to UB960 register 0x1 
[MCU2_0]    218.234136 s:  UB960 Error: Reg Write Failed for regAddr 1, cnt = 0
[MCU2_0]    218.234172 s: End of UB960 config 
[MCU2_0]    218.234213 s: Error :  returned -1 while configuring DES 1 
4
6 registered sensor drivers
a : IMX390-UB953_D3 
b : AR0233-UB953_MARS 
c : AR0820-UB953_LI 
d : UB9xxx_RAW12_TESTPATTERN 
e : UB96x_UYVY_TESTPATTERN 
f : GW_AR0233_UYVY

Finally we found out by probing i2c line that deserializer is not receiving any message. That line inactive actually.

To check the i2c device we removed vision apps dtb and probed the i2c line again there we can see activity in that i2c line, likewise we can see the i2c address of deserializer in I2C8 from i2cdetect command.
We know when we run vision apps, I2C6 instance is assigned to R5F and controlled from R5F. But there is no activity in that I2C line.

we found out that I2C8 of Linux is I2C6 of RTOS. But there is no activity in that i2c line while using vision apps. Could You please help us with the issue?

RTOS OS Version: 08.06.00.12

  • Hi Dharanitharan,

    As a disclaimer, PSDK RTOS is not supported on the SK-TDA4VM. All of the vision_apps examples are not expected to work out-of-box for the SK-TDA4VM, due to board changes such as the I2C busses having different devices on different bus. The recommendation for developing with PSDK RTOS would be to buy the J721E EVM board which costs more than the SK-TDA4VM, but would save time on development: https://www.ti.com/tool/J721EXSOMXEVM

    What is being tried in this E2E thread is untested, and TI does not have any guides for enabling the vision_apps example on the SK-TDA4VM. Please understand that if you choose to go down the path of using PSDK RTOS with SK-TDA4VM, support from TI would be limited.

    With that being said, do you have an EVM board that you can try the example out?

    Regards,

    Takuma

  • Hi Takuma,
    Then please conclude, is it possible to do ISP tuning on SK-TDA4VM?, or ISP tuning would be possible only on J721E EVM?

  • Hi Dharanitharan,

    ISP tuning in general is supported on SK-TDA4VM. There are guides for J721E EVM (which has the same SoC as SK-TDA4VM) and SK-AM6xA (which has the same software support as SK-TDA4VM) that can be used as reference:

    However, in terms of camera drivers and examples that are supported on the SK-TDA4VM out-of-box are the ones listed in the documentation for SK-TDA4VM: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-edgeai/TDA4VM/08_06_00/exports/docs/devices/TDA4VM/linux/getting_started.html

    IMX415 is not on the list of supported cameras out-of-box, so a new driver would need to be developed or obtained from open source. What is being talked about in this thread is developing RTOS camera drivers through vision_apps, but this is not supported with the SK-TDA4VM, which is the reasoning for my recommendation for J721E EVM.

    On the other hand, if you have Linux drivers that comply with the V4L2 standard for the IMX415 camera, then those can be used with GStreamer to create a pipeline that has ISP, which is supported by SK-TDA4VM. An example of a GStreamer pipeline with a camera that uses ISP (IMX219) would be the following, which can be referenced when creating your pipeline: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-edgeai/TDA4VM/08_06_00/exports/docs/common/edgeai_dataflows.html#rpiv2-camera-sensor-imx219 

    Regards,

    Takuma

  • Hi Takuma,
    Thanks for your detailed information, we will have order J721E EVM.

    But is there any way to remap I2C3 in SK-TDA4VM as I2C6 through device tree or through vision apps application?

  • Hi Dharanitharan,

    I have some concerns with the first option for remapping I2C3 to I2C6, since there are other devices that use I2C3 on the SK-TDA4VM on-board so the swap may break some of the drivers and software that has a dependency on certain devices being on certain I2C bus.

    Changing the vision apps application is probably the more feasible change. I see in <vision_apps folder>/utils/sensors/app_sensors.c there is some logic that probes and obtains i2cInst (I2C bus) and desI2cAddr. If we know the I2C bus and I2C address that is used by the deserializer on the SK-TDA4VM, these values should be able to be hardcoded in. Similar changes may be required for the camera I2C bus and address as well.

    While waiting for the new board, these changes could be attempted to see if the cameras come up.

    Regards,

    Takuma