Commit Graph

176 Commits (6e67794cce9f8564c0bb303b2f1630407c9414c0)

Author SHA1 Message Date
Cruz Monrreal 80082278b8
Merge pull request #6124 from marcuschangarm/nrf52_flash_fix
Make NRF52 flash work with SoftDevice
2018-02-20 13:31:45 -06:00
Marcus Chang 0a1cae9352 Make NRF52 flash work with SoftDevice
How you write and ersae the flash on the NRF52 changes depending on
whether the SoftDevice is enabled or not.

This change does a runtime check before erasing and writing, and
then chooses the correct function to perform the action.
2018-02-16 13:54:27 -08:00
Marcus Chang 6aa0975d71 itm_api.c implementation for Nordic NRF52 series
SWO frequency: 4000 kHz
2018-02-16 08:24:42 -08:00
Cruz Monrreal ee52f9044a
Merge pull request #5892 from OSHChip/master
add OSHChip as an mbed target
2018-02-14 15:19:26 -06:00
Ashok Rao 6c8b9b5005 Added MTB aliases & default SPI 2018-02-06 13:44:24 +00:00
Ashok Rao 2e9c3340de Adding LAIRD_BL600 MTB 2018-02-01 17:21:37 +00:00
Cruz Monrreal b08e1b3078
Merge pull request #5837 from ashok-rao/br-ublox-NINA
Adding MTB ublox NINA-B1 as a new target
2018-01-30 14:55:43 -06:00
Ashok Rao e1d901204b Add license info 2018-01-29 12:20:00 +00:00
drewcassidy 5547a09f20
fix typo 😖 2018-01-25 08:24:39 -08:00
drewcassidy e06d1db8ac
Add pinout diagram 2018-01-25 08:24:39 -08:00
drewcassidy a6c69567ee
add board header files 2018-01-25 08:24:38 -08:00
Cruz Monrreal 671c2d7e90
Merge pull request #5346 from scartmell-arm/feature-hal-spec-critical-section
Add Critical Section HAL API specification
2018-01-16 12:49:38 -06:00
Ashok Rao ec719bc2d9 Adding MTB ublox NINA-B1 as a new target 2018-01-12 13:08:27 +00:00
Cruz Monrreal b32828bc37
Merge pull request #5739 from pan-/nordic-new-client
BLE: Nordic pal client implementation
2018-01-11 10:26:47 -06:00
Vincent Coubard 31053273c2 Nordic BLE: Fix stack event size
Read By group type response can return 4 descriptor discovered when the remote server have 4 descriptors with a 16 bit UUID. The handle, UUID pair get stored in a ble_gattc_desc_t that is 20 bytes long.

This PR increase buffer size to handle this use case.
2018-01-10 17:04:35 +00:00
Steven Cartmell 643c8926d5 Remove counter from nordic critical HAL implementation
hal_critical_section_enter() is safe to call multiple times, however
hal_critical_section_exit() is only called on the last exit from a
critical section. This will cause a mismatch in the counter and the
interrupt state will never be restored if the critical section is
nested. Change this to a bool so that the interrupt save state is
tracked for hal_in_critical_section() to work correctly.
2018-01-09 15:35:12 +00:00
Steven Cartmell 061795c489 Move in_critical_section implementation into the HAL
- Add function to HAL hal_in_critical_section()
- Wrap assert in FEATURE_UVISOR macro
2018-01-09 10:41:29 +00:00
Steven Cartmell e14bee5209 Fix potential race condition in critical section HAL API
Call underlying HAL implementation to enter critical section/disable interrupts
before incrementing the global critical section counter.

Modify HAL implementations to track first entrances to the critical section and
only update the saved state on first enter.
2018-01-05 14:55:58 +00:00
Steven Cartmell 3c9ae7bf1c NRF51_DK: Add Critical Section HAL implementation 2018-01-05 14:55:57 +00:00
Jimmy Brisson b2495c7a8d
Merge pull request #5595 from nvlsianpu/bugfix/nordic_critical_section
fix nordic critical section
2018-01-04 09:52:32 -06:00
Andrzej Puzdrowski ae41c7db17 Implementation of critical section primitives
which can be called from diferent contexts.

