Commit Graph

11057 Commits (01f1e08358a9e94f116db2d639c2c745ab472ae9)

Author SHA1 Message Date
Vincent Coubard 01f1e08358 mbed_localtime: Add support of wday.
This field is necessary, it is used by several vendor RTC: Atmel, ST, NUVOTON,
NXP.
2017-06-08 10:11:01 +01:00
Vincent Coubard 946ed353bc mbed_mktime: Improve documentation for doxygen. 2017-06-08 10:01:43 +01:00
Sam Grove 547320e99c Rename function st_rtc_localtime with _rtc_localtime 2017-06-07 23:24:48 -05:00
Vincent Coubard f880e44145 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-07 22:06:22 -05:00
Russ Butler 96288e3eef 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-07 22:03:27 -05:00
Sam Grove 744b95cc9f Merge pull request #4425 from sg-/doxygen-template
Doxygen template and CI to not produce warnings and errors
2017-06-07 11:18:47 -05:00
Sam Grove 01e4520548 Merge pull request #4453 from c1728p9/lp_ticker_fix
Safely initialize RTC on kinetis devices
2017-06-07 09:58:49 -05:00
Sam Grove 8232afa53e Merge pull request #4216 from fmanno/issue-4189
STM32s Serial: Correct handling of parity bits
2017-06-06 20:00:19 -05:00
Sam Grove 72de85c62f Merge pull request #4417 from monkiineko/master
STM32: Fix 32-bit us ticker interrupt scheduling
2017-06-06 19:59:52 -05:00
Sam Grove 3c3e35dd44 Merge pull request #4423 from arostm/nucleo_f412zg_remove_hal_conf
NUCLEO_F412ZG: Remove hal_conf file from NUCLEO_F412ZG
2017-06-06 19:59:31 -05:00
Sam Grove 4d7c045753 Merge pull request #4424 from LMESTM/STM32_16bits_tickers
Fix corner cases in STM32 16bit tickers
2017-06-06 19:59:08 -05:00
Sam Grove 28f590fc4c Merge pull request #4430 from pan-/utest_cases_romable
utest optimization: Allow case data structure to be put in ROM.
2017-06-06 19:58:53 -05:00
Sam Grove 6002bdd533 Merge pull request #4439 from sg-/proper-realtek-fix
Proper fix for 1fa30b7403
2017-06-06 16:00:55 -05:00
Sam Grove 6b1f64fc86 Merge pull request #4451 from theotherjimmy/fix-test-typo
Fix typo in test code
2017-06-06 16:00:25 -05:00
Sam Grove e9e937df04 Merge pull request #4454 from c1728p9/warning_fixes
Warning fixes
2017-06-06 16:00:02 -05:00
Sam Grove bb2eb8b7b7 Fix doxygen warnings. 2017-06-06 15:32:42 -05:00
Russ Butler f749a2990b 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-06 15:30:41 -05:00
Anna Bridge 8d6bc1d47d Merge pull request #4455 from anttiylitokola/master
mbed-coap fixes
2017-06-06 15:53:38 +01:00
Antti Yli-Tokola d399395eab Revert Initialize remove_from_list flag to true.
* Cause regression in cloud registration
2017-06-06 13:48:42 +03:00
Antti Yli-Tokola fe808e0db5 mbed-coap fixes.
This commit includes:
 * Add support for sending response to duplicate messages
 * Add randomness for retransmission time
 * Fix usage sn coap blockwise max time data stored
 * CoAP parser option handler does not seem to handle "Option Length" completely according to spec
 * Handle '0' value if duplication buffer size is set through the sn_coap_protocol_set_duplicate_buffer_size()
2017-06-06 09:43:21 +03:00
Russ Butler 0de35e2a21 Fix config store deprecation warnings
Silence deprecation warnings in the config store C and C++ files. This
removes warnings that not relevant to applications. Note - using
these deprecated functions still gives an error outside of these files.
2017-06-05 18:06:10 -05:00
Russ Butler 2d7cf60278 Fix warning about unused mutex
Move the metrics mutex into the ifdef MBED_STACK_STATS_ENABLED since
it is not used ouside of it. This fixes the warning:
[Warning] greentea_metrics.cpp@37,28: 'mutex' defined but not used [-Wunused-variable]
2017-06-05 18:06:08 -05:00
Jimmy Brisson aabecf633b Remove doxygen warnings in nsapi 2017-06-05 17:32:46 -05:00
Jimmy Brisson a09db78a4c Enable doxygen for nsapi 2017-06-05 17:32:46 -05:00
Jimmy Brisson e534d3309b Remove more warnings from doxygen config 2017-06-05 17:32:46 -05:00
Jimmy Brisson 2818026016 Check for no warnings in travis 2017-06-05 17:32:46 -05:00
Jimmy Brisson e4956507b1 Remove warnings from doxyfile_options 2017-06-05 17:32:46 -05:00
Sam Grove 7dfc75de6d Remove previous docs building method and replaced by `doxygen doxyfile_options` 2017-06-05 17:32:45 -05:00
Sam Grove 38d511674d Ignore doxygen builds temporay object database 2017-06-05 17:32:45 -05:00
Sam Grove 5b57f28071 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-05 17:32:45 -05:00
Sam Grove 052d02e620 Fix doxygen warnings. 2017-06-05 17:32:45 -05:00
Sam Grove 0bf2c5f55c Fix doxygen warnings. 2017-06-05 17:32:45 -05:00
Sam Grove 2d8bf18317 Fix doxygen warnings. 2017-06-05 17:32:45 -05:00
Jimmy Brisson ad5608c9e6 Fix a typo in test code
I goofed on spelling (swapped two letters). Whoops.
2017-06-05 15:46:42 -05:00
Vincent Coubard f36619b859 utest_case.h : Fix comment indentation 2017-06-05 16:06:17 +01:00
Vincent Coubard 165d76ae25 utest case: Indicate explicitely that no data member shall be declared in
the Case class.
2017-06-05 16:06:17 +01:00
Vincent Coubard 5b27d65755 utest optimization: Allow case data structure to be put in ROM.
This patch split the Case class in two entities: Case and case_t. case_t contains the test case data structure while Case provide the interface to the test case. Unlike the class Case, case _t is a POD and can be instantiated at compile time and put in the constant data section (in ROM).

The Specification class has also been modified to accept arrays of case_t.
2017-06-05 16:06:17 +01:00
Anna Bridge a41e08c7bf Merge pull request #4365 from LMESTM/fix_i2C_pcf_F1F2F4L1
Fix i2c communication with pcf8574 on stm32 targets of f1, f2, f4 and l1 families
2017-06-05 14:41:36 +01:00
Anna Bridge f6d19726b2 Merge pull request #4368 from MultiTechSystems/iar_fix
MTS_DRAGONFLY_F411RE/MTS_MDOT_F411RE: add IAR to post_binary_hook toolchains
2017-06-05 14:40:02 +01:00
Anna Bridge e4945ef9d0 Merge pull request #4420 from hisener/master
Update CONTRIBUTING.md
2017-06-05 14:38:11 +01:00
Anna Bridge 9d6a255a49 Merge pull request #4436 from NXPmicro/Fix_USB_Driver
Issue#4250: Fix USB driver for Kinetis devices
2017-06-05 14:36:38 +01:00
Laurent MEUNIER ea2cc1d0e1 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-05 13:12:20 +02:00
Laurent MEUNIER fbfbb5e982 STM32 16 bits ticker: fix grammar issues in comments 2017-06-05 13:12:20 +02:00
Laurent MEUNIER 572a096c08 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-05 13:12:20 +02:00
Laurent MEUNIER 7bcabf7cc0 STM32 16 bits tickers: remove unused prototype
Since rework, this prototype is not needed anymore.
2017-06-05 13:12:20 +02:00
Laurent MEUNIER 27be2e1884 STM32 16 bits ticker: don't check FLAG just clear it
Not having the check will make the code more efficient.
2017-06-05 13:12:20 +02:00
Laurent MEUNIER 1b684ca4e9 STM32 16 bits tickers, no need to check TIM_FLAG_CC1OF FLAG
Following previous fixes on 16 tickers handling, the overflow flag
condition will not happen anymore, so the work-around in place is
not needed anymore
2017-06-05 13:12:20 +02:00
Laurent MEUNIER 35c68859c0 STM32: 16 bits ticker, fixes in set function and handler
This commit simplifies ticker interrupt set function and handler.

There were issues around the 16 bits timer wrap-around timing as we were
aligning interrupts with wrap-around limits (0xFFFF) and then reading
TIM_MST->CNT again in timer_update_irq_handler which could lead
to crossing case with the wrap-around (TIM_FLAG_UPDATE) case.

Now we're using the 16 lower bits of the timestamp as the reference from
using in set_compare and never changing it. There is also no need to set
comparator again in timer_update_irq_handler. This is more robust and
also more efficient.
2017-06-05 13:12:20 +02:00
Laurent MEUNIER b9b5f0b929 STM32 16bits ticker: rework us_ticker_read()
Move to a single more reliable implementation of us_ticker_read()
There were historically 2 versions of us_ticker_read() implementation.

The one removed here was not reliable because us_ticker_read() can be
called in interrupt context which means that TIM_MST->CNT would have
wrapped around while SlaveCounter is not yet updated. So there is a need
to check the TIM_FLAG_UPDATE inside this function, which was not done in
the implementation that is removed here.
2017-06-05 13:12:20 +02:00
Sam Grove 02bf926ffb Proper fix for 1fa30b7403
Replace #define with typedef
2017-06-04 11:26:21 -05:00