Commit Graph

5281 Commits (mbed-os-5.12)

Author SHA1 Message Date
Laurent Meunier d50f6e2690 STM32WB: fix some styling in HCI driver 2019-04-05 12:27:06 +01:00
Laurent Meunier 9c32d31a07 STM32WB: handle extended reset
as suggested during review, apply same sequence as in:
b96c0ac986
2019-04-05 12:27:06 +01:00
Laurent Meunier 0251c2b332 STM32WB: move HCI driver to target specific folder
Need to move stm32wb_HCIDriver.cpp to target specific folder otherwise
it could mess up with other STM targets.
2019-04-05 12:27:06 +01:00
Laurent Meunier 07545a20d6 STM32WB: Add SPDX identifier to new files
also update the copyright year when needed
2019-04-05 12:27:06 +01:00
Laurent Meunier 71d5daae34 STM32WB: fix compilation issue with ARMC6 2019-04-05 12:27:05 +01:00
Laurent Meunier 9992e14715 STM32WB: remove duplicate file 2019-04-05 12:27:05 +01:00
Laurent Meunier 615a9f6548 STM32WB: Update headers 2019-04-05 12:27:05 +01:00
Laurent Meunier 79568dbe6d STM32WB: Set a random static address during init 2019-04-05 12:27:05 +01:00
Laurent Meunier dbfe97d649 STM32WB: add debug trace group in BLE Transport Layer 2019-04-05 12:27:05 +01:00
Laurent Meunier e57771f375 STM32WB: Move STM32WB utilies from FEATURE_BLE to targets folder
These files are not BLE specific, but also needed for some clock setting
for instance.

In order to compile an MBED2 application, we need to move the files.
2019-04-05 12:27:04 +01:00
Laurent Meunier ee64f1543f NUCLEO_WB55RG: Rework Clock and sleep support
- move hw_conf.h file to targets/TARGET_STM/TARGET_STM32WB directory as
this is used also out of BLE feature.
- create a dedicated hal_deepsleep function as the behavior in WB is a lot
different from other existing STM32 targets
- update clock tree configuration to directly clock the entire tree @ 32MHz
out of HSE. This is needed as we want to let the M0 core running without
any change on M0-side of clocks when M4 enters /exits deep sleep.
2019-04-05 12:27:04 +01:00
Laurent Meunier 879ca1db24 NUCLEO_WB55RG: add Cordio HCI and Transport Layer driver
The STM32WB Coridio driver includes:
- the Cordio HCI driver handling the reset sequence. During reset sequence
the TX POWER level is set and the BD address is defined if found in OTP
or option bytes. The rest of the sequence is based on the standard CORDIO
HCI driver example.
- The Transport Layer part handles sending and receiving messages to the
WB controller running on cortex-M0 of the STM32WB target. The messages
are shared through shared memory and mailboxes system based on IPCC HW.
2019-04-05 12:27:03 +01:00
Laurent Meunier e26eaa1c9d NUCLEO_WB55RG: WB Transport Layer Cube files modifications
- Need to force ARM packed redefinition
- Configure LL stack in LL mode only
- Remove warning in shci_tl.c (PLACE_IN_SECTION)
2019-04-05 12:27:03 +01:00
bcostm be1e80512e NUCLEO_WB55RG: add WB Cube files reused for BLE transport layer 2019-04-05 12:27:03 +01:00
paul-szczepanek-arm e607fe923f add default services first 2019-04-05 12:27:00 +01:00
Kimmo Vaisanen a2857bac97 Cellular: Improve ATHandler AT traces
Original AT traces had several issue:
- Can be overwritten by other traces (printf/mbed-trace)
- No way to know which direction message was going (TX or RX)
- <cr> and <ln> characters were not visible in trace
etc.

