Tanat Posted June 13, 2017 Posted June 13, 2017 Hi all. I install Ubuntu_xenial_default with kernel 3.4.113 and want record video from CAM500B with ov5640 image sensor. I had edited camera section in fex file with next options: [csi0] vip_used = 1 vip_mode = 0 vip_dev_qty = 1 vip_define_sensor_list = 0 vip_csi_pck = port:PE00<2><default><default><default> vip_csi_mck = port:PE01<2><default><default><default> vip_csi_hsync = port:PE02<2><default><default><default> vip_csi_vsync = port:PE03<2><default><default><default> vip_csi_d0 = port:PE04<2><default><default><default> vip_csi_d1 = port:PE05<2><default><default><default> vip_csi_d2 = port:PE06<2><default><default><default> vip_csi_d3 = port:PE07<2><default><default><default> vip_csi_d4 = port:PE08<2><default><default><default> vip_csi_d5 = port:PE09<2><default><default><default> vip_csi_d6 = port:PE10<2><default><default><default> vip_csi_d7 = port:PE11<2><default><default><default> vip_csi_sck = port:PE12<2><default><default><default> vip_csi_sda = port:PE13<2><default><default><default> vip_dev0_mname = "ov5640" vip_dev0_pos = "rear" vip_dev0_lane = 4 vip_dev0_twi_id = 2 vip_dev0_twi_addr = 0x78 vip_dev0_isp_used = 1 vip_dev0_fmt = 0 vip_dev0_stby_mode = 1 vip_dev0_vflip = 1 vip_dev0_hflip = 0 vip_dev0_iovdd = "" vip_dev0_iovdd_vol = 2800000 vip_dev0_avdd = "" vip_dev0_avdd_vol = 2800000 vip_dev0_dvdd = "" vip_dev0_dvdd_vol = 1500000 vip_dev0_afvdd = "" vip_dev0_afvdd_vol = 2800000 vip_dev0_power_en = vip_dev0_reset = port:PE14<1><default><default><default> vip_dev0_pwdn = port:PE15<1><default><default><default> vip_dev0_flash_en = vip_dev0_flash_mode = vip_dev0_af_pwdn = vip_dev0_act_used = 0 vip_dev0_act_name = "ad5820_act" vip_dev0_act_slave = 0x18 vip_dev1_pos = "rear" vip_dev1_lane = 1 vip_dev1_twi_id = 0 vip_dev1_twi_addr = vip_dev1_isp_used = 0 vip_dev1_fmt = 1 vip_dev1_stby_mode = 0 vip_dev1_vflip = 0 vip_dev1_hflip = 0 vip_dev1_iovdd = "" vip_dev1_iovdd_vol = 2800000 vip_dev1_avdd = "" vip_dev1_avdd_vol = 2800000 vip_dev1_dvdd = "" vip_dev1_dvdd_vol = 1500000 vip_dev1_afvdd = "" vip_dev1_afvdd_vol = 2800000 vip_dev1_power_en = vip_dev1_reset = vip_dev1_pwdn = vip_dev1_flash_en = vip_dev1_flash_mode = vip_dev1_af_pwdn = And had added to file /etc/modules ov5640 vfe_v4l2 After reboot I can list video0 device in /dev but dmesg | grep ov5640 and dmesg | grep VFE returns nothing. And dmesg | grep OV5640 show [ 7.860317] [OV5640@lex]init_sensor - frame_rate: 0, max_win_size: 11 [ 7.952205] [OV5640@lex]CSI_SUBDEV_PWR_ON! [ 8.020823] [OV5640@lex]sensor_init 0x0 [ 8.065071] [OV5640@lex]CSI_SUBDEV_PWR_OFF! Then ffmpeg -f v4l2 -s 640x480 -i /dev/video0 -r 30 -c:v mpeg4 ./test/test.avi returns error: ioctl(VIDIOCENUMINPUT): invalid argument /dev/video0: Invalid argument. Please help me with this problem.
Tanat Posted June 14, 2017 Author Posted June 14, 2017 I had tried to boot without camera and dmesg | grep OV5640 displayed: init_sensor - frame_rate: 0, max_win_size: 11 CSI_SUBDEV_PWR_ON! sensor read rety=2 error at sensor_detect chip found is not an target chip CSI_SUBDEV_PWR_OFF! And tried to boot with had connected camera then dmasg | grep OV5640 displayed next: init_sensor - frame_rate: 0, max_win_size: 11 CSI_SUBDEV_PWR_ON! sensor_init 0x0 CSI_SUBDEV_PWR_OFF! Then agian I may list /dev/video0 but no access to this device
Tanat Posted June 20, 2017 Author Posted June 20, 2017 I tried to recompile ov5640 and vfe modules with DEV_DBG_EN 1 and now after commands modprobe ov5640 vfe_v4l2 I can see next: dmesg | grep VFE [ 1621.705770] [VFE]Welcome to Video Front End driver [ 1621.706258] [VFE]pdev->id = 0 [ 1621.706270] [VFE]dev->mipi_sel = 0 [ 1621.706278] [VFE]dev->vip_sel = 0 [ 1621.706285] [VFE]dev->isp_sel = 0 [ 1621.712469] [VFE_WARN]vfe vpu clock is null [ 1621.720171] [VFE]..........................vfe clk open!....................... [ 1621.720442] [VFE]vfe_init end [ 1621.730275] [VFE]probe_work_handle start! [ 1621.730308] [VFE]v4l2 subdev register input_num = 0 [ 1621.730320] [VFE]vfe sensor detect start! input_num = 0 [ 1621.730337] [VFE]Find sensor name is "ov5640", i2c address is 78, type is "YUV" ! [ 1621.730350] [VFE]Sub device register "ov5640" i2c_addr = 0x78 start! [ 1621.730366] [VFE]v4l2_device_register_subdev return 0 [ 1621.730377] [VFE]registered sensor subdev is OK! [ 1621.730385] [VFE]Check sensor! [ 1621.743731] [VFE]mclk on [ 1621.860358] [VFE]mclk off [ 1621.872420] [VFE]Sub device register "ov5640" is OK! [ 1621.872804] [VFE]V4L2 device registered as video0 [ 1621.872843] [VFE]..........................vfe clk close!....................... [ 1621.872866] [VFE]probe_work_handle end! [ 1621.881727] [VFE]vfe_open [ 1621.881754] [VFE]..........................vfe clk open!....................... [ 1621.881798] [VFE]vfe_open ok [ 1621.882233] [VFE]vfe_close [ 1621.882247] [VFE]vfe select input flag = 0, s_input have not be used . [ 1621.882269] [VFE]..........................vfe clk close!....................... [ 1621.882304] [VFE]vfe_close end and grep | ov5640 [ 1613.793181] [OV5640@lex]init_sensor - frame_rate: 0, max_win_size: 11 [ 1621.742431] [OV5640@lex]CSI_SUBDEV_PWR_ON! [ 1621.810043] [OV5640@lex]sensor_init 0x0 [ 1621.848152] [OV5640@lex]write sensor in function sensor_init=OK [ 1621.849336] [OV5640@lex]sensor_init DONE - exit [ 1621.849347] [OV5640@lex]CSI_SUBDEV_STBY_ON! [ 1621.849355] [OV5640@lex]sensor_s_release_af [ 1621.860033] [OV5640@lex]disalbe oe! [ 1621.730337] [VFE]Find sensor name is "ov5640", i2c address is 78, type is "YUV" ! [ 1621.730350] [VFE]Sub device register "ov5640" i2c_addr = 0x78 start! [ 1621.872420] [VFE]Sub device register "ov5640" is OK! Then I try to streaming video with mjpg-streamer but unsuccessful dmesg | grep VFE and grep OV5640 shows [ 1737.333490] [VFE]vfe_open [ 1737.333514] [VFE]..........................vfe clk open!....................... [ 1737.333571] [VFE]vfe_open ok [ 1737.512792] [VFE_ERR]bsp_csi_set_fmt error at vidioc_s_fmt_vid_cap! [ 1737.519970] [VFE]vfe_close [ 1737.519983] [VFE]vfe select input flag = 0, s_input have not be used . [ 1737.520063] [VFE]..........................vfe clk close!....................... [ 1737.520102] [VFE]vfe_close end [ 1613.793181] [OV5640@lex]init_sensor - frame_rate: 0, max_win_size: 11 [ 1621.742431] [OV5640@lex]CSI_SUBDEV_PWR_ON! [ 1621.810043] [OV5640@lex]sensor_init 0x0 [ 1621.848152] [OV5640@lex]write sensor in function sensor_init=OK [ 1621.849336] [OV5640@lex]sensor_init DONE - exit [ 1621.849347] [OV5640@lex]CSI_SUBDEV_STBY_ON! [ 1621.849355] [OV5640@lex]sensor_s_release_af [ 1621.860033] [OV5640@lex]disalbe oe! [ 1737.333646] [OV5640@lex]sensor_s_fmt [ 1737.333658] [OV5640@lex]capture_mode: 0 - V4L2_MODE_??? [ 1737.510072] [OV5640@lex]s_fmt set width = 640, height = 480 [ 1737.512425] [OV5640@lex]** pre_div = 3,mul = 70,sys_div = 1,pll_rdiv = 2,sclk_rdiv = 2 [ 1737.512439] [OV5640@lex]read pclk = 56000000 [ 1737.512452] [OV5640@lex]pv_fps(30) = pv_pclk(56000000) / ((vts_extra(0) + vts(984)) * hts(1896)) [ 1737.512465] [OV5640@lex]pv fps = 30 - ulres = 30 Please somebody help
Димитър Мазнеков Posted December 15, 2017 Posted December 15, 2017 Did you resolve that problem? I'm facing it too...
Recommended Posts