element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
RZBoard Camera not working
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 8 replies
  • Subscribers 323 subscribers
  • Views 1933 views
  • Users 0 members are here
  • camera
  • ov5640
Related

Camera not working

spacesaver
spacesaver over 2 years ago

I followed the directions here https://www.avnet.com/wps/wcm/connect/onesite/9fe02bc9-8335-4da2-924a-1bdde941e534/RzBoard-Linux-Yocto-UserManual-v2.1.pdf?MOD=AJPERES&CACHEID=ROOTWORKSPACE.Z18_NA5A1I41L0ICD0ABNDMDDG0000-9fe02bc9-8335-4da2-924a-1bdde941e534-ogmf6kR

enable_overlay_camera=ov5640 in uEnv.txt

media-ctl -d /dev/media0 -r

media-ctl -d /dev/media0 -l "'rzg2l_csi2 10830400.csi2':1 -> 'CRU output':0 [1]"

media-ctl -d /dev/media0 -V "'rzg2l_csi2 10830400.csi2':1 [fmt:UYVY8_2X8/1920x1080 field:none]"

media-ctl -d /dev/media0 -V "'ov5640 0-003c':0 [fmt:UYVY8_2X8/1920x1080 field:none]"

------------------------------------------------------------

root@rzboard:/home/yale/workspace/novatek_port/Source/hrnet# yavta -c1 -Fyavta_video_1920x1080_1.yuv -s 1920x1080 /dev/video0
Device /dev/video0 opened.
Device `RZV2L_CRU' on `platform:10830000.video' is a video output (without mplanes) device.
Video format set: YUYV (56595559) 1920x1080 (stride 3840) field none buffer size 4147200
Video format: YUYV (56595559) 1920x1080 (stride 3840) field none buffer size 4147200
8 buffers requested.
length: 4147200 offset: 0 timestamp type/source: mono/EoF
Buffer 0/0 mapped at address 0xffffae944000.
length: 4147200 offset: 4149248 timestamp type/source: mono/EoF
Buffer 1/0 mapped at address 0xffffae54f000.
length: 4147200 offset: 8298496 timestamp type/source: mono/EoF
Buffer 2/0 mapped at address 0xffffae15a000.
length: 4147200 offset: 12447744 timestamp type/source: mono/EoF
Buffer 3/0 mapped at address 0xffffadd65000.
length: 4147200 offset: 16596992 timestamp type/source: mono/EoF
Buffer 4/0 mapped at address 0xffffad970000.
length: 4147200 offset: 20746240 timestamp type/source: mono/EoF
Buffer 5/0 mapped at address 0xffffad57b000.
length: 4147200 offset: 24895488 timestamp type/source: mono/EoF
Buffer 6/0 mapped at address 0xffffad186000.
length: 4147200 offset: 29044736 timestamp type/source: mono/EoF
Buffer 7/0 mapped at address 0xffffacd91000.
Unable to start streaming: Broken pipe (32).
8 buffers released.

gstreamer also fails with "Failed to allocate required memory."

gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! waylandsink

I'm using

Poky (Yocto Project Reference Distro) 3.1.14
Linux rzboard 5.10.83-cip1-g11a8126702 #1 SMP PREEMPT Tue Apr 5 23:00:00 UTC 2011

I also tried compiling and running app_hrnet_cam and even after some minor changes, the furthest it can get is 
VIDIOC_STREAMON, where it always fails with EPIPE. This is consistent with the yavta errors

The V4L documentation suggest EPIPE means the media-ctl commands are wrong.

Is there any other camera known to work besides ov5640? How about ov5647. I built the driver and tried it but, media-ctl won't even recognize it.

Appreciate some help.

  • Sign in to reply
  • Cancel