This commit addresses those issues using mbed-trace and showing separately
each filehandle write and read.
2019-04-05 12:27:00 +01:00
mudassar-ublox 603808ea42 wait increased for all cases 2019-04-05 12:26:58 +01:00
mudassar-ublox dc1e1b20a3 power on wait increased for C030_U201 2019-04-05 12:26:58 +01:00
David Saada ff6c6b9523 Remove CFSTORE VERSION file (colliding with an ARM 6.12 C++ header file) 2019-04-05 12:26:58 +01:00
Marc Emmers 9401844ccb Removed function calls from mbed_assert, which caused the functions to be ignored in release mode 2019-04-05 12:26:57 +01:00
Michal Paszta ffe97fa5a0 Nanostack::EthernetInterface::bringdown() can handle blocking mode
This let the tests-network-interface test pass for nanostack.
2019-04-05 12:26:57 +01:00
Desmond Chen 0eccb9e529 BLE:Fix gattserver authorization list update permission check 2019-04-05 12:26:57 +01:00
Nick d7acaf646a Formatting fix 2019-04-05 12:26:57 +01:00
Nick 6041d3ef8d Adding variable length attributes to Maxim Feather 2019-04-05 12:26:57 +01:00
Hasnain Virk 23edd94a15 Adding TOA and Channel info in RX metadata
We provide now downlink channel frequency and time on air for the
received frame in the RX metadata.
Previously the channel information in both TX and RX metada contained
the index number of the channel. That information wasn't very useful
except the index numbers of default channels. To make more sense of the
meta data, we now store the channel frequency in the channel parameter
rather than the index number of the channel.

RX time on air is collected from the radio driver and it is assumed that
the downlink frame had 8 downlink preamble symbols (plus 4.25 of the
preambles added by the chip) for LoRa modulation.

This commit also include a bit of tidying of RX frequency storage in rx
configuration parameters storage. Previously we were missing filling in
the RX1 frequency correctly.
2019-04-05 12:26:56 +01:00
Arto Kinnunen 2a459d1a1e Fix compiler warnings in Nanostack HAL
Fix compiler warnings:
 -"warning: 'size' argument to memset is '0'"
 -"warning: implicit declaration of function"
