Create multi DMA channel fail base on USBBulkSourceSink example

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

cross mob
Flute
Level 2
Level 2
10 replies posted First solution authored 25 sign-ins

My code has been uploaded to xuesongshu/ht1: Learn and study CYUSB3014 (github.com)

The third and forth end point defined here:

Flute_0-1656659063812.png

New DMA handle:

Flute_1-1656659228802.png

And configured in CyFxBulkSrcSinkApplnStart function:

Flute_2-1656659334650.png

But it always failed with code 64(CY_U3P_ERROR_BAD_ARGUMENT). I don't know which config is bad. Please point out. Thank you.

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello Flute,

Please let me know how is the GPU interfaced with FX3. IS it through GPIF II Interface?

If yes, you would need to add a GPIF II state machine in the firmware to sample the data from GPIF II interface. Also, if all the 4 channels are need to communicate with the GPU over GPIF interface. the DMA channels need to be created from GPIF (PIB sockets) to USB ( UIB sockets)

It seems that you are interfacing GPU  for image/video transfer over FX3. In that case, please refer to the AN75779, AN65974 firmware for your reference EZ-USB™ FX3 SuperSpeed USB 3.0 peripheral controller - Infineon ...

Regards,
Rashi

View solution in original post

0 Likes
5 Replies
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

From the snippets shared, the DMA channel with a consumer as UIB CONS socket cannot be MANUAL IN channel (it should be MANUAL (CY_U3P_DMA_TYPE_MANUAL) channel). A MANUAL IN channel is always created with Consumer socket as CPU socket as done for glchhandleBulkSrcSink.

Please refer to FX3 TRM for more information on DMA channels

Regards,
Rashi
0 Likes

Hello Rashi,

I have read FX3_TRM.pdf but I still fill puzzled. For USBBulkSourceSink, which model should I select ? How to create third and forth channel ?

Flute_0-1656663303326.png

Regards,
Flute

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please help me to understand your application. How many DMA channels do you need and between which block of FX3.

Sorry, I am not able to understand your question on GPIF II Designer. Please let us know your application to help you better

Regards,
Rashi
0 Likes

Hello Rashi,

I need four DMA channels currently. Each pair of channels corresponds to a service function, for example, GPU command, GPU image, and so on.  

I'm developing a video monitor system. The equipment is hung on the high point of a building. The device is equipped with a telephoto lens. We need to judge whether the accident occurs when the camera is in a wide angle. When GPU judges that a traffic accident occurs, the equipment automatically adjusts the direction and focal length of the lens and alarms the superior system.

Please tell me whether I need to use GPIF designer II and whether there is a way to open more DMA channels only with code. If I have to use this software, please tell me how to use it step by step.

Regards,
Flute

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello Flute,

Please let me know how is the GPU interfaced with FX3. IS it through GPIF II Interface?

If yes, you would need to add a GPIF II state machine in the firmware to sample the data from GPIF II interface. Also, if all the 4 channels are need to communicate with the GPU over GPIF interface. the DMA channels need to be created from GPIF (PIB sockets) to USB ( UIB sockets)

It seems that you are interfacing GPU  for image/video transfer over FX3. In that case, please refer to the AN75779, AN65974 firmware for your reference EZ-USB™ FX3 SuperSpeed USB 3.0 peripheral controller - Infineon ...

Regards,
Rashi
0 Likes