您尚未登录。

楼主 # 2022-09-13 00:47:49

swunzg
会员
注册时间: 2019-11-07
已发帖子: 9
积分: 50

f1c100s ov2640抓图失败,求指点

原理图和tiny200完全一致【电压3.2v、2.8v、1.2v】

从tiny200编译的镜像

驱动加载成功,ov2640的ID已经读到了:
[    1.007089] i2c /dev entries driver
[    1.011204] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[    1.024224] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[    1.037633] ov2640 0-0030: ov2640 Product ID 26:42 Manufacturer ID 7f:a2
[    1.044353] i2c i2c-0: OV2640 Probed
[    1.049307] sun4i-csi 1cb0000.csi: Packed (RAW) format enabled.
[    1.056079] sun4i-csi 1cb0000.csi: -- Device registered as video0
[    1.065431] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)

/dev/video0设备也已经生成;
# ls /dev/
audio            snd              tty34            tty61
console          tty              tty35            tty62
cpu_dma_latency  tty0             tty36            tty63
dri              tty1             tty37            tty7
dsp              tty10            tty38            tty8
full             tty11            tty39            tty9
gpiochip0        tty12            tty4             ttyS0
i2c-0            tty13            tty40            ttyS1
kmsg             tty14            tty41            ttyS2
log              tty15            tty42            ttyS3
media0           tty16            tty43            ttyS4
mem              tty17            tty44            ttyS5
mixer            tty18            tty45            ttyS6
mtd0             tty19            tty46            ttyS7
mtd0ro           tty2             tty47            urandom
mtd1             tty20            tty48            v4l-subdev0
mtd1ro           tty21            tty49            v4l-subdev1
mtd2             tty22            tty5             vcs
mtd2ro           tty23            tty50            vcs1
mtd3             tty24            tty51            vcsa
mtd3ro           tty25            tty52            vcsa1
mtdblock0        tty26            tty53            vcsu
mtdblock1        tty27            tty54            vcsu1
mtdblock2        tty28            tty55            video0
mtdblock3        tty29            tty56            watchdog
null             tty3             tty57            watchdog0
ptmx             tty30            tty58            zero
pts              tty31            tty59
random           tty32            tty6
shm              tty33            tty60
#


使用命令抓图,没有输出,超时:
#media-ctl --set-v4l2 '"ov2640 0-0030":0[fmt:YUYV8_2X8/640x480]'
#fswebcam -d /dev/video0 --no-banner -r 640x480 -S 2 1.jpg

--- Opening /dev/video0...
Trying source module v4l2...
[  106.200225] sun4i-csi 1cb0000.csi: -- csi open successed
/dev/video0 opened.
[  106.216927] sun4i-csi 1cb0000.csi: --csi querycap ok:platform:1cb0000.csi
No input was specified, using the first.
--- Capturing frame...
Skipping 2 frames...
Timed out waiting for frame!
Capturing 1 frames...
Timed out waiting for frame!
[  126.380363] sun4i-csi 1cb0000.csi: --csi release ok
No frames captured.
#


# media-ctl --print-topology
Media controller API version 5.4.196

Media device information
------------------------
driver          sun4i-csi
model           Allwinner Video Capture Device
serial         
bus info       
hw revision     0x0
driver version  5.4.196

Device topology
- entity 1: ov2640 0-0030 (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev0
    pad0: Source
        [fmt:YUYV8_2X8/640x480 field:none
         crop.bounds:(0,0)/1600x1200
         crop:(0,0)/1600x1200]
        -> "sun4i-csi-0":0 [ENABLED,IMMUTABLE]

- entity 3: sun4i-csi-0 (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
    pad0: Sink
        [fmt:YUYV8_2X8/640x480 field:none]
        <- "ov2640 0-0030":0 [ENABLED,IMMUTABLE]
    pad1: Source
        [fmt:YUYV8_2X8/640x480 field:none]
        -> "sun4i_csi":0 [ENABLED,IMMUTABLE]

- entity 6: sun4i_csi (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
    pad0: Sink
        <- "sun4i-csi-0":1 [ENABLED,IMMUTABLE]

# fswebcam -d /dev/video0 -p YUYV -r 640x480 -S 2 1.jpg
--- Opening /dev[  347.542726] sun4i-csi 1cb0000.csi: -- csi open successed
/video0...
[  347.549321] sun4i-csi 1cb0000.csi: --csi querycap ok:platform:1cb0000.csi
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
--- Capturing frame...
Skipping 2 frames...
Timed out waiting for frame!
Capturing 1 frames...
Timed out waiting for frame!
[  367.710538] sun4i-csi 1cb0000.csi: --csi release ok
No frames captured.
#

驱动中加了些打印但是没有报错,没有思路了,请大佬们指点一下
跪谢!

_20220913004531_20220913-0054.png

最近编辑记录 swunzg (2022-09-13 00:57:07)

离线

楼主 #2 2022-09-13 10:51:06

swunzg
会员
注册时间: 2019-11-07
已发帖子: 9
积分: 50

Re: f1c100s ov2640抓图失败,求指点

哇酷小二 说:

U5 第8脚 PWD 电平对吗?

第8脚测试了是0;
第6脚,RST我把它断开了

还是不行,好奇怪,关键是内核没有报错,无从下手;
ov2640似乎不是标准的iic,i2c-tools好像还没有办法操作

离线

楼主 #4 2022-09-13 11:44:18

swunzg
会员
注册时间: 2019-11-07
已发帖子: 9
积分: 50

Re: f1c100s ov2640抓图失败,求指点

@哇酷小二
好的 谢谢  我检查下硬件

离线

楼主 #5 2022-09-14 11:30:21

swunzg
会员
注册时间: 2019-11-07
已发帖子: 9
积分: 50

Re: f1c100s ov2640抓图失败,求指点

焊接技术不过关,松香用了很多,后来用洗板水,结果松香流到摄像头的座子里面,导致有点接触不良,用镊子刮了一下就可以了,看来以后直接用锡浆算了

# fswebcam -d /dev/video0 --no-banner -r 800x600 -S 3 3.jpg
--- Opening /dev[ 2775.189562] sun4i-csi 1cb0000.csi: -- csi open successed
/video0...
[ 2775.195965] sun4i-csi 1cb0000.csi: --csi querycap ok:platform:1cb0000.csi
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
--- Capturing frame...
Skipping 3 frames...
Capturing 1 frames...
Captured 4 frames in 0.21 seconds. (19 fps)
[ 2775.971309] sun4i-csi 1cb0000.csi: --csi release ok
--- Processing captured image...
Disabling banner.
Writing JPEG image to '3.jpg'.
#

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn