Commit Graph

18080 Commits (db8cee04fc26ac47d6a5b4ebab1111979c011276)

Author SHA1 Message Date
Martin Kojtal 5b751e8be7
Merge pull request #7599 from c1728p9/double_low_power_ticker_interrupt
Fix double low power ticker interrupt
2018-08-20 18:00:55 +02:00
Brian Daniels b5a187ddb3 Fixing import paths of memap.py when excuted as a script 2018-08-20 09:03:29 -05:00
Juha Ylinen b8a7e25e84 Nanostack: Fix return code for unsupported socket options 2018-08-20 16:30:19 +03:00
Kimmo Vaisanen 2f15dae400 Lora: Refactor duty-cycle configuration and introduce config for JOIN request
- Duty cycle can be now only disabled with duty-cycle-on flag if region supports duty-cycle.
  If region does not support duty-cycle, this flag has no effect and duty cycle is always
  disabled.

- Also introduced a new flag (duty-cycle-on-join) to disable duty cycle for JOIN requests.
  This flag can be used for testing only and is used to speed up JOIN request testing as
  backoff times for JOIN request are really long (easily several minutes per attempt).
  This flag works in conjunction with main duty cycle setting. Disabling duty-cycle-on-join
  works only if duty-cycle-on is disabled (or region settings have duty cycle disabled).
2018-08-20 15:30:15 +03:00
Hasnain Virk 928c68cd7f Restoring default RX2 data rate
In #b0b0261 we changed the RX2 data rate to start from the highest data rate
available for the PHY rather than standard defined DR.
This introduced a regression, i.e., even when somebody changed the default RX2 data
rate to something usable for their environment, it didn't take any effect. As in
reset_mac_params() we override the data rate with max value possible for that PHY.
This commit restores the original behaviour and we always use standard defined
values.
2018-08-20 14:35:40 +03:00
Donatien Garnier d9c1748c14 Update formatting for SharedPtr.h 2018-08-20 12:04:53 +01:00
Vincent Coubard 3985fb8d62 Span: Fix documentation error. 2018-08-20 12:00:20 +01:00
Vincent Coubard 1f00336c7e Span: replace reference to Size with Extent. 2018-08-20 11:58:48 +01:00
Oren Cohen 795248bcaf Restore lp_ticker_free to previous implementation when running with uvisor
This is a temporary patch until uvisor is removed
2018-08-20 13:20:45 +03:00
Vincent Coubard 6fcf1e8284 Span: Make type pointer and reference declaration consistent with guideline. 2018-08-20 10:47:41 +01:00
Vincent Coubard 9b9d33a7b4 Span: Fix typo. 2018-08-20 10:41:47 +01:00
Timo Urhonen fde137c4d2 Updated file comment 2018-08-20 12:31:40 +03:00
Vincent Coubard 3fb3173876 Span: Fix odd condition in Span::empty. 2018-08-20 10:30:35 +01:00
Vincent Coubard 43170d21bf Span: Make name of dynamic span tag consistent with C++ standard. 2018-08-20 10:29:43 +01:00
Vincent Coubard eba1dc6dd6 Span: Improve comparison operator to array by using fixed size Span. 2018-08-20 09:13:31 +01:00
Vincent Coubard 7f195b8ec1 Span: Cleanup usage of ptrdiff_t and size_t 2018-08-20 09:13:17 +01:00
Vincent Coubard d8c788a413 Platform: Add C++ Span class.
The Span class allows the creation of views over contiguous memory. The view
do not own memory, is typed and has a length. It can be used as a replacement of
the traditional pair of pointer and size in parameters or class fields.

Main operations:
- size(): return the lenght of the memory viewed
- empty(): return if the memory viewed is empty
- [index]: access elements viewed
- data(): return a pointer to the memory viewed.
- first(count): Create a subview from the first count elements.
- last(count): Create a subview from the last count elements.
- == and !=: compare two views or a view to array and return if they are equal or
not.

The Span class came in two flavors:
- Static size: The size is encoded in the Span type and it is as lightweitgh as
a single pointer,
- Dynamic size: The object can store arbitrary views and it costs one pointer
and the size of the view.
2018-08-19 20:20:05 +01:00
Steven 1cfddb73b7 Fix stack size for LwIP on EFM32GG11
Typo in the config file made the LwIP stack way too small on EFM32GG11 STK3701 target. Additionally, the EMAC thread stack was slightly too small when debug printing is on.
2018-08-19 14:39:58 +02:00
Mahesh Mahadevan 64e5eb01d2 MIMXRT1050_EVK: Update the I2C driver
1. Remove the repeated_start flag and code as this is not needed
   for the LPI2C module
2. Enable the SION bit on the I2C pins
3. Enable 22K Pullup option of the I2C pins
4. Update the 0 byte write implementation to ensure the START
   command gets flushed out of the FIFO

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-08-17 15:03:35 -05:00
Donatien Garnier 6f3c07f6eb Optimize SharedPtr code 2018-08-17 20:11:00 +01:00
Donatien Garnier ac79b007d0 Cleanup description 2018-08-17 19:05:19 +01:00
Donatien Garnier 2608478e87 Cleanup shared pointer implementation and add reset() methods 2018-08-17 18:45:01 +01:00
Donatien Garnier f45642cec0 Make shared pointer thread safe and clean-up class and doc 2018-08-17 18:25:28 +01:00
Qinghao Shi 485fe79a71 add __ARM_FM macro in targets.json 2018-08-17 18:01:21 +01:00
Qinghao Shi f612ea0b47 replace hard-coded vector size with macro in linker scripts 2018-08-17 17:59:17 +01:00
Russ Butler dc2e2c0ce0 Speed optimization for LowPowerTickerWrapper
Only reschedule the Timeout object in the low power ticker wrapper
if it is not already pending.
2018-08-17 11:59:01 -05:00
Russ Butler 00b8e24446 Fix rollover handling in ticker frequency test
To handle timer rollovers the test tests-mbed_hal-common_tickers_freq
calls intf->set_interrupt(0). For this to work correctly the ticker
implementation must fire an interrupt on every rollover event though
intf->set_interrupt(0) was called only once. Whether an interrupt will
fire only once or multiple times is undefined behavior which
cannot be relied upon.

To avoid this undefined behavior this patch continually schedules an
interrupt and performs overflow detection on every read. This also
removes the possibility of race conditions due to overflowCounter
incrementing at the wrong time.
2018-08-17 11:59:01 -05:00
Russ Butler f68958df4e Fix tests to work with LPTICKER_DELAY_TICKS
Fix the HAL common_tickers and sleep tests so they work correctly when
the define LPTICKER_DELAY_TICKS is set.
2018-08-17 11:58:55 -05:00
Qinghao Shi 3c302d9d9b Increase the thread stack size on FastModel targets
The thread stack size was restricted due to some boards have really limited RAM sizes,
and out of heap memory on multiple threads tests.
The side effect was on the debug profile build, the tests will get stack overflow.
We need the build the test with debug profile in order to do the code coverage analysis.
So increased the thread stack size on FastModel targets.
2018-08-17 17:46:29 +01:00
Qinghao Shi 891c4ed244 Skip time drifting test on FastModels targets
FastModels targets are simulator running on the x86 hosts.
As the nature of non-RealTime x86 OS and FastModels, timing accuracy is not guaranteed
So skipping the time drifting tests on FastModel targets
2018-08-17 17:46:28 +01:00
Cruz Monrreal f15dbf2c3d
Merge pull request #7706 from jamesbeyond/fm_mem
Refactoring memory regions definitions for Fast Models MPS2 targets
2018-08-17 11:10:36 -05:00
Cruz Monrreal 8e25d2d905
Merge pull request #7669 from SigmaDeltaTechnologiesInc/master
SDT64, 8195, 32620, 32625, 51822, 52832B added to targets
2018-08-17 11:10:12 -05:00
Cruz Monrreal 871ee09c7a
Merge pull request #7667 from AriParkkila/cellular-detect
Cellular: Add CellularDevice::init_module API to be called at startup
2018-08-17 11:09:11 -05:00
Russ Butler adc64cccac Update low power ticker wrapper
Update the low power ticker wrapper code so it does not violate any
properties of the ticker specification. In specific this patch fixes
the following:
- Prevent spurious interrupts
- Fire interrupt only when the ticker times increments to or past the
    value set by ticker_set_interrupt