Orginal nordic critical primitives must been called in pairs
from exacly the same function. As mbed hal call it in separate
methods, so they are not suitable here.
2018-01-03 11:39:15 +01:00
Dexter Fryar 30e1e0a349 Add app_start config system support for NRF52840 for bootloader 2017-12-20 08:25:14 -06:00
Andrzej Puzdrowski b084812eff current critical section implementation makes possible that interrupt
signals are lost. It was observed at last for tests-api-spi ci-test-shield's
test.

This patch introduce usage of sdk5 origin implementation in which
sd_nvic_critical_region_enter/exit is calling each time critical region
is enter/exit. This fixes the issue.
2017-11-28 09:44:28 +01:00
Martin Kojtal 1fa09fa43d
Merge pull request #5487 from nvlsianpu/bugfix_5462_initial_pin_value
Fix bug for issue:  initial pin value not retained
2017-11-16 16:13:13 +00:00
Andrzej Puzdrowski edb86500b5 Fix bug for issue 5462, initial pin value not retained
For api usage like DigitalOut led(LED1, 1) the hal function gpio_write()
sets the output before f. gpio_mode() is called. gpio_mode() clears the
output as it take never writen parameters (gpio_cfg_t.init_hight).

This patch use internal hardware register of GPIO output instedad of above paramiter latch
for retaining proper writen state.
2017-11-13 16:44:56 +01:00
johnny a2c78e104a Add support for RedBear's BLE Nano 2
Cribbed from 4bf42f2e20

I'm not sure if if there are any copyright issues here with what is
effectively a set of config files. A few folks have been bugging me (and
the redbear folks) for these changes, so I wanted them somewhere
centralized.
2017-11-02 17:43:12 -04:00
Jimmy Brisson 0b796cdbb9 Merge pull request #5187 from nvlsianpu/fix_i2c_timeout
nRFx: Use us ticker for I2C timeout
2017-10-13 09:20:14 -05:00
Jimmy Brisson 5c3ce0a84c Merge pull request #5200 from nvlsianpu/nrf51_adcIn_range_extend
Extend nRF51 AnalogIn voltage range to 3.6 V
2017-10-09 11:14:41 -05:00
Andrzej Puzdrowski 2a0d38eaf6 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-09 14:14:54 +02:00
Andrzej Puzdrowski 93fb667b6d Fix: DigitalIn of nRF5x was allocating GPIOTE channel
The allocation of GPIOTE channels for DigitalIn is unwanted behavior.
This caused early run-out of channels for InterruptPin.
This patch replacing input configuration that is using gpiote driver by configuration that is
using gpio hal.
2017-09-27 09:49:48 +02:00
Andrzej Puzdrowski f861b37196 Extend nRF51 AnalogIn voltage range to 3.6 V
Previous the voltage range was set to 1.2 from SoC internal reference source.
This caused problem with testing. It is unexpected that range is much
shorter than vdd as well.

The voltage range was extended using SoC build in analog prescaler (set to 1/3).
2017-09-26 11:31:50 +02:00
Jimmy Brisson ca41a0f59d Correct uninit region for nordic targets 2017-09-13 14:51:27 -05:00
Jimmy Brisson d3b33d75a4 Correct NRF SDK11 assembly 2017-09-11 13:20:33 -05:00
Jimmy Brisson 4da4c1f5ce Correct compiler switching in Nordic code 2017-09-11 13:20:32 -05:00
Jimmy Brisson 15a9a0382b Enable Compiling with ARMC6 across all targets
remove duplicate sys.cpp
2017-09-11 13:20:32 -05:00
Russ Butler c3eae587eb Add tickless support for devices without SysTick
Some Cortex-M0 devices, such as the nrf51, don't have the SysTick.
Instead, these targets use a software interrupt to simulate SysTick.
Add the hooks in the tickless code to support these devices. Targets
which do not have SysTick should now define NO_SYSTICK in targets.json
and implement mbed_get_m0_tick_irqn to add os suport.

