3 Replies Latest reply on Aug 23, 2018 8:02 PM by axel.lin_1746341

    USB host custom class (dpump) on CYW54907

    gpeyton_2923021

      I am trying to implement a USB 2.0 host for a custom class on a CYW54907 wireless SoC (CYW943907AEVAL1F dev board). I would like to connect the host to a custom class on a USB device running on an FX3 module (CYUSB3KIT-003 EZ-USB® FX3™ SuperSpeed Explorer Kit).

       

      I am using USBX dpump to create a custom class on the host (see attached code). I also added dpump to the event handler in wiced_usb.c (attached). On the FX3 device, I am running the default BulkLoopAutoCpp example. I have also tried running the MouseDemo on FX3.

       

      I cannot get the custom DPUMP class to work. I notice that when I plug the device in, the event callback function (wiced_usb_host_usbx_host_evt_callback) in wiced_usb.c does not trigger. I suspect the reason is that the UX_HOST_CLASS class instance NULL? I get the same result when I test with default USBBulkSourceSinkLED example on FX3 (the LED doesn't even light up). Here is the terminal debug terminal output from this test:

       

      +-------------------------------------------------+

      + USB20 Host DPUMP Custom Class Application       +

      +-------------------------------------------------+

      > USB20 Host init starting...

      Detected board strapping is in USB-PHY mode!!

      Detected board is in USB Host mode!!

      USB Host support 2 HCI resource

      USB20 Host init completed!!!

       

      #UX#: Device:

      . State: 1

      . Address: 1

      . HCD name: ux_hcd_ehci

      . Class name: (null)

      . Speed: 2 (HIGH)

      . Port Index: 0

      . Max Power: 250

       

      loopback

       

      +++START: DPUMP custom class loopback started

       

      *** Please input any key from your terminal program ***

       

      DPUMP == NULL

      ---END: DPUMP test

       

       

      I also checked the MouseDemo with the same host – it enumerates as an HID device, and successfully executes the event callback function (see red). (It also prints data successfully when run with hid_keyboard host app). Here is the terminal output:

       

      +-------------------------------------------------+

      + USB20 Host DPUMP Custom Class Application       +

      +-------------------------------------------------+

      > USB20 Host init starting...

      Detected board strapping is in USB-PHY mode!!

      Detected board is in USB Host mode!!

      USB Host support 2 HCI resource

      USB20 Host init completed!!!

       

      Entering event call

      #UX#HostClassHid#: event UX_DEVICE_INSERTION

      #UX#HostClassHid#: Found Keyboard HID Class device

       

      RETURN TO MAIN APP EVENT HANDLER------------------- (1)

      USB20 Host: event (1)

      USB20 Host: unknown event (1)

       

      #UX#: Device:

      . State: 3

      . Address: 1

      . HCD name: ux_hcd_ohci

      . Class name: (null)

      . Speed: 0 (LOW)

      . Port Index: 0

      . Max Power: 250

       

      Could you please assist me in getting a custom class to work?

       

      Many thanks in advance.

       

       

      riyamifohsoleimani_2959646 anyu