cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

JeCl_4704641
New Contributor

Hello,

I want to implement a SPI communication between the PC (host application) and the FPGA, via the FX3 device. I want to both send and receive data simultaneously. I want to send some commands to the FPGA and be able to get the FPGA’s response.

I am using the UsbSpiRegMode firmware code example, and the functions CyU3PSpiTransmitWords and CyU3PSpiReceiveWords in same SS low/high period, or the function CyU3PSpiTransferWords. With the functions CyU3PUsbSendEP0Data and CyU3PUsbGetEP0Data.

But on the host application (Control Center), the control point can use either Write or Read (Out or In), but not Write/Read at the same time.

On the host application, I can send successfully some data to the FPGA but I am not able to read the data that are coming from the MISO line (FPGA's response).

How can I do both send and receive data simultaneously?

Thank you.

Jean.

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator

Hello Jean,

Please try opening two windows of the control center and try Data transfer IN and OUT through the control endpoint. As you are using the control center there will be some delay (1-2 seconds) when you press for IN OUT transfer on different windows.

- Please let me know if the data which is sent from the host is read back from FPGA via FX3. Is it a loop back application? Is the data from FPGA continuous (like streaming)?

- Please let me know the reason control endpoint for transferring the data. Is it possible for you to use Bulk endpoint?

I have programmed FX3 with bulksrcsink example of the SDK  and tried passing vendor commands for IN and OUT transfers. I am able to read and write. (results attached)

How can I do both send and receive data simultaneously?

>> Please let me know the reason to get the data simultaneously so that I can help you better

Please let me know if any queries

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
2 Replies
Rashi_Vatsa
Moderator
Moderator

Hello Jean,

Please try opening two windows of the control center and try Data transfer IN and OUT through the control endpoint. As you are using the control center there will be some delay (1-2 seconds) when you press for IN OUT transfer on different windows.

- Please let me know if the data which is sent from the host is read back from FPGA via FX3. Is it a loop back application? Is the data from FPGA continuous (like streaming)?

- Please let me know the reason control endpoint for transferring the data. Is it possible for you to use Bulk endpoint?

I have programmed FX3 with bulksrcsink example of the SDK  and tried passing vendor commands for IN and OUT transfers. I am able to read and write. (results attached)

How can I do both send and receive data simultaneously?

>> Please let me know the reason to get the data simultaneously so that I can help you better

Please let me know if any queries

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
Rashi_Vatsa
Moderator
Moderator

Hello Jean,

Please refer to this CyU3PSpiTransferWords() API which supports concurrent SPI transmit and receive operation in register mode. This API is supported by SDK 1.3.4

Regards,

Rashi

Regards,
Rashi
0 Likes