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

34375 Commits

Author SHA1 Message Date
benpicco
e87874ae54
Merge pull request #15689 from iosabi/qn908x_spi
cpu/qn908x: Implement blocking SPI support
2021-01-31 18:35:13 +01:00
benpicco
4ad08f8e66
Merge pull request #15890 from iosabi/qn908x_adc
cpu/qn908x: Fix BOARD_HAS_ADC_PA06_CAP usage.
2021-01-31 18:34:13 +01:00
iosabi
2aa7b92884 drivers/lis2dh12: Rename CS ad MODE to avoid conflicts
CS and MODE are a bit too generic macros and may conflict with headers
defined by the CPU, like in the QN908x case.

This patch renames them to BUS_CS and BUS_MODE to keep it consistent
with the other BUS names.
2021-01-31 16:27:23 +00:00
iosabi
4fb4f03252 boards/qn9080dk: Add SPI NOR flash definition
The QN9080-DK board has a 2 Mbit MX25R2035F SPI NOR flash connected to
SPI0. This patch adds the flash definition to the board.
2021-01-31 16:27:22 +00:00
iosabi
cde5d91018 boards/qn9080dk: Configure the SPI bus.
The SPI0 (FLEXCOMM2) is connected to a 2 Mb (256 KB) NAND flash
MX25R2035F in the board. This patch configures the SPI bus with the
CS line used for this flash chip.
2021-01-31 16:27:22 +00:00
iosabi
dfdd076125 cpu/qn908x: Implement blocking SPI support.
This patch implements the basic support the last of the FLEXCOMM modes,
Serial Peripheral Interface, in a simple blocking mode with busy wait,
which is enough to test all the SPI functionality end-to-end.

Tested reading and writing registers on a SPI peripheral, and checked
with the oscilloscope that the frequencies were as expected.

Results from `tests/periph_spi`:

```
> init 0 0 2 -1 0
SPI_DEV(0) initialized: mode: 0, clk: 2, cs_port: -1, cs_pin: 0
> bench

 1 - write 1000 times 1 byte:			16002	16009
 2 - write 1000 times 2 byte:			18001	18008
 3 - write 1000 times 100 byte:		802000	802007
 4 - write 1000 times 1 byte to register:	24003	24010
 5 - write 1000 times 2 byte to register:	26001	26008
 6 - write 1000 times 100 byte to register:	810001	810008
 7 - read 1000 times 2 byte:			23003	23009
 8 - read 1000 times 100 byte:		807002	807009
 9 - read 1000 times 2 byte from register:	32002	32009
10 - read 1000 times 100 byte from register:	816002	816009
11 - transfer 1000 times 2 byte:		23003	23009
12 - transfer 1000 times 100 byte:		807003	807010
13 - transfer 1000 times 2 byte to register:	32003	32009
14 - transfer 1000 times 100 byte to register:816002	816009
15 - acquire/release 1000 times:		7222	7228
-- - SUM:					5059250	5059351

```
2021-01-31 16:27:20 +00:00
iosabi
e085232da4 cpu/qn908x: Fix BOARD_HAS_ADC_PA06_CAP usage.
The macro was moved from Kconfig to the periph_cpu.h which means that
the macro name needed to be updated to BOARD_HAS_ADC_PA06_CAP instead
of CONFIG_BOARD_HAS_ADC_PA06_CAP.
2021-01-30 23:30:43 +00:00
benpicco
bd837fe98b
Merge pull request #15847 from iosabi/qn908x_adc
cpu/qn908x: ADC support
2021-01-30 20:22:15 +01:00
iosabi
e72049a180 boards/qn9080dk: Add ADC configuration
The QN9080DK board has 6 Analog Input lines in the J6 header, labeled
"A0" to "A5". This configuration enables these lines as ADC lines 0 to 5
as well as some other channel options available as lines 6 and up.
2021-01-30 17:25:09 +00:00
iosabi
965ebaa15b cpu/qn908x: Implement ADC support
The ADC in the QN908x cpu offers multiple options for ADC conversion
using up to 8 external pins, one external reference pin and some
internal signals like a 1.2V reference, Vss, Vcc and an internal
temperature monitor.

This patch implements support for sampling ADC values from the ADC lines
defined in the board configuration. Some configurations are really
always present and don't require a board configuration, like the Vcc or
internal temperature monitor but to coexist with other board ADC line
options they are only set as part of the board configuration.
2021-01-30 17:25:09 +00:00
benpicco
a61edaa32a
Merge pull request #15874 from btcven/2021_01_27-ieee802154-submac
tests/ieee802154_submac: check netdev_driver_t::recv return value
2021-01-29 21:30:06 +01:00
Hauke Petersen
42ff2ab778
Merge pull request #15804 from haukepetersen/opt_nrf5x_hfxo
cpu/nrf5x: enhance external HF clock source handling to allow for substantial energy savings
2021-01-29 11:49:44 +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
cea6d8dd2d cpu/nrf/radio/nrf802154: 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
Dylan Laduranty
1f085cfd03
Merge pull request #15843 from benpicco/mtd_write_page_hl
mtd: rename mtd_write_page() -> mtd_write_page_raw(), add high-level mtd_write_page()
2021-01-28 18:43:42 +01:00
4443b23348
tests/suit_manifest: increase timeout for nrf51dk 2021-01-28 13:41:15 +01:00
54dcd04105
tests/pkg_wolfssl: increase timeout for nrf51dk 2021-01-28 13:41:05 +01:00
6edb3a9e1b
tests/pkg_wolfcrypt-ed25519-verify: increase timeout for nrf51dk 2021-01-28 13:40:54 +01:00
dfa10efef4
tests/pkg_libcose: increase test timeout for nrf51dk 2021-01-28 13:40:24 +01:00
8cc19e4922
Merge pull request #15879 from LordTy/example-default-add-nrf52840dongle
example/default: add nrf52840dongle to BOARD_PROVIDE_NETIF
2021-01-28 13:03:26 +01:00
Tim Broenink
7f9c3e9a73 example/default: add nrf52840dongle to BOARD_PROVIDE_NETIF 2021-01-28 11:53:15 +01:00
Benjamin Valentin
d20a570f43 tests/mtd_raw: fix auto-test for memory that erases to 0 2021-01-28 11:51:28 +01:00
Benjamin Valentin
e6763b9b68 tests/mtd_raw: fix initial size output 2021-01-28 11:51:28 +01:00
Benjamin Valentin
ebe4fc0bc1 tests/mtd_raw: include mtd_write_page() in test 2021-01-28 11:51:28 +01:00
Benjamin Valentin
c569d9a1d9 drivers: add MTD_DRIVER_FLAG_DIRECT_WRITE to mtd drivers
- EEPROMs don't need read-modify-write cylce
 - SD cards will handle read-modify-write internally
