Multiple Thread in GPIF II for DR_data

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

cross mob
lock attach
Attachments are accessible only for community members.
E_521156
Level 4
Level 4
100 sign-ins 50 replies posted 50 sign-ins

Hi,

I am trying to send data from USB to GPIF in Serial mode (Serial interface using GPIF II ) . serial data is going to FPGA. But i have data loss in FPGA.

I think my problem is that there is a gap during buffer change. so I tried to do something like the configuration in UVC example in reversing(FROM FX3 to GPIF II)
I change the state machine for reading from 2 threads in DR_data (The image is attached) and also used multi channel DMA to with 2 consumer sockets (CY_U3P_DMA_TYPE_AUTO_ONE_TO_MANY). But now I get this error: BULK OUT transfer failed with Error Code:997  when i try to send a file which its size is more than DMA_Buff_size.
Should I do any other changes in code? I appreciate if there is any suggestion and help.
Thanks

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

Hello,

Apologies for late reply.

I reproduced the issue at my end.

In the firmware you shared, i found that the configuration for serial out is  0x00001F83,  /*  CY_U3P_PIB_GPIF_SERIAL_OUT_CONFIG */

which is socket zero ( as mentioned in GPIF_SEROUT_THREAD_NUMBER_MASK (bit 3:2) is configured for data sink (from USB to GPIF).

As you are using two sockets (thread) in you firmware, this field should be 0. So that the socket is chosen internally (as per the thread)

So the configuration should be 0x00001F81,  /*  CY_U3P_PIB_GPIF_SERIAL_OUT_CONFIG */

I have tested this at my end. Refer to the results

gpif_serial_thread.PNG

PS: I have changed the DMA buffer size and endpoint size to 1024 (for testing purpose)

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
7 Replies