Commit Graph

112 Commits (765aeb0dc6c67c798358ca4c5b465d1f7f1ef6c4)

Author SHA1 Message Date
Jeremy Brodt b18141343d [MAX32620HSP] Replaced tab with spaces. 2016-08-25 15:15:50 -05:00
Jeremy Brodt 67b556b648 [MAX32620HSP] Added Deep Sleep support with USB. 2016-08-24 16:33:47 -05:00
Jeremy Brodt b9b6d30659 [MAX32620HSP] Initial release. 2016-08-24 16:33:47 -05:00
Mahadevan Mahesh fef9bc3961 USB support for KL27
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2016-05-02 14:52:31 -05:00
mbedNoobNinja fa0bf58e3c New mbed platform VK_RZ_A1H 2016-04-26 17:27:39 +03:00
tomoyuki yamanaka 27caef30a4 Support of export function to the IAR.
We modified the following to support the export function to the IAR.
- In tools files, add RZ_A1H to the target of IAR.
- In tools files, add the tmpl files.
2016-02-15 14:49:31 +09:00
Martin Kojtal 6010f32619 Merge pull request #1482 from mjrgh/master
Remove doubling of buffer size in realiseEndpoint()
2016-01-15 07:42:32 +00:00
mjrgh 966bf9577a Remove doubling of buffer size in realiseEndpoint()
realiseEndpoint() was unnecessarily allocating twice the buffer space for each endpoint buffer.  This was presumably for the sake of the hardware SIE's double-buffering (EVEN/ODD) system, but that's vestigial - this implementation doesn't use the double-buffering capability at all, leaving the ODDRST bit in the CTL register always set.  The double-size allocation is a pure waste of memory.
2015-12-24 18:17:58 -08:00
mjrgh bd98d88202 Fix interrupt handler for endpoints > 2
The IRQ handler calculated the endpoint number wrong when handling IN and OUT tokens.  The errant code worked by accident for endpoints 1 and 2 but was incorrect for other addresses.  For endpoints 5 and above it resulted in stray pointer read/writes that could crash the device.
2015-12-24 16:30:46 -08:00
Mikko Polojarvi 511b46de83 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.
2015-07-28 17:22:53 +03:00
Mikko Polojarvi 549d2b9e21 SiL USB: Fix endpoint definitions for Happy Gecko
Happy only has 3 endpoints, so flag out the rest.
2015-07-28 17:22:53 +03:00
amveeq 1620432608 Update USBEndpoints.h
No USB in Zero Gecko so removed also from here for the sake of clarity.
2015-07-28 17:22:53 +03:00
Mikko Polojarvi 088e451b7a SiL USB: Correctly handle ep0 reset on Happy
Use correct function when resetting endpoint 0 (on stall etc)
on Happy Gecko.
2015-07-28 17:22:53 +03:00
Mikko Polojarvi 1eb719bc17 SiL USB: Remove incorrect Zero Gecko flagging
Zero Gecko has no USB support, so don't even try to compile for it.
2015-07-28 17:22:53 +03:00
Mikko Polojarvi 3eaef2e095 SiL USB: Update copyrights and licence boilerplate
Everything should be copyrighted to SiLabs, and licensed
under Apache 2.0.
2015-07-28 17:22:53 +03:00
Mikko Polojarvi 957d7bd942 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.
2015-07-28 17:22:53 +03:00
Mikko Polojarvi 8054366915 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.
2015-07-28 17:22:53 +03:00
Josephc3 720b8f2bc8 Added KL26 Target
Added KL26Z as a target.
2015-06-21 19:03:45 +01:00
Neil Thiessen fca1a1c981 [USBDevice] LPC11UXX suspend status fix
The USB suspend status changed interrupt is now correctly reported.
2015-06-12 14:51:12 -06:00
Martin Kojtal ccd547492b Merge pull request #1161 from porkybrain/master
Fix my overflow bug in CircBuffer
2015-06-08 08:01:09 +01:00
Odin Holmes 6cc142d8b1 used Size+1 insted of size because no c++11 (no constexpr) 2015-06-05 20:04:07 +02:00
Odin Holmes c918e92124 Fixed typeo in CircBuffer.h 2015-06-05 19:59:37 +02:00
Martin Kojtal 6f7f37eec7 Merge pull request #1118 from logost/LPC2460
Introduction of new platform LPC2460 MCU
2015-06-01 10:52:03 +01:00
Jeremy Brodt a6437fb434 [MAX32600MBED] Added USBDevice definitions to eliminate build errors. 2015-05-21 18:36:36 -05:00
KunYi Chen d58da17792 fixed build error on USBDevice library for Target DISCO_F429ZI 2015-05-19 10:55:41 +08:00
Dmitry Bogdanov 035a3b8f56 fix typo 2015-05-18 13:37:41 +04:00
Dmitry Bogdanov 4653da3604 Merge remote-tracking branch 'origin/master' into LPC2460
Conflicts:
	libraries/USBDevice/USBDevice/USBEndpoints.h
	workspace_tools/export_test.py
