Call CyU3PUsbGetEP0Data function error

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable
        A strange problem , i transfer data to EP0 with CyControl, when CyU3PUsbSendEP0Data is successfull, but CyU3PUsbGetEP0Data is failed, only receive, not transer, why? code: switch (rqt) { case 0xB0: status=CyU3PUsbSendEP0Data (8, (uint8_t *)glEp0Buffer); break; case 0xB1: status=CyU3PUsbGetEP0Data (glEp0BufferLenght,glEp0Buffer,NULL); break;   
0 Likes
5 Replies
LiMa_282146
Level 4
Level 4
First like given

The data buffer has to be a mutiple of 16 bytes, the function will then return the actual number of bytes sent by the host. See the FX3APIGUIDE for more details. In your example what is the buffer length?

   

Sodafarl

0 Likes
Anonymous
Not applicable

What error value do you get in FX3 (not on PC side) in case of the error?

0 Likes
LiMa_282146
Level 4
Level 4
First like given

I think it would be CY_U3P_ERROR_BAD_ARGUMENT.

0 Likes
Anonymous
Not applicable
        I am a Chinese,visit the website of the cypress is very slow,buffer size is 4096 byte   
0 Likes
Anonymous
Not applicable

@Sodafarl - I see no doco (now) that the buffer needs to be a multiple of 16 bytes.

   

There is mention that the buffer should be a multiple of the endpoint size for large reads, but always no more than the host request size

0 Likes