1 Reply Latest reply on Jul 5, 2020 7:07 AM by YatheeshK_36

    Cypress FX3 power supply negotiation

    PeSc_1220081

      We have been doing some testing wtih the Cypress FX3 3014 USB device enumeration when connected to USB 2.0 ports on a host and on bus-powered hubs.

       

      I have set the high-speed descriptor (CyFxUSBSSConfigDscr) to Bus powered (0x80) drawing 500 mA (0xFA).

       

      The device started and operated successfully on a laptop when connected both to the host port on the laptop, and a bus-powered hub.  My understanding of the USB standard is that a high power device should enumerate at 100 mA on a bus-powered hub.  A request for 500 mA would be denied, and it should fail to fully start up.  We have tried this with three different makes of bus-powered up with the same behaviour each time.

       

      I then set the power supply current descriptor to an illegal value of 0xFF (510 mA request of power request).  The laptop would start this device up from the host port successfully, but all of the bus powered hubs gave a windows error message that it was drawing too much power, and the device would not function, which is expected behaviour.  When this configuratino was tried on a second PC, it gave an error on both the host port and the bus-powered-hub.

       

      1. Why is the FX3 enumerating successfully on various brands of bus-powered-hubs desipite requesting 500 mA of power?
      2. Do I understand correctly that the CY_U3P_EVENT_SETCONF is received from the host when the 500 mA configuration is valid?  Once this is recieved, the higher power device functions can be initialised to draw more than the 100 mA startup current?  From the example code:
      /* This is the callback function to handle the USB events. */
      void
      CyFxSlFifoApplnUSBEventCB (
              CyU3PUsbEventType_t evtype,
              uint16_t            evdata
      )
      {
          switch (evtype)
          {
          case CY_U3P_USB_EVENT_SETCONF:
              /* Stop the application before re-starting. */
              if (glIsApplnActive)
              {
                  CyFxSlFifoApplnStop ();
              }
              /* Start the loop back function. */
              CyFxSlFifoApplnStart ();
              break;
      

       

      I therefore need to put the code in to start up the high power functions just before CyFxSlFifoApplnStart () is executed on line 17.

       

      Many thanks for your assistance.

        • 1. Re: Cypress FX3 power supply negotiation
          YatheeshK_36

          Hello,

           

          The USB 3.0 ports can deliver a power of 4.5W i.e. 5V at 900mA for a high power 3.0 bus power device and 2.5W i.e. 5V at 500mA of current for a high power 2.0 bus powered device.

           

          1. If a 3.0 Hub is used, the device may be capable of drawing upto 500mA from the downstream port of the Hub and hence will be able to successfully enumerate.

           

          Please refer to Section 11.4.5 VBUS Electrical Characteristics from the USB 3.0 spec

           

          2. When power requirement exceeds the maximum the HUB can deliver, it will cancel the host SET CONFIGURATION request. The device will report an INSUFFICIENT_RESOURCE  status.

          I have attached the wireshark capture when a high speed device requests more than 100mA current from a 2.0 HUB.

           

          Thanks,

          Yatheesh