- Disable interrupts when ticker_init is called
2018-08-17 09:29:41 -05:00
Russ Butler 472ababfef Update deep sleep lock check in tests
When the define LPTICKER_DELAY_TICKS is set deep sleep can be randomly
disallowed when using the low power ticker. This is because a Timer
object, which locks deep sleep, is used to protect from back-to-back
writes to lp tickers which can't support that. This causes tests which
assert that deep sleep is allowed to intermittently fail.

To fix this intermittent failure this patch adds the function
sleep_manager_can_deep_sleep_test_check() which checks if deep sleep
is allowed over a duration. It updates all the tests to use
sleep_manager_can_deep_sleep_test_check() rather
than sleep_manager_can_deep_sleep() so the tests work even if deep
sleep is spuriously blocked.
2018-08-17 09:29:41 -05:00
Russ Butler 1bbf43ad38 Add test for ticker suspend and resume
Unit test the functions ticker_suspend and ticker_resume.
2018-08-17 09:29:40 -05:00
Russ Butler 23e6d50000 Add ticker suspend/resume API
Add an API to suspend and resume the ticker.
2018-08-17 09:29:40 -05:00
Donatien Garnier 9ebfbc0cdd Re-introduce a shared pointer class in mbed OS 2018-08-17 12:30:51 +01:00
Hasnain Virk a7cb32f83f unused variable warning in LoRaMac.h for release build
In release builds where MBED_ASSERT macro is syphoned off, we were hitting
an unused variable warning. To mitigate that we could direct the variable
used in MBED_ASSERT to void.
2018-08-17 11:19:34 +03:00
Cruz Monrreal 3c25b96441
Merge pull request #7786 from mikaleppanen/dns_repeat_to_ext
Moved ASYNCHRONOUS_DNS_SIMULTANEOUS_REPEAT under mbed extended tests
2018-08-16 17:57:36 -05:00
kegilbert 383b464cf8 Final cleanup of eventqueue doxy comments 2018-08-16 17:19:57 -05:00
kegilbert a08ade30d4 Finish basic examples for all eventqueue methods 2018-08-16 17:19:57 -05:00
kegilbert c802f77258 Add inline doxy examples for eventqueue method calls 2018-08-16 17:19:57 -05:00
kegilbert 04fe577329 Patch EventQueue doxygen to remove templatewall
In the doxygen only segment define generic function declarations for the docs

Finished initial rework, pending TODOs for param comments
2018-08-16 17:19:57 -05:00
Cruz Monrreal 54d7623f0c
Merge pull request #7728 from 0xc0170/fix_feature_template
PR template: Feature -> functionality change
2018-08-16 16:24:27 -05:00
Cruz Monrreal ed57c8cb13
Merge pull request #7797 from OPpuolitaival/fix_target_name
Fix target_name variable in some use cases
2018-08-16 16:18:19 -05:00
David Saada 876b5f755b FlashIAP & NVStore tests: Skip test if overwriting code in flash. 2018-08-16 21:59:45 +03:00
David Saada 62a70f461b Fix TMPM64B IAR linker file
Remove unnecessary manual inclusion of tmpm64b_fc object file in linker script
2018-08-16 21:59:44 +03:00
Cruz Monrreal 467265847a
Merge pull request #7670 from davidsaada/david_fix_nvstore_test_max_possible_keys
Check max possible keys in NVStore tests
2018-08-16 13:38:43 -05:00
Cruz Monrreal f62e1032af
Merge pull request #7600 from c1728p9/remove_unnecissary_low_power_ticker_rescheduling
Remove unnecessary low power ticker rescheduling
2018-08-16 13:37:01 -05:00