Commit Graph

176 Commits (6e67794cce9f8564c0bb303b2f1630407c9414c0)

Author SHA1 Message Date
Andrzej Puzdrowski 080c5af88b remove hardcode uart pins definition for nRF52 SoCs
Each boards define its own pins.
2017-06-27 16:00:52 +02:00
Andrzej Puzdrowski 323633611c nrf5 spi_api - coding style enhancement 2017-06-27 10:44:21 +02:00
Andrzej Puzdrowski c1870afa86 Bugfix: #4357 simultaneous using of I2C and SPI.
Use serial-box of Nordic nRF5 SDK to share resource between
SPI and I2C.
SPI is allocated from highest hw instance number resource in order
to allocate as many I2C instances as possible.
2017-06-27 10:44:20 +02:00
iotvietmember 5c0c964291 Add support for VBLUno51 board [TARGET_VBLUNO51]
+ VBLUno51 board:
Nordic nRF51822
Bluetooth Low Energy
DAPLink interface
Arduino UNO pinout compatible
4 Power

+ Wiki: https://vngiotlab.github.io/vbluno/

+ Pass all test case in mbed test suite

Signed-off-by: iotvietmember <robotden@gmail.com>
2017-06-25 20:16:58 +07:00
Martin Kojtal d121a43e37 Merge pull request #4597 from theotherjimmy/travis-upcase-asm
Assert that all assembly files are named correctly in travis
2017-06-21 09:50:47 +02:00
Jimmy Brisson c7d6bbe295 Upcase all assembler file extensions 2017-06-20 14:50:08 -05:00
Vincent Coubard 970ee38079 NRF52840: Adjust idle thread stack size.
A stack size of 256 bytes is not enough on the NRF52840, this patch
changes it to a size of 512 bytes.
2017-06-16 10:15:03 +01:00
Martin Kojtal e850355a16 Merge pull request #4509 from kegilbert/17q2-spi_sdcard-rebase2
NRF52840: enabled SdBlockDevice capability
2017-06-09 15:07:03 +01:00
Russ Butler 805374ed89 Restore cmsis_nvic for Cortex-M0 targets
Restore cmsis_nvic (cmsis_nvic.c and cmsis_nvic.h) files for the
implementations which use a mechanism other than the VTOR to set
interrupts. These are vendor specific and were done for M0 devices
which do not have a VTOR.

Note - There were two cmsis_nvic files which did not use the VTOR that
which not restored in this patch. This is because these targets were
not M0 devices and could use the new unified implementation instead.
These files are:
targets\TARGET_ARM_SSG\TARGET_MPS2\TARGET_MPS2_M0P\device\cmsis_nvic.c
targets\TARGET_ONSEMI\TARGET_NCS36510\device\cmsis_nvic.c

