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

USB superspeed peripherals Forum Discussions

NickNick
Level 2
10 replies posted 5 replies posted 5 sign-ins
Level 2

Greetings,

I want to use the CYUSB3065 chip to get an image from the OG02B1B OVT sensor on a PC via the USB3 interface. I drew a printed circuit board for the OG02B1B sensor and connected it to the CYUSB3065 starter kit using the mipi csi-2 interface. After that, I modified the code for CYUSB3065. Now I'm running a CLASSIC MEDIA PLAYER in Windows10 and the Wireshark program outputs the log shown on the printscreen. There is data, but they are all equal to 0xFF03. What does it mean? and how to solve the problem?

0 Likes
1 Solution
JayakrishnaT_76
Moderator
Moderator First question asked 1000 replies posted 750 replies posted
Moderator

Hello,

If you pad data, then the total data rate will be as follows:

Data rate = 1600 * 1300 * 16 * 60 = 1996800000 bits per second = 1.859Gbps

Padding data to 16 bit will make use of a 16 bit interface, and as the max interface frequency is 100MHz, the maximum possible data rate will be:

Max possible data rate = 16bits*100MHz = 1600Mbps = 1.6Gbps

As the calculated data rate is greater than the max possible data rate, streaming this video by padding the incoming data would not be possible. So, please refer to the following KBA and pack the incoming data to 16 bits:

https://community.infineon.com/t5/Knowledge-Base-Articles/Streaming-RAW10-Format-Input-Data-to-16-24...

Best Regards,
Jayakrishna

View solution in original post

0 Likes
25 Replies
JayakrishnaT_76
Moderator
Moderator First question asked 1000 replies posted 750 replies posted
Moderator

Hello,

Please note that CX3 is a bridge between a MIPI based image sensor and USB host. The behavior that you are seeing should be mostly due to an improper configuration of the image sensor. Kindly cross check the image sensor configurations with the sensor vendor. We suspect that the sensor is configured to send some test patterns.

Best Regards,
Jayakrishna
0 Likes
NickNick
Level 2
10 replies posted 5 replies posted 5 sign-ins
Level 2

Hi, I changed the values in the sensor's Test Pattern register so that the sensor outputs a test image and the numbers in Wireshark have changed (see printscreen). But in Media Player Classic I still have a black image. What can I check? Maybe some control points? I also attach my project, can there be obvious problems there?(there are no sensor settings, they are under NDA)

0 Likes
JayakrishnaT_76
Moderator
Moderator First question asked 1000 replies posted 750 replies posted
Moderator

Hello,

Can you please share the complete UART prints and wireshark trace for us to debug the issue? Please compress and share the .zip files as a part of your response.

Best Regards,
Jayakrishna
0 Likes
NickNick
Level 2
10 replies posted 5 replies posted 5 sign-ins
Level 2

HelloJayakrishna.,
the file CY_SENSOR_OG02B1B_USB_Log.pcapng, is the Wireshark log, it is always the same.
teraterm(1,2).log,- this logs Tera Term. They are somewhat different, although I have always performed the same actions.

0 Likes
JayakrishnaT_76
Moderator
Moderator First question asked 1000 replies posted 750 replies posted
Moderator

Hello,

Please let us know which host application is used for streaming the video.

Based on the Wireshark traces and UART logs, I find that the host is issuing an ABORT PIPE request to stop the video streaming. But, the reason for the host to issue the abort is not seen from the traces. 

Also, please confirm that you are using FX3 SDK 1.3.4 for development.

In addition to this, can you please let me know what are the "actions" mentioned in the following line from your previous response:
"They are somewhat different, although I have always performed the same actions."

Best Regards,
Jayakrishna
0 Likes
NickNick
Level 2
10 replies posted 5 replies posted 5 sign-ins
Level 2

Hi, I am using the Media Player Classic application on the host. SDK version 1.3.4. Printscreen attached. Moreover, the Evaluation Board with the OV5640 native sensor works well. Therefore, it's about the settings of the CX3 MIPI interface. But how to configure the CX3 interface MIPI correctly?

The actions I perform are: launch Media Player Classic, File->Open Device, select the device of interest, wait 1 second, press the "Stop" button. Therefore, there is an interruption of the video stream in the Wireshark logs. The Media Player Classic screen is always black.

 

0 Likes
JayakrishnaT_76
Moderator
Moderator First question asked 1000 replies posted 750 replies posted
Moderator

Hello,

Please do not press on the Stop button. Let the captures go on. Pressing the stop button is actually responsible for the abort event seen in the wireshark traces. 

Also, please make sure that the macro PRINT_FRAME_INFO is enabled while building the project. If not, please enable it and build the firmware. 

