cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

Contributor

Dear Sir,

I had added HID interface(standard key board type) to my UVC code,and it works fine!

And then I add vendor request interface,according to Vendor Interface in UVC - KBA218335 ,

both HID and vender request interafce are composite device, I can see CX3-UVC[23] , usb input device[24] and unknown[27] from BUS hound tools,

but after several seconds, all of these devices are dispeared.

I add vendor request desciptor (9 bytes) ONLY in SSconfigdesr(USB3.0 mode),   update the total length and total interface counts. so 4 interfaces (UVC: 2, hid : 1, and vendor request:1)  are configured.  the MARCO HID is defined

2019-07-03 085812.png

The following attached file are USB descriptors and bus hound trace.

It may be something wrong with vendor request code in usb descriptors, can Cypress expert give me some advice?

Thanks.

0 Likes
Reply
1 Solution
Moderator
Moderator

Hi David,

It is expected to add a vendor interface to send vendor commands to a UVC Device. Please let me know the details of driver you are using and changes you made in firmware. Are you facing any problem while doing this?

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
Reply
6 Replies
Contributor

Dear Sir,

I add vendor request descriptor in USBVideoClassBulk project(SDK 1.3.4 included), uvc and this vendor request interface can be found in device manager, and UVC can show video. because of no any vendor request CB , vendor request interface just show in device manager, no real action.

0 Likes
Reply
Contributor

Dear Dir,

The picture is without vendor request, it works fine!!! I found if I add 9 bytes vendor request descriptor in end of SSconfig,update the total length and interface count, my UVC device can not be enumerated at all.

I study usbflashprog project, which is based on vendor request, and also follow Vendor Interface in UVC - KBA218335 , it seem no more code is needed.

I am looking for to Cypress support.

Thanks.批注 2019-07-03 133608.png

0 Likes
Reply
Contributor

Dear Sir,

In fact, I can send Vendor request by control end point 0 by BUS Hound without declaring vendor request in SSconfigdescritor. 

I uncoment UVC_APPLICATION Macro. and

CX3 code recieves this 8 bytes setup command. when I sent c0 76 00 00 00 00 07 00

BUS Hound receive : 31 32 33 34 35 36 37 , they are exactly numbers CX3 return.

  1. #if 1//ndef UVC_APPLICATION
        /*This code is application only when chosen to enumerate as Vendor Class; Usually used for RAW Video streaming*/
    /*To test VENDOR CLASS enumeration of OV5640 Example follow test trocedure: Load the code-> Open Control Center
      * and set maximum 'Packets per Xfer' and 'Xfers to Queue' -> Send Vendor command to Set Resolution 1080p30 (Vendor Req Code = 0x78)
      * -> Send Vendor Command for enabling streaming (Vendor Req Code = 0x76) -> Open CPP Streamer application->
      * choose BULK IN Endpoint and Start transfers-> Check the debug prints (enable ifdef code for PRINT_FRAME_INFO) for frame size received and FPS
      */
        if ((bType == CY_U3P_USB_VENDOR_RQT) && (bTarget == CY_U3P_USB_TARGET_DEVICE))
        {
            /* isHandled needs to be set to True, so that the driver does not stall EP0. */
            isHandled = CyTrue;
            /*For Vendor Class applications, add sensor commands*/
            switch (bRequest)
            {
            case 0x76:
              CyU3PDebugPrint(4,"enable Streaming\n\r");
              //CyU3PUsbAckSetup ();
  2.           ep0Buf[0] = '1';
              ep0Buf[1] = '2';
              ep0Buf[2] = '3';
              ep0Buf[3] = '4';
              ep0Buf[4] = '5';
              ep0Buf[5] = '6';
              ep0Buf[6] = '7';
  3.           status = CyU3PUsbSendEP0Data(7, ep0Buf);
              /*Uncomment below code to test for OV5640*/
              /*CyCx3UvcApplnStart();*/
                break;
            case 0x77:
              CyU3PDebugPrint(4,"disable Streaming\n\r");
              CyU3PUsbAckSetup ();
              /*Uncomment below code to test for OV5640*/
              /*CyCx3UvcApplnStop();*/
             break;
            case 0x78:
              CyU3PDebugPrint(4,"Set Sensor Resolution 1080p30\n\r");
              CyU3PUsbAckSetup ();
              /*Uncomment below code to test for OV5640*/
              /*
                    status = CyU3PMipicsiSetIntfParams (&cfgUvc1080p30NoMclk, CyFalse);
                    if (status != CY_U3P_SUCCESS)
                    {
                        CyU3PDebugPrint (4, "\n\rUSBStpCB:SetIntfParams SS1 Err = 0x%x", status);
                    }
  4.                 CyCx3_ImageSensor_Set_1080p ();
        */
             break;
            }
  5.     }
    #endif

it seem the HOST(WIN10) doesn't block this operation without declaring vendor request interface in CyCx3USBSSConfigDscr[],

Can I use this method to send my vendor comand?  are there any potiential risk by this method?\

Thanks.

批注 2019-07-03 163756.png

0 Likes
Reply
Moderator
Moderator

Hi,

I am a bit confused with the statement "In fact, I can send Vendor request by control end point 0 by BUS Hound without declaring vendor request in SSconfigdescritor."

Can you please elaborate on this. Do you want to send vendor request without setting up the vendor request interface in the descriptor file?

Can you share the code and the descriptor file for the ease of understanding?

Regards,

Rashi

Regards,
Rashi
0 Likes
Reply
Contributor

Dear Sir,

It is real, no any vendor request interafce declared in SSconfigdescritor, I use USB bus hound to send any vender request to CX3, it can be received and responded successfully.

Best

0 Likes
Reply
Moderator
Moderator

Hi David,

It is expected to add a vendor interface to send vendor commands to a UVC Device. Please let me know the details of driver you are using and changes you made in firmware. Are you facing any problem while doing this?

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
Reply