Hi all,
I'm trying to enable RAW format on a ov5640 camera. I'm using a custom
imx8mm based board, with a 4.14 kernel based on the
rel_imx_4.14.98_2.0.0_ga branch from nxp. I tried capturing some RAW
frames using v4l-utils using the following commands:
- RAW8: v4l2-ctl -d /dev/video0 --verbose
--set-fmt--video=width=2592,height=1944,pixelformat=BA81 --stream-mmap
--stream-count=1 --stream-to=raw8_2592x1944.raw
- RAW10: v4l2-ctl -d /dev/video0 --verbose
--set-fmt-video=width=2592,height=1944,pixelformat=BG10 --stream-mmap
--stream-count=1 --stream-to=raw10_2592x1944.raw
When a RAW frame is captured, a bunch of CRC errors shows up in the
kernel log, like the ones below:
6,15197,289730726,-;mxc_mipi-csi.0: CRC Error: 1
6,15198,289730734,-;mxc_mipi-csi.0: Frame Start: 1
6,15199,289730738,-;mxc_mipi-csi.0: status: 01000002
6,15200,289730773,-;mxc_mipi-csi.0: CRC Error: 2
6,15201,289730778,-;mxc_mipi-csi.0: status: 00000002
6,15202,289730795,-;mxc_mipi-csi.0: CRC Error: 3
6,15203,289730799,-;mxc_mipi-csi.0: status: 00000002
6,15204,289730809,-;mxc_mipi-csi.0: CRC Error: 4
Resulting images are completely garbled. This happens for both 8-bit and
10-bit formats. Currently I'm trying to get this working with 8-bit
mode, before moving on to 10-bit. Capture in YUV format works fine.
For reference, I'm using ov5640_mipi_v2 driver for the camera, which I
modified to add register configuration for RAW mode and support for the
MEDIA_BUS_FMT_SBGGR8_1X8 format. The ov5640 registers I set for enabling
RAW mode are:
0x3034 = 0x18 // 8-bit mode
0x4300 = 0x00 // Output data format: RAW BGGR
0x501F = 0x03 // ISP Format: ISP RAW (DPC)
Drivers used on the board for the MIPI CSI layer are mx6s_capture.c and
mxc_mipi_csi.c .
Does anyone have any insight on what might be causing these errors?
Any help would be appreciated!
Best,
Laura