imx6ull tw9990 camera driver issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

imx6ull tw9990 camera driver issue

2,894 次查看
zhufeng
Contributor I

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:

image.png

    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.

 

0 项奖励
回复
6 回复数

2,838 次查看
joanxie
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复

2,816 次查看
zhufeng
Contributor I
Hi joanxie,
Thank you for your reply.
The link address for this issue is the same patch as the one mentioned above, but the problem still exists.
Do you have any other suggestions?
0 项奖励
回复

2,807 次查看
joanxie
NXP TechSupport
NXP TechSupport

for your error message, I gave the suggestion, pls check the register

  BASEADDR_SWITCH_SEL  and  BASEADDR_SWITCH_EN, try to set them to 1

0 项奖励
回复

2,796 次查看
zhufeng
Contributor I
Thinks!
When initializing, these two have already been set to 1 (see attachment mx6s_capture. c -->csi_tvdec_mable), and during runtime, the value read from the register is also 1 (see attachment CSI-REG.txt)
0 项奖励
回复

2,739 次查看
joanxie
NXP TechSupport
NXP TechSupport

how about setting  BASEADDR_SWITCH_SEL =0 and   BASEADDR_SWITCH_EN =0 ? I had another customer who has similar error message, fixed it after change to 0, but normally we suggest customer to set 1

0 项奖励
回复

2,726 次查看
zhufeng
Contributor I
Think you!
I tried to set BASEADDR_SWITCH_SEL and BASEADDR_SWITCH_EN to 0, there was no “base address switching Change Err” during runtime. However, the screen still flickered and the application died shortly after. The serial terminal was unable to exit the program and had to restart the system.
Do you have any other suggestions?
0 项奖励
回复