Commit Graph

11069 Commits (aa6aa82471f719fecbde27ffc834e29d8b39dfb3)

Author SHA1 Message Date
Andreas Larsson aa6aa82471 Rebase of: 2d2f0a0b5c
Added missing bootloader_supported for NUCLEO_F439ZI
2017-06-11 09:48:24 +01:00
Martin Kojtal f3019d37ff mbed sdk boot: fix gcc sw init hook attribute
Remove naked attribute that should not be defined for sw init hook, as it
should return.
2017-06-11 09:48:24 +01:00
Aksel Skauge Mellbye c9b8bee5ad Bugfixes to using bootloader with Series 1 devices. 2017-06-11 09:48:23 +01:00
Aksel Skauge Mellbye 7550f62777 Fix compile warnings and ticker test failure
* Using PinName as bitfield doesn't work without warnings, since NC
  needs all 32 bits to be represented.
* lp_ticker should not be freed when interrupt is disabled, since this
  will kill the timebase.
2017-06-11 09:48:23 +01:00
Vincent Coubard 853cdc0216 rtc_time: Fix incorrect return value when the calendar is not available.
According to the C99 specification "The value (time_t)(-1) is returned if the
calendar time is not available". Before this patch, in such case the function
was returning 0 instead of -1.
2017-06-11 09:48:23 +01:00
Jimmy Brisson 42bfa06b48 Use absolute paths for bootloader binaries 2017-06-11 09:48:23 +01:00
Andrzej Puzdrowski 98bb2472fd change: trng_get_bytes returns at last one random byte. 2017-06-11 09:48:22 +01:00
Andrzej Puzdrowski 75bfbcf056 fix non-blocking mode of TRNG driver improve coding style. 2017-06-11 09:48:22 +01:00
kl-cruz b26fcf489c Fixed length in trng in every mode 2017-06-11 09:48:22 +01:00
kl-cruz 045718c9c2 added trng implementation for nrf52840 2017-06-11 09:48:21 +01:00
Steven Cooreman 80ad824e7d Add behavior to throw away collected entropy on occurrence of a noise alarm. 2017-06-11 09:48:21 +01:00
Steven Cooreman bb2d4e3078 Remove internal test functions 2017-06-11 09:48:21 +01:00
Steven Cooreman 062ae8ceee Update to 4 spaces/tab 2017-06-11 09:48:21 +01:00
Steven Cooreman fcfb7de98d Remove leftover comment about mbedTLS plugin 2017-06-11 09:48:20 +01:00
Steven Cooreman aaac6adaa9 Add TRNG support
Adding support for the TRNG peripheral present on Series 1 Configuration 2 devices.
2017-06-11 09:48:20 +01:00
Vincent Coubard c678ac8f50 mbed_localtime: Add support of year day.
This field is needed by the LPC43XX targets.
2017-06-11 09:48:20 +01:00
Vincent Coubard 89beb69f89 mbed_localtime: Add support of wday.
This field is necessary, it is used by several vendor RTC: Atmel, ST, NUVOTON,
NXP.
2017-06-11 09:48:19 +01:00
Vincent Coubard 45d590669e mbed_mktime: Improve documentation for doxygen. 2017-06-11 09:48:19 +01:00
Sam Grove c5808d5e7a Rename function st_rtc_localtime with _rtc_localtime 2017-06-11 09:48:19 +01:00
Vincent Coubard f9b9bcc343 remove usage of mktime/localtime in favor of dedicated functions.
The use of mktime was causing a fault when called in interrupt handler because on GCC it lock the mutex protecting the environment, To overcome this issue, this patch add dedicated routine to convert a time_t into a tm and vice versa.
In the process mktime has been optimized and is now an order of magnitude faster than the routines present in the C library.
2017-06-11 09:48:18 +01:00
Russ Butler 3931874fb5 Simplify Ameba RTC driver
The Ameba RTC driver converts time_t to
second/minute/hour/day/month/year in rtc_write and back to time_t in
rtc_read. Replace this with an implementation which uses time_t
directly.
2017-06-11 09:48:18 +01:00
Seppo Takalo 4dbb39c24a Fix compilation for NCS36510 RF driver.
RTX porting for this driver was done against the previous API that
have now been reverted.
2017-06-11 09:48:18 +01:00
Laurent MEUNIER bbd0cdb0de STM32 L0: Add Flash API support
This is the introduction of Flash API support for STM32 L0 family.
2017-06-11 09:48:18 +01:00
Laurent MEUNIER ff6029ee3d Update stm32l476rg linker scripts for bootloader
Add MBED_APP_START and MBED_APP_SIZE to the linker scripts
so the start and size of an image can be specified. This allows the
ROM to be split into a bootloader region and an application region.
2017-06-11 09:48:17 +01:00
Laurent MEUNIER 08fb31be3b Rebase of: e51c40c061
Fix vector table

The address of the vector table is hardcoded to the start of flash.
This patch updates make it properly handle updating the VTOR with
a bootloader.
2017-06-11 09:48:17 +01:00
Laurent MEUNIER a80edddf93 Enable bootloader on NUCLEO_L476RG 2017-06-11 09:48:17 +01:00
Jimmy Brisson 121b7f1361 Fix typo in tools code to handle bootloader builds
fixes a regression
2017-06-11 09:48:16 +01:00
Kevin Gilbert deb4c92338 EventQueue.h Doxygen doc fixed up. Moved overloaded callback arguments documentation to overloaded functions to fix warnings. B0..B4 were not documentated additionally, only bulk docs for a0..a4 and c0..c4 were moved around. 2017-06-11 09:48:16 +01:00
Kevin Gilbert 1906f76dd8 Removed Doxygen errors from Event.h - Removed Makefile from branch - Moved a0..a4/c0..c4 parameter documentation from top level overloaded functions to each function to appease Doxygen. - Removed @see Event::Event from overloaded functions as the link did not work and the argument parameter documentation was moved down to each function - TODO: Cleanup EventQueue.h 2017-06-11 09:48:16 +01:00
Seppo Takalo 8d2537ba9c Fix typo that used 16kB for stack.
Intend is to use 2kB for stack, not 16kB, but the divide operand
has been forgotten here.
2017-06-11 09:48:15 +01:00
Russ Butler 9fef5bbef3 Fix semaphore usage on lpc1768 emac
The semaphore xTXDCountSem had the count to match the number of
resources available, but was being used as a binary semaphore in a
loop to listen for events. This patch updates the logic to make use of
the resource count.

With RTX5 the OS traps with an error if the a semaphore is released
more times than its count with an error similar to
"Semaphore 10000e6c error -17". Because xTXDCountSem is being used
as a binary semaphore it triggered this trap. With this patch the
semaphore is no longer used as a binary semaphore and no longer traps.
2017-06-11 09:48:15 +01:00
Sam Grove 1ff08912c3 Fix doxygen warnings. 2017-06-11 09:48:15 +01:00
Jimmy Brisson 633efd795d Remove doxygen warnings in nsapi 2017-06-11 09:48:15 +01:00
Jimmy Brisson 5e8c3ac6b9 Enable doxygen for nsapi 2017-06-11 09:48:14 +01:00
Jimmy Brisson 9109b8310b Remove more warnings from doxygen config 2017-06-11 09:48:14 +01:00
Jimmy Brisson 61e03cb8c7 Check for no warnings in travis 2017-06-11 09:48:14 +01:00
Jimmy Brisson 1faf905d55 Remove warnings from doxyfile_options 2017-06-11 09:48:13 +01:00
Sam Grove 236ce19779 Remove previous docs building method and replaced by `doxygen doxyfile_options` 2017-06-11 09:48:13 +01:00
Sam Grove f9dd86dea4 Ignore doxygen builds temporay object database 2017-06-11 09:48:13 +01:00
Sam Grove 821af242a3 Update doxyfile_options that has settings used by developer.mbed.org
Should be kept in sync with doxygen_options.json which is used for
building the doxygen which is used by docs.mbed.com It is intended
only generate doxygen for specific directories which present the
public APIs for mbed OS
2017-06-11 09:48:13 +01:00
Sam Grove ec6c7ee65e Fix doxygen warnings. 2017-06-11 09:48:12 +01:00
Sam Grove 072890d962 Fix doxygen warnings. 2017-06-11 09:48:12 +01:00
Sam Grove 38d999477d Fix doxygen warnings. 2017-06-11 09:48:12 +01:00
Russ Butler a4b479233d Safely initialize RTC on kinetis devices
When initializing the RTC on Kinetis devices, handle the case where
the time overflow interrupt is pending and the case where the time
alarm flag is pending. These flags persist across reset and if not
handled will cause a crash when powering up the low power ticker.

This problem manifested as a lp_ticker test failure on the K22F and
K64F on CI only when running a nightly. This problem has been present
but was made obvious by PR #4094 which configures all tickers to
interrupt at least every MBED_TICKER_INTERRUPT_TIMESTAMP_MAX_DELTA
(~31 minutes). This caused the RTC alarm to fire 31 minutes after the lp_ticker
or lp_timeout test and caused the next run of the lp_ticker test to
crash on boot.
2017-06-11 09:48:11 +01:00
Francisco J. Manno 206e1b7634 STM32s Serial does not properly handle parity bits
Reworked the serial_format() function for STM32F0x
devices to take the format in the form:
data_bits - parity - stop_bits

E.g. 8 - N - 1

where data_bits exclude the parity bit.
Added a case for 7 bits data as at least the chips
STM32F0x1/STM32F0x2/STM32F0x8 support 7 bits data.

Consolidated serial_format() and uart_init()
functions into a general TARGET_STM serial_api.c
file since the functions are common to all STM targets.

Fixes #4189
2017-06-11 09:48:11 +01:00
Bradley Scott b1f3ef4872 STM32: Fix 32-bit us ticker interrupt scheduling
For STM32 targets using a 32-bit timer for the microsecond ticker, the
driver did not properly handle timestamps that are in the past.  It
would just blindly set the compare register to the requested timestamp,
resulting in the interrupt being serviced up to 4295 seconds late
(i.e. after the 32-bit timer counts all the way around to hit the
timestamp again).

This problem can easily be reproduced by creating a Timeout object
then calling the timeout's attach_us() member function to attach a
callback with a timeout of 0 us.  The callback will not get called for
over 2147 seconds, and possibly up to 4295 seconds late if no other
microsecond ticker events are getting scheduled in the meantime.

Now, after the compare register has been set, the timestamp is checked
against the current time to see if the timestamp is in the past, and
if so, the compare event is manually set.

NOTE: By checking if the timestamp is in the past after configuring the
capture register, we ensure proper handling in the case where the timer
updates past the timestamp while setting the capture register.
2017-06-11 09:48:11 +01:00
arostm eef244063b NUCLEO_F412ZG: Remove hal_conf file The board have to use th hal_conf file from F4/device directory 2017-06-11 09:48:10 +01:00
Laurent MEUNIER 2f80b9a28f STM32 16bits tickers: consider all corner cases in us_ticker_set_interrupt
The present commit comes from monkiineko mbed contributor.
The comments in code explains in details all the possible case and
how they are handled.
2017-06-11 09:48:10 +01:00
Laurent MEUNIER 2ab994415d STM32 16 bits ticker: fix grammar issues in comments 2017-06-11 09:48:10 +01:00
Laurent MEUNIER 070eb8de8e STM32 16 bits tickers: save useless instance init
TimMasterHandle.Instance initialization can be removed from here,
because it will either have been already done previously,
or it will be done in the us_ticker_init() call immediately below.
2017-06-11 09:48:10 +01:00