- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, We having trouble to receive frame when send two Frame Request two endpoint simultaneously. We are using window10 64x, CyAPI library.
I am connecting HX3PD EVP board to two FX3
DS4 to FX3_1
DS5 to FX3_2
we set device count 1, endpoint1 to be FX3_1
then device count 2, endpoint2 to be FX3_2
1.) The code below Works, however this is not our use case. We are required to send two Frame request from two different endpoint then only received two data from two different endpoint
Send first frame request using endpoint1 then receive using endpoint1
Send 2nd frame request using endpoint2 then receive using endpoint2
succeedsendA = true
succeedsendB = true
succeedReceivedA = true
succeedReceivedB = true
2.) Our Actual use case: The code below result be
succeedsendA = true
succeedsendB = true
succeedReceivedA = true
succeedReceivedB = false
3.) The code below result be
succeedsendA = true
succeedsendB = true
succeedReceivedA = true
succeedReceivedB = false
We tried with different combination, it always result "endPointX->XferData(VideobufferX[currentFrame], rLenX)" will only succeed get data if it is placed before ControlEndPointExecuteCommand();
May i know how can i send two Frame request with endpoint1 and endpoint2 then only receive the data of either endpoint1 and endpoint2 simultaneously?
Thanks
Attached the ControlEndPointExecuteCommand() as reference
Solved! Go to Solution.
- Tags:
- hx3pd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
If xferdata is used one after the other, then you will not be able to perform simultaneous data transfers.
Instead, you can try to create 2 threads in your host application. And then call xferdata for each device in individual threads. We currently do not have any reference examples to share. But, you can test this approach and let us know if it helps.
Jayakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Can you please let me know why you want to use "endPointX->XferData(VideobufferX[currentFrame], rLenX)" after ControlEndPointExecuteCommand()?
This is because, from the definition of ControlEndPointExecuteCommand(), I understood that it is just a vendor command that transmits zero byte to the device (it could be a command to initiate or terminate the data transfer). Then, you can perform the data transfer soon after ControlEndPointExecuteCommand() is called for a particular device as you have done in the first case. This can be followed by the same sequence for the second device. Please let me know why this option is not the one of interest for you.
Also, what exactly is rLenx?
In addition to this, can you please connect both the FX3 devices to 2 different USB ports on the same PC and check if the same issue occurs with this setup too? This will help us to understand if the problem is related to HX3PD or not.
Jayakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
rlens is our expected frame size which is 4096x2304x2
endPoint->XferData(Videobuffer1[currentFrame], rLen, 0)
we also monitor the return bytes from rLens after getting
This is our working FX3 code for this potion:
The reason why we doing two Frame request at same time is because want to utilize the HX3PD 10Gbps speed/bandwith. Since FX3 only support 5Gbps, so two FX3 return the frame should be can fully utilize HX3PD (5Gbps+5Gbps = 10Gbps).
Do let us know if our testing method is invalid?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
xferdata () is a blocking API. It will return only if the intended amount of data is received/short packet is received/an error occurred. So, you will not be able to read simultaneously from 2 FX3 devices by using 2 xferdata () calls one after the other.
Jayakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Jayakrishna,
Thanks for your clarification, is there other way to read simultaneously from 2 FX3 devices by using 2 xferdata () calls one after the other?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
we would like to test this theory based on this description,
https://community.infineon.com/t5/USB-superspeed-peripherals/Multiple-FX3-into-Gen2-HUB/m-p/185253
so setting two Frame request at same time and receiving both frame at same time is our assumption to test this out.
Let us know if the assumption is correct?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
If xferdata is used one after the other, then you will not be able to perform simultaneous data transfers.
Instead, you can try to create 2 threads in your host application. And then call xferdata for each device in individual threads. We currently do not have any reference examples to share. But, you can test this approach and let us know if it helps.
Jayakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jayakrishna,
Just tested your suggestion and it did working. just use the std::thread will do. then t1.join() wait the thread end.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
We are glad to hear that our suggestion helped to meet your requirement.
Jayakrishna