PC can't transfer data with two Cypress devices

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

cross mob
qiko_3575871
Level 3
Level 3

Hello everyone,

I have a problem. Could somebody help me?

I want to transfer data between PC and Cypress device. The operating system is Ubuntu 16.04.

I can send data to Cypress device and  receive response form it. I also need to keep receiveing data from Cypress device.

When I just connect one Cypress device, it works fine. And If there is some problem with transfering data, I will close cypress device by function 'cyusb_close' and open again by function 'cyusb_open'. And I call this as reopen.

But now I need to connect two or more Cypress devices. And I will transfer with them at the same time. So I create two threads. But if I reopen one device to solve some problem, another device will be closed. And sometimes, it will crash when it is transfer data.

I don't know what happens. And I don't know the solution, either.

So  could somebody give me some solutions or some advice.

Thanks in advance!

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

Hi,

As is described in programmers manual, cyusb_close() will close ALL cyusb devices of interest discovered. So, try to use cyusb_reset_device to reset your device instead of closing all devices.


Regards,

Eddie

View solution in original post

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

Hi,

May I know the part number of the Cypress device you are using?

Regards,
Eddie

0 Likes

Hi,

It is CYUSB3014.

Thanks.

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

What demo firmware you are using for this test?

0 Likes

I don't use demo firmware. We design a firmware for our demo.

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

Can you try with our example firmware to see if the same issue will happen?

0 Likes

Thanks.

I don't think the firmware is wrong. I think maybe there is some problems with libcyusb or libusb.

0 Likes

Any update? Thank you.

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

Hi,

As is described in programmers manual, cyusb_close() will close ALL cyusb devices of interest discovered. So, try to use cyusb_reset_device to reset your device instead of closing all devices.


Regards,

Eddie

0 Likes

OK. Thank you very much.

I will try it.

0 Likes