Jump to content

Chen Wang

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Chen Wang

  1. To get OV5640 working for your Allwinner H3 based board: Step 1. Update the fex file The file is usually located in /boot directory, name could be script.bin or *.bin depends on the os. Use bin2fex to convert the bin file to fex file. (If you don't have fex2bin, do "apt install sunxi-tools") the fex file is just a text file, search for "[csi0]", it stands for Camera Serial Interface 0. if you are using Orange Pi Zero Plus2 H3 board with OV5640 camera, you can use the following setting, if you are using a different board, you need to check the board schematic to make sure the pins(port:Pxnn<n><default><default><default>) defined in the fex file are in line with what's in the schematic(you can refer to my previous post in this thread on where in the schematic to check) and update them accordingly. twi address(vip_dev0_twi_addr), voltage settings(vip_dev1_iovdd_vol,vip_dev1_avdd_vol,vip_dev1_dvdd_vol,vip_dev1_afvdd_vol) are described in OV5640 datasheet(8.3 DC characteristics https://cdn.sparkfun.com/datasheets/Sensors/LightImaging/OV5640_datasheet.pdf). Once done, use fex2bin to convert the fex file to bin file. Reboot the board to load the updated bin file. [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 = 2 vip_dev0_twi_id = 2 vip_dev0_twi_addr = 120 vip_dev0_isp_used = 0 vip_dev0_fmt = 0 vip_dev0_stby_mode = 0 vip_dev0_vflip = 1 vip_dev0_hflip = 1 vip_dev0_iovdd = "" vip_dev0_iovdd_vol = 1800000 vip_dev0_avdd = "" vip_dev0_avdd_vol = 2800000 vip_dev0_dvdd = "" vip_dev0_dvdd_vol = 1500000 vip_dev0_afvdd = "" vip_dev0_afvdd_vol = 0 vip_dev0_power_en = port:PA08<1><default><default><default> 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 = 24 vip_dev1_mname = "" vip_dev1_pos = "front" 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 = Step 2. Load the drivers modprobe ov5640 modprobe vfe_v4l2 check dmesg, the normal log should look like this: [ 24.397287] [OV5640@lex]init_sensor - frame_rate: 0, max_win_size: 11 [ 35.772109] [OV5640@lex]CSI_SUBDEV_PWR_ON! [ 35.849649] [OV5640@lex]sensor_init 0x0 [ 35.897182] [OV5640@lex]CSI_SUBDEV_STBY_ON! [ 35.906344] [OV5640@lex]sensor_s_release_af [ 35.927791] [OV5640@lex]disalbe oe! At this point you should have a working /dev/video0
  2. I'm able to use both OV5640 and GC2035 on Orange Pi PC Plus v1.1 with ARMBIAN Debian GNU/Linux 8 (jessie) 3.4.112-sun8i I can't seem to get either GC2035 or OV5640 to work on Orange Pi Zero Plus v1.0 H3 with ARMBIAN 5.38 stable Ubuntu 16.04.3 LTS 3.4.113-sun8i I noticed there's a change in the circuit schematics: In Orange Pi PC Plus v1.1, CSI-PWR-EN is on PA17 In Orange Pi Zero Plus v1.0, CSI-PWR-EN is on PA8
  3. same issue, is that the right solution for OV5640?
  4. I got 4 of orange pi pc plus boards, and I am having exactly the same problem with only 1 of these boards. And phillc54's solution fixed the problem. But I wonder what's the cause of the problem...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines