Commit Graph

2974 Commits (af10bee3f7958c6980c38d744ba927fdfcce5e3d)

Author SHA1 Message Date
0xc0170 0d637743c7 mbed lib revision - 105 2015-08-18 14:45:36 +01:00
Martin Kojtal 1c2263fbc7 Merge pull request #1288 from BlackstoneEngineering/BLoDFix
ST BLoD Fix
2015-08-18 08:01:01 +01:00
Martin Kojtal 6d84db41c6 Merge pull request #1289 from bcostm/dev_DISCO_F746NG
DISCO_F746NG - Improvements
2015-08-14 13:13:40 +01:00
Martin Kojtal b28ce2b780 Merge pull request #1277 from modtronix-com/master
Changed NZ32-SC151 external oscillator to 16MHz, and moved defines to device.h
2015-08-14 12:43:02 +01:00
David H 57463eaef0 Merge pull request #5 from mbedmicro/master
Update my fork with original
2015-08-14 13:25:26 +10:00
modtronix-com 160d4bccf7 Cosmetic changes
Cosmetic change to reduce number of diffs showing up in pull request
2015-08-14 12:06:13 +10:00
modtronix-com 16327ce210 Added place for adding mbed and HAL defines
Added place for adding mbed and HAL defines
2015-08-14 11:53:45 +10:00
modtronix-com ccecacc129 Moved "stm32l1xx_hal_conf.h" to project folder.
Moved "stm32l1xx_hal_conf.h" to target folder. This file is part of
STM32CubeL1, and this is the way it is done for the 95 examples supplied
with STM32CubeL1. This file should be part of project(target) folder,
not API. On mbed, this has been done for TARGET_STM32F4 and
TARGET_STM32F7 targets (in ../targets/cmsis/TARGET_STM folder). All
targets in these two folders already have the "stm32l1xx_hal_conf.h"
file in the target folder.
2015-08-14 10:53:11 +10:00
Steven Cooreman 62d9adfb42 In certain cases, the clock setting did not select HFXO, even though HFXO was requested in the board header.
Root cause: you cannot use a C-enum name in a #if compare, becaudse the preprocessor will replace all enum names with 0 (so all checks on HFXO/LFXO checked out regardless of the define).
2015-08-13 17:35:40 +02:00
Martin Kojtal 376d6a73e3 Merge pull request #1287 from stevew817/usb-device-rel3
Silicon Labs - Add support for USBDevice
2015-08-13 15:39:43 +01:00
Martin Kojtal bd9a168505 Merge pull request #1273 from marcusbirkin/master
KL46Z - Ensure the NVIC table gets copied to RAM even when it is not at 0x0000
2015-08-13 11:43:33 +01:00
Martin Kojtal 163a66abdd Merge pull request #1268 from martin2100/patch-1
STMF4 - pwmout_api.c freq fix
2015-08-13 11:21:23 +01:00
Martin Kojtal bc07f838f8 Merge pull request #1286 from devanlai/master
LPC15XX - Fix GPIO port word pin registers offset
2015-08-13 11:19:31 +01:00
Martin Kojtal 59ff23cdaf Merge pull request #1290 from BlackstoneEngineering/BLoDFix_SiLabs
Blue Lights of Death fix for Silicon Labs boards
2015-08-13 10:56:41 +01:00
Martin Kojtal 52618298c3 Merge pull request #1285 from masaohamanaka/master
RZ_A1H - Add RZ_A1H in RPC. Modify communication problem of Ethernet.
2015-08-13 10:33:27 +01:00
Martin Kojtal 88ef2fe48f Merge pull request #1283 from kgills/pwm_fix
[MAXWSNENV, MAX32600MBED] Simplifying pwm search. Reordering PinMap_PWM.
2015-08-13 10:27:02 +01:00
Martin Kojtal cc42528dbc Merge pull request #1281 from jpbrucker/fix_us_ticker
Nordic: handle unwanted RTC interrupts
2015-08-13 10:21:57 +01:00
Martin Kojtal 99877b836d Merge pull request #1276 from jpbrucker/nrf51_clock_fallback
Nordic: fallback to the internal LF clock in case Xtal doesn't start
2015-08-13 10:17:26 +01:00
Martin Kojtal ab6a668ec1 Merge pull request #1227 from neilt6/master
FATFileSystem - Updated FatFs to R0.11
2015-08-13 10:09:43 +01:00
Jun-Ru Chang 680a647d0d Fix compilation warning
The warning message is shown as below.

Compile: Thread.cpp
[Warning] Thread.cpp@45: In constructor 'rtos::Thread::Thread(void (*)(const void*), void*, osPriority, uint32_t, unsigned char*)':
  comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Jun-Ru Chang <jrjang@gmail.com>
2015-08-13 00:07:29 +08:00
Austin Blackstone 0278260cad added BLoD functionality to all Silicon Labs boards. Added #define to all device.h files and a disable_irq() exception in common/board.c because the wait function is implemented in a interrupt for both NRF and SiLabs boards 2015-08-11 11:32:11 -05:00
bcostm 2b1b1acce6 Improvement of timer initialization for pwmout 2015-08-11 14:42:15 +02:00
bcostm 8f6a11530c Change SERIAL_TX/RX value 2015-08-11 14:38:03 +02:00
bcostm 8b76967c29 Improvement of ticker configuration 2015-08-11 14:34:06 +02:00
bcostm 408927ec5a [DISCO_F746NG] Update cmsis files (alignment with STM32CubeF7 package) 2015-08-11 12:16:52 +02:00
bcostm 03bd5dbd8f [DISCO_F746NG] Update STM32CubeF7 to V1.0.1 2015-08-11 12:04:45 +02:00
Austin Blackstone 1f93de49b6 added Blue Lights of Death action to ST Nucleo and Diso boards 2015-08-10 16:54:50 -05:00
Devan Lai 37c71434dd [LPC15XX] Fix GPIO port word pin registers offset
Adjust offset for GPIO port word pin registers from 0x100 to 0x1000
2015-08-07 22:32:57 -07:00
bcostm a1bd132fc1 Merge branch 'master' of https://github.com/mbedmicro/mbed 2015-08-07 11:54:06 +02:00
tomoyuki yamanaka 746ba018c0 Modify communication problem of Ethernet.
In Ethernet, modify a problem that sometimes fail to "pbuf_alloc" function.
2015-08-07 16:33:04 +09:00
tomoyuki yamanaka bb4d569cfd Add RZ_A1H in RPC. 2015-08-07 16:20:22 +09:00
Kevin Gillespie e3482229e0 Simplifying pwm search. Reordering PinMap_PWM. 2015-08-05 12:57:07 -05:00
0xc0170 020975119c mbed lib revision - 104 2015-08-05 14:19:47 +01:00
Jean-Philippe Brucker 15019ef882 Nordic: fallback to the internal LF clock in case Xtal doesn't start
Since some Nordic platforms don't use an external clock source, they
need to be built with the TARGET_NRF_LFCLK_RC flag. If they don't,
SystemInit will wait indefinitely for an external clock to start.

This patch adds a 1s timeout to the external oscillator initialisation,
and falls back to using the internal RC one if no LFCLKSTARTED event was
received in this interval.

For most applications, this won't matter. When building for the wrong
Nordic target, pin numbers will be mixed up as well and the application
will break later on.
But on targets that can only be updated using FOTA and don't have an
interface chip, this patch avoid ending up with a bricked device after a
slight mistake. Indeed, BLE DFU service is portable across all boards
and will run even with a mixed-up target setup, allowing the user to
re-install the right application.

An example scenario is transferring an application on a standalone
NRF51 chip, after spending some time prototyping on an mKIT, which tends
to happen a bit too often...

Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
2015-08-05 10:57:57 +01:00
Jean-Philippe Brucker 1c90449f35 Nordic: handle unwanted RTC interrupts
This patch clears the EVENT_COMPARE register even when we're not
expecting to get a COMPARE interrupt.

Here is a scenario where we get an unwelcome interrupt, and where it
currently results in a deadlock:

* A Ticker T1 runs at 500ms
* Its handler registers a Timeout T2 at 20µs. Since LF clock runs at
  32.768kHz, this will be rounded up to a multiple of 30.5µs (actually
  61µs, to ensure we're in the next tick window)

           T1  T2                                T1' T2'
    -------|---|---------------------------------|---|--------->
           :   :                                 :
           <---> n * 30.5µs                      :
           <--------------- 500ms --------------->

* When the ticker API handles T1, it calls us_ticker_set_interrupt a
  first time for T1', and then for registering T2.
* Since T2 period is less than one RTC tick (30.5µs), there is a high
  chance it will go past *while* we're still in this first handler.
* So ticker_irq_handler also handles T2 as well, and removes it from the
  queue.
* us_ticker_set_interrupt is called for T1' before returning from
  ticker_irq_handler

The problem resides in the fact that us_ticker_set_interrupt takes more
than 2 RTC ticks to execute: while inside the handler, T2 interrupt will
fire.

* Because of this pending interrupt, RTC1_IRQHandler will be called
  right away, but since we removed T2 from the queue, the handler is
  waiting for T1' instead, and will not clear EVENT_COMPARE until we
  reach the T1' tick, in about 500ms.
* This results in a lock and main isn't executed anymore.

With this patch, we avoid being stuck in RTC1_IRQHandler while waiting
for T1'.

Note: even when T2 isn't handled in the same loop as T1, we may get a
spurious interrupt, because us_ticker_set_interrupt will be called twice
for T2... and will register T2+m the second time, while T2 interrupt is
fired in the background.
That case isn't as harmful, since RTC1_IRQHandler will be waiting for
T2+m, which is only one or two ticks further, and then it won't be
called again before T1'.

Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
2015-08-05 10:39:29 +01:00
modtronix-com 25144420ab Changed External oscillator to 16MHz, moved defined to device.h
For NZ32-SC151 fixed External oscillator frquency to 16MHz, and, moved
defined to device.h
2015-08-04 12:35:23 +10:00
Martin Kojtal 9d276ebad7 Merge pull request #1265 from Wiznet/mbed_dev4
Wiznet - I2c -> gpio
2015-07-31 14:52:52 +01:00
Martin Kojtal e4cd8bbd3e Merge pull request #1266 from alexbeer2048/master
Enable LPC8xx usart when configuring it
2015-07-31 14:12:58 +01:00
Martin Kojtal 5b1dc60c03 Merge pull request #1271 from kgills/pwm_fix
MAXWSNENV, MAX32600MBED - Fixing pwm array search.
2015-07-31 13:57:26 +01:00
Jay Francis 2cb58075f7 Removed PB6 debug toggling 2015-07-29 11:42:58 -04:00
Kevin Gillespie db8697c321 [MAXWSNENV, MAX32600MBED] Fixing pwm array search. 2015-07-28 13:55:22 -05: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
bcostm 0f35f53699 [DISCO_L476VG] Add hal specific files 2015-07-28 10:23:26 +02:00