Commit Graph

522 Commits (af0ab802d43c744ce6e61c52c0994d928462dc36)

Author SHA1 Message Date
Martin Kojtal d0d3462781
Merge pull request #11846 from manchoz/manchoz_makerdiary-nrf52840-mdk
Add support for Makerdiary nRF52840-MDK
2019-11-21 10:54:21 +01:00
Martin Kojtal 699372421a
Merge pull request #11790 from 0xc0170/master-rob
nrf52: reset UARTE peripheral in serial_free
2019-11-14 10:42:08 +01:00
Giampaolo Mancini 1804b40fac Fix indentation 2019-11-12 14:48:54 +01:00
Giampaolo Mancini fd3088867e Add support for Makerdiary nRF52840-MDK 2019-11-12 09:56:04 +01:00
Przemyslaw Stekiel b24afed5ae SPI fpga test: use get_capabilities() function to skip test cases for unsupported features 2019-11-06 10:09:20 +01:00
Rob Vlaar 6f31229f48 Workaround to reset UARTE peripheral to be able to go into deep sleep 2019-10-31 15:29:30 +00:00
Przemyslaw Stekiel c83307e96c NRF52: Fix PWM driver
Fix pwm nrf
2019-10-30 14:37:30 +01:00
Martin Kojtal 4b21157085
Merge pull request #11739 from maciejbocianski/nrf52_i2c_byte_rw_fix
Nrf52 i2c byte rw fix
2019-10-28 13:16:49 +01:00
Maciej Bocianski 703348acc8 NRF52: fix i2c byte read/write implementation
i2c_byte_write implementation was broken.
Data sending was inside addressing block

Changed from:
i2c_byte_write
{
   if (start) {
      if (read_address)
         start read;
      esle
         start write;
      write byte;
   }
}

to:
i2c_byte_write
{
   if (start) {
      // if first call after start
      // address for reading or writing
      if (read_address)
         start read;
      esle
         start write;
      } else {
         // send data byte
         write byte;
   }
}
2019-10-28 08:41:12 +01:00
Martin Kojtal 8637069b36
Merge pull request #11698 from kjbracey-arm/armstack
Clean up ARM toolchain heap+stack setup in targets
2019-10-24 11:37:11 +02:00
Maciej Bocianski 7d5f6cf4a9 NRF52: fix i2c timeouts
add tick to us conversion
2019-10-23 15:00:11 +02:00
Kevin Bracey fb6aa3ef4f Clean up ARM toolchain heap+stack setup in targets
ARM Compiler 6.13 testing revealed linker errors pointing out
conflicting use of `__user_setup_stackheap` and
`__user_initial_stackheap` in some targets. Remove the unwanted
`__user_initial_stackheap` from the targets - the setup is
centralised in the common platform code.

Looking into this, a number of other issues were highlighted

* Almost all targets had `__initial_sp` hardcoded in assembler,
  rather than getting it from the scatter file. This was behind
  issue #11313. Fix this generally.
* A few targets' `__initial_sp` values did not match the scatter
  file layout, in some cases meaning they were overlapping heap
  space. They now all use the area reserved in the scatter file.
  If any problems are seen, then there is an error in the
  scatter file.
* A number of targets were reserving unneeded space for heap and
  stack in their startup assembler, on top of the space reserved in
  the scatter file, so wasting a few K. A couple were using that
  space for the stack, rather than the space in the scatter file.

To clarify expected behaviour:

* Each scatter file contains empty regions `ARM_LIB_HEAP` and
  `ARM_LIB_STACK` to reserve space. `ARM_LIB_STACK` is sized
  by the macro `MBED_BOOT_STACK_SIZE`, which is set by the tools.
  `ARM_LIB_HEAP` is generally the space left over after static
  RAM and stack.
* The address of the end of `ARM_LIB_STACK` is written into the
  vector table and on reset the CPU sets MSP to that address.
* The common platform code in Mbed OS provides `__user_setup_stackheap`
  for the ARM library. The ARM library calls this during startup, and
  it calls `__mbed_user_setup_stackheap`.
* The default weak definition of `__mbed_user_setup_stackheap` does not
  modify SP, so we remain on the boot stack, and the heap is set to
  the region described by `ARM_LIB_HEAP`. If `ARM_LIB_HEAP` doesn't
  exist, then the heap is the space from the end of the used data in
  `RW_IRAM1` to the start of `ARM_LIB_STACK`.
* Targets can override `__mbed_user_setup_stackheap` if they want.
  Currently only Renesas (ARMv7-A class) devices do.
* If microlib is in use, then it doesn't call `__user_setup_stackheap`.
  Instead it just finds and uses `ARM_LIB_STACK` and `ARM_LIB_HEAP`
  itself.
2019-10-23 14:53:49 +03:00
Giampaolo Mancini c30ca66e2b Add SPDX identifier 2019-10-21 15:41:41 +02:00
Giampaolo Mancini f9674adaad Fix overflow calculation for reload_value.
Please,  note that this patch fixes upstream bug. See:

https://devzone.nordicsemi.com/f/nordic-q-a/51674/maximum-reload-time-for-wdt
2019-10-21 15:41:41 +02:00
Giampaolo Mancini c79f54c67b Remove default conf macro because typo in nRF SDK 2019-10-21 15:41:41 +02:00
Giampaolo Mancini 92a316711e Fix timeout limits 2019-10-21 15:41:41 +02:00
Giampaolo Mancini 10c78f41e8 Add support for nRF52 Watchdog 2019-10-21 15:41:40 +02:00
Martin Kojtal c94ae909a8
Merge pull request #11622 from trowbridgec/increase-nrfx-gpiote-config-num-of-low-power-events
nRF52 SDK 15.0 - Enable more than 1 interrupt
2019-10-16 14:26:04 +08:00
Martin Kojtal ea3ead0349
Merge pull request #11676 from maciejbocianski/nrf5X_fix_i2c_twi_sdk
nrf52 - fix i2c/twi driver
2019-10-15 22:16:19 +08:00
Maciej Bocianski 7cc0b614bb nrf52 - fix i2c/twi driver
Sync TWI driver to sdk version 15.3.0 to get rid of data length limitation
2019-10-12 08:59:57 +02:00
Maciej Bocianski 98939e2749 nrf5x - add missing gpio_set implementation 2019-10-11 08:55:23 +02:00
Chris Trowbridge 26ebc997e0 Increase NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS from a default of 1 to 4 2019-10-03 08:56:39 -04:00
Martin Kojtal fda544a14c
Merge pull request #11566 from trowbridgec/add-default-connectivity-config-for-ep-agora
EP_AGORA: Add config logic to enable BLE, cell, and LoRa by default
2019-10-01 13:17:59 +02:00
Martin Kojtal 7e62cafc82
Merge pull request #11585 from marcemmers/nrf_port_api
NRF52: Fixed missing guard in port_api.c
2019-09-30 14:46:31 +02:00
Marc Emmers a02c50d768 Add newline at end of file 2019-09-30 11:20:56 +02:00
Marc Emmers 4c1067b8b8 Fixed missing #if in port_api.c 2019-09-27 14:44:20 +02:00
Chris Trowbridge eb6a474ba8 EP_AGORA: Add config logic to enable BLE, cell, and LoRa by default 2019-09-25 12:28:04 -04:00
Martin Kojtal 530f1e9a24 NRF52: fix config
remove lib config and use target configuration instead. To avoid duplication of symbols, etc.

Fixes #10655
2019-09-05 11:02:05 +01:00
Hugues Kamba f3df1c1d1e Relocate TARGET_MCU_NRF52840 to TARGET_NRF5x/TARGET_NRF52 2019-08-16 15:42:43 +01:00
Hugues Kamba 5cbc3e0497 Relocate USB target specific code to root `targets` directory
All target specific source and header files should be in the `targets`
directory located at the root of the Mbed OS repository.
2019-08-16 15:42:43 +01:00
Martin Kojtal be23d3c871
Merge pull request #11137 from facchinm/nano33ble_public
Add Arduino Nano 33 BLE target
2019-08-13 10:51:12 +02:00
Martino Facchin bd0988416e [TARGET] Add Arduino NANO33BLE 2019-08-08 17:24:56 +02:00
Seppo Takalo 5f6379a55d
Merge pull request #11119 from Reda-RM/master
Riot Micro cellular device
2019-08-07 14:07:27 +03:00
Seppo Takalo 6436f11335
Merge pull request #11123 from desmond-blue/fix-nrf52-us-ticker-free
NRF52 need to call TIMER_TASK_SHUTDOWN for current consumption
2019-08-06 11:33:55 +03:00
Reda Maher ef1d9778a9 [Riot Micro] Add Riot Micro cellular module targets 2019-08-05 18:57:43 +02:00
desmond.chen 7b5366f7a3 NRF52 need to call TIMER_TASK_SHUTDOWN for current consumption 2019-07-30 17:20:08 +08:00
Chris Trowbridge 04ca01d16f Update PinNames.h with the pinout for EP_AGORA HW rev 1.1 2019-07-26 11:48:36 -04:00
Seppo Takalo c505d25186
Merge pull request #11077 from bentcooke/52840_align
NRF52840: remove align instructions from gcc linker for ARM.extab exi…
2019-07-23 11:37:47 +03:00
Seppo Takalo 13873f388c
Merge pull request #11062 from AGlass0fMilk/fix-nrf52-saadc-res-again
Fix SAADC resolution for nRF52-based targets... again
2019-07-22 15:30:11 +03:00
Ben Cooke 36bd06c00a NRF52840: enable TRNG in Nordic SDK config 2019-07-19 13:24:12 -05:00
Ben Cooke 892adc6e91 nrf52840: remove align instructions from gcc linker for ARM.extab exidx sections 2019-07-19 10:22:05 -05:00
George Beckstein 7ff707c9b4 Fix SAADC resolution for nRF52-based targets... again 2019-07-17 11:43:20 -04:00
Martin Kojtal b47064ae65
Merge pull request #10933 from tymoteuszblochmobica/chache
Nordic NRF52832 cache ON
2019-07-05 10:09:59 +01:00
George Beckstein f2b88362fb Apply same resolution fix to nRF52832 targets 2019-07-01 12:22:04 -04:00
George Beckstein b08a26bfa0 Fix SAADC resolution set in sdk_config. analogin_read_u16 assumes 12-bit range but config was set to 10 bit range causing incorrect readings to be returned. 2019-07-01 12:09:27 -04:00
Tymoteusz Bloch 1af0fe89b8 Nordic NRF52832 onboard instruction cache is turned ON to increase MCU performance 2019-07-01 15:08:53 +02:00
Martin Kojtal d71db32154
Merge pull request #10881 from AGlass0fMilk/fix-nrf52-critical-region-api
Fix Nordic/Mbed Critical Section API Inconsistency (In Builds w/o Softdevice)
2019-07-01 09:18:10 +01:00
George Beckstein 15cd907d35
Fix alignment 2019-06-24 08:34:54 -04:00
George Beckstein f548f558da Fixed bug causing Nordic drivers to use a different critical section API from Mbed. This caused conflicts when Nordic's critical section API would globally reenable interrupts while Mbed still expected to be in a critical section. 2019-06-20 14:54:10 -04:00
Maciej Bocianski fcde82ba4f HAL I2C: adds missing DEVICE_I2C guards 2019-06-19 23:08:55 +02:00