imx6ul csi problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6ul csi problem

Jump to solution
2,332 Views
王双
Contributor III

hi,

I use imx6ul + yocto-4.1.15-ga to develop  product, when debuging csi module + ov9712(parallel) on gated mode,  we found image we get sometimes is ok.

But sometimes we can't get anything, at this time I use memtool to check CSI register, I found CSI.CSIDMASA_FB1 is equal to CSI.CSIDMASA_FB2, but if the image is OK, these two registers value is different, and these two registers value is only the difference point between  2 situation.

I attach the memtool result.

Pls help me to solve it.

this is we get correct image.

csi_image_ok.png

this  we can't get anything, no data, 

csi_img_nothing.png

Tags (2)
0 Kudos
1 Solution
1,650 Views
王双
Contributor III

hi igor,

I've been solved this problem, at last I found the mistake is our app dev pass parameter for ioctl(VIDIOC_S_FMT) is wrong. I major work as bsp dev, and not foucs on app develop.

Best regards

View solution in original post

0 Kudos
9 Replies
1,650 Views
igorpadykov
NXP Employee
NXP Employee

Hi 王 双 

please try latest Linux 4.9.11_1.0.0 BSP described on link

http://www.nxp.com/products/software-and-tools/software-development-tools/i.mx-software-and-tools/i....

also may be useful to look at CSI_CSISR register for errors. Also one can check if

CSI.CSIDMASA_FB1 is equal to CSI.CSIDMASA_FB2 immediately at application start, this may point

to driver probe errors.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
1,650 Views
王双
Contributor III

hi igor,

I already test the lastest bsp 4.9.11-1.0.0, still have the same problem,

I google it, and found someone set bit25-30 and bit 22 on register CSICR18, I didn't find any info in IMX6ULRM, but I found it in IMX7SRM, looks like some MIPI setting,  I tried set bit25-30 as 0x1E(YUV422 8bit) and bit22 as 1(data from MIPI) , and then we can get correct image data everytime, but another problem occured, some data(look like image buffer) is shown on the top half lcd,  I didn't understand how to explain it .

do you have anymore advice?

Best regards!

0 Kudos
1,650 Views
igorpadykov
NXP Employee
NXP Employee

Hi

had you checked if CSI.CSIDMASA_FB1 is equal to CSI.CSIDMASA_FB2 immediately at application start

or it worked fine at start and wrong setting become after some time.

Best regards
igor

0 Kudos
1,650 Views
王双
Contributor III

hi I check it.  when csi driver probed, these two reg value is 0, and  app start request it has change like this 

// csi probe

CSI.CSIDMASA_FB1 Addr:0x021C4028 Value:0x00000000

CSI.CSIDMASA_FB2 Addr:0x021C402C Value:0x00000000

these info printed by memtool when I use my custom app to capture

// app start capture 

CSI.CSIDMASA_FB1 Addr:0x021C4028 Value:0x90080000

CSI.CSIDMASA_FB2 Addr:0x021C402C Value:0x900C0000

CSI.CSIDMASA_FB1 Addr:0x021C4028 Value:0x92100000

CSI.CSIDMASA_FB2 Addr:0x021C402C Value:0x900C0000

CSI.CSIDMASA_FB1 Addr:0x021C4028 Value:0x92100000

CSI.CSIDMASA_FB2 Addr:0x021C402C Value:0x92180000

CSI.CSIDMASA_FB1 Addr:0x021C4028 Value:0x90080000

CSI.CSIDMASA_FB2 Addr:0x021C402C Value:0x92180000

and so much info is correct and then 

CSI.CSIDMASA_FB1 Addr:0x021C4028 Value:0x92100000

CSI.CSIDMASA_FB2 Addr:0x021C402C Value:0x900C0000

CSI.CSIDMASA_FB1 Addr:0x021C4028 Value:0x92100000

CSI.CSIDMASA_FB2 Addr:0x021C402C Value:0x92180000

CSI.CSIDMASA_FB1 Addr:0x021C4028 Value:0x92180000  //  fb1 addr is same as fb2 addr, why??

CSI.CSIDMASA_FB2 Addr:0x021C402C Value:0x92180000

CSI.CSIDMASA_FB1 Addr:0x021C4028 Value:0x92180000 // after all the print info is like this

CSI.CSIDMASA_FB2 Addr:0x021C402C Value:0x92180000

Later I exit my app, these registers value is 0x00000000, I think it's right, csi driver clean it.

Could you explain why it happen? 

Best regards

0 Kudos
1,650 Views
igorpadykov
NXP Employee
NXP Employee

Hi

does issue appear on heavy loading conditions, please try with minimal image,

reduce fps. Also how many boards affected, if just one board one can test memory with ddr test

i.MX6/7 DDR Stress Test Tool V2.70 

Best regards
igor

0 Kudos
1,650 Views
王双
Contributor III

hi,

app‘s cpu usage  less than 20%,total cpu usage less than 30%,  memory is LPDDR3 512MB(256MB for cma)  system use only 100MB , and already use minimal image to make rootfs. We make 5 sets, all the same problem, ddr stress  I tested  under u-boot, it's ok.

Does this problem related to upper I said that  "I google it, and found someone set bit25-30 and bit 22 on register CSICR18, I didn't find any info in IMX6ULRM, but I found it in IMX7SRM, looks like some MIPI setting,  I tried set bit25-30 as 0x1E(YUV422 8bit) and bit22 as 1(data from MIPI) , and then we can get correct image data everytime, but another problem occured, some data(look like image buffer) is shown on the top half lcd,  I didn't understand how to explain it ."

0 Kudos
1,650 Views
igorpadykov
NXP Employee
NXP Employee

 could you try with mx6s_v4l2_capture.out provided in unit tests (imx-test)
www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-test-5.7.tar.gz

procedure is the same as with i.MX6SL

About preview function in i.MX6SL. 

Best regards
igor

0 Kudos
1,651 Views
王双
Contributor III

hi igor,

I've been solved this problem, at last I found the mistake is our app dev pass parameter for ioctl(VIDIOC_S_FMT) is wrong. I major work as bsp dev, and not foucs on app develop.

Best regards

0 Kudos
1,650 Views
王双
Contributor III

hi, igor

THX for reply it. About CSI_CSISR register I confirm that there is no errors report, and driver's print info is no error too.

Later I will test the new bsp. Thanks again.

Best regerds

0 Kudos