Commit Graph

12750 Commits (mbed-os-5.6)

Author SHA1 Message Date
bcostm 7f31c76b2b STM32 RTC: initializes structures 2017-10-20 16:18:28 +01:00
Russ Butler 9583fff8a7 Add error if OS tickrate is changed
The current mbed-os drivers rely on a tickrate of 1ms for timing.
This means that if OS_TICK_FREQ is set to any value other than 1000
then mbed-os driver will no longer delay for the correct amount of
time. To prevent this from happening this patch triggers a compile
time error if a tickrate other than 1m is used.
2017-10-20 16:18:28 +01:00
bcostm 215eddcf39 fix init struct analogout 2017-10-20 16:18:28 +01:00
Seppo Takalo d3f9dd3913 Enable MPL by default for 6LoWPAN-ND.
In Thread network, MPL is already enabled so this causes
both to behave similarly.
2017-10-20 16:18:28 +01:00
Kevin Bracey 62b5b443b0 lwIP: Add memory configs to JSON
We currently set the lwIP pbuf pool size small - to 5 x 576-byte
buffers.

This is insufficient to hold a single DTLS handshake flight, so can
cause cloud client connections to fail. STM-based platforms are failing
handshake because of this. (K64F works because it doesn't use the pbuf
pool for reception, but lwIP does recommend drivers use the pbuf pool).

Not changing the default memory sizes here, as intended for a patch
release, but adding mbed configuration options to allow the numbers to
be adjusted for memory tuning in an application.

In a future minor revision, I would recommend increasing the default
PBUF_POOL_SIZE - we are well below lwIP's out-of-the-box default - and
offsetting by a reduction in MEM_SIZE for the drivers that don't use
PBUF_RAM.
2017-10-20 16:18:28 +01:00
Kevin Gilbert 10b7613b03 Remove -p as an argument flag for profile 2017-10-20 16:18:28 +01:00
Kevin Gilbert 3c3e2800b8 Add profile argument to mbed-os example build tools to allow non-default build profiles to be passed in 2017-10-20 16:18:28 +01:00
Pavel Sorejs 0b5043ea5b Add bootloaderd support to NUCLEO_F446RE target 2017-10-20 16:18:28 +01:00
adbridge 4892b5476e Move to using command strings rather than command lists.
Previously the script used
cmd =['git','checkout', branch]
syntax. This does not work well cross platform. The solution it to
actually use strings. E.g.
cmd = "git checkout " + branch
2017-10-20 16:18:28 +01:00
adbridge 4c40c248c0 Fix the prepare_branch function
Currently when checking if the destination branch already exists the
command 'git branch' is used. This only returns local branches. What is
actually required is the list of remote branches. This can be obtained
by the command 'git branch -r' and filtering the result.
2017-10-20 16:18:28 +01:00
Seppe Stas 575c0645e7 Fix analogin scaling for EFM32 target
Fixes #5115.

`analogin_read_u16` returns a value in the range `0x0000 - 0xFFF0`
since the resolution of the ADC is 12 bits. However, in
`analogin_read` this value gets divided by `0xFFFF` assuming the range
is `0x0000-0xFFFF`. This causes a small error in the value returned by
`AnalogIn::read` for the EFM32 target.
2017-10-20 16:18:28 +01:00
Przemyslaw Stekiel 6e0cd31525 Add Low Power Timer test. 2017-10-20 16:18:28 +01:00
Kevin Bracey 30e8e9d5b1 Make poll() use wait(1) rather than yield()
Spinning while polling is overly CPU intensive, and inconsistent with
the current blocking behaviour of UARTSerial.

Change to use Thread::wait(1) to match UARTSerial.
2017-10-20 16:18:28 +01:00
Kevin Bracey 25400d5730 Avoid wait_ms() spin
System's wait_ms() spins to achieve a precise delay - we don't want this.
Call Thread::wait directly.
2017-10-20 16:18:28 +01:00
Andrzej Puzdrowski 075993e009 fix bug: I2C timeout due the clos strething by slave on nRFx SoC
Change implementation of timeout to one that is using us_ticker hal.
Timeout is now configurable by I2C_TIMEOUT_VALUE_US macro and this
value will be imported if will be defined externaly.
2017-10-20 16:18:28 +01:00
Martin Kojtal 1f258ce367 Test: deepsleep() API replacement
Use sleep() as entry function + check to be certain we
are entering deepsleep when required by test (should be allowed)
2017-10-20 16:18:28 +01:00
Vincent Coubard 3e3b70ed83 NRF52840: add the device configuration STCLK_OFF_DURING_SLEEP 2017-10-20 16:18:28 +01:00
Vincent Coubard a3ef05dd31 Fix typo in DELTA_DFBM_NQ620 target
Replace `device_has_had` by `device_has_add`
2017-10-20 16:18:28 +01:00
Vincent Coubard 76deb7ee21 Sleep: Disallow sleep for targets turning of the systick clock at sleep entry.
When the RTOS is present and the tickless mode is not implemented, it is
expected that the next tick issued by the Systick timer will wake up the MCU.
However nothing prevents an implementation of the ARM architecture to gate the
systick clock signal upon sleep entry.

Therefore on those targets sleep shall be prohibited if the RTOS is present and the
tickless mode is not implemented.

To ease life of porters , a new option has been added in the device add list:
STCLK_OF_DURING_SLEEP. This option expose that the target turn of the systick
clock during sleep.

Targets which exhibit such behavior shall add this define in their device_has list.
2017-10-20 16:18:28 +01:00
Przemyslaw Stekiel 1c376d6475 Add test for Timer class. 2017-10-20 16:18:28 +01:00
Rob Meades 006ca97478 Enable crypto HW acceleration for STM32F437xG platforms (i.e. ublox C030 family). 2017-10-20 16:18:28 +01:00
Shrikant Tudavekar d1e46c1035 fix echo test handshake and reduce uart load
1) if we receive more than one __sync, previous handshake would consider
it as echo_count and try to decode the value. Now we skip superfluous __sync.