2021-01-28 11:51:28 +01:00
Benjamin Valentin
e8bbe1d1c7 mtd: re-add mtd_write_page()
Add a write_page() command that performs a read-modify-write cycle
if necessary.
2021-01-28 11:51:28 +01:00
Marian Buschsieweke
13b97be08c
Merge pull request #15872 from benpicco/boards/cc1352p-launchpad_saul
boards/cc1352(p)-launchpad: add SAUL configuration
2021-01-28 10:07:54 +01:00
da39ba00cc
Merge pull request #15875 from aabadie/pr/tests/driver_bq2429x_test_with_config
tests/driver_bq2429x: move test to test-with-config
2021-01-28 09:58:10 +01:00
Dylan Laduranty
1d0dbb4626
Merge pull request #15846 from benpicco/cpu/sam0_common-spi_fixes
cpu/sam0_common: SPI: MOSI only operation & fix for adafruit-itsybitsy-m4
2021-01-28 09:26:28 +01:00
999849fac4
tests/driver_bq2429x: move test to test-with-config 2021-01-28 09:17:39 +01:00
Jean Pierre Dudey
bb65b3b0af tests/ieee802154_submac: check netdev_driver_t::recv return value
Signed-off-by: Jean Pierre Dudey <me@jeandudey.tech>
2021-01-27 22:52:21 +01:00
Benjamin Valentin
c10282d7a3 boards/cc1352-launchpad: fix BTN-1 definition
same as for cc1352p-launchpad
2021-01-27 20:01:14 +01:00
Benjamin Valentin
f8543df549 boards/cc1352-launchpad: add SAUL configuration 2021-01-27 19:55:57 +01:00
Benjamin Valentin
56dc904d3b boards/cc1352p-launchpad: add SAUL configuration 2021-01-27 19:55:17 +01:00
Benjamin Valentin
9ad4159865 boards/cc1352p-launchpad: fix BTN-1 definition
BTN-1 is on pin 15, configuring pin 13 as input gets the board stuck at boot.
2021-01-27 19:55:17 +01:00
1bde5296fd
Merge pull request #14987 from bergzand/pr/riscv/semihosting
stdio_semihosting: Extend with RISC-V support
2021-01-27 18:49:35 +01:00
550be21cfc
Merge pull request #15868 from aabadie/pr/pkg/libfixmath_nump_version
pkg/libfixmath: bump version to latest master
2021-01-27 17:56:39 +01:00
0a6c9c4ec0
stdio_semihosting: Extend with RISC-V support
RISC-V support semihosting in very similar way as the cortex-m
microcontrollers. The code calls a breakpoint instruction and the
attached debugger reads/writes registers and memory for stdio.

The RISC-V architecture doesn't support a call number with the EBREAK
instruction, to allow the debugger to detect a semihosting break point,
the EBREAK instruction is wrapped in a SLLI and SRAI instruction. These
use x0 as output register, making them NOP instructions.

One caveat when using this is that the RISC-V core traps the EBREAK
instruction with trap code 3 when no debugger is attached. Restarting
the application with the debugger attached avoids this.
2021-01-27 17:52:19 +01:00
543b26c7ab
tests/pkg_libfixmath_unittests: exclude new small boards 2021-01-27 16:58:47 +01:00
df12cbbe5a
pkg/libfixmath: bump version to latest master 2021-01-27 14:19:52 +01:00
Benjamin Valentin
f12a82e4f9 cpu/stm32: use common pm_off() function
The code is identical to the one found in sys/pm_layered/pm.c
2021-01-27 14:07:22 +01:00
Benjamin Valentin
b6c96b101b riotboot: disable pm_layered
On `same54-xpro` this saves 212 bytes of ROM.
2021-01-27 13:21:20 +01:00
Benjamin Valentin
9c1455d55f cpu: make pm_layered a DEFAULT_MODULE
Allow to disable pm_layered in the bootloader to save some ROM.
2021-01-27 13:21:20 +01:00
benpicco
4509dc6812
Merge pull request #15863 from btcven/2020_01_26-ieee-sfd-phr
ieee802154: add SFD and length of PHR for MR-FSK.
2021-01-27 12:31:12 +01:00
dd9ff31878
Merge pull request #15832 from fjmolinas/pr_TOOLCHAIN_cleanup
Makefile.include: change to account for TOOLCHAIN having dependencies
2021-01-27 11:56:44 +01:00
Jean Pierre Dudey
38ade8d2e9 ieee802154: add MR-FSK SFD values for 2FSK
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2021-01-27 11:52:53 +01:00
Jean Pierre Dudey
9fe6b9ac99 ieee802154: add MR-FSK PHR length definition
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2021-01-27 11:52:53 +01:00
Francisco Molina
92afc0441a
examples/gnrc_minimal: move TOOLCHAIN dep to Makefile.gnu.dep 2021-01-27 11:13:08 +01:00