2015-05-05 21:35:21 +04:00
julbouln 7bb1ea30fe add suspend callback to STM32F4 USBDevice HAL 2015-04-25 17:40:31 +02:00
Martin Kojtal 7c4831f300 Merge pull request #1044 from porkybrain/master
Changed CircBuffer to take its size as a template parameters for efficientcy.
2015-04-23 08:44:13 +01:00
Toyomasa Watarai 5b74eed7da [USBMIDI] Fix compile error
* Member variables in USBMIDIMessage and USBMIDI class wrongly
initialized in class declaration
* Add member initialization in constructor
2015-04-20 14:34:47 +09:00
porkybrain 75732d75fa Merge branch 'master' of https://github.com/porkybrain/mbed 2015-04-17 01:59:18 +02:00
porkybrain 0209929dc4 Merge branch 'master' of https://github.com/mbedmicro/mbed 2015-04-17 01:57:49 +02:00
porkybrain 478aa7ef33 free memory afer disabling the usb ISR solves race condition which could corrupt the heap. (issue #1049) 2015-04-17 01:56:35 +02:00
Odin Holmes c48e5ea445 Update CircBuffer.h 2015-04-16 17:39:18 +02:00
porkybrain cad87d11d4 moved initialization into constructor for compatibility with c++03 2015-04-16 15:57:30 +02:00
Martin Kojtal b675c99d9c Merge pull request #1037 from jeremybrodt/max32600mbed
MAX32600MBED - Adding MAX32600MBED platform.
2015-04-16 11:35:28 +01:00
porkybrain 250ce08712 Changed CircBuffer to take its size as a template parameters. This results in smaller code size and less ram usage because the optimizer knows the size at compile time and it does not need to be stored in ram. It should also be faster because there is no indirection to the heap.
I have not tested this code!
2015-04-15 17:07:40 +02:00
julbouln 8dab8c4751 Added USBMIDI tests + bugfix MIDI OUT 2015-04-14 20:57:56 +02:00
Jeremy Brodt 5ada69b73d [MAX32600MBED] Adding MAX32600MBED platform. 2015-04-14 10:00:23 -05:00
julbouln 20759f0ff9 USBMIDI: SysEx message create helper 2015-04-11 11:22:29 +02:00
julbouln 1793b6a80a USBMIDI: Add SysEx support 2015-04-11 11:17:40 +02:00
Martin Kojtal 158cbeb292 Merge pull request #979 from jeremybrodt/usbcallbacks
USB - Add macros to alias the endpoint callback functions to support configurability
2015-04-08 08:38:31 +02:00
Bogdan Marinescu 251f3f8b55 Merge pull request #991 from masaohamanaka/master
[RZ/A1H]Add some function(USB 2port, NVIC wrapper) and modify some settings(OS, Terminal).
2015-03-31 18:10:46 +03:00
Clement Leger 8d8b485ce7 USBDevice: fix missing defined check for TARGET_F411RE 2015-03-24 10:29:32 +01:00
Masao Hamanaka 281ba38624 Add 2Port function to USBDevice(usb1). 2015-03-23 20:16:41 +09:00
Masao Hamanaka 6c78c36541 Add 2Port function to USBDevice(usb0). 2015-03-23 20:15:42 +09:00
Masao Hamanaka 5b179989c3 Delete some needless USBDevice files to add 2Port function. 2015-03-23 20:07:59 +09:00
Jeremy Brodt bbe2e0caed Using "Data Terminal Ready" signal to determine when the host is connected. 2015-03-17 14:18:56 -05:00
Jeremy Brodt 1bbb0ee109 Added macros to alias the endpoint callback functions to support configurability. 2015-03-17 13:41:40 -05:00
Paul Staron fda34ea4c2 Update USBDevice.cpp
Added Teensy3.1 support
2015-03-07 18:28:13 +00:00