cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

Anonymous
Not applicable

Hi Genius people,

I am new to UVC. I have little bit experience with USB devices. I am using EZ-USB FX3 board (dev kit with a MIPI sensor).

What i am trying is to create 2 separate devices with a YUV 1080p stream from each. I am trying to prototype this and followed the "USBVideoClassBulk.zip" sample code.

(This sample produces the MJPEG stream).

I modified the descriptors to have 4 interfaces with 1 control and 1 streaming interface for each stream. But my device enumeration fails and I get "reset" request from the Windows PC. Can any one help me with some tips and sample descriptors.

I really appreciate all the help and support.

Regards,

Ragini

0 Likes
1 Solution
SrinathS_16
Moderator
Moderator

Hello Ragini,

The Fx2g2UvcDemo example firmware that comes with the FX3 SDK implements streaming hard-coded YUY2 format image data in USB 2.0 mode. I have attached a project file that implements the same in USB 3.0 mode as well so that it can be used in FX3 or FX2G2.

Best regards,

Srinath S

View solution in original post

14 Replies
SrinathS_16
Moderator
Moderator

Hello Ragini,

- Please let know if the device came up on the device manager without any error mark.

- In case there is an error shown up on the device manager, share the screenshot of the same.

- Also, share the descriptor file that you have used in your project.

Kindly, note that FX3 has got one PCLK output that can be used for the GPIF interface. In case you are connecting two image sensors on the GPIF interface, it has to be taken care that both the sensors use the same clock. FX3 does not treat the image sensors as two separate devices, rather it acts as a pass through for the data between the GPIF interface and the USB interface.

Best regards.

Srinath S

0 Likes
Anonymous
Not applicable

Hi Srinath,

Thanks for headsup on the CLK and GPIF interface side. I have not started

yet.

Also, i am trying this in 2 steps. First i like to get one one device with

one streaming, then i try to get 2 devs (/dev/video0 and /dev/video1) with

one stream each.

I am trying to bring-up the YUY2 stream over UVC. For example: 176x144

resolution. As of now I am trying to pass the buffer with "0" as data.

I had a silly error in the descriptor, now i can see the device enumerates

correctly. But I don't see the data transfer when I start the stream. If i

use the default mode (MJPEG stream as default in code example), the

streaming works.

Herein attached the code. Am i making some mistake ?

Regards,

Ragini

VlKh_2251656
Contributor II

You use mgpeg?

very good!

How you configure sensor?

0 Likes
Anonymous
Not applicable

Sample has mjpeg. I am trying to do YUY2 data (just 0 or 0xFF which should give green or megenta frames). I am not using the sensor for now. Hence not doing any additional stuff related to MIPI

0 Likes
VlKh_2251656
Contributor II

I try use ov5640 mjpeg advantades, but not result...

0 Likes
SrinathS_16
Moderator
Moderator

Hello Ragini,

The Fx2g2UvcDemo example firmware that comes with the FX3 SDK implements streaming hard-coded YUY2 format image data in USB 2.0 mode. I have attached a project file that implements the same in USB 3.0 mode as well so that it can be used in FX3 or FX2G2.

Best regards,

Srinath S

View solution in original post

VlKh_2251656
Contributor II

Oh!

It's very good example! Many thanks!

0 Likes
VlKh_2251656
Contributor II

But please, tell me.

It's yuv422 format or yuv simple?

How convert rgb image to this format?

In wich function created frame picture?

Many thanks.

0 Likes
VlKh_2251656
Contributor II

O!

function:

static CyU3PReturnStatus_t UvcAppFillBuffers (CyBool_t updateData)

very good.

0 Likes
VlKh_2251656
Contributor II

But, please, send me, how I find the start of frame.

I don't understand where is frame beginning.

I want show (for simple) static picture, but don't understood how sinchronize with start of frame.

Many thank!

0 Likes
SrinathS_16
Moderator
Moderator

Hello,

Please look for the definition of UvcAddHeader function block in the attached firmware. It contains the addition of proper header information which indicates the host if it is the EOF (End Of Frame). In this example, the EOF is detected based on the bytes of data that is transferred. If the bytes transferred equals the frame size, the EOF field in the UVC header is set.

Best regards,

Srinath S

VlKh_2251656
Contributor II

Many thanks!

Yes, I found.

        // Indicate End of Frame in the buffer

        buffer_p[1] |=  UVC_HEADER_EOF;

0 Likes
VlKh_2251656
Contributor II

But this example also best worked on devboard fx3 superspeed explorer kit 003.

0 Likes
VlKh_2251656
Contributor II

Now I try add SRAM support in example SRAM_FX3...

0 Likes