Firefly Open Source Community

Title: MIPI error: err2: 0x00010000 [Print This Page]

Author: JayCarlson    Time: 10/6/2020 00:08
Title: MIPI error: err2: 0x00010000
Last edited by JayCarlson In 10/6/2020 00:29 Editor

I'm trying to get a custom MIPI camera solution going using an OV2740, but I can't get anything out of the ISP. My image sensor is configured for 1920x1080@10bit RAW, at 60 fps, 2 lanes, 400 MHz (800 Mbps) transfer rate. I've tested with 4 lanes at 200 MHz (400 Mbps) with the same problem. I've verified the correct number of lanes are outputting at the correct clock rate using an oscilloscope, so I know the PX30's MIPI PHY should be receiving data, but it seems completely dead.

I tried using gstreamer:
  1. gst-launch-1.0 rkisp device=/dev/video0 io-mode=4 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=60/1 ! kmssink
Copy the code
This produces this output:
  1. [XCORE]:XCAM ERROR rkisp_device.cpp:74: atomisp device (/dev/video0) try subdev format failed
  2. [XCORE]:XCAM ERROR v4l2_device.cpp:618: device(/dev/video0) get dma buf(0) failed
  3. Caught SIGSEGV
  4. exec gdb failed: No such file or directory
Copy the code
I tried testing it with v4l2src instead of rkisp:
  1. gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! video/x-raw,format=NV12,width=1920,height=1080 ! kmssink
Copy the code
As well as the qcamera demo and this v4l2-ctl command:
  1. v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080
  2. ,pixelformat=NV12 --stream-mmap=3 --stream-to=/root/raw.out --stream-count=1000
  3. --stream-poll
Copy the code
In any case, I get this output, after enabling (and added) some logging messages:
  1. [  364.391006] rkisp1: waiting on params stream on event timeout
  2. [  364.391597] rkisp1 ff4a0000.rkisp1: can not get first iq setting in stream on
  3. [b][  364.392419] rkisp1: MIPI error: err2: 0x00010000[/b]
  4. [  364.394693] rockchip-mipi-dphy-rx ff2f0000.mipi-dphy-rx0: data rate hsfreq range set to 899 mbps
  5. [  364.395541] rockchip-mipi-dphy-rx ff2f0000.mipi-dphy-rx0: enabled 2 lanes for reception
  6. [  364.396334] ov2740 2-0030: __ov2740_start_stream() called
  7. [  364.396898] ov2740 2-0030: ov2740_set_ctrl() V4L2_CID_VBLANK called
  8. [  364.397504] ov2740 2-0030: ov2740_set_ctrl() V4L2_CID_VBLANK=8
  9. [  364.399508] ov2740 2-0030: ov2740_set_ctrl() V4L2_CID_EXPOSURE=1080
  10. [  364.401722] ov2740 2-0030: ov2740_set_ctrl() V4L2_CID_ANALOGUE_GAIN=16
  11. [  364.402412] ov2740 2-0030: ov2740_set_ctrl() V4L2_CID_TEST_PATTERN called
  12. [  364.403109] ov2740 2-0030: Disabling test pattern
  13. [b]select timeout[/b]
  14. [b][  367.410019] rkisp1: waiting on event return error 0[/b]
  15. [  367.411561] rockchip-mipi-dphy-rx ff2f0000.mipi-dphy-rx0: disabled reception
  16. [  367.412254] ov2740 2-0030: __ov2740_stop_stream() called
  17. [  367.430933] ov2740 2-0030: ov2740_s_power() called
Copy the code
It doesn't matter if I use /dev/video0 or /dev/video1 (main path or self path). I get the same errors.
What should I be looking at to fix this? I looked at Part1 and Part2 of the TRM, but there doesn't appear to be any information about the MIPI D-PHY in it, so I don't know what error code 0x00010000 represents.

I'm using an HTS of 1928 and a VTS of 1088, though the original sample code I received had perplexing HTS/VTS values of 1080 and 1125, respectively. It seems like if it were a timing parameter issue, the ISP would report that, and/or give me a garbled image.

Author: JayCarlson    Time: 10/7/2020 04:57
I think maybe I was missing MIPI data for a bit while I was testing the other day. I'm now getting MIPI error: err2: 0x00030000. Same symptoms. I tried reducing my settings to 30 fps with a 400 Mbps (200 MHz) MIPI clock, but it's still not working.

Any ideas?




Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1