After making these suggestions, please share the complete UART debug logs for us to check.

Best Regards,
Jayakrishna
0 Likes
NickNick
Level 2
10 replies posted 5 replies posted 5 sign-ins
Level 2
 
0 Likes
JayakrishnaT_76
Moderator
Moderator First question asked 1000 replies posted 750 replies posted
Moderator

Hello,

It looks like you are still pressing on the Stop button. Or the prints shared are incomplete. Can you please cross check once again and share the complete UART debug prints again with me?

Best Regards,
Jayakrishna
0 Likes
NickNick
Level 2
10 replies posted 5 replies posted 5 sign-ins
Level 2

Hello,

These are two identical launches one after the other. The UART output is different. I don't understand why. I didn't press the "Stop" button.

0 Likes
JayakrishnaT_76
Moderator
Moderator First question asked 1000 replies posted 750 replies posted
Moderator

Hello,

Is it possible to share the complete source with us?

Best Regards,
Jayakrishna
0 Likes
NickNick
Level 2
10 replies posted 5 replies posted 5 sign-ins
Level 2
 
0 Likes
JayakrishnaT_76
Moderator
Moderator First question asked 1000 replies posted 750 replies posted
Moderator

Hello Nick, 

Please try the following and share the complete UART debug logs with us:

1. Program the device with the firmware

2. Open the host application and start playing the video

3. Do not stop or pause the video stream

Please share the logs as a text file and not as a snapshot.

Best Regards,
Jayakrishna
0 Likes
NickNick
Level 2
10 replies posted 5 replies posted 5 sign-ins
Level 2

I do as you say, the UART doesn't give out anything else.

0 Likes
NickNick
Level 2
10 replies posted 5 replies posted 5 sign-ins
Level 2

I do as you say, the UART doesn't give out anything else.

 

 

0 Likes
JayakrishnaT_76
Moderator
Moderator First question asked 1000 replies posted 750 replies posted
Moderator

Hello,

Can you please change the usage of the below API at line 1443 to:

status = CyU3PEventGet (&glCx3Event, CX3_USB_SUSP_EVENT_FLAG | CX3_DMA_RESET_EVENT,
CYU3P_EVENT_OR_CLEAR, &eventFlag, CYU3P_WAIT_FOREVER);

to

status = CyU3PEventGet (&glCx3Event, CX3_USB_SUSP_EVENT_FLAG | CX3_DMA_RESET_EVENT,
CYU3P_EVENT_OR_CLEAR, &eventFlag, CYU3P_NO_WAIT);

After this, please share the UART debug logs and wireshark traces with us. Please share the complete logs instead of snapshots.

Best Regards,
Jayakrishna
0 Likes
NickNick
Level 2
10 replies posted 5 replies posted 5 sign-ins
Level 2

Hello,

at the end, "disable ar0140 Camera csi-output" because I closed the player to stop the output to the UART.

0 Likes
NickNick
Level 2
10 replies posted 5 replies posted 5 sign-ins
Level 2

another log with the beginning.

 

0 Likes
JayakrishnaT_76
Moderator
Moderator First question asked 1000 replies posted 750 replies posted
Moderator

Hello,

Based on my understanding, you would like to stream the resolution 1920*1080 in YUY2 format.

So, the size of a frame = 1920*1080*2 = 4147200 bytes

But, from the UART prints, I find that the size of the frame is 679008 bytes which is really less compared to the required size. The same is seen in the Wireshark traces. This is the reason for the black screen seen. 

I suspect that the sensor is not configured to stream the video frames at 1080p in YUY2 format. Please cross check with the sensor vendor and update the sensor configuration settings. 

Best Regards,
Jayakrishna
0 Likes
NickNick
Level 2
10 replies posted 5 replies posted 5 sign-ins
Level 2

the sensor is set to,- Configuration Settings for 2Lane R1600x1300 RAW10 MIPI. 

I specified the same values in the CX 3 configurator.

/*
## Cypress CX3 configuration settings file
## ===========================
##
## Copyright Cypress Semiconductor Corporation, 2013,
## All Rights Reserved
## UNPUBLISHED, LICENSED SOFTWARE.
##
## CONFIDENTIAL AND PROPRIETARY INFORMATION
## WHICH IS THE PROPERTY OF CYPRESS.
##
## Use of this file is governed
## by the license agreement included in the file
##
## <install>/license/license.txt
##
## where <install> is the Cypress software
## installation root directory path.
##
## ===========================
*/

#include "cyu3mipicsi.h"


