1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

219 Commits

Author SHA1 Message Date
fd6f6e248c
cpu/nrf52: remove specific handling of softdevice 2020-10-29 09:02:12 +01:00
benpicco
e4164e3924
Merge pull request #15275 from jia200x/pr/radio/config_phy_amendment
ieee802154/radio: add TRX_OFF pre condition to config_phy
2020-10-26 23:28:45 +01:00
Jose Alamos
6c1ea917d6 nrf802154: adapt config_phy to TRX_OFF precondition 2020-10-26 17:04:48 +01:00
José Alamos
e8721ce415
Merge pull request #15145 from fjmolinas/pr_openwsn_radio_hal
pkg/openwsn: add ieee802154_hal based radio
2020-10-23 21:26:21 +02:00
Francisco Molina
6f6001900f
cpu/nrf52: add OpenWSN conf 2020-10-23 15:31:56 +02:00
Francisco Molina
82e06ef8f4
pkg/openwsn: add ieee802154 hal based radio 2020-10-23 15:31:55 +02:00
Bas Stottelaar
22243aec7a cpu/*: realign ENABLE_DEBUG 2020-10-23 00:46:26 +02:00
José Alamos
9fd49581e7
Merge pull request #15140 from fjmolinas/pr_tx_start_radio_hal
sys/net/ieee802154/radio: add IEEE802154_RADIO_INDICATION_TX_START
2020-10-22 16:57:27 +02:00
Francisco Molina
8236c8aef1
cpu/nrf52/radio: add FRAMESTART event 2020-10-22 14:59:06 +02:00
Bas Stottelaar
ab6188cea3 cpu/*: add missing include of assert.h 2020-10-22 11:13:08 +02:00
Francisco Molina
eb1cbeae1f
cpu/nrf52/radio: change internal state to idle after rx 2020-10-21 15:08:17 +02:00
Jose Alamos
15ba1c765b nrf802154: improve debug messages 2020-10-20 14:24:01 +02:00
Jose Alamos
967a288e74 nrf802154: fix "off" function 2020-10-20 14:24:01 +02:00
Jose Alamos
c269456245 nrf802154: fix wrong state transitions 2020-10-20 14:24:01 +02:00
Jose Alamos
fa0dd8b5e2 netdev_ieee802154_submac: set addresses using netdev_register 2020-10-19 15:18:35 +02:00
Jose Alamos
46600adf22 nrf802154: unify auto_init for HAL and netdev 2020-10-19 15:18:35 +02:00
benpicco
0f726b17d5
Merge pull request #15228 from jia200x/pr/hal_read_func
ieee802154/radio: add `read` function
2020-10-15 21:31:10 +02:00
Jose Alamos
ee5adad401 ieee802154/radio: replace indication mechanism 2020-10-14 18:07:28 +02:00
Francisco
df3ab9f161
Merge pull request #15138 from aabadie/pr/dist/codespell_fixes
dist/codespell: update the list of ignored words and fix all typos
2020-10-02 12:27:12 +02:00
Benjamin Valentin
c78ee2bf64 cpu/nrf52: provide radio_nrf802154 at CPU level
The presence of the 802.15.4 radio peripheral is a feature of the CPU,
not the board.
Move it to the right place and reduce code duplication.
2020-10-02 10:44:59 +02:00
9d0d07ecce
cpu/nrf52: fix typo 'substract' -> 'subtract' 2020-10-02 07:57:53 +02:00
chrysn
2053a1785a cpu/nrf52: Ensure that uninitialized PWM outputs are disabled 2020-09-30 13:16:59 +02:00
chrysn
65d4c88be8 cpu/nrf52: Warn against implicit 0 in PWM channels
Working with less-than-full PWMs has shown that a warning is indicated
here, as just missing an item would result in inadvertently driving
P0.00.
2020-09-30 13:15:18 +02:00
chrysn
8dd60286a7 cpu/nrf52: Fix PWM generation if <4 channels are used
The PWM decodeer, in LOAD=Single mode, loads data in groups of 4
half-words. Previously, if any channel was not connected to a pin (a
connection that's immaterial to the loader), a smaller number would be
given resulting in the decoder not loading anything at all.

See-Also: https://infocenter.nordicsemi.com/pdf/nRF52840_PS_v1.1.pdf#page=256
2020-09-30 13:14:47 +02:00
chrysn
65e63ffbbb cpu/nrf52: Don't touch pin modes on PWM startup
Once PWM is running, the active PWM module overrides the PIN_CNF state;
only when PWM is stopped the pin returns into its PIN_CNF state (which,
then, the board may set to whatever idle means there).

(Moreover, the code there only worked for P0 registers, not eg. the
P1.09 of the nrf52840dongle's RGB LED).
2020-09-30 13:14:47 +02:00
chrysn
5b97b49b1d cpu/nrf52: Remove unused static inline USB poweroff
The function was never in used, and this is breaking builds using LLVM
that treats unused static inlines as an error.
2020-09-15 15:55:05 +02:00
Francisco
858533e68e
Merge pull request #14994 from benpicco/nrf802154-register
nrf802154: register with netdev
2020-09-11 12:48:40 +02:00
Jose Alamos
377560f5cc nrf52840: add radio hal implementation 2020-09-10 17:01:14 +02:00
Benjamin Valentin
58dc106309 nrf802154: register with netdev 2020-09-10 00:05:25 +02:00
Leandro Lanzieri
d25fc243c4
treewide: change prefix for generated Kconfig symbols.
This changes the prefixes of the symbols generated from USEMODULE and
USEPKG variables. The changes are as follow:

   KCONFIG_MODULE_ => KCONFIG_USEMODULE_
   KCONFIG_PKG_ => KCONFIG_USEPKG_
   MODULE_ => USEMODULE_
   PKG_ => USEPKG_
2020-08-31 09:37:09 +02:00
Benjamin Valentin
f0e77840dc cpu/nrf52: spi_twi_irq add workaround for nRF52810 vendor file
Either nRF52810 should define SPIM_COUNT 2 or nRF52805 should
define SPIM_COUNT 1.
But as it nRF52805 defines SPIM_COUNT 2 and nRF52810 defines SPIM_COUNT 1
even though both have a single SPI and a single, separate TWI peripheral.

Re-define SPIM_COUNT to 2 on nRF52810 as this is the easiest solution.
2020-08-16 23:26:17 +02:00
Benjamin Valentin
5ecf2e8bb1 cpu/nrf52: ensure PWM is present
Not all members of the family have a PWM peripheral
2020-08-16 23:26:17 +02:00
Benjamin Valentin
899e97af30 cpu/nrf52: add definitions for remaining family members 2020-08-16 23:26:17 +02:00
Benjamin Valentin
91ad431e34 cpu/nrf52: fix nrf52811 vector definition
SWI2 was missing - compare with vendor/nrf52811.h
2020-08-09 21:46:06 +02:00
Benjamin Valentin
4980cb7abe cpu/nrf52: fix nrf52832 vector definition
The CPU has 39 interrupt vectors and the FPU interrupt is the last one.
(Yes this MCU has an FPU).

Compare with vendor/nrf52.h
2020-08-09 21:46:06 +02:00
Benjamin Valentin
3f8bb169c6 cpu/nrf52: fix nrf52840 vector definition
The CPU has 48 interrupt vectors and spi3 is the last one.
See vendor/nrf52840.h
2020-08-09 21:46:06 +02:00
Benjamin Valentin
ec67798cf0 cpu/nrf52: fix spi_twi_irq for nrf52805/10/11
These smaller parts have SPI1 mapped to TWI0 (if SPI1 exists at all).
2020-08-09 21:46:06 +02:00
Benjamin Valentin
ca2b7e1952 cpu/nrf5x_common: UART: capture whole nrf52 lineup 2020-08-09 21:46:06 +02:00
Benjamin Valentin
2f236cb092 cpu/nrf52: only enable instruction cache if available
The instruction cache is not available on all nrf52 MCUs.
2020-08-09 21:46:06 +02:00
Benjamin Valentin
ea2638dcac cpu/nrf52: split up vector definition
The interrupt vectors vary between each member of the family.
To retain sanity, split the vectors file up for each MCU.
2020-08-09 21:46:06 +02:00
Benjamin Valentin
307495985a cpu/nrf52: not all parts have a FPU 2020-08-09 21:46:06 +02:00
Benjamin Valentin
7a9e68af96 cpu/nrf52: add vendor files for nrf52805/10/20/33 2020-08-09 21:46:06 +02:00
Jose Alamos
5c824f6f12 nrf802154: fix set_tx_power function 2020-07-31 17:16:10 +02:00
Leandro Lanzieri
6a9c28aa72
cpu/nrf52: Add Kconfig symbols 2020-07-16 10:23:49 +02:00
Leandro Lanzieri
4d65bc8e0a
cpu: Rename CPU_ARCH to CPU_CORE 2020-06-16 12:05:40 +02:00
83a6ad182d
nrf52/i2c: Use mutex and IRQ for blocking
This commit enhances the I2C code of the nRF52 family to block on a
mutex while the I2C transfer is busy. The mutex is unlocked in the ISR
when it is trigger by either a stop condition or an error condition.
2020-06-02 10:24:40 +02:00
b15c4ef418
Merge pull request #14069 from benpicco/cpu/nrf52-cleanup
cpu/nrf52: update & fix vendor files, derive flash settings
2020-05-19 10:55:50 +02:00
720ccad7dd
nrf52: Add EasyDMA-based SPI periph driver 2020-05-18 19:16:17 +02:00
1139c0737f
nrf52: add common SPI/I2C IRQ code 2020-05-18 19:14:56 +02:00
Benjamin Valentin
bdf40d5ffa cpu/nrf52: fix NRF52811 vendor file
That `system_nrf52811.h` include must be removed.
2020-05-16 19:22:14 +02:00
Benjamin Valentin
d8a5f87aee cpu/nrf52: update vendor files 2020-05-16 19:21:56 +02:00
Benjamin Valentin
d34551e8da cpu/nrf52: use vendor defines for flash size
We don't need to define FLASHPAGE_SIZE and FLASHPAGE_NUMOF ourself if
the BPROT peripheral is present.
Now why nrf52840 doesn't have it, I don't know, but for nrf52832 and
nrf23811 the values in BPROT_REGIONS_SIZE and BPROT_REGIONS_NUM match
the values manually provided here before.
2020-05-12 18:10:15 +02:00
Benjamin Valentin
20a044c956 cpu/nrf52: fix nrf52811 interrupt vector table
SPI1 and TWI0 share the same IRQ, not SPI1 and TWI1
2020-05-12 15:10:06 +02:00
Benjamin Valentin
d53bc7bf73 cpu/nrf52: add peripherals.h vendor files
Those make our lives much easier.
2020-05-12 14:52:06 +02:00
Benjamin Valentin
fb2f2c456f cpu/nrf52: add nrf52811 vendor files 2020-05-12 14:49:26 +02:00
Philipp Blum
35dcf637f2 cpu/nrf52: add support for nrf52811 2020-05-10 17:10:33 +02:00
Akshai M
642fe16807 cpu/nrf52/include/nrf802154.h : Add Group
Add CT Params to netdev group in Config for Doxygen
2020-04-14 20:52:16 +05:30
Jose Alamos
77325b4cde ieee802154: add CONFIG_ prefix to config macros 2020-04-08 19:08:25 +02:00
Leandro Lanzieri
64552a3b9a
cpu/cortexm_common: Move common modules to Makefile.dep
This moves the following modules to a architecture-specific Makefile.dep
file:
- cortexm_common
- cortexm_common_periph
- newlib
- newlib_nano
- periph
2020-04-01 09:46:21 +02: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
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
68ec8b2c2b
Merge pull request #13391 from kaspar030/mpu_feature
cpu/cortex-m: turn MPU support into a feature
2020-03-04 07:09:40 +01:00
a3c527fdbc cpu/*: add cortex_mpu to known-to-support CPU families 2020-03-03 22:59:41 +01:00
f568162f9b
cpu/nrf5x: provide specific gpio_t definition 2020-02-19 19:16:58 +01:00
d7c0102115
cpu/cortexm: move CPU_ARCH/FAM to Makefile.features 2020-02-17 16:02:48 +01:00
Karl Fessel
4445faaa3a core/shed: remove not needed bitarithm include add missing
bitarithm.h is not needed for the interface of shed but may cause conflicts
due to different definitions of SETBIT and CLRBIT

common implementations are: (value, offset) xor (value, mask) bitarithm
implements the later

frac.c and nrf52/usbdev.c use bitarithm.h but where missing the include

sam0/rtt.c defined a bit using mask from bitarithm,
changed that to the soulution used in sam0/rtc.c
2020-02-05 12:45:29 +01:00
Martine Lenders
8d749dc024
Merge pull request #13148 from chrysn-pull-requests/usb-default-vidpid
USB: Use default VID/PID for RIOT-included peripherals
2020-01-30 17:37:52 +01:00
chrysn
e65f3f372b USB VID/PID: Set whitelist define for internals that use usb.h
This list is probably incomplete as it was created experimentally.
2020-01-30 15:04:10 +01:00
66d903c209
cpu/nrf5x: move dependencies to Makefile.dep 2020-01-28 13:18:39 +01:00
Jose Alamos
709c1aac30 Kconfig: Expose NRF802154 configurations 2020-01-21 11:29:00 +01:00
Jose Alamos
f652564eb1 nrf802154: implement CCA 2020-01-21 11:06:20 +01:00
Jose Alamos
09c79f07e7 nrf802154: use correct ED_RSSIOFFS sign 2020-01-21 11:06:20 +01:00
Marian Buschsieweke
186d2ccfa4
cpu/nrf52/periph: adc_sample() now returns int32_t 2020-01-10 14:13:15 +01:00
c8d1d6b3f3 cpu/nrf52: fix typos 2019-11-23 22:39:36 +01:00
Francois Berder
4a31f94cfc many typo fixes
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01:00
Yegor Yefremov
df7e760588 doxygen/I2C: don't include overridden typedefs
Add missing #ifndefs to overridden I2C typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:35:33 +01:00
Yegor Yefremov
5b0252b150 doxygen/ADC: don't include overridden typedefs
Add missing #ifndefs to overridden ADC resolution typedefs.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-15 10:35:32 +01:00
Hauke Petersen
d87228dab1 cpu/nrf52: add feature 'ble_nimble_netif' 2019-11-13 13:05:34 +01:00
Francisco Molina
347a0fc804 cpu/ boards/: remove exports for CPU_FAM 2019-10-18 08:55:33 +02:00
Francisco Molina
5e9b92a326 cpu: remove CPU_ARCH exports 2019-10-18 08:55:33 +02:00
c1b95733b6
cpu/nrf52: allow accessing multiple i2c peripherals 2019-10-04 08:42:35 +02:00
Gunar Schorcht
02d81b717e
Merge pull request #12063 from maribu/i2c_release
drivers/periph/i2c: Updated i2c_release() to return void
2019-10-01 19:50:38 +02:00
07b3bc6918
nrfusb: Fix data stage handling of control writes 2019-09-18 08:11:44 +02:00
88e07c06d2
Merge pull request #11367 from maribu/arm_early_stdio
cpu: Moved stdio_init() prior to periph_init() for ARM targets
2019-09-09 16:52:30 +03:00
Marian Buschsieweke
df27dbef7a
cpu: Moved stdio_init() into cpu_init()
- Removed stdio_init() from newlib's _init(), as this is too late in the boot
  process to allow DEBUG()ing during periph_init()
- Added stdio_init() to the various cpu_init() routines of the ARM CPUs just
  before periph_init()
2019-09-06 16:54:23 +02:00
a5c594ae5f
nrfusb: Check chip revision before enabling
Engineering sample A doesn't have a functional USB peripheral (errata
issue 94). This commit adds an assertion check for this revision to
prevent some developer headaches.
2019-09-06 10:00:32 +02:00
benpicco
1ffe2e5e30
Merge pull request #11512 from skullbox305/cpu-nrf5x
cpu/nrf52: i2c bugfix
2019-09-03 18:43:38 +02:00
Marian Buschsieweke
0863410c09
cpu/nrf52: Updated i2c_release() 2019-08-22 12:03:08 +02:00
fjmolinas
254934dfa6 cpu/nrf5x_common: add flashpage_raw_support 2019-08-05 17:45:14 +02:00
ee39222b2e
nrf52: Add suspend/resume detection to usbdev 2019-06-25 15:39:52 +02:00
ab05e63175
nrf52: Add USB device peripheral driver 2019-06-11 14:14:36 +02:00
francisco
de3314334e cpu/nrf52: set RIOTBOOT_LEN to 8k
- nrf52 flash page is 4k, the bootloader needs to be x2 so slots
  start at the beginning of a page.
2019-05-13 21:47:14 +02:00
Igor Knippenberg
dbd8c2774f cpu/nrf52: i2c bugfix 2019-05-13 11:32:57 +02:00
Semjon Kerner
253cf0f9fc
Merge pull request #11176 from bergzand/pr/nrf802154/undef_memcpy
nrf802154: don't call memcpy if iolist->iol_len==0
2019-03-25 08:09:59 +01:00
b4bb144006
nrf802154: don't call memcpy if iolist->iol_len==0 2019-03-22 19:00:53 +01:00
658fb0651e
nrf802154: Disable hardware IFS handling 2019-03-15 13:39:09 +01:00
de2f193da3
nrf802154: Fix timer behaviour of the IFS timer
The timer_clear function doesn't clear the hardware timer counter, but
is designed to clear the allocation of the channel. The consequence is
that the IFS timer here is not set to zero in the callback, but only
stopped at the current value. When the timer is started again, it has to
count the full timer range until it matches the timeout value again.

This commit fixes this issue by using timer_set instead of
timer_set_absolute. This way the current timer value (when the timer is
stopped) is read and the IFS timeout value is added to the current timer
value.
2019-03-15 13:39:09 +01:00
8c4760050e
nrf802154: Change timer frequency to match symbols rate
ieee802.15.4 specifies 40 symbols as LIFS value and 12 symbols as SIFS
value. Furthermore, the 2.4Ghz DSSS mode has a symbol rate of
62.5Ksymbols/s. To have the LIFS and SIFS in the code match the timings
from the specification, the TIMER_FREQ must match the symbol rate of
62.5Ksymbol/s such that one tick of the timer equals one symbol in time.
2019-03-15 13:38:32 +01:00