2019-04-05 12:26:56 +01:00
Arto Kinnunen 2794c31ebc Squashed 'features/nanostack/coap-service/' changes from 227cc3d..086e7ba
086e7ba Adjust variable scope (#121)

git-subtree-dir: features/nanostack/coap-service
git-subtree-split: 086e7ba8a1afdcfe3df16ae92ef28cae1af5a4a6
2019-04-05 12:26:56 +01:00
Kari Haapalehto 16f74c6a8a Correct thread status callback functionality. At the start-up, there was 2 NSAPI_STATUS_CONNECTING callbacks, so extra one removed from ThreadInterface.cpp. At the network lost case, there was NSAPI_STATUS_DISCONNECTED and NSAPI_STATUS_LOCAL_UP callbacks. NSAPI_STATUS_DISCONNECTED has been removed, since the NSAPI_STATUS_LOCAL_UP is enought. 2019-04-05 12:26:29 +01:00
mudassar-ublox 468084212f cellular_network_test compilation error removed 2019-04-05 12:26:28 +01:00
paul-szczepanek-arm d28d49cbab simplify call 2019-04-05 12:26:28 +01:00
paul-szczepanek-arm aa6ff686fb update comments 2019-04-05 12:26:28 +01:00
paul-szczepanek-arm cfe0c34dbd bounce scan timeout of the queue 2019-04-05 12:26:28 +01:00
Amir Cohen c5a0d469ff Improve general Block Device tests
Fixing all rand issues, aligning erase addresses, moving prints to debug mode.
2019-04-05 12:26:26 +01:00
Hasnain Virk 1f322d23eb Ack timeout must be at least 2 seconds
While calculating ack timeout, we were ending up getting a random value
which may become less than 2 seconds. This is not allowed as per v1.0.2
specification.

To fix the issue we now take the random number from 0 to 2000 ms and
then add that to the fixed 2000 ms ack timeout value, guaranteeing a
value at least equal to 2000 ms.
2019-04-05 12:26:26 +01:00
Hasnain Virk 8e298cc98d Fixing premature RX2 abort
A bug while setting up RX start timers would result in premature closusre
of RX2 window. The 'ack_Timeout_timer' would be invoked prematurely and
at that time RX2 window may be being demodulating. This resulted in
massive instability with any test that relied on Confirmed traffic or
lower data rates.

To fix the issue, we must know the length of the RX window in
milliseconds and for this purpose we have extended the
'get_rx_window_params(...)' API. The length of the time the window
may remain open must be accounted for while setting up
'ack_timeout_timer'.
2019-04-05 12:26:26 +01:00
Tymoteusz Bloch 4897ff28e5 Fixed compilation error in LWIPStack class if lwip tcp is disabled. 2019-04-05 12:26:26 +01:00
itziar c4c6515ad3 Applied suggested astyle fix(es) 2019-04-05 12:26:25 +01:00
itziar 18e8671b68 Bug related to downlink sequence counter rollover 2019-04-05 12:26:25 +01:00
mudassar-ublox 4402908bbd C030_N2XX default interface 2019-04-05 12:26:20 +01:00
Ari Parkkila c65fec37c9 Cellular: Fix max packet size for BC95 driver 2019-04-05 12:26:19 +01:00
Teppo Järvelin a12f8cd5db Cellular: don't allow ATHandler read/write if filehandle not usable
For example after going to ppp mode we must block at write and
read as filehandle is not usable.
2019-04-05 12:26:18 +01:00
Teppo Järvelin 811984aa26 Cellular: fix astyle for files that already in master 2019-04-05 12:26:18 +01:00
Teemu Kultala d2a645da72 cellular: remove last CELLULAR_DEVICE references 2019-04-05 12:26:17 +01:00
Teppo Järvelin 390eea4852 Cellular: call AT+CGEREP after sim is ready
Current implementation did call AT+CGEREP before sim was ready
and it was failing in most modems.
2019-04-05 12:26:17 +01:00
Sebastian Stockhammer c9fcf72b77 Setup connection profile with username and password 2019-04-05 12:26:17 +01:00
Ari Parkkila c2e730c15c Cellular: Remove compile dependency of UARTSerial 2019-04-05 12:26:16 +01:00
Sebastian Stockhammer f78e7c7365 Disable dual stack mode for ehs5-e 2019-04-05 12:26:16 +01:00
Sebastian Stockhammer bd15aeaa05 Revert "Disable dual stack mode"
This reverts commit 8611474e6c.
2019-04-05 12:26:15 +01:00
Sebastian Stockhammer 4408bb696c Disable dual stack mode 2019-04-05 12:26:15 +01:00
Sebastian Stockhammer 7d37750b5c Fix registration modes and disable CGSN with type 2019-04-05 12:26:15 +01:00
Sebastian Stockhammer f0e61e7f41 Support Cinterion EHS5-E cellular module 2019-04-05 12:26:15 +01:00
Desmond Chen 7482a86de0 BLE:fix on_phy_update_complete function 2019-04-05 12:26:15 +01:00
Mirela Chirica 6cbe74f794 Cellular: AT information response to return false on empty prefix 2019-04-05 12:26:15 +01:00
Arto Kinnunen afcf6941ad Update nanostack-interface error mapping
Use status NSAPI_ERROR_PARAMETER instead of NSAPI_ERROR_UNSUPPORTED
when error is caused by parameter.
2019-04-05 12:26:14 +01:00
Vincent Coubard ab06c1f9ea BLE - Use LowPower Ticker and Timer for address rotation and scan timeout. 2019-04-05 12:26:14 +01:00
Vincent Coubard 165732938f BLE - Use LowPowerTimer instead of Timer in the Cordio stack. 2019-04-05 12:26:14 +01:00
paul-szczepanek-arm 46f935723c change tick rate to 1 ms 2019-04-05 12:26:14 +01:00
Teppo Järvelin 931add3261 Increased timeout for lwip waiting netif_is_link_up
Cellular PPP connect fails too often if timeout is 15s so increased to 60 seconds.
Tested to be enough with BG96 and MTB_MTS_DRAGONFLY.
2019-04-05 12:26:13 +01:00
Desmond Chen 57636b08ad BLE:Cordio:Fix insert characteristic not handle error 2019-04-05 12:26:13 +01:00
Vincent Coubard 9504abdcba BLE - Report extended advertising in legacy handler if legacy API in use.
Workaround for the Cordio stack as extended advertising can be reported for a legacy advertising command.
2019-04-05 12:26:13 +01:00
Volodymyr Medvid ba751e3d4a Correctly include EventQueue.h
There are two EventQueue.h in mbed-os codebase:
events/EventQueue.h
features/FEATURE_BLE/ble/pal/EventQueue.h

By accident, `mbed compile` generates includes.txt with the correct
order of include search paths. This is not the case for the CMake
exporter: targets with FEATURE_BLE enables fail to compile with errors:

mbed-os/features/cellular/framework/AT/ATHandler.h:99:60: error:
'events' has not been declared

Update all places to always include either "events/EventQueue.h"
or "ble/pal/EventQueue.h": to always find the correct header.
2019-04-05 12:26:12 +01:00
Marcus Chang 61851aad07 Add missing RSPIF component to the defaut BlockDevice handler 2019-04-05 12:26:10 +01:00
Desmond Chen 5a35956cb6 BLE:Fix cordio reset sequence 2019-04-05 12:26:10 +01:00
Teppo Järvelin b031dfa1d7 Cellular: removed manual registering state.
Simplified state machine by removing manual registering state.
This was done as some modems did not have all the needed at commands
for checking the registered network. Some modem run out of memory as when
checking correct network there might be so many networks available.
Manual registration still works but it does not do any checks to which network
it's registered. Moved manual registering at command earlier in state machine so it forces
registering to a correct network. Internal refactor/fix, does not affect applications.
2019-04-05 12:26:10 +01:00
Desmond Chen cf7550fb85 BLE:Cordio:insert_descriptor check r/w properties 2019-04-05 12:26:10 +01:00
Arto Kinnunen 49e0bf4487 Update Wi-SUN network default name 2019-04-05 12:26:10 +01:00
Teppo Järvelin 360fcf2a20 Fix lwip to compile if MBED_CONF_LWIP_DEBUG_ENABLED is defined
File features/lwipstack/lwip-sys/arch/cc.h fails to compile
with error: 'MBED_NORETURN' does not name a type.
Fix with adding correct include.
2019-04-05 12:26:09 +01:00
Oren Cohen 3a024662e1 Remove #ifndef NO_GREENTEA from tests 2019-04-05 12:26:09 +01:00
Jan Jongboom f2f3351811 Dead pointer usage in GenericSecurityManager
`pscrk` is set to the address of `csrk`, but `csrk` is out of scope when using the resulting value. There's no guarantee that the memory is still valid.
2019-04-05 12:26:09 +01:00
Teemu Kultala e206f61ad1 cellular: BC95 memory leak fix 2019-04-05 12:26:08 +01:00
Michal Paszta e2785be609 DNS recv/send returning WOULD_BLOCK force delayed retry 2019-04-05 12:26:08 +01:00
Wajahat Abbas 0443e0dd06 Corrected timeout for +UDNSRN command 2019-04-05 12:26:06 +01:00
Kari Haapalehto 9af45c554b Fix for NUCLEO_F207 UDPSOCKET_ECHOTEST_BURST_NONBLOCK fails. Increase eth-rxbufnb from 1 to 2 will fix the problem 2019-04-05 12:26:06 +01:00
Teppo Järvelin fa220011aa Cellular: fix issue where CGACT not supported in coming firmware in BG96. 2019-04-05 12:26:06 +01:00
mudassar-ublox c4bbddb89c Applied suggested astyle fixes 2019-04-05 12:26:06 +01:00
mudassar-ublox 9427d2653d updated api and removed Astyle issue 2019-04-05 12:26:06 +01:00
mudassar-ublox 5bda91d1f7 C030_N211 api's update and removed N2XX_CellularNetwork class 2019-04-05 12:26:05 +01:00
mudassar-ublox 9d28abae0d C030_N211 cellular api refactoring 2019-04-05 12:26:05 +01:00
mudassar-ublox 5084c669b9 C030_N211 cellular api 2019-04-05 12:26:04 +01:00
Jaeden Amero caf6bd8b89 tls: Update Mbed TLS to 2.17.0
There are no differences from the previously imported version of Mbed
TLS other than the version number.
2019-03-24 09:48:43 +00:00
Jaeden Amero 86a03e7f2b crypto: Update Mbed Crypto to 1.0.0
There are no differences from Mbed Crypto 1.0.0d7 other than the version
number.
2019-03-24 09:48:43 +00:00
Kimmo Vaisanen 9e9f2a2747 Cellular: Fix plmn trace for IAR
IAR compiler does not seem to like printing null strings.
2019-03-24 09:48:43 +00:00
Sarah Marsh b18dbc7378 Fix undefined tr_debug for QUECTEL_BG96 cellular feature 2019-03-24 09:48:43 +00:00
Amir Cohen 43f4e25496 Fix functionality for FlashIAPBD & SlicingBD
Due to discovery of inconsistent sector sizes in devices storage the is_valid_erase function was adjusted,
For FlashIAPBD the 'code size' was included to the calculation, preventing faulty "virtual" addresses calculation.
For SlicingBD the same error was fixed and in all 3 validation functions that sent addresses for validation and program/read/erase
different addresses.
2019-03-19 13:12:36 +00:00
David Saada a566fab330 Add bootloader support for the LPC55S69 board
bla
2019-03-19 13:12:36 +00:00
avolinski 9f8db7ecd4 Temporary disable Crypto HW accelerator on STM32F439xI chipset due to issue: https://github.com/ARMmbed/mbed-os/issues/10095 2019-03-19 13:12:35 +00:00
Michael Schwarcz 5311b90cf4 LPC55S69_S: reduce ITS size to 32KB
- Reduce LPC55S69 secure side ITS from 64KB to 32KB
2019-03-19 13:12:18 +00:00
Yossi Levy e1d08ad93c Updating CY8CKIT_062_WIFI_BT_PSA bootloader image 2019-03-19 13:12:17 +00:00
Oren Cohen 25be419d65 Update features/FEATURE_BOOTLOADER/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_WIFI_BT_PSA/mbed_lib.json
Co-Authored-By: yossi2le <yossi.levy@arm.com>
2019-03-19 13:12:16 +00:00
Yossi Levy f05f3ec7a4 mbed-os to support bootlader for Cypress CY8CKIT_062_WIFI_BT_PSA and CY8CKIT_062_BLE 2019-03-19 13:12:16 +00:00
Evgeni Bolotin ecd6f21bed modify rpb base address for M0 2019-03-19 13:11:58 +00:00
Michael Schwarcz 42fca9ae0e Reduce 32KB from LPC55S69_S binary size 2019-03-19 12:59:08 +00:00
paul-szczepanek-arm 561d9e81b9 qualify cordio pal includes 2019-03-12 10:06:41 -05:00
Netanel Gonen 3a4fd57b3e change the include to mbedtls/config.h 2019-03-12 10:06:40 -05:00
Donatien Garnier b984dbdfa3 Generate BLE Random Static Address on U-blox Odin-W2 platform 2019-03-12 10:06:39 -05:00
Mahesh Mahadevan 560a45011b LPC55S69: Update the KVStore config files
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-12 10:06:38 -05:00
Arto Kinnunen bbc2502ac1 Squashed 'features/nanostack/sal-stack-nanostack/' changes from 76da6a5..84a07ce
84a07ce Merge branch 'release_internal' into release_external
80b1e23 Check X509 config before using the functions

git-subtree-dir: features/nanostack/sal-stack-nanostack
git-subtree-split: 84a07ce1ca862a5a63c0024601193c65e10b6d5e
2019-03-12 10:06:35 -05:00
Vivek Pallantla 69e8b735b0 PSOC6 deep-sleep changes
- Enable add MBED_TICKLESS in targets/targets.json
 - BLE : deep-sleep aware HCI transport driver
 - WIFI: deep-sleep aware driver
 - Rebuild WICED libraries with Low Power changes
2019-03-12 10:06:33 -05:00
Oleg Kapshii 78a0057858 Added support for PSA target to WIFI_BT board
Added WiFi_Bt CM4 PSA target in mbedos json
Added SPE-NSPE mailbox initialization for CM4 SystemInit
Made similar to FUTURE_SEQUANA configurations
Copied FUTURE_SEQUANA CM0 SPM part for WiFi_Bt smoke test
Added CY8CKIT_062_WIFI_BT_M0 and CY8CKIT_062_WIFI_BT_M0_PSA targets
Sorted files for new CY8CKIT_062_WIFI_BT_M0 and CY8CKIT_062_WIFI_BT_M0_PSA targets
Copied files for CY8CKIT_062_WIFI_BT_M0_PSA from FUTURE_SEQUANA
Copied and updated cm0p start files
Corrected according to FUTURE_SEQUANA
Changes to M0 startup files to have SPM started
Fixed implicit declaration warning
Commented interrupts enabling according to FUTURE_SEQUANA flow
Updated prebuild spm_smore CM0 hex for CM4 target
Turned on greentea environment
Used special memory region for common CM0/CM4 data
Updated prebuild CM0 SPM hex
Placed shared memory region for flash operations into SPM shared memory region
Updated cyprotection code and configuration
Start address of protected regions is set by a defined number from target.json
Added masters pcMask configuration
Added support for PSA target to WIFI_BT board
Enabled resources protection for SPM
Aligned RAM usage according to Cypress FlashBoot and CyBootloader
alligned protection config
Added CYW943012P6EVB_01_M0 target
Enlarged heap size, remobed nv_seed
Added heap reservation in linker script from mbed-os
Removed heap size definition
turned on nv_seed config
Removed nv_seed macros
Enabled protection for PSoC6 CM0
Added PSoC6 CM0 PSA readme
Enabled mbed_hal-spm test
Enabled nv_seed and removed unneeded ipc config define
Added SPDX string to feature_ble cypress target files
Removed unneeded supported_toolchains lines for Cypress targets
Disabled protection settings
Corrected flash initialization for PSoC6 CM0 PSA
Changed PSoC6 IPC6 protection for flash
Enabled special flash initialization and enabled protection settings
Updated and added new prebuild PSoC6 CM0 PSA hex files
Disabled HW TRNG and CRC for PSoC6 CM4 PSA target
Added missing const to allow types to match
Updated PSoC6 WIFI_BT_PSA prebuilt directory
Moved PSoC6 shared section usage area definition to begin of ld
Added initial ARM_STD linker and startup files for PSoC6 CM0
Added initial IAR linker and startup files for PSoC6 CM0
Added defines to disable some SPM protection settings for PSoC64
Moved Flash function variables into separate memory region
Added defines for new Public area definition
Updated PSoC6 CM0_PSA hex-files
2019-03-12 10:06:32 -05:00
Nir Sonnenschein 65f632f8f4 add mbed_lib.json to prevent inclusion in bare-metal builds 2019-03-12 10:06:31 -05:00