Other Parts Discussed in Thread: DS90UB964-Q1EVMTDA
My platform is:
J721EXSOMG01EVM+DS90UB964-Q1EVMTDA+DS90UB913+ar0140
Sensor ouput yuv data with resolution1280*720.
UB964 and j721EVM is connect at J52 of J721EVM.J52 is CSI2 EXP connecter.
I do the whole step below but get wrong yuv data and see some warning like “
[MCU2_0] 7844.913788 s: VX_ZONE_WARNING:[tivxCaptureSetTimeout:772] CAPTURE: WARNING: Error frame not provided using tivxCaptureRegisterErrorFrame, defaulting to waiting forever !!! “
1,Copy sensor driver.
copy directory gw_ar0233_yuv to gw_ov10635_yuv in imaging\sensor_drv\src
And the IssSensor_CreateParamsis show as below (almost the same with gw_ar0233_yuv):
static IssSensor_CreateParams gw_ov10635CreatePrms = {
GW_OV10635_UYVY, /*sensor name*/
0x6, /*i2cInstId*/
{0, 0, 0, 0, 0, 0, 0, 0}, /*i2cAddrSensor*/
{0, 0, 0, 0, 0, 0, 0, 0}, /*i2cAddrSer*/
/*IssSensor_Info*/
{
{
GW_OV10635_OUT_WIDTH, /*width*/
GW_OV10635_OUT_HEIGHT, /*height*/
1, /*num_exposures*/
vx_false_e, /*line_interleaved*/
{
{VX_DF_IMAGE_UYVY, 7}, /*dataFormat and MSB [0]*/
},
0, /*meta_height_before*/
0, /*meta_height_after*/
},
ISS_SENSOR_GW_OV10635_FEATURES, /*features*/
ALGORITHMS_ISS_AEWB_MODE_NONE, /*aewbMode*/
60, /*fps*/
4, /*numDataLanes*/
{1, 2, 3, 4}, /*dataLanesMap*/
{0, 0, 0, 0}, /*dataLanesPolarity*/
CSIRX_LANE_BAND_SPEED_720_TO_800_MBPS, /*csi_laneBandSpeed*/
},
1, /*numChan*/
10635, /*dccId*/
};
2, config in ub9xx_gw_ov10635_serdec_config.h is show as below
(diff : ub9xxSerCfg_GW_OV10635 is not used yet)
#define GW_OV10635_OUT_WIDTH (1280U)
#define GW_OV10635_OUT_HEIGHT (720U)
#define GW_OV10635_SER_CFG_SIZE (5U)
I2cParams ub9xxSerCfg_GW_OV10635[GW_OV10635_SER_CFG_SIZE] = {
{0x0E, 0xF0, 0xF0},
{0x0D, 0xF0, 0x60},
{0x0D, 0xB0, 0x60},
{0x0D, 0xB4, 0x60},
{0xFFFF, 0x00, 0x0} /*End of script */
};
I2cParams ub9xxGW_OV10635DesCSI2Enable[10u] = {
{0x33, 0x03, 0x1},
{0xFFFF, 0x00, 0x0} //End of script
};
I2cParams ub9xxGW_OV10635DesCSI2Disable[2u] = {
{0x33, 0x02, 0x10},
{0xFFFF, 0x00, 0x0} /*End of script */
};
3,modify ub964DesCfg_Common as below
#define COMMON_DES_CFG_SIZE (36U)
static I2cParams ub964DesCfg_Common[COMMON_DES_CFG_SIZE] = {
{0x01, 0x02, 0x20},
{0x1f, 0x02, 0x00},
{0x0D, 0x90, 0x1}, /*I/O to 3V3 - Options not valid with datashee*/
{0x0C, 0x0F, 0x1}, /*Enable All ports*/
{0xBC, 0x00, 0x1}, /* 720p */
/*Select Channel 0*/
{0x4C, 0x01, 0x10},
{0x58, 0x58, 0x1}, /*Enable Back channel, set to 50Mbs*/
{0x7C, 0xE0, 0x1}, /* low bit8*/
/*Select Channel 1*/
{0x4C, 0x12, 0x10},
{0x58, 0x58, 0x1},/*Enable Back channel, set to 50Mbs*/
{0x7C, 0xE0, 0x1}, /* low bit8*/
/*Select Channel 2*/
{0x4C, 0x24, 0x10},
{0x58, 0x58, 0x1},/*Enable Back channel, set to 50Mbs*/
{0x7C, 0xE0, 0x1}, /* low bit8*/
/*Select Channel 3*/
{0x4C, 0x38, 0x10},
{0x58, 0x58, 0x1},/*Enable Back channel, set to 50Mbs*/
{0x7C, 0xE0, 0x1}, /* low bit8*/
{0x20, 0x00, 0x1}, /*Forwarding and using CSIport 0 */
/*Sets GPIOS*/
{0x10, 0x83, 0x1},
{0x11, 0xA3, 0x1},
{0x12, 0xC3, 0x1},
{0x13, 0xE2, 0x1},
{0x4C, 0x01, 0x10}, /* 0x01 */
{0x32, 0x01, 0x1}, /*Enable TX port 0*/
{0x33, 0x02, 0x1}, /*Enable Continuous clock mode and CSI output 4lnae�� out endbale*/
{0x4C, 0x12, 0x10}, /* 0x12 */
{0x32, 0x01, 0x1}, /*Enable TX port 0*/
{0x33, 0x02, 0x1}, /*Enable Continuous clock mode and CSI output*/
{0x4C, 0x24, 0x10}, /* 0x24 */
{0x32, 0x01, 0x1}, /*Enable TX port 0*/
{0x33, 0x02, 0x1}, /*Enable Continuous clock mode and CSI output*/
{0x4C, 0x38, 0x10}, /* 0x38 */
{0x32, 0x01, 0x1}, /*Enable TX port 0*/
{0x33, 0x03, 0x1}, /*Enable Continuous clock mode and CSI output*/
{0xFFFF, 0x00, 0x0} //End of script
};
4 In iss_sensor.c
(1)In function IssSensor_DeserializerInit
Call only “status = ub960_cfgScript(ub964DesCfg_Common, 0U); “
- In function ImageSensor_RemoteServiceHandler
Remove all disableUB960Broadcast(0) and disableUB960Broadcast(1)
Remove all IssSensor_Config()
(write reg failed wrong will happened if call disableUB960Broadcast .)
- in function IssSensor_Init()
Add status |= IssSensor_gw_ov10635_Init();
5 Make and run
Make image and vission_apps and run vx_app_single_cam.out . Choose sensor and choose ldc =0 choose ‘s’ to save data . Log is show below.
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.1.101, socket port=5000!!!
tivxImagingLoadKernels done
7837.714153 s: ISS: Enumerating sensors ... !!!
[MCU2_0] 7837.714276 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_CREATE
[MCU2_0] 7837.714405 s: UB960 config start
7837.898528 s: ISS: Enumerating sensors ... found 0 : GW_OV10635_UYVY
Select camera port index 0-7 : [MCU2_0] 7837.898354 s: End of UB960 config
[MCU2_0] 7837.898431 s: IssSensor_DeserializerInit return status=0
Invalid entry
. Please choose between 0 and 7
Select camera port index 0-7 : 0
0x1 registered sensor drivers
a : GW_OV10635_UYVY
Select a sensor above or press '0' to autodetect the sensor : Invalid selection
. Try again
0x1 registered sensor drivers
a : GW_OV10635_UYVY
Select a sensor above or press '0' to autodetect the sensor : a
Sensor selected : GW_OV10635_UYVY
LDC Selection Yes(1)/No(0) : LDC Selection Yes(1)/No(0) : 0
## table_width =1920,table_height=1080
app_init done
------------- app_create_graph ----------------
Querying GW_OV10635_UYVY
7844.885405 s: ISS: Querying sensor [GW_OV10635_UYVY] ... !!!
7844.885672 s: ISS: Querying sensor [GW_OV10635_UYVY] ... Done !!!
YUV Input selected. VISS and AEWB nodes will be bypassed.
Sensor DCC is enabled
Sensor width = 1280
Sensor height = 720
Sensor DCC ID = 10635
Sensor Supported Features = 0x100
Sensor Enabled Features = 0x100
7844.885699 s: ISS: Initializing sensor [GW_OV10635_UYVY], doing IM_SENSOR_CMD_PWRON ... !!!
7844.885876 s: ISS: Initializing sensor [GW_OV10635_UYVY], doing IM_SENSOR_CMD_CONFIG ... !!!
7844.886073 s: ISS: Initializing sensor [GW_OV10635_UYVY] ... Done !!!
Creating graph
Initializing params for capture node
Initializing params for capture node
true == yuv_cam_input
capture_config = 0x0x6e0410
Creating capture node
obj->capture_node = 0x0x69ad10
xx yuv format get capt_yuv_image
xxx LDC not enable
NULL != obj->capt_yuv_image
xxx display_image
Display Set Target done
xx add_graph_parameter_by_node_index
xx vxSetGraphScheduleConfig
vxSetGraphScheduleConfig done
vxVerifyGraph done
Scaler is disabled
xxx tivxExportGraphToDot
[MCU2_0] 7844.885493 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_QUERY
[MCU2_0] 7844.885555 s: Received Query for GW_OV10635_UYVY
[MCU2_0] 7844.885591 s: ### createPrms pixel_container :1498831189
[MCU2_0] 7844.885762 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_PWRON
[MCU2_0] 7844.885805 s: IM_SENSOR_CMD_PWRON : channel_mask = 0x1
[MCU2_0] 7844.885919 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_CONFIG
[MCU2_0] 7844.885960 s: Application requested features = 0x100
[MCU2_0]
[MCU2_0] 7844.885991 s: sensorBroadcast == 0 @@@@
[MCU2_0] 7844.886012 s: IM_SENSOR_CMD_CONFIG returning status = 0
app_create_graph exiting
app_create_graph done
app_run_graph_interactive
==========================
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
u: Update DCC from File System
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
u: Update DCC from File System
x: Exit
Enter Choice: 7844.911112 s: ISS: Starting sensor [GW_OV10635_UYVY] ... !!!
[MCU2_0] 7844.911186 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_STREAM_ON
[MCU2_0] 7844.911288 s: IM_SENSOR_CMD_STREAM_ON: channel_mask = 0x1
[MCU2_0] 7844.911327 s: #sensorBroadcast==0
[MCU2_0] 7844.911353 s: UB960 config start
[MCU2_0] 7844.912365 s: End of UB960 config
7844.913446 s: ISS: Starting sensor [GW_OV10635_UYVY] ... !!!
[MCU2_0] 7844.912522 s: ### set port 0 to be locked ##,status=0
[MCU2_0] 7844.912700 s: ###pageSelectOrig 13 ,status:0 ##
[MCU2_0] 7844.913282 s: ### line_count_73:2
[MCU2_0] 7844.913314 s: line_count_74:d0
[MCU2_0] 7844.913337 s: line_len_75:a
[MCU2_0] 7844.913359 s: line_len_76:0
[MCU2_0] 7844.913378 s: ##
[MCU2_0] 7844.913788 s: VX_ZONE_WARNING:[tivxCaptureSetTimeout:772] CAPTURE: WARNING: Error frame not provided using tivxCaptureRegisterErrorFrame, defaulting to waiting forever !!!
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
u: Update DCC from File System
x: Exit
Enter Choice: s
YUV file name /mnt/opt/vision_apps/test_data/cap_0000.yuv
imgaddr_width = 1280
imgaddr_height = 720
imgaddr_stride = 2560
width = 1280
height = 720
Written 1843200 bytes
1843200 bytes written to /mnt/opt/vision_apps/test_data/cap_0000.yuv
6 saved yuv data show red with random noise.
7 board connect view
(1) j721evm+964 +camera
(2)j721emv top view
(3)ub964 top