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

USB superspeed peripherals

laden
Level 1
10 sign-ins 5 replies posted 5 sign-ins
Level 1

Hi,i use the fx3 to set a data link between PC and FPGA. On the USB control center,0x01 0x03 0x81 0x83 bulk endpoint serve as data transmission in auto dma mode from GPIF-II to usb(fig-1),endpoint 0 work as command transmission channel。I use function CyU3PUsbSendEP0Data(dataLen,ep0Buf) (fig-2)to send back data ,use the controlendpoint class implementation Read(PUCHAR buf, LONG &len) (fig-3)on PC ,fx3 shows that fx3 ep0 has send the data successfully, but PC get a failure as shown fig-5. Has any invalid operation?HELP me,thx!

laden_0-1627361629544.png

fig-1 (USB CONTROL CENTER )

laden_1-1627363441768.png

fig-2(FX3 SDK EP0 send data code)

laden_2-1627364206185.png

fig-3 (PC reading  ep0 data code)

laden_3-1627364502589.png

fig-4 (fx3 uart print the statue of fx3 ep0 sending)

laden_4-1627364608168.png

fig-5 ( print the status of PC ep0 data reading)

 

 

 

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator 500 solutions authored 1000 replies posted 750 replies posted
Moderator

Hello,

Please find the attached firmware which is tested or the CONTROL IN and OUT transfers

The communication is done using the VENDOR commands

Req Type: VENDOR

Target: Device

Req code: 0x77 - For CONTROL IN  ---   Direction: IN

Req code: 0x76 - CONTROL OUT  --- Direction: OUT

Please find the attached test results and let me know if any query on this.

Regards,
Rashi

View solution in original post

0 Likes
8 Replies
Rashi_Vatsa
Moderator
Moderator 500 solutions authored 1000 replies posted 750 replies posted
Moderator

Hello,

Please let me know if you are able to get the data with the original Control Center Application.

Also, please share the USB traces using Wireshark to check the USB communication with the custom/modified Host application.

Regards,
Rashi
0 Likes
laden
Level 1
10 sign-ins 5 replies posted 5 sign-ins
Level 1

fx3 can get the data from PC ,PC CYAPI implementation was shown as fig-1.Fx3 received the data successfully as shown fig-2.I have not tested over the Wireshark Tool

laden_0-1627376865552.png

fig-1

fx3 can get the data from PC

laden_1-1627376910858.png

fig-2 (fx3 uart print the data from PC)

 

0 Likes
Rashi_Vatsa
Moderator
Moderator 500 solutions authored 1000 replies posted 750 replies posted
Moderator

Hello,

I understand that you are using a custom USB host application and not the USB control Center to read the data from FX3. Is that correct? 

Please let me know if the data is received by USB Control Center application (of the SDK) or is the problem reproducible with default USB control Center application?

Regards,
Rashi
0 Likes
laden
Level 1
10 sign-ins 5 replies posted 5 sign-ins
Level 1

Yes, I'm using CYAPI to develop my own fx3 controller.

USB Control Center  can send data to ep0 successfully (shown as fig-1)

laden_2-1627439490861.png

 

fig-1(USB Control Center  send the 32 bytes data to ep0 )

 

laden_3-1627439534520.png

 

fig-2(fx3 uart print the ep0 data from pc  )

laden_4-1627439613877.png

fig-3(USB Control Center  get the 32 bytes data from ep0 failed )

 

 

 

 

0 Likes
Rashi_Vatsa
Moderator
Moderator 500 solutions authored 1000 replies posted 750 replies posted
Moderator

Hello,

It seems there is some confusion here. In the thread description, I see that VENDOR request is sent to FX3 to receive the data on USB Host but from the control center you are sending standard request. 

Can you please share your firmware for us to check or reproduce the problem at our end? This will help us to debug the issue faster.

Regards,
Rashi
0 Likes
laden
Level 1
10 sign-ins 5 replies posted 5 sign-ins
Level 1

OK  ,thx

 

0 Likes
Rashi_Vatsa
Moderator
Moderator 500 solutions authored 1000 replies posted 750 replies posted
Moderator

Hello,

Please find the attached firmware which is tested or the CONTROL IN and OUT transfers

The communication is done using the VENDOR commands

Req Type: VENDOR

Target: Device

Req code: 0x77 - For CONTROL IN  ---   Direction: IN

Req code: 0x76 - CONTROL OUT  --- Direction: OUT

Please find the attached test results and let me know if any query on this.

Regards,
Rashi
0 Likes
laden
Level 1
10 sign-ins 5 replies posted 5 sign-ins
Level 1

Thank u , ,it's a good solution for my confusion