how to stream video from direct MIPI input without calling sensor initializing via I2C?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
TzCh_3504586
Level 3
Level 3
5 likes given First like given

Hi,

I want to make CX3 receive MIPI sent from my ISP chip directly and stream video through USB3.0 using e-CAM tool.

Which means, I don't need the CX3 send I2C to initialize the sensor.

I've configured the sensor and bypassed the "cyu3imagesensor.c" and "cyu3imagesensor.h" by commenting them.

But the video stream didn't come out, and also the UART didn't print any frame count there.

I've done some hardware debugging (oscilloscope) and confirm that the MIPI signal is successfully received by CX3.

And also do UART debug print to check

the result I get from debug print :

(power on the CX3)

bRType = 0x81, bRequest = 0x0, wValue = 0x0, wIndex = 0x0, wLength= 0x2

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0xA1, bRequest = 0x87, wValue = 0x1400, wIndex = 0x100, wLength= 0xA

bRType = 0xA1, bRequest = 0x81, wValue = 0x200, wIndex = 0x0, wLength= 0x1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0xA1, bRequest = 0x87, wValue = 0x1400, wIndex = 0x100, wLength= 0xA

bRType = 0xA1, bRequest = 0x81, wValue = 0x200, wIndex = 0x0, wLength= 0x1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0xA1, bRequest = 0x87, wValue = 0x1400, wIndex = 0x100, wLength= 0xA

bRType = 0xA1, bRequest = 0x81, wValue = 0x200, wIndex = 0x0, wLength= 0x1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

AppInit:GpifSMStart passed

(Open e-CAM after powering up CX3)

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0xA1, bRequest = 0x87, wValue = 0x1400, wIndex = 0x100, wLength= 0xA

bRType = 0xA1, bRequest = 0x81, wValue = 0x200, wIndex = 0x0, wLength= 0x1

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x100, wLength= 0x0

StpCB:In SET_FTR 0::1

EnterSuspendMode Status =  0x0, Wakeup reason = 0x8

bRType = 0x1, bRequest = 0x3, wValue = 0x0, wIndex = 0x0, wLength= 0x0

StpCB:In SET_FTR 0::1

bRType = 0xA1, bRequest = 0x81, wValue = 0x100, wIndex = 0x1, wLength= 0x22

bRType = 0x21, bRequest = 0x1, wValue = 0x100, wIndex = 0x1, wLength= 0x22

bRType = 0xA1, bRequest = 0x81, wValue = 0x100, wIndex = 0x1, wLength= 0x22

bRType = 0xA1, bRequest = 0x83, wValue = 0x100, wIndex = 0x1, wLength= 0x22

bRType = 0xA1, bRequest = 0x82, wValue = 0x100, wIndex = 0x1, wLength= 0x22

bRType = 0x21, bRequest = 0x1, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Set cur Still probe index = 1

bRType = 0xA1, bRequest = 0x81, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Get cur Still probe index = 1

bRType = 0xA1, bRequest = 0x82, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Get cur Still probe index = 1

bRType = 0xA1, bRequest = 0x83, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Get cur Still probe index = 1

bRType = 0x21, bRequest = 0x1, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Set cur Still probe index = 1

bRType = 0xA1, bRequest = 0x81, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Get cur Still probe index = 1

bRType = 0xA1, bRequest = 0x82, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Get cur Still probe index = 1

bRType = 0xA1, bRequest = 0x83, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Get cur Still probe index = 1

bRType = 0x21, bRequest = 0x1, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Set cur Still probe index = 1

bRType = 0xA1, bRequest = 0x81, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Get cur Still probe index = 1

bRType = 0xA1, bRequest = 0x82, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Get cur Still probe index = 1

bRType = 0xA1, bRequest = 0x83, wValue = 0x300, wIndex = 0x1, wLength= 0xB

Get cur Still probe index = 1

bRType = 0x21, bRequest = 0x1, wValue = 0x200, wIndex = 0x1, wLength= 0x22

AplnStrt:SMState = 0x2

And it stucks here without any video stream.

Usually if it start streaming it'll print out :

"Prod = %d Cons = %d  Prtl_Sz = %d Frm_Cnt = %d Frm_Sz = %d " etc.

I couldn't spot any suspicious activity from these print outs,

Any suggestions ?

Is it because I done something wrong on the bypassing part?

Something like the stream request is waiting an ACK which will never been sent because I commented some essential part?

Attachment is the project I'm currently working on, please have a look.

Thank you,

Paddy

0 Likes
1 Solution

It is good to know that the issue on the data lanes is solved.

Please probe VSYNC and HSYNC now and share the HSYNC High and Low; VSYNC high and low timings.

Answering other queries:

1. Note that the GPIF interrupt comes when there is Frame End.

     In the frame end state of the GPIF state machine, we have set Interrupt CPU action. This triggers the GPIFCB function. Hence, DMA      Callback event can come irrespective of GPIFCB.

2. Please remove the debug prints in Callback functions. This may block normal functionality.

     Put a flag and print in the infinite for loop running in Main Thread.

3. Please share the snippet that printed 0x45 (CY_U3P_ERROR_TIMEOUT = Timeout on relevant operation). This error comes when there is      a timeout on relevant operation

I hope that you might have referred AN75779 App. Note to understand the UVC application firmware. If not, please refer.

View solution in original post

20 Replies