Dylan Laduranty
de6939aa43
cpu/nrf53: add initial support
...
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-04 17:14:06 +02:00
Dylan Laduranty
a73ddbd045
cpu/nrf5x_common: reset all available CC channels
...
Except the last channel used for capture
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-06-28 16:40:15 +02:00
e5d25e0b04
nrf5x_common: Clear I2C periph shorts
...
The I2C peripheral's shortcuts are used with the read and write register
to automatically stop the I2C transaction or to continue with the next
stage.
With simple I2C read and write bytes these shorts are not used, but are
also not cleared by the function in all cases, causing it to use the
shortcut configuration set by a previous function call. This patch
ensures that the shorts are always set by the read and write functions
2023-06-14 10:37:24 +02:00
Marian Buschsieweke
a8f1a7e007
cpu/nrf5x_common: Implement timer_set()
...
The fallback implementation of timer_set() in `drivers/periph_common`
is known to fail on short relative sets. This adds a robust
implementation.
2022-12-23 14:48:08 +01:00
Marian Buschsieweke
0a24d54bd5
cpu/nrf5x_common/periph_timer: Fix thread safety
...
Two threads using distinct sets of channels should be able to share a
timer. Hence, we need to make read-modify-write accesses on timer state
atomic.
2022-12-23 14:45:12 +01:00
Marian Buschsieweke
3ad897df2a
cpu/nrf5x_common/periph_timer: Clear periodic flag on set
...
A call to timer_set_absolute() should clear the periodic flag on the
specified timer and channel. This adds it.
2022-12-23 14:45:12 +01:00
Marian Buschsieweke
fbd7b77331
cpu/nrf5x_common/periph_timer: fix spurious IRQs
2022-11-24 22:36:42 +01:00
Marian Buschsieweke
020c6ff69c
Merge pull request #18954 from jue89/fix/nrf5x-uart-lowpower
...
cpu/nrf5x/uart: run STOPTX task after finished tx
2022-11-24 14:20:58 +01:00
Marian Buschsieweke
cefef8fd1e
Merge pull request #18953 from jue89/fix/nrf5x-timer-lowpower
...
cpu/nrf5x/timer: fix high current consumption in powered off state
2022-11-23 17:03:33 +01:00
Jue
3da1faca90
cpu/nrf5x/uart: run STOPTX task after finished tx
...
This reduces power consumption for UARTs that are configured in tx-only mode.
2022-11-22 21:33:14 +01:00
Jue
a7e2182bb0
cpu/nrf5x/timer: run task SHUTDOWN instead of STOP
...
This is a workaround for errata 78 that causes increased current consumption even in the stopped state.
2022-11-22 19:15:31 +01:00
Marian Buschsieweke
b533fcf543
cpu/nrf5x_common: improve doc on timer_conf_t::channels
2022-11-22 13:43:05 +01:00
Benjamin Valentin
516b4b6c7f
cpu/nrf51: use cortexm.ld
2022-09-23 15:55:05 +02:00
Benjamin Valentin
838a5e4bd3
netdev_drivers: make sure to signal LINK_UP at least once
2022-09-16 22:57:28 +02:00
Marian Buschsieweke
57201e7521
Merge pull request #18478 from benpicco/cpu/nrf5x_i2c_spi_share
...
cpu/nrf5x: allow providing multiple I2C and SPI buses on the same shared periph
2022-08-30 12:18:05 +02:00
Benjamin Valentin
7b7eb9d17b
cpu/nrf5x: allow multiple I2C and SPI buses on a shared periph
2022-08-30 10:05:34 +02:00
Gunar Schorcht
0bef4c0c30
pkg/nimble: conditional compilation of nRF5x code
...
The package uses the nRFx SDK package `nrfx`. In addition, the `mynewt-nimble` repository contains some files (`porting/nimble/src/hal_timer.c` and `porting/npl/riot/src/nrf5x_isr.c`) that are compilable only for nRF MCUs. To allow the compilation for other platforms, the use of the `nrfx` package and the compilation of these files are now dependent on the use of any nRF5x MCU.
2022-08-24 09:03:38 +02:00
Gunar Schorcht
73eb3cba72
kconfig: move BLE_* features to common features file
...
These BLE_* features are not necessarily nRF5x specific and should be defined as common features. The commit also fixes the alphabetical order for HAS_RUST_TARGET.
2022-08-12 16:14:58 +02:00
Jose Alamos
3c849381e2
drivers/nrf52840: select HAVE_IEEE802154_RADIO_HAL_INTERFACE
2022-08-10 13:50:26 +02:00
Leandro Lanzieri
a4d5169e95
cpu/nrf5x_common/radio/Kconfig.nrf5x: indicate radio HAL implementation
2022-07-28 09:32:25 +02:00
Hauke Petersen
068c4f1c3b
pkg: add nrfx as package
2022-06-02 14:59:50 +02:00
Hauke Petersen
5430c145f8
cpu/nrf5x: rename nrfx.h -> nrfx_riot.h
...
The nrfx compatibility header is renamed to allow for optinally
including the real nrfx headers using a RIOT package.
2022-06-02 14:59:50 +02:00
Marian Buschsieweke
16f859dafd
drivers/saul: use const qualifier for data to write
...
This makes life easier when calling e.g. `saul_reg_write()` with data
stored in flash.
As now the signatures for reading and writing differ (in that `const`
qualifier only), `saul_notsup()` is split into `saul_write_notsup()`
and `saul_read_notsup()`. However, one is implemented as a symbol alias
of the other, so that ROM consumption remains unchanged.
2022-05-23 08:35:27 +02:00
Marian Buschsieweke
bae91c1660
Merge pull request #17723 from benpicco/periph_timer_periodic-set_stopped
...
drivers/periph/timer: add TIM_FLAG_SET_STOPPED flag
2022-05-03 12:06:37 +02:00
Benjamin Valentin
191ff4079b
cpu/nrf5x_common: timer: implement TIM_FLAG_SET_STOPPED
2022-04-28 13:27:59 +02:00
Marian Buschsieweke
f0586dbf8f
cpu/nrf5x_common: implement periph/gpio_ll{,_irq}
...
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2022-04-23 19:47:00 +02:00
chrysn
facb5e633f
Merge pull request #17436 from Ollrogge/reserve_flash
...
cpu: add flash_writable section to linker script
2022-03-17 21:44:32 +01:00
Ollrogge
41f961a197
periph/flashpage: Add _in_address_space feature
2022-03-17 19:45:54 +01:00
Francisco Molina
4906353cfe
cpu/nrf52-9160: add periph_spi_init_gpio
2022-02-08 09:17:48 +01:00
Marian Buschsieweke
8ee657f0e5
cpu/nrf5x_common/periph_temperature: Increase resolution
...
Modify the periph_temperature implementation to expose the full
resolution of the temperature sensor. The accuracy of the sensor will
likely be less than 0.25 °C, but typically temperature sensors have
a precision in the order of their resolution. Exposing the full
resolution can therefore be useful to monitor relative temperature
changes.
2021-12-15 16:14:08 +01:00
Hauke Petersen
00393e8214
kconfig: add ble_phy_x feature and mapping
2021-12-02 23:31:32 +01:00
Gunar Schorcht
007e29ebb5
cpu/periph/i2c: update implementations to new I2C API
...
Make all `spi_acquire` implementations return `void` and add assertions to check for valid device identifier where missing.
2021-11-29 06:35:25 +01:00
benpicco
09e0692a85
Merge pull request #17201 from bergzand/pr/nrf5x/periph_qdec
...
nrf5x_common: Add qdec peripheral implementation
2021-11-18 22:30:58 +01:00
benpicco
2ffbcecbe1
Merge pull request #17225 from dylad/pr/cpu/nrf91/add_periph_flashpage_support
...
cpu/nrf9160: add periph_flashpage support
2021-11-18 22:10:18 +01:00
Benjamin Valentin
eabc9a8042
cpu/nrf5x_common: fix cast to periph type
2021-11-18 10:14:51 +01:00
Dylan Laduranty
cc440bc296
cpu/nrf9160: add flashpage configuration
2021-11-17 14:06:04 +01:00
Dylan Laduranty
b734622944
cpu/nrf5x_common: update periph_flashpage for nRF9160 support
2021-11-17 14:05:51 +01:00
3b1bdd6b3c
nrf5x_common: Add qdec peripheral implementation
2021-11-16 15:21:51 +01:00
5e52a0ea4c
cpu/nrf5x_common: nrfx.h: add missing "kernel_defines.h" include
2021-10-20 11:36:55 +02:00
Francisco Molina
6b276af790
cpu/nrf52: initial kconfig modeling
2021-09-29 10:17:47 +02:00
dylad
1beda0f1e4
cpu/nrf9160: add TWI and SPI support
2021-09-06 20:15:18 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines
2021-08-13 19:50:38 +02:00
dylad
5b85a5750e
cpu/nrf9160: add initial support
2021-07-28 20:11:26 +02:00
Jose Alamos
3f62db6042
nrfmin: avoid explicit cast to netdev
2021-07-09 11:35:21 +02:00
Benjamin Valentin
d47a880915
cpu: add periph_rtt_overflow feature
...
The RTT overflow callback is not available on all RTT implementations.
This means it is either a no-op or `rtt_set_overflow_cb()` is a no-op
or it will overwrite the alarm set with `rtt_set_alarm()`.
This adds a feature to indicate that proper overflow reporting is available.
2021-04-30 11:58:00 +02:00
Hauke Petersen
e28ec7907b
Merge pull request #15806 from haukepetersen/opt_nrf5x_nrfblehfxo
...
cpu/nrf/radio/nrfble: request HFXO only on demand
2021-04-12 11:04:12 +02:00
chrysn
2b09d3162a
cpu/nrf52: Expose more timers
2021-03-30 16:34:44 +02:00
Marian Buschsieweke
1a1a16eb7e
cpu/nrf5x_common: drop bogus rtt_set_counter()
...
rtt_set_counter() is implemented as noop for nRF5x. This drops this bogus
implementation and the corresponding feature.
2021-03-08 17:34:30 +01:00
benpicco
2614831c86
Merge pull request #16137 from maribu/stm32_rtt
...
drivers/periph_rtt: add periph_rtt_set_counter feautre
2021-03-08 16:53:57 +01:00
Marian Buschsieweke
ab89234040
drivers/periph/rtt: add periph_rtt_set_counter feature
...
Some periph_rtt implementations do not provide `rtt_set_counter()`. This
adds `periph_rtt_set_counter` as feature to allow testing for its
availability. The feature is provided at CPU level if periph_rtt is
provided by the board for all CPUs implementing `rtt_set_counter()`.
2021-03-08 14:16:46 +01:00
Marian Buschsieweke
b9cb75fedf
drivers/periph/rtt: add periph_rtt_set_counter feature
...
Some periph_rtt implementations do not provide `rtt_set_counter()`. This
adds `periph_rtt_set_counter` as feature to allow testing for its
availability. The feature is provided at CPU level if periph_rtt is
provided by the board for all CPUs implementing `rtt_set_counter()`.
2021-03-04 18:05:06 +01:00
Francisco Molina
e2570f4d56
cpu/nrf52: add periph_uart_non_blocking to nrf52840
2021-03-03 08:12:12 +01:00
Francisco Molina
91443cb0f9
cpu/nrf5x_common/uart: power on correct UARTE
2021-02-25 14:26:12 +01:00
Hauke Petersen
72db395963
cpu/nrf5x/kconfig: add VDD_LC_FILTER_REGx features
2021-02-19 17:19:45 +01:00
Hauke Petersen
cc2df0c508
cpu/nrf5x: use IS_ACTIVE to enable the DCDC conv
2021-02-19 17:19:28 +01:00
bcb23da368
Merge pull request #16005 from benpicco/cpu/nrf52_gpio_count
...
cpu/nrf5x_common: make GPIO_PIN macro model independent
2021-02-16 16:18:29 +01:00
Benjamin Valentin
eb89482a75
cpu/nrf5x_common: make GPIO_PIN macro model independent
...
We can use the `GPIO_COUNT` vendor macro to check if there is more than
one GPIO port on nRF52.
This is the case for nRF52840 and nRF52833.
2021-02-14 00:30:25 +01:00
Benjamin Valentin
a8fcc7b238
cpu/nrf5x: only enable DCDC for REG0 if REG0 exists
...
nRF52833 has POWER_MAINREGSTATUS_MAINREGSTATUS_High, but no POWER->DCDCEN0
register.
This breaks all builds on this MCU.
Fix the ifdef to fix the build.
2021-02-14 00:06:34 +01:00
benpicco
3e3c4d06fb
Merge pull request #15955 from aabadie/pr/boards/microbit-v2
...
boards: add support for microbit v2
2021-02-13 23:48:43 +01:00
Hauke Petersen
9d7a37a571
cpu/nrf5x: also enable DCDC for REG0 if used
2021-02-12 10:37:43 +01:00
Hauke Petersen
905fb34408
cpu/nrf5x/nrfble: let driver requeset HFXO
2021-02-12 10:16:50 +01:00
36ca3845c2
cpu/nrf5x_common: fix pin support for nrf52833xxaa model
2021-02-10 13:39:51 +01:00
Benjamin Valentin
cc9c58aae3
nrfmin: depend on gnrc_netif instead of gnrc_netdev_default
...
`gnrc_netdev_default` is a pseudomodule, what this driver really wants
is gnrc_netif.
2021-02-09 12:27:58 +01:00
Hauke Petersen
deafa9074a
cpu/nrf/radio/nrfble: request HFXO clock source
2021-01-29 11:10:15 +01:00
Hauke Petersen
11a914ed8a
cpu/nrf/radio/nrfmin: request HFXO clock source
2021-01-29 11:10:15 +01:00
Hauke Petersen
9d1692c45a
cpu/nrf5x: allow to request/release HFXO clk src
2021-01-29 11:10:15 +01:00
Marian Buschsieweke
e2c5467d09
cpu/nrf5x_common/radio/nrfmin: drop duplicated code
...
`gnrc_netif_hdr_build()` calls internally `gnrc_netif_hdr_init()`, which does
initialize `gnrc_netif_hdr_t::rssi` and `gnrc_netif_hdr_t::lqi`. So no need to
do this twice.
2021-01-13 08:53:17 +01:00
chrysn
e3e89fe513
cpu/nrf5x: implement periph_timer_periodic
2020-12-04 19:03:44 +01:00
e176649266
nrf5x: Adapt to flashpage/flashpage_pagewise API
2020-11-11 23:16:40 +01:00
Marian Buschsieweke
125c892c03
drivers/periph/timer: Use uint32_t for frequency
...
For all currently supported platforms `unsigned long` is 32 bit in width. But
better use `uint32_t` to be safe.
2020-10-30 22:02:12 +01:00
fd6f6e248c
cpu/nrf52: remove specific handling of softdevice
2020-10-29 09:02:12 +01:00
Bas Stottelaar
22243aec7a
cpu/*: realign ENABLE_DEBUG
2020-10-23 00:46:26 +02:00
Bas Stottelaar
ab6188cea3
cpu/*: add missing include of assert.h
2020-10-22 11:13:08 +02:00
Marian Buschsieweke
c38ca6d718
Merge pull request #15212 from miri64/gnrc_pkt/enh/pkt-list-ops
...
gnrc_pkt: introduce packet list operations
2020-10-15 12:13:03 +02:00
Martine Lenders
45144fb4a4
treewide: use new gnrc_pkt API functions instead of utlist.h macros
2020-10-13 13:32:53 +02:00
Benjamin Valentin
a863a43207
kconfigs: replace BOOTLOADER_% feature with HIGHLEVEL_STDIO
2020-10-13 10:30:22 +02:00
benpicco
add0814cd0
Merge pull request #15117 from chrysn-pull-requests/nrf52-pwm-fixes
...
cpu/nrf52: PWM fixes
2020-09-30 15:51:16 +02:00
Benjamin Valentin
33f49183d9
cpu/nrf5x_common: UART: add support for 1 MBaud
...
`UART_BAUDRATE_BAUDRATE_Baud1M` is defined in the vendor files, so
make it available to the user.
2020-09-30 13:42:59 +02:00
chrysn
2053a1785a
cpu/nrf52: Ensure that uninitialized PWM outputs are disabled
2020-09-30 13:16:59 +02:00
Benjamin Valentin
d9116684e5
cpu/cortexm_common: advertise puf_sram feature
...
`puf_sram` is a feature of the linker script, it does not need vendor
specific hardware support.
2020-09-11 16:30:45 +02:00
Benjamin Valentin
ca2b7e1952
cpu/nrf5x_common: UART: capture whole nrf52 lineup
2020-08-09 21:46:06 +02:00
Benjamin Valentin
1713dca711
cpu/nrf52: gpio: fix build for nrf52811
...
We can use a more general conditional here.
2020-08-09 21:46:06 +02:00
f013be5507
Merge pull request #14497 from aabadie/pr/drivers/makefile_dep_cleanup
...
drivers/Makefile.dep: remove inappropriate use of FEATURES_PROVIDED for rtt_rtc
2020-07-20 13:04:59 +02:00
Leandro Lanzieri
31b288443a
cpu/nrfx_common: Add Kconfig symbols
2020-07-16 10:23:48 +02:00
988638715f
cpu/nrf5x_common: remove inappropriate rtc dependency resolution
2020-07-10 21:58:03 +02:00
Martine S. Lenders
78fc1e7654
nrfmin: remove NETOPT_IPV6_IID support
...
This option is handled in the `gnrc_netif`-layer without any access to
the driver's option since 7ae90564d9
.
2020-06-25 10:51:05 +02:00
16ff94b4fe
nrf5x: remove common nrf5x spi peripheral driver
2020-05-18 19:18:28 +02:00
99a59c5dbd
nrf5x: Extend gpio with exti channel retrieval
2020-05-18 19:17:29 +02:00
Philipp Blum
35dcf637f2
cpu/nrf52: add support for nrf52811
2020-05-10 17:10:33 +02:00
5773db93f8
Merge pull request #14025 from fjmolinas/pr_nrf5x_rtt_conf
...
boards/common/nrf5x: add configurable RTT_FREQUENCY
2020-05-05 17:46:05 +02:00
Francisco Molina
409185c5ce
boards/common/nrf5x: add configurable RTT_FREQUENCY
...
Adds: RTT_MAX_FREQUENCY, RTT_MIN_FREQUENCY & RTT_CLOCK_FREQUENCY
2020-05-05 14:52:55 +02:00
PeterKietzmann
dd2d6b174e
cpu/nrf5x_common: enable bias correction in hwrng
2020-05-01 17:04:36 +02:00
Jose Alamos
67ed9defbe
gnrc_netif_xxx_create: use external netif allocation
2020-03-26 11:12:23 +01:00
fc6b586919
Merge pull request #13586 from bergzand/pr/nrf/dcdc
...
nrf5x: Add and enable configuration for the built-in DC/DC converter
2020-03-24 11:56:40 +01:00
Benjamin Valentin
f8d61edba0
cpu/nrf5x_common: use RTT based RTC implementation
2020-03-19 15:25:14 +01:00
Dylan Laduranty
0b15db3694
cpu/nrf5x: use generic hw fc module
2020-03-10 14:47:19 +01:00
64f04e4da9
nrf5x: Add built-in DC/DC converter enable function
...
The internal DC/DC converter is more efficient compared to the LDO
regulator. The downside of the DC/DC converter is that it requires an
external inductor to be present on the board. Enabling the DC/DC
converter is guarded with NRF5X_ENABLE_DCDC, this macro must be defined
if the DC/DC converter is to be enabled.
2020-03-07 17:37:40 +01:00
Jose Alamos
3ad574a822
drivers/netdev: use netdev_trigger_event_isr function
2020-03-06 14:03:43 +01:00
9cebd757a2
cpu/nrf5x: update GPIO_UNDEF value
...
The gpio_t value is uint8_t so use UINT8_MAX for GPIO_UNDEF
2020-02-19 19:16:58 +01:00
f568162f9b
cpu/nrf5x: provide specific gpio_t definition
2020-02-19 19:16:58 +01:00