Commit Graph

15477 Commits (beb6d7802a2ba5639f89738354e86b7a54db5104)

Author SHA1 Message Date
Jimmy Brisson beb6d7802a Cleanup extraneous spaces on empty lines 2018-04-30 09:30:32 -05:00
Jimmy Brisson d0e09851ac Use rel path for the ONLY arm asm include statement 2018-04-23 15:23:35 -05:00
Jimmy Brisson d8becaa652 Remove ASM include paths for ARM compiler 2018-04-23 15:23:00 -05:00
Cruz Monrreal 5fcc9617de
Merge pull request #6486 from deepikabhavnani/thread_class_tz
Thread class tz
2018-04-23 11:03:08 -05:00
Cruz Monrreal 11b6a4eaf9
Merge pull request #6602 from 0xc0170/fix_req_future
requirements: add future
2018-04-23 11:02:43 -05:00
Cruz Monrreal f372bcb69b
Merge pull request #6611 from pauluap/compiler_warning_UARTSerial
Uninitialized variable warning in UARTSerial at -O3
2018-04-23 11:01:49 -05:00
Cruz Monrreal a15c2f0b22
Merge pull request #6666 from bcostm/PULL_REQUEST_CUBE_UPDATE_L0_V1.10.0
STM32L0: Update with CubeL0 V1.10.0
2018-04-23 11:01:13 -05:00
Cruz Monrreal f7a707ace8
Merge pull request #6669 from ithinuel/make_pr_template_fancier
make PR type box list "fancier" without making it a github tasklist
2018-04-23 10:59:09 -05:00
Cruz Monrreal 35bd8b9de1
Merge pull request #6682 from jarvte/fix_cellular_unittests
Fixed cellular unittests
2018-04-23 10:57:50 -05:00
Cruz Monrreal a27700da33
Merge pull request #6683 from ganesh-ramachandran/master
Add IAR export and nvstore page size fix for TMPM46B
2018-04-23 10:53:55 -05:00
Cruz Monrreal 8e2398520a
Merge pull request #6686 from maximmbed/max32620c-fix-i2c
Remove automatic I2C stop after each read
2018-04-23 10:52:51 -05:00
Cruz Monrreal 38846b2a6c
Merge pull request #6690 from li-ho/ev-cog-bootloader
ADI: Enable bootloader for EV_COG_AD3029LZ and EV_COG_AD4050LZ
2018-04-23 10:51:41 -05:00
Anna Bridge 6634e4606d
Merge pull request #6547 from marcuschangarm/feature-nrf52
Update Nordic NRF52 based targets to SDK 14.2
2018-04-20 10:35:40 +01:00
Edmund Hsu e10ef5bd73 ADI: Enable bootloader for EV_COG_AD3029LZ and EV_COG_AD4050LZ 2018-04-20 16:20:02 +10:00
Edmund Hsu e2d9eb8b79 EV_COG_AD3029LZ: Rework linker scripts to support bootloader
- fix compiler warning message of flash_api.c
- eliminate absolute address of ROM tables
- add MBED_APP_START and MBED_APP_SIZE to linker scripts
2018-04-20 15:57:05 +10:00
Edmund Hsu beb6a38009 EV_COG_AD4050LZ: Rework linker scripts to support bootloader
- fix compiler warning message of flash_api.c
- fix compiler warning message of startup_ADuCM4050.c
- eliminate absolute address of ROM tables
- add MBED_APP_START and MBED_APP_SIZE to linker scripts
2018-04-20 15:45:26 +10:00
Keyur Hariya 3e7a909265 Remove automatic I2C stop after each read
Automatic stop prevents sending repeated start.
2018-04-19 13:20:14 -05:00
Marcus Chang b964420bbc Reorganize targets.json for NRF52 based targets
* Consolidated device_has and macros to the main MCU targets.
* Moved errata configuration to mbed_lib.json for HAL implementation.
* Moved clock configuration to mbed_lib.json for HAL implementation.
* Moved UART configuration to mbed_lib.json for HAL implementation.
2018-04-19 09:41:05 -07:00
Marcus Chang 2c651afd11 Updated target MTB_LAIRD_BL652 to use SDK 14.2 2018-04-19 09:40:41 -07:00
Marcus Chang b9f91b3839 Fix off-by-one error in NRF52 serial implementation 2018-04-19 09:40:41 -07:00
Marcus Chang 18fa9414cd Add resource management for serial for the NRF52 family
Instance counter keeps track of how many objects have been
initialized and freed. On the first object the instance is
enabled and on the last object the instance is disabled.
2018-04-19 09:40:41 -07:00
Marcus Chang cafa8ae752 Fix serial_putc bug in NRF52 family
serial_putc didn't work when called with interrupts disabled.
2018-04-19 09:40:41 -07:00
Marcus Chang 3663494bd9 Serial re-implementation for the NRF52 series
Serial implementation uses UARTE instead of UART peripheral:

