unplug usb cause waitforxfer error, how to reconnect the usb when error occur

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

cross mob
qiqic_2594061
Level 1
Level 1

like the official example (cypress\EZ-USB FX3 SDK\1.3\application\c_sharp\streamer),i use the BulkEndPoint (begindataxfer waitforxfer finishdataxfer mode)  and set the ppk(2) ,queues(16)  can receive data perfectly,but when i unplug the usb that connected with the PC,my program failed in waitforxfer() ,my program cannot run the code bellow the red mark.

pastedImage_0.png

someone know how to fix the problem? when error occur above ,how can i renum && reconnect the usb device for continue my data receiving.

0 Likes
3 Replies
Roy_Liu
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 10 questions asked

Please check if this helpful - BeginDataXfer / WaitForXfer behaviour

Roy Liu
0 Likes

hi yliu

can you speek Chinese?  hahaha

for your link above,

①  my code is accomplished by reference the official code as mentioned above,

②  when use official tools (streamer) ,for the beginning it works well(just  receiving datas from FPGA ) while unplug the usb and reconnected with my pc error occured ,just like the error that showed above, having no reaction ,and i cannot open the control center and streamer but i can find it in Task manager(background process)

13.png14.png

so the problem is how to contine my datas receiving when i unplug my usb and replug it with my pc , how can i detect the errors when i use begindataxfer / waitforxfer / finishdataxfer in a loop, if i can detect the error ,i can reEnum the usb device and reconnecte it ,it just the problem confused me.

0 Likes
YiZ_31
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hi,

我用FX3 SDK 1.3.4 版本中的C++ streamer没有发现这个问题。如果传输过程中拔掉的话会出现如图所示的错误,再插上即可继续数据传输。20190102145747.png

0 Likes