/* qqq : */
CyU3PMipicsiCfg_t qqq =
{
CY_U3P_CSI_DF_RAW10, /* CyU3PMipicsiDataFormat_t dataFormat */
2, /* uint8_t numDataLanes */
0, /* uint8_t pllPrd */
0, /* uint16_t pllFbd */
CY_U3P_CSI_PLL_FRS_125_250M, /* CyU3PMipicsiPllClkFrs_t pllFrs */
CY_U3P_CSI_PLL_CLK_DIV_2, /* CyU3PMipicsiPllClkDiv_t csiRxClkDiv */
CY_U3P_CSI_PLL_CLK_DIV_2, /* CyU3PMipicsiPllClkDiv_t parClkDiv */
0, /* uint16_t mClkCtl */
CY_U3P_CSI_PLL_CLK_DIV_2, /* CyU3PMipicsiPllClkDiv_t mClkRefDiv */
1600, /* uint16_t hResolution */
100 /* uint16_t fifoDelay */
};

/* [ ] */

 

How to fix the situation with the CX3 settings?

0 Likes
JayakrishnaT_76
Moderator
Moderator First question asked 1000 replies posted 750 replies posted
Moderator

Hello,

Please create a new project by referring to the following KBAs:
https://community.infineon.com/t5/Knowledge-Base-Articles/Steps-to-Setup-up-MIPI-CSI-Camera-Solution...

https://community.infineon.com/t5/Knowledge-Base-Articles/Streaming-RAW10-Format-Input-Data-to-16-24...

It is not just the MIPI settings that needs to be adjusted. The descriptors also should be adjusted. Please create a new project by following the above KBAs and let me know if the issue persists.

Best Regards,
Jayakrishna
0 Likes
NickNick
Level 2
10 replies posted 5 replies posted 5 sign-ins
Level 2

Hello,

In order to create the current project, I have already done what is described in 

https://community.infineon.com/t5/Knowledge-Base-Articles/Steps-to-Setup-up-MIPI-CSI-Camera-Solution...

I have a sensor configuration for Configuration Settings for 2Lane R1600x1300 RAW10 MIPI 60fps. Maybe 60 fps is too much?, Although I have reduced the CLK clock frequency of the sensor (Instead of 24 Mhz it costs 10 Mhz).

Is it possible to understand how many bytes of CX3 are obtained in one frame by mipi?

0 Likes
JayakrishnaT_76
Moderator
Moderator First question asked 1000 replies posted 750 replies posted
Moderator

Hello,

As you are using RAW format, the input data can be packed or padded by the MIPI block of CX3. Please refer to the following KBA to understand more on this:
https://community.infineon.com/t5/Knowledge-Base-Articles/Streaming-RAW10-Format-Input-Data-to-16-24...

If you are padding the data into 16 bits, then the frame size can be calculated as follows:

Frame size = 1600 * 1300 * 2 = 4160000 bytes

If you are packing the data into 16 bits/24 bits, the frame size can be calculated as follows:

Frame size = (1600 * 1300 * 10)/8 = 2600000 bytes

Please note that packing the incoming data into 16/24 bits has a constraint that the line size should be perfectly divisible by 1624.

As the UART logs does not show any failure, it looks like the fps is not actually causing any issues. Can you please let me know if you are packing or padding the incoming data? If you are padding the incoming data to 16 bits, then you can change it to pack the incoming data into 16 bits. With this setting, there should not be any problems due to the data rate for the current resolution and fps. Can you please try this and share the complete UART debug logs and Wireshark traces?

Best Regards,
Jayakrishna
0 Likes
NickNick
Level 2
10 replies posted 5 replies posted 5 sign-ins
Level 2

Hello,

I want to do data padding in 16 bits. Is this not visible in the project source codes?
Right now I can't view the project settings graphically because EZ USB Suite no longer shows graphical settings.

0 Likes
JayakrishnaT_76
Moderator
Moderator First question asked 1000 replies posted 750 replies posted
Moderator

Hello,

If you pad data, then the total data rate will be as follows:

Data rate = 1600 * 1300 * 16 * 60 = 1996800000 bits per second = 1.859Gbps

Padding data to 16 bit will make use of a 16 bit interface, and as the max interface frequency is 100MHz, the maximum possible data rate will be:

Max possible data rate = 16bits*100MHz = 1600Mbps = 1.6Gbps

As the calculated data rate is greater than the max possible data rate, streaming this video by padding the incoming data would not be possible. So, please refer to the following KBA and pack the incoming data to 16 bits:

https://community.infineon.com/t5/Knowledge-Base-Articles/Streaming-RAW10-Format-Input-Data-to-16-24...

Best Regards,
Jayakrishna
0 Likes