FX3 start and stop streaming and DMA operation

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

cross mob
omco_594686
Level 3
Level 3
Welcome!

Hi,

My application is non-uvc and I'm based on the FW from this post:

FX3 non-uvc camera streamer

I'm using Cypress's streamer as a test tool.. and sending vendor commands with USB Control Center - 0x99 to start steam and 0x88 to stop it.

Everything works great during streaming.. but when I stop and start again I get commit failures..

It looks like it fails to execute CyU3PDmaMultiChannelCommitBuffer (chHandle, (dmaBuffer.count + CY_FX_UVC_MAX_HEADER), 0);

But why? Do I need to reset somehow the DMA components?

How should I manage the start/stop mechanism properly?

Omri.

0 Likes
1 Solution

Hello,

Please try changing the third parameter of the API CyU3PUsbStall inside the vendor command 0x88 to CyFalse. This parameter is required to be set to CyTrue if a CLEAR_FEATURE request is issued by the host. In this case, there is no CLEAR_FEATURE request issued by the host. So, you can keep it as CyFalse itself. Please try this and let me know if you see any improvements.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna

View solution in original post

0 Likes
5 Replies
YatheeshD_36
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

When you send the vendor command to start streaming, please reset the DMA Channel and flush the end point pipe to start a fresh stream.

you can use the following sequence before you start committing the buffers to USB.

CyU3PUsbSetEpNak()

CyU3PUsbFlushEp()

CyU3PDmaMultiChannelReset()

CyU3PDmaMultiChannelSetXfer()

Please let me know what are the functions you are calling when you send the vendor commands 0x99 and 0x88.

Thanks,

Yatheesh

0 Likes

Hi YatheeshK_36​,

Thanks for your reply.

Here's the code I use:

start_stop_steam_01.jpg

It runs from the callback function that I set with CyU3PUsbRegisterSetupCallback

EDIT: It's the same code from FX3 non-uvc camera streamer which I based on.

Omri.

0 Likes

Hello,

Please try changing the third parameter of the API CyU3PUsbStall inside the vendor command 0x88 to CyFalse. This parameter is required to be set to CyTrue if a CLEAR_FEATURE request is issued by the host. In this case, there is no CLEAR_FEATURE request issued by the host. So, you can keep it as CyFalse itself. Please try this and let me know if you see any improvements.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes

Hi Jayakrishna,

Your solution solves the problem.

Thanks.

Omri.

0 Likes

Hello,

Thank you for the update.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna
0 Likes