Top Replies

  • spacesaver
    spacesaver over 1 year ago in reply to locnguyen +1
    Here's the custom kernel I got from Evan. Thanks again Evan. He disabled the ISP on the Renesas chip. There's another ISP on the sensor itself that can downscale, but I was told it's not possible to use…
  • evanstoddard
    0 evanstoddard over 2 years ago

    Hi,

    Could you try adding the following to your uEnv.txt file:

    fdt_extra_overlays=rzboard-ov5640.dtbo

    Evan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • spacesaver
    0 spacesaver over 2 years ago in reply to evanstoddard

    Thanks, I tried it but same exact error. This is my uEnv.txt

    fdtfile=rzboard.dtb
    enable_overlay_disp=hdmi
    enable_overlay_camera=ov5640
    fdt_extra_overlays=rzboard-ov5640.dtbo

    If there was only some way to debug what's happening in the kernel. I turned dev_debug on and it logged the ioctls, but no reason for why STREAMON failed.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • evanstoddard
    0 evanstoddard over 2 years ago in reply to spacesaver

    A couple things just to make sure I fully understand your setup.

    Are you using the Avnet MIPI camera? (https://www.avnet.com/shop/us/products/avnet-engineering-services/aes-acc-maax-cam1-3074457345642357172/)

    Can you verify that that rzboard-ov5640.dtbo is located under /boot/overlays?

    spacesaver said:
    If there was only some way to debug what's happening in the kernel. I turned dev_debug on and it logged the ioctls, but no reason for why STREAMON failed.

    So you don't see anything regarding the camera when you run dmesg?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • spacesaver
    0 spacesaver over 2 years ago in reply to evanstoddard

    Yes, I'm using the AVnet camera and do have the rzboard-ov5640.dtbo. I think this is proof that it loaded:

    root@rzboard:~# find /sys -name "*5640*"
    /sys/bus/i2c/drivers/ov5640
    /sys/firmware/devicetree/base/__symbols__/ov5640_vdddo_1v8
    /sys/firmware/devicetree/base/__symbols__/ov5640
    /sys/firmware/devicetree/base/__symbols__/ov5640_vddd_1v5
    /sys/firmware/devicetree/base/__symbols__/ov5640_vdda_2v8
    /sys/firmware/devicetree/base/__symbols__/ov5640_to_csi
    /sys/module/ov5640

    Strangely, there is nothing from dmesg by default. Here's the output after I set these to 0xff. Maybe you or someone can compare these to a working setup.

    /sys/devices/platform/soc/10830000.video/video4linux/video0/dev_debug
    /sys/devices/platform/soc/10830400.csi2/video4linux/v4l-subdev0/dev_debug
    /sys/devices/platform/soc/10058000.i2c/i2c-0/0-003c/video4linux/v4l-subdev1/dev_debug

    --------------------------after media-ctl commands---------------------------------------

    [ 176.558669] videodev: v4l2_open: v4l-subdev0: open (0)
    [ 176.558711] videodev: v4l2_release: v4l-subdev0: release
    [ 182.942859] videodev: v4l2_open: v4l-subdev1: open (0)
    [ 182.942917] videodev: v4l2_open: v4l-subdev0: open (0)
    [ 182.942938] videodev: v4l2_release: v4l-subdev0: release
    [ 182.942947] videodev: v4l2_release: v4l-subdev1: release

    ---------------------------after yavta -c1 -Fyavta_video_1920x1080_1.yuv -s 1920x1080 /dev/video0 ----------------------------------------
    [ 208.664537] videodev: v4l2_open: video0: open (0)
    [ 208.664732] video0: VIDIOC_QUERYCAP: driver=rzv2l_isp, card=RZV2L_CRU, bus=platform:10830000.video, version=0x00050a53, capabilities=0xa5200001, device_caps=0x25200001
    [ 208.664799] video0: VIDIOC_S_FMT: type=vid-cap, width=1920, height=1080, pixelformat=YUYV, field=none, bytesperline=3840, sizeimage=4147200, colorspace=8, flags=0x0, ycbcr_enc=1, quantization=1, xfer_func=2
    [ 208.664852] video0: VIDIOC_G_FMT: type=vid-cap, width=1920, height=1080, pixelformat=YUYV, field=none, bytesperline=3840, sizeimage=4147200, colorspace=8, flags=0x0, ycbcr_enc=1, quantization=1, xfer_func=2
    [ 208.686766] video0: VIDIOC_REQBUFS: count=8, type=vid-cap, memory=mmap
    [ 208.693967] video0: VIDIOC_QUERYBUF: 00:00:00.000000000 index=0, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xffff00000000, length=4147200
    [ 208.694008] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 208.694181] videodev: v4l2_mmap: video0: mmap (0)
    [ 208.694237] video0: VIDIOC_QUERYBUF: 00:00:00.000000000 index=1, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xffff003f5000, length=4147200
    [ 208.694260] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 208.694313] videodev: v4l2_mmap: video0: mmap (0)
    [ 208.694342] video0: VIDIOC_QUERYBUF: 00:00:00.000000000 index=2, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xffff007ea000, length=4147200
    [ 208.694363] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 208.694405] videodev: v4l2_mmap: video0: mmap (0)
    [ 208.694431] video0: VIDIOC_QUERYBUF: 00:00:00.000000000 index=3, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xffff00bdf000, length=4147200
    [ 208.694451] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 208.694493] videodev: v4l2_mmap: video0: mmap (0)
    [ 208.694518] video0: VIDIOC_QUERYBUF: 00:00:00.000000000 index=4, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xffff00fd4000, length=4147200
    [ 208.694539] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 208.694579] videodev: v4l2_mmap: video0: mmap (0)
    [ 208.694605] video0: VIDIOC_QUERYBUF: 00:00:00.000000000 index=5, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xffff013c9000, length=4147200
    [ 208.694626] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 208.694669] videodev: v4l2_mmap: video0: mmap (0)
    [ 208.694694] video0: VIDIOC_QUERYBUF: 00:00:00.000000000 index=6, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xffff017be000, length=4147200
    [ 208.694715] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 208.694756] videodev: v4l2_mmap: video0: mmap (0)
    [ 208.694782] video0: VIDIOC_QUERYBUF: 00:00:00.000000000 index=7, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xffff01bb3000, length=4147200
    [ 208.694802] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 208.694842] videodev: v4l2_mmap: video0: mmap (0)
    [ 208.694878] video0: VIDIOC_QBUF: 00:00:00.000000000 index=0, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=4147200, offset/userptr=0x0, length=4147200
    [ 208.694899] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 208.694908] video0: VIDIOC_QBUF: 00:00:00.000000000 index=1, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=4147200, offset/userptr=0x3f5000, length=4147200
    [ 208.694926] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 208.694933] video0: VIDIOC_QBUF: 00:00:00.000000000 index=2, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=4147200, offset/userptr=0x7ea000, length=4147200
    [ 208.694952] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 208.694959] video0: VIDIOC_QBUF: 00:00:00.000000000 index=3, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=4147200, offset/userptr=0xbdf000, length=4147200
    [ 208.694978] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 208.694984] video0: VIDIOC_QBUF: 00:00:00.000000000 index=4, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=4147200, offset/userptr=0xfd4000, length=4147200
    [ 208.695002] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 208.695009] video0: VIDIOC_QBUF: 00:00:00.000000000 index=5, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=4147200, offset/userptr=0x13c9000, length=4147200
    [ 208.695027] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 208.695033] video0: VIDIOC_QBUF: 00:00:00.000000000 index=6, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=4147200, offset/userptr=0x17be000, length=4147200
    [ 208.695052] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 208.695058] video0: VIDIOC_QBUF: 00:00:00.000000000 index=7, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=4147200, offset/userptr=0x1bb3000, length=4147200
    [ 208.695076] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 208.706935] video0: VIDIOC_STREAMON: error -32: type=vid-cap
    [ 208.714084] video0: VIDIOC_REQBUFS: count=0, type=vid-cap, memory=mmap
    [ 208.716306] videodev: v4l2_release: video0: release

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • spacesaver
    0 spacesaver over 2 years ago in reply to evanstoddard

    Also, this is the firmware version I'm using that was preinstalled with the board. Maybe there's a newer prebuilt one?

    Poky (Yocto Project Reference Distro) 3.1.14 rzboard ttySC0

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • spacesaver
    0 spacesaver over 2 years ago in reply to evanstoddard

    Ah, I see you're helping us through another channel. Thanks for the new kernel image. 1920x1080 works now

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • locnguyen
    0 locnguyen over 1 year ago in reply to spacesaver

    Hi spacesaver 

    Could you share this kernel image? 

    I also face this issue when using the camera. But the message might be different

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • spacesaver
    0 spacesaver over 1 year ago in reply to locnguyen

    Here's the custom kernel I got from Evan. Thanks again Evan. He disabled the ISP on the Renesas chip. There's another ISP on the sensor itself that can downscale, but I was told it's not possible to use 640x480 because Renesas's DVP pixel clock cannot be that slow.

    v3.0.0_no_isp.zip

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube