OV5640 - Host not displaying image stream

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

cross mob
lock attach
Attachments are accessible only for community members.
GrAU_4638336
Level 4
Level 4
25 replies posted 10 replies posted 10 sign-ins

Hello,

I have been trying to get an image stream running on a CX3 + OV5640 board without success.
The firmware contains UVC and CDC interface and the debug prints are sent correctly. 
I have other firmwares on which I'm able to get the image stream flowing without problem so I know there is no hardware issue on my board. 
From the debug logs, the size of the frames is 614400 and all of them seem to be correctly sent to the host. 

I spent couple of day trying to fix things and compare the working and non working versions that I have without being able to find the root cause.
At this point, it is not clear to me wether the problem is related to a misconfiguration of the sensor and Mipi interface or a problem with the firmware itself. 

I have attached the firmware, the debug prints from one session and the USB traces extracted via Wireshark. 

If anyone could have a quick look and give me hints, that would be really appreciated.
Thanks in advance for your help

1 Solution
GrAU_4638336
Level 4
Level 4
25 replies posted 10 replies posted 10 sign-ins

I found the answer in the thread opened by my colleague. Here is the answer for people that might be interrested.

>>From the firmware shared in the thread pointed, I can see that RX payload size field in probe control structure is smaller than the DMA buffer size (0x5FF0).

Please configure the RX Payload size greater or equal to DMA buffer size in probe control structure as follows

0x00, 0x90, 0x00, 0x00, /* No. of bytes device can RX in single payload: 36KB *

Regards,
Rashi

That solved the issue. Thanks again Rashi! 

View solution in original post

4 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

From the wireshark trace, I see that the payload size is either 12288 bytes or 12284 bytes.

I think this is not expected as your data buff size is 0x5FF0

While printing frame info Frm_Sz, ((TxCountflag*CX3_APP_DATA_BUF_SIZE)+PartialBufSize) is made use of. Instead can you check what is the actual frame size transferred by tracking dmaBuffer.count

Regards,

Hemanth
0 Likes
lock attach
Attachments are accessible only for community members.
cam
Level 1
Level 1
5 replies posted 5 sign-ins First like received

I added a log inside the CyCx3AppDmaCallback function to print the dmaBuffer.count. Find attached.

 

0 Likes
GrAU_4638336
Level 4
Level 4
25 replies posted 10 replies posted 10 sign-ins

Hello, 

I would like to follow up with Cam's answer. Have you found anything that could help us debug the stream?
If necessary, I can provide more information or debug logs. 

Thanks in advance for your help on this topic.

Greg

0 Likes
GrAU_4638336
Level 4
Level 4
25 replies posted 10 replies posted 10 sign-ins

I found the answer in the thread opened by my colleague. Here is the answer for people that might be interrested.

>>From the firmware shared in the thread pointed, I can see that RX payload size field in probe control structure is smaller than the DMA buffer size (0x5FF0).

Please configure the RX Payload size greater or equal to DMA buffer size in probe control structure as follows

0x00, 0x90, 0x00, 0x00, /* No. of bytes device can RX in single payload: 36KB *

Regards,
Rashi

That solved the issue. Thanks again Rashi!