cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

Anonymous
Not applicable

 Hi

   

 

   

I send a data from host using the control transfer at Endpoint 0.

   

I use this CyU3PUsbGetEP0Data to read the data. However, when i send again, it give me error.

   

 

   

Is it any problem of this?

0 Likes
2 Replies
arasc_296896
New Contributor

 Hi,

   

Can you brief the context and with which return status it is failing ?

0 Likes
Anonymous
Not applicable

 Hi

   

 

   

See the Attachments

   

 

   

I have 3 devices connected, when i click a button, a vendor command via control transfer will sent to each device.

   

You will see for the first 3 transfer, they are all success. But will i click another button which also another vendor command via control transfer to all device, it cancel out! Then when i click again (click third time), it said "unsuccessful transaction".

   

This is the code in firmware, i put this in "CyBool_t CyFxLEDtestApplnUSBSetupCB" USB setup CB.

   

"else if (bType == CY_U3P_USB_VENDOR_RQT)

   

    {

   

    if (wIndex == 0x22)

   

    {

   

    CyU3PUsbFlushEp(0);

   

    CyU3PUsbGetEP0Data(sizeof (buffer), (uint8_t *)buffer, &readcount);

   

    CyU3PUsbAckSetup ();

   

    isHandled = CyTrue;

   

        }

   

    else if ((wValue == 0x33) && (wIndex == 0x33))

   

    {

   

    CyU3PUsbGetEP0Data(sizeof (buffer), (uint8_t *)buffer, &readcount);

   

    CyU3PUsbAckSetup ();

   

    isHandled = CyTrue;

   

    }

   

    }"

   

 

   

Why I only can successful to send for the first time?

0 Likes