Note - cmsis_nvic.c and cmsis_nvic.h were initial removed in
(and restored from) the commit:
b97ffe8fdc -
"CMSIS5: Replace target defined NVIC_Set/GetVector with CMSIS implementation"
2017-06-08 22:50:23 -05:00
Kevin Gilbert f324647aae Original pull request had added these checks to a deleted file. Replicating that change to allow builds on the NRF52840_DK (see original PR #4088 to see the explanation for the removal of spi async) 2017-06-08 17:31:24 -05:00
Andrzej Puzdrowski baf45b6596 [NRF52840]: disbale SPIM which fix block device 2017-06-08 17:31:24 -05:00
Andrzej Puzdrowski 3dc3329d13 [NRF5840] change: trng_get_bytes returns at last one random byte. 2017-06-07 15:32:57 -05:00
Andrzej Puzdrowski 8edac29db8 [NRF52840]: fix non-blocking mode of TRNG driver
improve coding style.
2017-06-07 15:32:40 -05:00
kl-cruz 8698756c63 [nRF52840] Fixed length in trng in every mode 2017-06-07 15:32:12 -05:00
kl-cruz c32e2c262a [nRF52840] added trng implementation for nrf52840 2017-06-07 15:31:39 -05:00
Sam Grove 5f138810a9 Merge pull request #4294 from ARMmbed/feature_cmsis5
Update CMSIS-Core and RTX to version 5
2017-06-02 23:44:32 -05:00
Martin Kojtal e229a49182 Merge pull request #4207 from geky/spi-remove-byte-locking
spi: Add SPI block-write to C++ and HAL for performance
2017-06-01 14:03:36 +02:00
Bartek Szatkowski 85cc9c8381 Remove deprecated RTX4 config options 2017-05-30 18:55:55 +01:00
Bartek Szatkowski b793a3fb89 Update codebase for CMSIS5/RTX5
Update all of mbed-os to use RTX5.
2017-05-30 18:55:52 +01:00
Bartek Szatkowski b97ffe8fdc CMSIS5: Replace target defined NVIC_Set/GetVector with CMSIS implementation 2017-05-30 18:55:51 +01:00
Sam Grove 58e88813a9 Merge pull request #4282 from kl-cruz/FlashAPI_nRF52840
Flash api nRF52840
2017-05-26 10:31:05 -05:00
Christopher Haster c1de19e49e spi: Added default spi_master_block_write implementation to all targets
There is an easy default implementation of spi_master_block_write that
just calls spi_master_write in a loop, so the default implementation
of spi_master_block_write has been added to all targets.
2017-05-25 12:04:58 -05:00
Jimmy Brisson da9b8f3dee Move duplicated NRF52 + MCU_NRF51822 files into NRF52 2017-05-22 11:26:43 -05:00
Jimmy Brisson e4739835ce Add static to NRF5 SDK11 macro definition 2017-05-19 15:06:41 -05:00
Martin Kojtal 8f295177ce Merge pull request #4317 from c1728p9/reduce_test_overhead
Reduce test overhead in preperation for CMSIS 5
2017-05-17 10:13:25 +01:00
kl-cruz 5cac624a2d nRF52840: Align sources after rebase 2017-05-17 09:21:51 +02:00
kl-cruz 4bb818cd97 nRF52840: Fixed flashapi test and casting issue 2017-05-17 09:21:39 +02:00
kl-cruz 98d4a13959 nRF52840: Aligned sources to coding standard 2017-05-17 09:21:27 +02:00
kl-cruz 7761af2b8d nRF52840: Removed unused, commented code 2017-05-17 09:21:17 +02:00
kl-cruz bd25d3bbda nRF52840: Added checking if sd is enabled in flashapi 2017-05-17 09:21:05 +02:00
kl-cruz 5e057a685d nRF52840: Cleaned up code 2017-05-17 09:20:54 +02:00
kl-cruz 39b0ef5394 nRF52840: Added flash_api implementation 2017-05-17 09:20:29 +02:00
Bartek Szatkowski c82c40f378 Temporarily increase max number of tasks for small boards
Affected boards: NRF51_DK, NRF52_DK, Beetle. This change is temporary and
will be overwritten by RTX update. It's necessary for the boards to pass
updated tests.
2017-05-15 13:23:08 +01:00
Andrzej Puzdrowski 1f1168a51e NRF5: changes for code review of merg nrf52840 to NRF5 sources
s140 headers renamed form ble_* to nrf_ble_*,
Removed s130 and s132 headers named form ble_*
(Them had been added by #2ff572682798562e812015dc775b5896e0fda5a4)
Headers inclusinons were changed in order to meet above changes.

Revrted bad change in us_ticker.c:
use __disable_irq lock instead of core_util_critical_section_enter lock
for setting rtc1 tick for systick emulation as was good before.
2017-05-09 15:43:30 +02:00
Andrzej Puzdrowski 382a067d4f Fix compilation errors on linux machine 2017-04-28 16:46:32 +02:00
Andrzej Puzdrowski 708dd4703d remove orphaned NRF5_SDK13 hal api driver 2017-04-28 13:47:44 +02:00
Andrzej Puzdrowski e6dbbde6ad [NRF5] coding style format. 2017-04-28 13:13:27 +02:00
Andrzej Puzdrowski 2ff5726827 [NRF5]
HAL driver: Add changes from needad for nrf52840 support
us_ticker, spi, sleep, serial, pwmout, pinmap, object, i2c, gpio, analogin

Add compatibility patches for:
- SoftDevice headers renamed (redirec by a few h files)
- sdk configuration (redirect by sdk_config.h files)
- renaming of func in softdevice handler module
2017-04-26 15:19:38 +02:00
Andrzej Puzdrowski c62a33e5c1 NORDIC: moving nRF52840 files to NRF5 "common" port.
TARGET_NRF5_SDK13/sdk -> TARGET_NRF5/TARGET_SDK13
TARGET_NRF5/sdk -> TARGET_NRF5/TARGET_SDK11
TARGET_NRF5_SDK13/TARGET_MCU_NRF52840 -> TARGET_NRF5/TARGET_MCU_NRF52840
2017-04-26 11:38:17 +02:00
Anna Bridge 7a3aa7a094 Merge pull request #4174 from nvlsianpu/nRF52840_rtc_ovf_bugfix
[NRF52840]:  fix rtc overflow-while-set-timestamp issue
2017-04-20 16:51:28 +01:00
Anna Bridge 78c48504c1 Merge pull request #4016 from nvlsianpu/nrf5_rtc_ovf_bugfix
[NRF5]: fix rtc overflow-while-set-timestamp issue
2017-04-20 15:48:03 +01:00
Andrzej Puzdrowski 67276e3785 [NRF52840]: fix coding style us_ticker.c 2017-04-12 14:34:14 +02:00
Andrzej Puzdrowski 55fbd7a299 [NRF52840]: Removed unwanted nRF5 SDK's app_timer libarary.
The Library is unused by the port. It breaks "non-rtos" compilation.
2017-04-12 11:43:11 +02:00
Andrzej Puzdrowski 560bd7403d [NRF52840]: fix:
- rtc overflow-while-set-timestamp issue
- timer has a race condition
2017-04-12 11:10:48 +02:00
Andrzej Puzdrowski 4f99aa5eb5 [NRF5] us_ticker:
- extarct for check rtc overflow
- make common_rtc_32bit_ticks_get safe against preemption.
2017-04-03 16:10:21 +02:00
Sam Grove 91ecc52da0 Merge pull request #4003 from productize/master
Fixed OBOE in async serial tx for NRF52 target, fixes #4002
2017-03-29 22:43:24 +01:00
Jimmy Brisson 0ed0a9e1b0 Remove the nrf_soc_nosd directory
This removes the duplicate header files from the build. We were getting
lucky on most invocations of `mbed compile` in that these headers were
searched for after some others, but not when exporting to uvision.
2017-03-24 11:21:30 -05:00
Brian Daniels 1019cb0bfe Fixing a macro to detect when RTOS was in use for the NRF52840_DK 2017-03-24 10:16:13 -05:00
Andrzej Puzdrowski c6ef2f377d [NRF5]: If rtc overflow occurr while setting of timestam then the ccompara-event ocurre (erroneusly) in 512s.
- move ovf handler at the begining of rtc handler for mitigate the case (mitigate issue for exexution from rtc handler)
- add repeating of operation of set a timestamp in cas that rtc overflow occured during the operation.
2017-03-24 15:00:25 +01:00
Seppe Stas 5c4c6ace0f Fixed OBOE in async serial tx for NRF52 target, fixes #4002 2017-03-23 10:51:46 +01:00
Andrzej Puzdrowski 680d086c70 [nRF52840] use core_util_critical_section_enter/exit instead of __enable_irq/__disable_irq 2017-03-22 13:15:11 +01:00
Ron Eldor c78f73ca63 Fix compilation errors on linux machine
Change path of include from '\' to '/', which works on linux as well.
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 71f302268e [NRF52840] Removed nrf52 targets files form nrf5_sdk13 sources. 2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski f6da6c0283 [NRF52840] code formating, CR changes
corrected spi_init() to properly handle re-initialization… #3842
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski b1b802f96c i2c_api implementation has been changed in order to support single byte reads and writes (the latter are used in I2CEeprom module used in CI tests, and this caused that tests-i2c-api were failing). These operations (single byte transfers) are not possible to achieve with the driver from nrf5 SDK (nrf_drv_twi), so the new implementation uses TWI HAL only. 2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski e798edc604 [NRF52840]: fix mbed-os-rtos-rtx-target_cortex_m-tests-memory-heap_and_stack@IAR by
increasing heap size for IAR. Corected initial MSP for ARMCC.
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 3a81e23cf2 [nRF5_SDK13] Changes from CR.
- fix typso, renaming, repharse commnets.
- fix alghoritm of white/id lists setup functions in nRF5xGap class.
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 113ae4e06b [NRF5_SDK13] fix:
- bad number of pin from nRF52840 ,
- bad type of mask of gpio for nRF52940
- typo (object.h)
- revert abort func. to spi_master driver
- update twi_master driver to the newest (e8527f65e90eee6a4dd48ca55d3fc051a556320a master SDK nRF5)
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 4e188af065 upgrade implementationof gap::connect in case of private address and whitelisting for SD API 3 and further 2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 9d8c05bbe8 introduce API update to (v3.x.x and further)in BLE_GAP_EVT_CONNECTED service.
whitelist and identiti list settings provider now takes into account scaner filter po0licy and advertise r filter policy
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 1366dfb65f nrf5_SDK13 update copyright clause 2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 42fcae481a nRF5: whitelisting update fo SD API >-3.x.x 2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 8aa71fa47a add mising fds configuration 2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 689d12df62 NRF5_SDK13: Make BLE sources compilable - this is not redy to use!
- Remove ble_advertising.h/c - it was unused, redundant code
- includes for SD header ble.h were changed to headers\ble.h in order to distingusch form feature-ble BLE.h
- btle_init() introduced PM for disable <B>privacy</B> for API 3 and further.
- temporary removed or mocked real implemantation of whitelist-ing support functionalities:
btle_security.createWhitelistFromBondTable , gap::startAdvertising, gat::startRadioScan, gap::stopAdvertising
Gap::generateStackWhitelist, Gap::getStackWhiteIdentityList-(mock)
- Characteristic Descriptor Discoverer - aligned to the apply SD API
- long uuid service's read spupport
- add BLE features support to sdk configurations file
- publicate sdk's id_manager.ah() function.
- cutted out f. app_error_handler for mbed-os
- removed PACKED definition form app_util_platform (redefined by mbed-os)
- Gap::setAddress  - allign to new SD API using peer manager
- extend Gap::getPermittedTxPowerValues for nRF52840
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 5b36de9c4f nrf52840: add workaround for RTC errata 20
include thered main stack for cmsis rtos
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 5649eef980 Enabled nRF52840_DK's compilation for IAR IDE:
- corected scater & startup file for IAR EW
- fix warnings caused by port_api.c, ble_radio_notification.c, nrf_drv_spi.c (for IAR it was error), serial_api.c
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 46f72777dc make nRF52840 target compilable for ARM compiler
- enable fstorage in sdk config
- remove files of modules: bootloader, DFU bootloader and UICR setings
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski f0b3cd2ed0 to be commented 2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski aef41216a9 ported-fixed for nRF52840 port
+ serial
+ analog
+ pin description
+ gpio
+ cmsis vector opp
+ gcc startup/scater file
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski a175e2ce31 + description of the NRF52840_DK target
+ mbed RTx setings for nRF52840

fix build of test for NRF52840
+ few sdk's missing filess
- few sdk's unvanted files
corect mbed HAL implementation to changes made in sdk v13
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 9bf209ef00 fix: align nRF5 v13 sdk struct to origin 2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 5ebcb3ec12 fix- sdk updste script bug causing losing of nested directory when coping file by forced directory. 2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski decf835475 move s140 headers to headers directory
add softdevices compiled inetl-hex files
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski 9fa7a61212 Update nRF5 SDK sources from version v11 to the version nRF5_SDK_13.0.0-1.alpha_055eef3
using
.\targets\TARGET_NORDIC\TARGET_NRF5_SDK13\porting_tools\sdk_update.py
and
.\targets\TARGET_NORDIC\TARGET_NRF5_SDK13\porting_tools\replace_headers.py

files .\targets\TARGET_NORDIC\TARGET_NRF5_SDK13\TARGET_MCU_NRF52832\sdk\softdevice\s132\headers\nrf_ble*.h
renamed to .\targets\TARGET_NORDIC\TARGET_NRF5_SDK13\TARGET_MCU_NRF52832\sdk\softdevice\s132\headers\ble*.h
by hand.
2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski ad5b64b4dd merge nRF528xx sdk sources into one directory 2017-03-22 08:38:34 +01:00
Andrzej Puzdrowski cd44b58d11 Initial commit of NRF52840 target as the copy of NRF52832 and NRF52_DK. 2017-03-22 08:38:34 +01:00
TsungtaWu 20411ec9bc [DELTA_DFBM_NQ620] Add RC calibration setting and revise mbed_overrides.c
In targets.json, add lf_clock_rc_calib_timer_interval and
lf_clock_rc_calib_mode_config setting which are essential when using BLE
In mbed_overrides.c, create valuables instead of doing printf, those
valuables are intended to be used for debugging in runtime.
2017-03-11 18:55:53 +08:00
Martin Kojtal c3e7b5434c Merge pull request #3842 from anangl/fix_spi_api
TARGET_NRF: corrected spi_init() to properly handle re-initialization…
2017-03-09 15:43:13 +00:00
Głąbek, Andrzej 4213c61073 TARGET_NRF: added a description of the recent change in spi_init(). 2017-03-02 13:47:37 +01:00
Głąbek, Andrzej 678f3f9966 TARGET_NRF: corrected spi_init() to properly handle re-initialization on the same pins + minor editorial corrections. 2017-02-27 13:48:55 +01:00
Hovik Melikyan c4a979ef72 Allow to redefine nRF's PSTORAGE_NUM_OF_PAGES outside of the mbed-os source
By default the number of pstorage pages is set 1 and all addresses are
calculated in the pstorage module accordingly. Nordic recommends
changing this macro to whatever number is suitable for the app (see
https://devzone.nordicsemi.com/question/53066/what-will-be-the-starting-
address-of-pstorage-page-how-we-can-change-it/?answer=53085#post-id-5308
5) which is not quite elegant given that pstorage_platform.h is part of
the mbed-os repo. With this modification you can e.g. define
PSTORAGE_NUM_OF_PAGES on the command line, however note that you should
rebuild mbed-os with this setting as it affects pstorage_platform.c.
2017-02-24 11:24:24 +00:00
Christopher Haster aff49d8d1e Renamed files in platform to match source names
critical.h     -> mbed_critical.h
sleep.h        -> mbed_sleep.h
toolchain.h    -> mbed_toolchain.h
rtc_time.h     -> mbed_rtc_time.h
semihost_api.h -> mbed_semihost_api.h
wait_api.h     -> mbed_wait_api.h
2017-02-22 18:17:54 -06:00
Sam Grove 14bc2338eb Merge pull request #3812 from anangl/rework_i2c
TARGET_NRF5: reworked i2c_api.c
2017-02-21 11:03:27 -06:00
Głąbek, Andrzej da73716092 TARGET_NRF5: corrected code style in i2c_api.c. 2017-02-21 11:47:51 +01:00
Głąbek, Andrzej de2114f92b TARGET_NRF5: removed TWI master driver, as it is no longer used by i2c_api.c. 2017-02-21 07:49:11 +01:00
Głąbek, Andrzej 4bc09b3a8f TARGET_NRF5: reworked i2c_api.c. 2017-02-21 07:48:54 +01:00
Bartek Szatkowski 762e15e772 NRF51822: HAL: Restore WEAK declaration for hal_(deep)sleep
Otherwise we have a conflict between NRF51822 and DELTA_DFCM_NNN40.
2017-02-01 09:30:48 +00:00
Martin Kojtal ade6722707 Merge pull request #3607 from ARMmbed/feature_hal_sleep
Platform: Add sleep/deepsleep user facing functions
2017-01-26 13:55:33 +02:00
Bartek Szatkowski f2c00c7cb5 NRF51822: Remove MBED_WEAK from hal_sleep functions 2017-01-19 11:56:13 +00:00
Bartek Szatkowski 6a045a49a9 Platform: Add sleep/deepsleep user facing functions
Add sleep/deepsleep functions to platform layer which are replacing HAL
functions with the same name, rename existing symbols in HAL layer
to hal_sleep/hal_deepsleep. This way sleep functions
are always available, even if target doesn't implement them, which makes
the code using sleep clearer. It also enables us to make decision on in
which builds (debug/release) the sleep will be enabled.
2017-01-19 09:39:29 +00:00
TsungtaWu c6e0b9c20e Revise to improve readability
Delete the blank line.
Use Marcos rather than magic numbers
Put brace at end of the while line
2017-01-19 17:20:46 +08:00
TsungtaWu ef26a4c0e7 Add DELTA_DFCM_NNN50 platform
greentea tests are all passing
mbedgt: test case results: 175 OK
Please kindly review this PR
2017-01-18 11:01:48 +08:00
Michael Ammann b1a9e7b1c8 Target: Add new target UBLOX_EVK_NINA_B1
Based on nrf51 MCU.
2016-12-20 10:31:14 +00:00
TsungtaWu 7d4befa01b DELTA_DFBM_NQ620 default configuration (#3298)
* Change default SRC setting and add mbed_sdk_init() for DELTA_DFBM_NQ620

Change SRC setting to RC as default to match with hardware config.
mbed_sdk_init() is added for internal debug purpose (experimental)

* remove the redundant #define

Those #define never used.
2016-12-05 16:43:07 +00:00
0xc0170 bcdb86675a ublox eva nina - fix line endings
Fixes #3346
2016-12-01 11:19:42 +00:00
Michael Ammann 76cfccb716 Update PinNames.h 2016-11-21 08:07:58 +01:00
Michael Ammann 5cf34fac8e Add files via upload 2016-11-18 17:17:28 +01:00
Michael Ammann 83379979a2 Create device.h 2016-11-18 17:17:15 +01:00
Vincent Coubard 9649637e42 [NORDIC - NRF51 - MBED 2] Fix a bug related to the RTC interrupt enabled.
Enable the interrupt for the OS tick when the OS tick is enabled rather than
all the time. Otherwise, the interrupt will be triggered bu never handled.
2016-11-10 16:47:25 +00:00
Sam Grove e011341f04 Merge pull request #3176 from RidaJichi/master
Modifying micro:bit pin names to mirror micro:bit edge connector
2016-11-07 10:25:53 -06:00