* EasyDMA is used for reading and writing data.
* Triple buffering for receiving data.

See README for full description.
2018-04-19 09:40:41 -07:00
Marcus Chang 9502011d96 README file for NRF52 HAL implementation
Added SPI and I2C section.
2018-04-19 09:40:41 -07:00
Marcus Chang fc8f0e1aa4 I2C HAL update for NRF52
When possible, the I2C HAL will now use the TWI driver in SDK 14.

The manual I2C API still maps onto the old TWI peripheral directly
because the TWI driver doesn't provide the needed low-level functionality.
2018-04-19 09:40:41 -07:00
sarahmarshy c9d16e9e89 Implement SPI API for NRF52x
Implement spi_api.c for NRF52X boards using SDK14.

This driver does not implement SPI slave functions and does not use SPIM.
2018-04-19 09:40:41 -07:00
Marcus Chang d11f74cb4c NRF52 series PWM reimplementation for SDK 14.2
Driver uses new API in SDK 14.2
2018-04-19 09:40:41 -07:00
Donatien Garnier f9b371fc0f Handle required BLE5 softdevice commands 2018-04-19 09:40:41 -07:00
Donatien Garnier aeab2ecbbf Fix potential race condition in nRF5xn.cpp 2018-04-19 09:40:41 -07:00
Marcus Chang cfb480447a NRF52: fix us_ticker IRQ handler
Applying PR to NRF52 SDK 14.2:
https://github.com/ARMmbed/mbed-os/pull/5046
2018-04-19 09:40:41 -07:00
Marcus Chang 97426d63e9 NRF52 BLE: Fix GCC C++11 include error
Change <memory> include to <new>

From: d001fb1c66
2018-04-19 09:40:41 -07:00
Marcus Chang 8dd627621e Fix ISR stack size inconsistencies on NRF52 series
GCC and IAR ISR stack sizes have been set to 0x800.
(ARM compiler does not set stack size explicitly).
2018-04-19 09:40:41 -07:00
Marcus Chang 6db7e68db5 Helper functions for sharing hardware peripherals on NRF52
Common functions for getting and setting the instance owner of a
hardware peripheral. Used for reconfiguring SPI/I2C after change
of ownership.
2018-04-19 09:40:41 -07:00
Blackstone Engineering ea6c0078c7 Extended PeripheralPins and pinmap for NRF52 series
The NRF52 series can map digital signals to any physical pin which
makes it challenging to associate pin names with hardware instances.

pinmap_ex:
  Keep track of which hardware instance is in use and what pins are
  associated with it. Currently only supports I2C and SPI, but
  provides a mechanism for allocating the shared I2C/SPI hardware.

PeripheralPinsDefault:
  Optional pin map for pre-assigning hardware instances at compile
  time. This makes it easier to optimize hardware utilization.
2018-04-19 09:40:41 -07:00
Marcus Chang f0d1424768 Update analogin_api.c for NRF52 SDK 14.2
Use new SDK API and fixed return value to be normalized to 16 bit
as per the Mbed HAL specification.
2018-04-19 09:40:41 -07:00
Donatien Garnier 64baf717e8 Upgrade NRF52 BLE API to version 5
* Add NRF_SD_BLE_API_VERSION=5 macro to MCU_NRF52832 target
* Added initial Softdevice v5 API support for nRF5XPalGattClient.cpp
* Added initial Softdevice v5 API support for nRF5xGap.h
* Added initial Softdevice v5 API support for nRF5xGattServer.cpp
* Make sure the ah() hash function used by the security manager is declared with C linkage
* Removed 'ARM porting pending' checks in Nordic SDK
* Added BLE configuration to mbed_lib.json for NRF52x targets
* Migrated APIs and events model for Nordic SDK14.2 & SD API v5 in btle.cpp; adopted polling dispatch model
* Migrated APIs and events model for Nordic SDK14.2 & SD API v5 in nRF5xn.cpp
* Migrated APIs and events model for Nordic SDK14.2 & SD API v5 in nRF5xGap.cpp
* Added const qualifier to hwCallbacks's p_ble_evt parameter in nRF5xGattServer
* Add workaround to enable Radio Notification module from Nordic SDK
  * Disabled SWI1 interrupt manually from SWI driver module
    * Added missing include directive for "nrf_nvic.h" in ble_radio_notification.c
* Set correct number of custom UUIDs
* Adjust Softdevice RAM requirements for NRF52832/S132
  * RAM settings for the application were adjusted as follow:
    * Start: 0x20003800
    * Size: 0xC800
* Adjust Softdevice RAM requirements for NRF52840/S140
  * RAM settings for the application were adjusted as follow:
    * Start: 0x20003700 (was 0x20003000)
    * Size: 0xC900
* Added 3dBm as a permitted TX Power value for NRF52832
* Fix address type recovery in GAP
* Return min non-connectable adv interval compatible with infrastrcture's expectations
* Moved BLE driver from TARGET_SDK_14_2/FEATURE_BLE to TARGET_SDK_14_2/TARGET_SOFTDEVICE_COMMON/ble
2018-04-19 09:40:41 -07:00
Marcus Chang fa79e685fc Fix TRNG for NRF52
* When multiple TRNG objects are initialized, destroying the first
  object will turn the TRNG off for the other objects. This fix
  adds a counter to ensure that only when the last object is
  destroyed will it cause the TRNG to be disabled.

* The corner case where a user request 0 bytes is correctly handled
  and will now return immediately.
2018-04-19 09:40:41 -07:00
Marcus Chang 5d5277336a Fix NRF52 build error
This commit removes mbed 2 support for the NRF52 since the new build
system is incompatible with the old one.
2018-04-19 09:40:41 -07:00
Marcus Chang 3b9ec4932c Flash storage for NRF52
Add fstorage and fds from Nordic SDK for SoftDevice compatible
flash storage. Mbed HAL flash API mapped to use fstorage API
to ensure write and erase doesn't conflict with BLE operation.
2018-04-19 09:40:41 -07:00
Marcus Chang 2e7b5ba27b Fix linker scripts and startup code for NRF52
Various bug fixes:

 * Moved SPIM3 location in vector table based on new location in SDK 14.2.
 * Updated vector table entries and size in startup code and linker scripts.
 * Added missing vector table RAM section to IAR linker script.
2018-04-19 09:40:41 -07:00
Marcus Chang 00713342b9 Switch to managed bootloader for SoftDevice merge on NRF52
SoftDevice can be swapped even easier now:

    "target_overrides": {
        "*": {
            "target.extra_labels_remove": ["SOFTDEVICE_COMMON", "SOFTDEVICE_S140"],
            "target.extra_labels_add": ["SOFTDEVICE_NONE"]
        }
    }
2018-04-19 09:40:41 -07:00
Marcus Chang 39c69f146c Optional SoftDevice for the NRF52 series
Ability to swap SoftDevices using the mbed configuration system.

For example, build NRF52840_DK without SoftDevice:

    "target_overrides": {
        "*": {
            "target.MERGE_SOFT_DEVICE": false,
            "target.extra_labels_remove": ["SOFTDEVICE_COMMON", "SOFTDEVICE_S140"],
            "target.extra_labels_add": ["SOFTDEVICE_NONE"]
        }
    }

Pinned down vector table to beginningn of RAM.
2018-04-19 09:40:41 -07:00
Marcus Chang 770b1a326e Simplified critical_section_api.c for NRF52 series
Critical section enter/exit is now delegated to Nordic SDK's

sd_nvic_critical_region_enter
sd_nvic_critical_region_exit

When the SoftDevice is not included these functions map to

__disable_irq
__enable_irq
2018-04-19 09:40:41 -07:00
Marcus Chang 60397c527e Renamed NRF52 targets for HAL critical section test 2018-04-19 09:40:41 -07:00
Marcus Chang 5c3e494a7e Renamed MCU_NRF52832 inheritance in MTB_UBLOX_NINA_B1 2018-04-19 09:40:41 -07:00
Marcus Chang c049921064 Add GCC linker sections for NRF52 SoftDevice 2018-04-19 09:40:41 -07:00
sarahmarshy 6827816454 Add TRNG device_has for NRF52_DK 2018-04-19 09:40:41 -07:00
Marcus Chang cf61c240bf Update critical section for NRF5x 2018-04-19 09:40:41 -07:00
Marcus Chang efa3461fd4 Change target.json to use new SDK and folder structure for NRF52 2018-04-19 09:40:41 -07:00
Marcus Chang 3940d3abaf Default SDK configuration for NRF52832 and NRF52840 2018-04-19 09:40:41 -07:00