This patch also removes os tick handling from the existing devices
(nrf51) since this is now handled in common code.
2017-09-07 21:35:04 -05:00
Jimmy Brisson 74387f8c78 Merge pull request #4765 from iotvietmember/add_vbluno52
Add support for the VBLUno52 board
2017-07-27 09:45:53 -05:00
Jimmy Brisson 1f94ede86c Merge pull request #4744 from deepikabhavnani/spi_issue_4743
Allow user to set default transfer byte for block read
2017-07-24 14:45:30 -05:00
iotvietmember bd49f4303e Add support for the VBLUno52 board
Fix ERROR_PATTERN in VBLUNO52 config

Signed-off-by: iotvietmember <robotden@gmail.com>
2017-07-22 11:23:51 +07:00
Deepika 1b797e9081 Closed review comments
1. Doxygen and Grammar related
2. Change dummy to spi_fill
3. Remove NXP driver and add default loop in spi block read (same as all
other drivers)
2017-07-21 09:46:22 -05:00
Jimmy Brisson adfed0f9de Merge pull request #4644 from 0xc0170/fix_ticker_delta_negative
Ticker: add fire interrupt now function
2017-07-17 11:05:46 -05:00
Martin Kojtal c295187750 Merge pull request #4634 from nvlsianpu/bugfix/issue_4357_I2C_SPI_simultaneously
Fix the issue #4357: NRF52 doesn't support simultaneous use of I2C and SPI.
2017-07-13 16:53:33 +02:00
Martin Kojtal 06ff4f8bf2 Merge pull request #4693 from pan-/fix#4658
Nordic: Fix multiple defined symbol.
2017-07-13 16:43:09 +02:00
Martin Kojtal 08dfc8458e Merge pull request #4736 from pan-/fix_nrf52_idle_stack
NRF52832: Extend idle thread stack size to 512 bytes.
2017-07-13 16:36:38 +02:00
Martin Kojtal 10ea63b8e7 Ticker: add fire interrupt now function
fire_interrupt function should be used for events in the past. As we have now
64bit timestamp, we can figure out what is in the past, and ask a target to invoke
an interrupt immediately. The previous attemps in the target HAL tickers were not ideal, as it can wrap around easily (16 or 32 bit counters). This new
functionality should solve this problem.

set_interrupt for tickers in HAL code should not handle anything but the next match interrupt. If it was in the past is handled by the upper layer.

It is possible that we are setting next event to the close future, so once it is set it is already in the past. Therefore we add a check after set interrupt to verify it is in future.
If it is not, we fire interrupt immediately. This results in
two events - first one immediate, correct one. The second one might be scheduled in far future (almost entire ticker range),
that should be discarded.

The specification for the fire_interrupts are:
- should set pending bit for the ticker interrupt (as soon as possible),
the event we are scheduling is already in the past, and we do not want to skip
any events
- no arguments are provided, neither return value, not needed
- ticker should be initialized prior calling this function (no need to check if it is already initialized)

All our targets provide this new functionality, removing old misleading if (timestamp is in the past) checks.
2017-07-13 12:23:25 +01:00
Vincent Coubard 3f4e839957 NRF52832: Extend idle thread stack size to 512 bytes.
Fix a crash where the idle thread stack size overflows. This crash
was depending on the compiler and standard library used.
2017-07-11 11:55:47 +01:00
Vincent Coubard 17b68d7c50 Nordic: Fix multiple defined symbol.
The symbol Systick_Handler was defined as a weak symbol in us_ticker.c and
startup_nRF51822.s. While it work as expected when an application is compiled
from mbed OS source code it creates a duplicate symbol issue when mbed OS is
bundled as a library.
2017-07-03 15:07:06 +01:00
andreas.larsson 461c1b8492 Set LED4 the same as LED3 to get tests-mbedmicro-rtos-mbed-timer to pass. If set to NC the test will assert. 2017-06-30 12:29:38 +02:00
Jimmy Brisson 916bc4d953 Merge pull request #4629 from iotvietmember/add_target_vbluno51
Add support for VBLUno51 board
2017-06-29 11:08:19 -05:00
iotvietmember 96e932525b Remove comment in sdk_config.h
Signed-off-by: iotvietmember <robotden@gmail.com>
2017-06-27 21:27:40 +07:00