您好,
我们尝试 在 R5F RTOS (8.0 SDK)中测试962模式、 但获取错误的 YUV 数据并警告"CAPTURE:Error frame not provided using TIVxCaptureRegisterErrorFrame"、您能提供帮助吗?
我们已更改的内容:
1.1 ub9xx_testpat_serdes_config.h
I2cParams ub9xxDesCfg_testpat[TESTPAT_DES_CFG_SIZE] = {
//962 PATTERN
{0x33,0x03,0x1},//CSI0 enable
{0xB0,0x00,0x1},//Indirect Pattern Gen Registers
{0xB1,0x01,0x1},//PGEN_CTL
{0xB2,0x01,0x1},
{0xB1,0x02,0x1},//PGEN_CFG
{0xB2,0x32,0x1},
{0xB1,0x03,0x1},//PGEN_CSI_DI
{0xB2,0x1E,0x1},
{0xB1,0x04,0x1},//PGEN_LINE_SIZE1
{0xB2,0x0A,0x1},
{0xB1,0x05,0x1},//PGEN_LINE_SIZE0
{0xB2,0x00,0x1},
{0xB1,0x06,0x1},//PGEN_BAR_SIZE1
{0xB2,0x01,0x1},
{0xB1,0x07,0x1},//PGEN_BAR_SIZE0
{0xB2,0x40,0x1},
{0xB1,0x08,0x1},//PGEN_ACT_LPF1
{0xB2,0x02,0x1},
{0xB1,0x09,0x1},//PGEN_ACT_LPF0
{0xB2,0xD0,0x1},
{0xB1,0x0A,0x1},//PGEN_TOT_LPF1
{0xB2,0x02,0x1},
{0xB1,0x0B,0x1},//PGEN_TOT_LPF0
{0xB2,0xFD,0x1},
{0xB1,0x0C,0x1},//PGEN_LINE_PD1
{0xB2,0x11,0x1},
{0xB1,0x0D,0x1},//PGEN_LINE_PD0
{0xB2,0x05,0x1},
{0xB1,0x0E,0x1},//PGEN_VBP
{0xB2,0x24,0x1},
{0xB1,0x0F,0x1},//PGEN_VFP
{0xB2,0x24,0x1},
{0xB1,0x10,0x1},//PGEN_COLOR0
{0xB2,0xAA,0x1},
{0xB1,0x11,0x1},//PGEN_COLOR1
{0xB2,0x33,0x1},
{0xB1,0x12,0x1},//PGEN_COLOR2
{0xB2,0xF0,0x1},
{0xB1,0x13,0x1},//PGEN_COLOR3
{0xB2,0x7F,0x1},
{0xB1,0x14,0x1},//PGEN_COLOR4
{0xB2,0x55,0x1},
{0xB1,0x15,0x1},//PGEN_COLOR5
{0xB2,0xCC,0x1},
{0xB1,0x16,0x1},//PGEN_COLOR6
{0xB2,0x0F,0x1},
{0xB1,0x17,0x1},//PGEN_COLOR7
{0xB2,0x80,0x1},
{0xFFFF, 0x00, 0x0} //End of script
};
1.2.iss_sensor_testpat.c
static IssSensor_CreateParams testpatCreatePrms = {
UB96X_TESTPATTERN_UYVY, /*sensor name*/
0x0, /*i2cInstId*/
{0, 0, 0, 0, 0, 0, 0, 0}, /*i2cAddrSensor*/
{0, 0, 0, 0, 0, 0, 0, 0}, /*i2cAddrSer*/
/*IssSensor_Info*/
{
{
TESTPAT_OUT_WIDTH, /*width 1280U*/
TESTPAT_OUT_HEIGHT, /*height 800U*/
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_TESTPAT_FEATURES, /*features*/
ALGORITHMS_ISS_AEWB_MODE_NONE, /*aewbMode*/
25, /*fps*/
4, /*numDataLanes*/
{1, 2, 3, 4}, /*dataLanesMap*/
{0, 0, 0, 0}, /*dataLanesPolarity*/
CSIRX_LANE_BAND_SPEED_800_TO_880_MBPS,//CSIRX_LANE_BAND_SPEED_720_TO_800_MBPS, /*csi_laneBandSpeed*/
},
1, /*numChan*/
962, /*dccId*/
};
制作并运行(&X)
./run_app_single_cam.sh
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 !!!
93.268399 s: GTC Frequency = 200 MHz
APP: Init ... Done !!!
93.270968 s: VX_ZONE_INIT:Enabled
93.271007 s: VX_ZONE_ERROR:Enabled
93.271012 s: VX_ZONE_WARNING:Enabled
93.274953 s: VX_ZONE_INIT:[tivxInit:71] Initialization Done !!!
93.275142 s: VX_ZONE_INIT:[tivxHostInit:48] Initialization Done for HOST !!!
----------------appInit------------------
Invalid token [
]
sensor_selection = [0]
Invalid token [
]
ldc_enable = [0]
Invalid token [
]
num_frames_to_run = [1000000000]
Invalid token [
]
is_interactive = [1]
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 = 0.0.0.0, socket port=5000!!!
tivxImagingLoadKernels done
93.276973 s: ISS: Enumerating sensors ... !!!
[MCU2_0] 93.277063 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_CREATE
[MCU2_0] 93.277190 s: UB962 config start
[MCU2_0] 93.422907 s: End of UB962 config
95.689817 s: ISS: Enumerating sensors ... found 0 : UB96x_UYVY_TESTPATTERN
Select camera port index 0-7 :
Invalid entry
. Please choose between 0 and 7
Select camera port index 0-7 : 0
0x1 registered sensor drivers
a : UB96x_UYVY_TESTPATTERN
Select a sensor above or press '0' to autodetect the sensor : Invalid selection
. Try again
0x1 registered sensor drivers
a : UB96x_UYVY_TESTPATTERN
Select a sensor above or press '0' to autodetect the sensor : a
Sensor selected : UB96x_UYVY_TESTPATTERN
LDC Selection Yes(1)/No(0) : LDC Selection Yes(1)/No(0) : 0
app_init done
Querying UB96x_UYVY_TESTPATTERN
104.336630 s: ISS: Querying sensor [UB96x_UYVY_TESTPATTERN] ... !!!
104.336905 s: ISS: Querying sensor [UB96x_UYVY_TESTPATTERN] ... Done !!!
YUV Input selected. VISS and AEWB nodes will be bypassed.
Sensor DCC is enabled
Sensor width = 1280
Sensor height = 800
Sensor DCC ID = 962
Sensor Supported Features = 0x100
Sensor Enabled Features = 0x100
104.336933 s: ISS: Initializing sensor [UB96x_UYVY_TESTPATTERN], doing IM_SENSOR_CMD_PWRON ... !!!
104.337105 s: ISS: Initializing sensor [UB96x_UYVY_TESTPATTERN], doing IM_SENSOR_CMD_CONFIG ... !!!
[MCU2_0] 104.336718 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_QUERY
[MCU2_0] 104.336777 s: Received Query for UB96x_UYVY_TESTPATTERN
[MCU2_0] 104.336985 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_PWRON
[MCU2_0] 104.337031 s: IM_SENSOR_CMD_PWRON : channel_mask = 0x1
[MCU2_0] 104.337207 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_CONFIG
[MCU2_0] 104.337249 s: Application requested features = 0x100
[MCU2_0]
[MCU2_0] 104.337281 s: Configuring camera # 0
[MCU2_0] 104.337316 s: IssSensor_Config
[MCU2_0] 104.337347 s: testpat_Config
[MCU2_0] 104.337366 s: UB962 config start
104.385036 s: ISS: Initializing sensor [UB96x_UYVY_TESTPATTERN] ... Done !!!
Creating graph
Initializing params for capture node
Initializing params for capture node
capture_config = 0x0x6e0410
Creating capture node
obj->capture_node = 0x0x69ad10
Display Set Target done
vxSetGraphScheduleConfig done
Scaler is disabled
[MCU2_0] 104.384910 s: End of UB962 config
[MCU2_0] 104.384959 s: IM_SENSOR_CMD_CONFIG returning status = 0
app_create_graph exiting
app_create_graph done
==========================
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: 104.394227 s: ISS: Starting sensor [UB96x_UYVY_TESTPATTERN] ... !!!
104.395002 s: ISS: Starting sensor [UB96x_UYVY_TESTPATTERN] ... !!!
get_dcc_dir_size : Could not open directory or directory is empty /opt/vision_apps/dcc/UB96x_UYVY_TESTPATTERN/wdr
[MCU2_0] 104.394295 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_STREAM_ON
[MCU2_0] 104.394365 s: IM_SENSOR_CMD_STREAM_ON: channel_mask = 0x1
[MCU2_0] 104.394406 s: UB962 config start
[MCU2_0] 104.394916 s: End of UB962 config
[MCU2_0] 104.395398 s: VX_ZONE_WARNING:[tivxCaptureSetTimeout:772] CAPTURE: WARNING: Error frame not provided using tivxCapturme, defaulting to waiting forever !!!
s^H
Test data path is NULL. Defaulting to current folder
YUV file name .//cap_0000.yuv
imgaddr_width = 1280
imgaddr_height = 800
imgaddr_stride = 2560
width = 1280
height = 800
Written 2048000 bytes
2048000 bytes written to .//cap_0000.yuv
==========================
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:
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
Test data path is NULL. Defaulting to current folder
YUV file name .//cap_0001.yuv
imgaddr_width = 1280
imgaddr_height = 800
imgaddr_stride = 2560
width = 1280
height = 800
Written 2048000 bytes
2048000 bytes written to .//cap_0001.yuv
==========================
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: s
Test data path is NULL. Defaulting to current folder
YUV file name .//cap_0002.yuv
imgaddr_width = 1280
imgaddr_height = 800
imgaddr_stride = 2560
width = 1280
height = 800
Written 2048000 bytes
2048000 bytes written to .//cap_0002.yuv
3.在 PC 中查看 YUV 图像

