Hi,
I encountered a problem where the camera data I obtained was messy. I used imx6ull, version 4.1.15 of the kernel, modified the driver based on this issue: imx6ul tw9990 issue(https://community.nxp.com/t5/i-MX-Processors/imx6ul-tw9990-issue/m-p/709933), and tested it using the luvcview tool. The resulting data is as follows, and the image will shake:
Frequently reporting address switching errors:
root@ATK-IMX6U:~# ./luvcview -d /dev/video0 -f yuv -s 720x576
luvcview version v0.1 [ 18.398201] func-->csi_init_interface
size width: 720 height: 576
[ 18.403123] func--->ioctl_s_parm,type:1
video /dev/video0
length: 829440 offset: 0
Buffer mapped at address 0x76ebb000.
length: 829440 offset: 831488
Buffer mapped at address 0x76df0000.
vinfo: xoffset:0 yoffset:0 bits_per_pixel:16 xres:480 yres:272
[ 18.432852] func->csi_tvdec_enable --------------------
[ 18.438105] func->csi_tvdec_enable cr18 set--------------------
get picture !
[ 18.785755] base address switching Change Err.
[ 18.825751] base address switching Change Err.
[ 19.105738] base address switching Change Err.
[ 19.145735] base address switching Change Err.
[ 19.545713] base address switching Change Err.
[ 19.624180] mx6s-csi 21c4000.csi: 9a200000 != 9a100000 2
[ 19.664193] mx6s-csi 21c4000.csi: 9a100000 != 9a200000 1
[ 20.185676] base address switching Change Err.
[ 20.264144] mx6s-csi 21c4000.csi: 9a200000 != 9a100000 2
[ 20.304158] mx6s-csi 21c4000.csi: 9a100000 != 9a200000 1
[ 20.505663] base address switching Change Err.
[ 20.584124] mx6s-csi 21c4000.csi: 9a100000 != 9a300000 2
[ 20.589578] base address switching Change Err.
[ 20.704119] mx6s-csi 21c4000.csi: 9a200000 != 9a100000 1
[ 22.105566] base address switching Change Err.
[ 22.184037] mx6s-csi 21c4000.csi: 9a200000 != 9a100000 2
[ 22.224036] mx6s-csi 21c4000.csi: 9a100000 != 9a200000 1
[ 22.265557] base address switching Change Err.
[ 24.665418] base address switching Change Err.
[ 25.025403] base address switching Change Err.
[ 25.065397] base address switching Change Err.
[ 25.305382] base address switching Change Err.
[ 25.825352] base address switching Change Err.
[ 25.865349] base address switching Change Err.
[ 26.185335] base address switching Change Err.
[ 26.263803] mx6s-csi 21c4000.csi: 9a100000 != 9a300000 2
[ 26.545312] base address switching Change Err.
[ 26.585308] base address switching Change Err.
The attachment is the drivers/media/platform/mxc/subdev/mx6s_capture.c and the CSI register viewed during luvcview tool runtime.
Can someone help me check what problem? Thanks.
you can refer to the link as below
How to enable i.MX6UL CSI port support BT.656 deinterlace mode and PXP preview - NXP Community
for base address switching Change Err, pls check BASEADDR_SWITCH_SEL and BASEADDR_SWITCH_EN, try to set them to 1