Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Silicon Labs] Add support for USBDevice #1287

Merged
merged 9 commits into from Aug 13, 2015

Commits on Jul 28, 2015

  1. Silicon Labs USB device support

    ** Overview
    
    This commit provides USB device-mode drivers for Silicon Labs chips.
    The code is based on the SiLabs USB driver that is part of the
    Simplicity dev environment.
    
    Because Mbed USBDevice class wants to control the USB transactions
    itself, large parts of the higher level code originally present in the
    driver have been stripped out. An attempt has been made to keep Mbed
    code separate enough that patches can be applied with minor effort, if
    needed.
    
    ** Use of dynamic memory
    
    Due to requirements imposed by the USB hardware, the driver needs read
    and write buffers for every enabled endpoint. Since information on
    what EPs will be used is only available during runtime, dynamic memory
    allocation is used to minimize memory usage.
    
    If needed, dynamic memory use can be disabled via a flag in
    usbconfig.h. In this case, please read the documentation to see what
    limitations this imposes. Static memory usage can also be reduced by
    limiting the maximum number of active endpoints - see configuration in
    usbconfig.h and USBEndpoints_EFM32.h.
    
    ** Power management
    
    Driver supports the new SiLabs functionality in Mbed sleep(). Normal
    sleep (EM1) is always available, and deep sleep (EM2) is available
    when USB is either disconnected or suspended. How and when different
    sleep modes are made possible can be configured in usbconfig.h
    
    ** Supported hardware
    
    Current release officially supports, and has only been tested on Giant
    Gecko. Upcoming releases will add support for other SiLabs platforms
    on Mbed.
    mpolojar committed Jul 28, 2015
    Configuration menu
    Copy the full SHA
    8054366 View commit details
    Browse the repository at this point in the history
  2. Silicon Labs USB device support - Wonder, Leopard, Happy

    USB device support for Wonder, Leopard and Happy Gecko. See
    details on configuration etc on the previous commit.
    
    Known issue: USBAudio does not work reliably on Happy Gecko.
    mpolojar committed Jul 28, 2015
    Configuration menu
    Copy the full SHA
    957d7bd View commit details
    Browse the repository at this point in the history
  3. SiL USB: Update copyrights and licence boilerplate

    Everything should be copyrighted to SiLabs, and licensed
    under Apache 2.0.
    mpolojar committed Jul 28, 2015
    Configuration menu
    Copy the full SHA
    3eaef2e View commit details
    Browse the repository at this point in the history
  4. SiL USB: Remove incorrect Zero Gecko flagging

    Zero Gecko has no USB support, so don't even try to compile for it.
    mpolojar committed Jul 28, 2015
    Configuration menu
    Copy the full SHA
    1eb719b View commit details
    Browse the repository at this point in the history
  5. SiL USB: Correctly handle ep0 reset on Happy

    Use correct function when resetting endpoint 0 (on stall etc)
    on Happy Gecko.
    mpolojar committed Jul 28, 2015
    Configuration menu
    Copy the full SHA
    088e451 View commit details
    Browse the repository at this point in the history
  6. Update USBEndpoints.h

    No USB in Zero Gecko so removed also from here for the sake of clarity.
    amveeq authored and mpolojar committed Jul 28, 2015
    Configuration menu
    Copy the full SHA
    1620432 View commit details
    Browse the repository at this point in the history
  7. SiL USB: Fix endpoint definitions for Happy Gecko

    Happy only has 3 endpoints, so flag out the rest.
    mpolojar committed Jul 28, 2015
    Configuration menu
    Copy the full SHA
    549d2b9 View commit details
    Browse the repository at this point in the history
  8. SiL USB: Disable LEM in Happy with ISOC endpoints

    Happy Gecko's USB Low Energy Mode does not work properly with
    isochronous endpoints.
    
    Note that Happy Gecko errata USB_E112 states:
    
      Do not use the SUSPEND mode of LEMOSCCTRL in USB_CTRL.
    
      In rare cases with high data throughput, a transmission can
      fail when this mode is enabled.
    
      Use the GATED mode of LEMOSCCTRL for the best energy
      efficiency. The NONE mode can be used to disable energy
      savings
    
    However, even using GATE mode causes problems for high-frequency
    isochronous transfers. The primary effect for OUT endpoints is that
    the first read will succeed, and the following one (targetting the
    next frame) will fail with zero bytes incoming data, and PKTDRPSTS
    is set in the related interrupt status register.
    
    Disabling LEMOSCCTRL (set to NONE) solves the problem. Since this
    will cause increased energy usage, do this only when an ISOC endpoint
    is added.
    mpolojar committed Jul 28, 2015
    Configuration menu
    Copy the full SHA
    511b46d View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2015

  1. Configuration menu
    Copy the full SHA
    cd01871 View commit details
    Browse the repository at this point in the history