PC can't get EP0 data

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

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

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
lock attach
Attachments are accessible only for community members.
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

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