2) reduce the uart load produced by the test, as we are heavily running tests in
parallel and not one-to-one this update was required.
2017-10-20 16:18:28 +01:00
Akos Kiss f926eb430d Fix documentation of BLE GattCharacteristic
The constructor doc incorrectly suggested that only short (16-bit)
UUIDs were accepted. The same doc also referred to properties
instead of characteristics. (And to "value length", which seemed to
be completely out of place in the context of the current code.)
2017-10-20 16:18:27 +01:00
Tony Wu b235e0a256 rtl8195am - fix ARMC6 guards
Fix ARMC6 guard typo introduced in commit 4f3f0cc9cc (Make Realtek link)

While at it, remove redundant ISR_STACK_SIZE assignment for ARMCC.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-10-20 16:18:27 +01:00
Tony Wu 10f94e972a rtl8195am - remove obsolete configs
The following configs were no longer necessary for RTX5.
    OS_TASKCNT
    OS_MAINSTKSIZE
    OS_CLOCK

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-10-20 16:18:27 +01:00
andreas.larsson 3b45287824 Moved STDIO_UART defines to targets.json for UBLOX_EVK_ODIN_W2 instead of hardcoded. 2017-10-20 16:18:27 +01:00
Seppo Takalo 609cd3bb88 Add license texts 2017-10-20 16:18:27 +01:00
Seppo Takalo 1d8249133d Add Doxygen documentation for testcases. 2017-10-20 16:18:27 +01:00
Seppo Takalo ee9d04e248 Fix builds for targets without wifi or without mbed_app.json 2017-10-20 16:18:27 +01:00
Seppo Takalo 8cb7c14f90 Update help text 2017-10-20 16:18:27 +01:00
Seppo Takalo b2a884dcec Fix includes.
Cannot include header file witin a function (without severe side effects)
2017-10-20 16:18:27 +01:00
Seppo Takalo 6f118da42c Update template mbed_app.json 2017-10-20 16:18:27 +01:00
Seppo Takalo 52b9716ad2 Set timeout to 4 minutes.
Wifi connections and scanning takes long time. 2 minutes might not be enough.
2017-10-20 16:18:27 +01:00
Seppo Takalo 05439e0a2e Implement functional Wifi tests
Implement 100% function coverage for WifiInterface as specified
in "Wifi test plan"
2017-10-20 16:18:27 +01:00
ccli8 0bd4d5e72c Remove dead power-down code with mbed OS 3
These power-down code are stale and would be superseded by sleep manager.
2017-10-20 16:18:27 +01:00
ccli8 c32006ff39 Refine sleep code
1. Remove stale code with mbed OS 3.
2. Remove check for busy peripherals unorganizedly. This would be supported by e.g. official sleep manager.
2017-10-20 16:18:27 +01:00
ccli8 37bf8e3c7d Fix RTC hour error with AM/PM 2017-10-20 16:18:27 +01:00
ccli8 148e1e2883 Fix lp_ticker wake-up is incorrectly disabled 2017-10-20 16:18:27 +01:00
ccli8 dfe78597a8 Fix lp_ticker typo 2017-10-20 16:18:27 +01:00
ccli8 f86f651226 Change SW2/SW3 to SW1/SW2 to match target board 2017-10-20 16:18:27 +01:00
ccli8 901fcba462 Move target configuration from mbed_lib.json to targets.json 2017-10-20 16:18:27 +01:00
ccli8 cb10be0a34 Fix RTC hour error with AM/PM 2017-10-20 16:18:27 +01:00
ccli8 921f9e18fc Fix RTC macro function with no arguments in BSP 2017-10-20 16:18:27 +01:00
ccli8 f7f1ed37ce Refine sleep code
1. Remove stale code with mbed OS 3.
2. Remove check for busy peripherals unorganizedly. This would be supported by e.g. official sleep manager.
2017-10-20 16:18:27 +01:00
ccli8 0ece4d02b0 Replace mktime/localtime with interrupt-safe version in rtc
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-10-20 16:18:27 +01:00
cyliangtw 8c987698ad Fixed ethernet multi-function pin 2017-10-20 16:18:27 +01:00
Filip Jagodzinski ae4ce867f9 HAL: ticker_api: Fix outdated comment 2017-10-20 16:18:27 +01:00
Russ Butler 06fa1dbbef Prevent use of deleted ticker in Ticker test
In test_case_2x_callbacks two tickers are setup to repeatedly
reschedule each other. When these tickers are deleted this
rescheduling is still occurring and can lead to a deleted ticker
being scheduled.

When this happens the following error message is displayed:
Thread 0x0 error -6: Not allowed in ISR context

Note - this problem was not detected by CI since the test reported
the correct results back to the host test and only experienced this
error on tear down.

This problem can be reproduced on an nrf51 by first building the ticker
test with:
"mbed test -t GCC_ARM -m NRF51_DK -n tests-mbed_drivers-ticker
--compile -DMBED_TRAP_ERRORS_ENABLED=1
-DMBED_HEAP_STATS_ENABLED=1 -DMBED_STACK_STATS_ENABLED=1"

And then running testing with:
"mbed test -t GCC_ARM -m NRF51_DK -n tests-mbed_drivers-ticker --run"
2017-10-20 16:18:27 +01:00
Senthil Ramakrishnan 634bde35a1 Merging changes from ATParser got AT parser unification 2017-10-20 16:18:27 +01:00
Senthil Ramakrishnan fbb184988a Merging changes from ATParser towards parser unification 2017-10-20 16:18:27 +01:00