cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

New Contributor

I have the CX3 streaming 2720x2080@14.4 fps data as a UVC device.  The code was generated using a CX3 configuration project.

The source data is 10-bit raw monochrome data, so I would like to enable the CX3 streaming endpoint.

I have commented out

/* #define UVC_APPLICATION */

from uvc.h and the device now shows up as 'Cypress FX3 USB StreamerExample Device'

however, when I try to send vendor command 0x76, I receive the following error:

pastedImage_3.png

Additionally, the streamer app only shows errors when I try to read from the device.

Can you provide any insight as to what I might be doing wrong?

Thanks!

0 Likes
Reply
1 Solution
Moderator
Moderator

Hi Carsten,

You are getting commit Buffer failures. Please start the Streamer app first and then send the control commands via control center. I suspect that streaming has started but the host is not consuming the data.

Thanks & Regards
Abhinav Garg

View solution in original post

0 Likes
Reply
6 Replies
Moderator
Moderator

Hi,

Please let us know which firmware did you choose for testing.

If it is not in the FX3 SDK examples, can you please attach the same here?

Since the device came up in control center, the device descriptor has the device class mentioned as 'Vendor'.

From your post it is clear that device is not giving the data. So now we have to confirm whether FX3 is getting the image data from the image sensor. Can you use UART log to confirm the same? See if PRINT_FRAME_INFO is enabled in your firmware. The idea is that - In the for loop of CyCx3UvcAppThread_Entry, there is a debug print to indicate the streaming statistics. See if that is enabled.

See if there are any errors indicated in the debug print.

Regards,

Hemanth

Hemanth
0 Likes
Reply
New Contributor

We are using the CX3 configuration project defaults.  We have PRINT_FRAME_INFO enabled.

Here is the log when we send vendor code 0x78 to initialize the sensor and 0x76 to start data streaming:

AppInit:GpifSMStart passed

bRType = 0xC0, bRequest = 0xA0, wValue = 0xE600, wIndex = 0x0, wLength= 0x1

bRType = 0x40, bRequest = 0x78, wValue = 0x0, wIndex = 0x0, wLength= 0x200

Set Sensor Resolution 1080p30

bRType = 0x40, bRequest = 0x76, wValue = 0x0, wIndex = 0x0, wLength= 0x200

enable Streaming

AplnStrt:SMState = 0x2

CB failure

AplnStop:SMState = 0x5

AplnStrt:SMState = 0x1

CB failure

AplnStop:SMState = 0x5

AplnStrt:SMState = 0x1

the above 3 lines repeat indefinitely.

Carsten

0 Likes
Reply
New Contributor

In cycx3_uvc.c,

status = CyU3PDmaMultiChannelCommitBuffer (chHandle, (dmaBuffer.count), 0);

in function

CyCx3UvcAppDmaCallback

is returning

CY_U3P_ERROR_INVALID_SEQUENCE

Carsten

0 Likes
Reply
Moderator
Moderator

Hi Carsten,

The resolution is set to 1080p30 as indicated by the Debug log "Set Sensor Resolution 1080p30". But your sensor is streaming 2720x2080@14.4 fps (as mentioned by you in the first post). Could you please share the project.

Also I would like to suggest you to use CX3 default example "cycx3_uvc_ov5640" that comes along with the SDK at the following location:

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\cx3_examples\cycx3_uvc_ov5640

Thanks & Regards

Abhinav Garg

0 Likes
Reply
New Contributor

The "Set Sensor Resolution 1080p30" is the default debug print from your sample application, the actual framerate does not change from 2880x2080 @ 14.6fps.

I've uploaded all code minus the register writes to the image sensor, which are under NDA and cannot be publicly shared.  I can provide them directly to cypress if that will help.

Link: raw_stream.zip - Google Drive

One last oddity - cypress control center returns:

CONTROL OUT transfer

CONTROL OUT transfer failed with Error Code:997

however, the debug log from the CX3 indicates it received the message.

The example firmware in cyx3_uvc_ov5640 does not have a bulk transfer mode, only UVC mode.  If you have other code showing how to bridge MIPI data to a CX3 bulk endpoint that would be very helpful.

Carsten

0 Likes
Reply
Moderator
Moderator

Hi Carsten,

You are getting commit Buffer failures. Please start the Streamer app first and then send the control commands via control center. I suspect that streaming has started but the host is not consuming the data.

Thanks & Regards
Abhinav Garg

View solution in original post

0 Likes
Reply