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

8285 Commits

Author SHA1 Message Date
Benjamin Valentin
55b5c47bc8 cpu/esp32: add stdio_usb_serial_jtag 2023-01-09 00:51:27 +01:00
Marian Buschsieweke
525751c33b
cpu/riscv_common/periph_timer: Fix timer_clear()
Previously, timer_clear() was a no-op, resulting in spurious IRQs from
already canceled timeouts. This fixes the issue.
2023-01-09 00:08:59 +01:00
Benjamin Valentin
59f067171f core/init: call vfs_bind_stdio() in early_init() 2023-01-08 22:26:13 +01:00
Benjamin Valentin
124b849503 cpu: call early_init() 2023-01-08 22:26:12 +01:00
Gunar Schorcht
f4d6b2d642 cpu/gd32v: fix clock setting
`CONFIG_BOARD_HAS_HXTAL` is used to indicate that the board has an HXTAL connected. If the HXTAL is present, it is used as PLL clock source. But if the HXTAL is not present, the half IRC8M clock should be used as PLL clock source and must not be disabled at the end of clock settings. Using IRC8M clock as PLL clock source also requires another PLL multiplication factor.
2023-01-08 11:32:28 +01:00
Gunar Schorcht
e4010f7445 cpu/gd32v: fix clock setting
`CLOCK_HXTAL` is a value and not a flag, so that shifting to the left changes anything in the register but does not set the PLLSEL bit. `RCU_CFG0_PLLSEL_Msk` has to be used instead to set the PLLSEL bit.
2023-01-08 10:42:01 +01:00
Gunar Schorcht
dd0593a3c8 cpu/gd32v: fix clock setting
Setting the `RCU_CTL` register just to the IRC8M bit also removes the IRC8M calibration and trim adjust value in this register. Therefore IRC8M calibration and trim adjust value have to be preserved and the IRC8M has to be set.
2023-01-08 10:42:01 +01:00
bors[bot]
441b69964c
Merge #19106
19106: core/lib: Add macros/utils.h header r=aabadie a=maribu

### Contribution description

The macros CONCAT(), MIN(), and MAX() are defined over and over again in RIOT's code base. This de-duplicates the code by moving the macros to a common place.

### Testing procedure

Generated binaries don't change, as this only a de-duplication of macros that doesn't change their definition.

### Issues/PRs references

None

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-01-07 21:16:51 +00:00
Gunar Schorcht
32168da8d6 cpu/esp32: add flashpage support
f
2023-01-07 14:49:36 +01:00
Gunar Schorcht
80833a74e8 cpu/esp32: add flashpage support to linker scripts 2023-01-07 10:38:52 +01:00
Gunar Schorcht
6f9c64c6cb cpu/esp32: add flashpage support to Kconfig 2023-01-07 10:38:52 +01:00
Gunar Schorcht
f4c0d7da71 cpu/esp32: add flashpage definitions in CPU config 2023-01-07 10:38:52 +01:00
Marian Buschsieweke
86fdbd7054
core/lib: Add macros/utils.h header
The macros CONCAT(), MIN(), and MAX() are defined over and over again in
RIOT's code base. This de-duplicates the code by moving the macros to a
common place.
2023-01-07 09:47:44 +01:00
bors[bot]
4f1bb12720
Merge #18752 #19100 #19104
18752: nanocoap_sock: deprecate nanocoap_get() r=benpicco a=benpicco





19100: cpu/esp_common: allow configuration of UART0 r=benpicco a=gschorcht

### Contribution description

This PR
- fixes the issue for ESP32 SoCs that UART0 signals can't be routed to arbitrary GPIOs and
- allows the configuration of the UART device used by the bootloader.

The UART interface and its configuration used by the STDIO are defined in RIOT using the define `STDIO_UART_DEV` and the configuration of the corresponding UART device in `periph_conf.h`. 

However, the bootloader compiled directly in ESP-IDF uses its own definitions `CONFIG_ESP_CONSOLE_UART_*` for the UART configuration. To be able to use a consistent UART configuration in RIOT and the bootloader, e.g. to see the output of the 2nd stage bootloader, these `CONFIG_ESP_CONSOLE_UART_*` can be defined via a set of KConfig variables in RIOT (not yet implemented in Kconfig):
- `CONSOLE_CONFIG_UART_NUM` defines the UART device to be used by the bootloader and by `STDIO_UART_DEV`
- `CONSOLE_CONFIG_UART_RX` and `CONSOLE_CONFIG_UART_TX` define the GPIOs to be used by the bootloader and should be the GPIOs as defined in `periph_conf.h` for the corresponding UART device.

### Testing procedure

Any ESP32 node should still work with `stdio_uart` and the default configuration. To test an alternative configuration, use
```
CFLAGS='-DUART1_TXD=5 -DUART1_RXD=4 -DCONFIG_CONSOLE_UART_NUM=1 -DCONFIG_CONSOLE_UART_TX=5 -DCONFIG_CONSOLE_UART_RX=4' USEMODULE=esp_log_startup BOARD=esp32-wroom-32 make -C tests/shell flash
```
The bootloader output and the STDIO should be routed to UART1 at GPIO4 and GPIO5.

### Issues/PRs references

Prerequisite for PR ##18863

19104: tests/periph_uart: only exclude STDIO_UART_DEV if stdio_uart is used r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
2023-01-06 21:15:36 +00:00
Gunar Schorcht
7230299575 cpu/esp32: use same UART device in stdio_uart and bootloader 2023-01-06 16:43:51 +01:00
Gunar Schorcht
623660b399 cpu/esp32/bootloader: allow config of UART console
The UART interface and its configuration as used by the STDIO is defined in RIOT using `STDIO_UART_DEV` and the UART configuration in `periph_conf.h`.

However, the bootloader compiled directly in ESP-IDF uses its own definitions `CONFIG_ESP_CONSOLE_UART_*` for the UART configuration. To be able to use a consistent UART configuration in RIOT and the bootloader, e.g. to see the output of the 2nd stage bootloader, these `CONFIG_ESP_CONSOLE_UART_*` can be defined via a set of KConfig variables `CONSOLE_CONFIG_UART_*`. Here the variable `CONSOLE_CONFIG_UART_NUM` is then also used as `STDIO_UART_DEV` and the variables `CONSOLE_CONFIG_UART_RX` and `CONSOLE_CONFIG_UART_TX` of the configuration in `periph_conf.h` should be used accordingly.
f
2023-01-06 16:43:51 +01:00
Gunar Schorcht
fb8d521ac6 cpu/esp_common: allow configuration of UART0 2023-01-06 16:43:51 +01:00
Gunar Schorcht
8b34d547ac cpu/esp32: fix SDK configuration for USB PHY
When using USB Serial/JTAG/OTG/CDC, USB should be enabled in `phy_init`, otherwise USB interface is not working properly.
2023-01-06 12:30:11 +01:00
bors[bot]
256da8e9b5
Merge #18869
18869: cpu/sam0_common/periph: Fix compilation with LLVM  r=benpicco a=Teufelchen1

Related to #18851 

This fixes an unused function error when compiling the gnrc_networking_mac example using LLVM as toolchain.
The fix works by only including the function when it is actually needed.


Co-authored-by: Teufelchen1 <bennet.blischke@haw-hamburg.de>
2023-01-05 16:17:53 +00:00
bors[bot]
e35c7adb73
Merge #19031
19031: cpu/stm32/periph_timer: implement timer_set() r=benpicco a=maribu

### Contribution description

The fallback implementation of timer_set() in `drivers/periph_common` is known to fail on short relative sets. This adds a robust implementation.

### Testing procedure

Run `tests/periph_timer_short_relative_set` at least a few dozen times (or use https://github.com/RIOT-OS/RIOT/pull/19030 to have a few dozen repetitions of the test case in a single run of the test application). It should now succeed.

### Issues/PRs references

None

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-01-04 19:04:26 +00:00
Marian Buschsieweke
94f9a56125
cpu/qn908x/periph_timer: Implement timer_set()
This fixes test failures in tests/periph_timer_short_relative_set.

Note: This differs a bit from the implementation in e.g. nRF5x or STM32
in that it always briefly pauses the timer. The issue is that when
running the timer can take a few ticks to actually react to the new
compare target. So even if the previously written target is still in
the future, the timer may not fire anyway. Pausing the timer while
setting and setting the target at least one higher than the current
count reliably triggers the IRQ.
2023-01-03 22:35:11 +01:00
Marian Buschsieweke
b8cc222e76
cpu/stm32/periph_timer: 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.
2023-01-03 15:51:06 +01:00
bors[bot]
f7ef90d213
Merge #19074
19074: cpu/esp8266: build the SDK bootloader from source r=benpicco a=gschorcht

### Contribution description

This PR is a takeover of PR #17043, which is rebased to the current master and includes some corrections that became necessary after rebasing.

**Copied from description of PR #17043:**

We had four versions of pre-built bootloaders for the esp8266 with different settings of logging and color logging. These bootloaders were manually built from the SDK and shipped with RIOT-OS source code. However there are more settings that affect the bootloader build that are relevant to the app or final board that uses this bootloader. In particular, flash size and flash speed is important for the bootloader to be able to load an app from a large partition table at the fastest speed supported by the board layout and flash chip.

Another example is the UART baudrate of the logging output from the bootloader. The boot ROM will normally start at a baud rate of 74880 (depending on the crystal installed), so it might make sense to keep the UART output at the same speed so we can debug boot modes and bootloader with the same terminal.

This patch builds the `bootloader.bin` file from the ESP8266 SDK source code. The code is built as a module (`esp8266_bootloader`) which at the moment doesn't generate any object code for the application and only produces a `bootloader.bin` file set to the `BOOTLOADER_BIN` make variable for the `esptool.inc.mk` to flash.

The code needs to be compiled and linked with custom rules defined in the module's Makefile since the `bootloader.bin` is its own separate application.

The `BOOTLOADER_BIN` variable is changed from a path relative to the `$(RIOTCPU)/$(CPU)/bin/` directory to be full path. This makes it easier for applications or board to provide their own bootloader binary if needed.

As a result of building the bootloader from source we fixed the issue of having a large partition table.

### Testing procedure

Use following command to flash the application with STDIO UART baudrate of 115200 baud.
```
BAUD=74880 USEMODULE=esp_log_startup make -C tests/shell BOARD=esp8266-esp-12x flash
```
Connect with a terminal programm of your choice (unfortunatly `picocom` and `socat` don't support a baudrate close to 74880), for example:
```
python -m serial.tools.miniterm /dev/ttyUSB0 74880
```
On reset, the `esp8266-esp-12x` node shows the ROM bootloader log output
```
 ets Jan  8 2013,rst cause:2, boot mode:(3,7) 

load 0x40100000, len 6152, room 16 
tail 8
chksum 0x6f
load 0x3ffe8008, len 24, room 0 
tail 8
chksum 0x86
load 0x3ffe8020, len 3408, room 0 
tail 0
chksum 0x79
```
as well as the second-stage bootloader built by this PR (`ESP-IDF v3.1-51-g913a06a9ac3`) at 74880 baudrate.
```
I (42) boot: ESP-IDF v3.1-51-g913a06a9ac3 2nd stage bootloader
I (42) boot: compile time 11:25:03
I (42) boot: SPI Speed      : 26.7MHz
...
I (151) boot: Loaded app from partition at offset 0x10000
```
The application output is seen as garbage since the `esp8266-esp-12x` uses 115200 as baurate by default.

To see all output at a baudrate of 74880 baud, you can use the following command:
```
CFLAGS='-DSTDIO_UART_BAUDRATE=74880' BAUD=74880 USEMODULE=esp_log_startup make -C tests/shell BOARD=esp8266-esp-12x flash
```

If the application is built without options, the ROOM bootloader output will be 74880 baud and the second stage bootloader and application output will be 115200 baud.

### Issues/PRs references

Fixes issue #16402

Co-authored-by: iosabi <iosabi@protonmail.com>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-01-03 00:44:24 +00:00
bors[bot]
6b4b7542eb
Merge #19078
19078: cpu/esp32: define FLASHFILE_POS r=benpicco a=gschorcht

### Contribution description

Instead of using a fixed position of the image file in the flash, the variable `FLASHFILE_POS` is used which allows to override the default position of the image in the flash at 0x10000.

This PR is a prerequisite for the `periph_flashpage` implementation PR #19079.

### Testing procedure

Flashing a ESP32x SoC should work with `FLASHFILE_POS=0x20000`, for example:
```
USEMODULE=esp_log_startup FLASHFILE_POS=0x20000 BOARD=esp32-wroom-32 make -j8 -C tests/shell flash
```
The bootloader output should give `00020000` as offset for the `factory` partition
```
I (75) boot: Partition Table:
I (78) boot: ## Label            Usage          Type ST Offset   Length
I (84) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (91) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (97) boot:  2 factory          factory app      00 00 00020000 000199b0
I (104) boot: End of partition table
```
and
```
I (125) esp_image: segment 0: paddr=00020020 vaddr=3f400020 size=02140h (  8512) map
```
during the load of the image.

### Issues/PRs references

Prerequisite for PR #19079

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-01-02 18:18:19 +00:00
bors[bot]
821acbe6fb
Merge #19077
19077: cpu/esp32: configurable linker scripts r=benpicco a=gschorcht

### Contribution description

This PR provides configurable linker scripts for ESP32x SoCs.

Using the vendor `memory.ld.in` file and a `sections.ld.in` file instead of the static versions of these files, from which the actual used `memory.ld` and  `sections.ld` are generated using the C preprocessor, allows to use the configuration in `sdkconfig.h` as well as Kconfig to define a custom memory layout. For example, it is no longer necessary to maintain different `memory.ld` files for the ESP32 BLE module, since the memory layout is now defined from the values of the configuration.

Note for the review: The `memory.ld.in` files are now simply copies of the manufacturer's `memory.ld.in` files. However, it is not possible to use the vendor's `memory.ld.in` files directly, because they have to be extended further on, e.g. for the `periph_flashpage` implementation.

This PR is prerequisite for the `periph_flashpage` support in PR #19079.

### Testing procedure

Green CI.

### Issues/PRs references

Prerequisite for PR #19079

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-01-02 04:56:58 +00:00
Gunar Schorcht
8381cd3633 cpu/esp32: using configurable linker scripts in makefiles 2022-12-31 16:03:46 +01:00
Gunar Schorcht
409e609f46 cpu/esp32x: generate section.ld from section.ld.in
Using `sectoins.ld.in` instead of a static `sections.ld`, from which the actual used `sections.ld` is generated with the C preprocessor, allows to use the configuration in `sdkconfig.h` as well as Kconfig to use a custom section layout.
2022-12-31 15:30:34 +01:00
Gunar Schorcht
dc2dc801cc cpu/esp32x: generate memory.ld from vendor memory.ld.in
Using the vendor `memory.ld.in` instead of a static `memory.ld`, from which the actual used `memory.ld` is generated with the C preprocessor, allows to use the configuration in `sdkconfig.h` as well as Kconfig to use a custom memory layout. For example, it is no longer necessary to maintain different `memory.ld` files for the ESP32 BLE module, since the memory layout is now defined from the values of the configuration.
2022-12-31 15:30:34 +01:00
Gunar Schorcht
a0715b281b cpu/esp32: export FLASH_SIZE to SDK configuration 2022-12-31 14:10:57 +01:00
Gunar Schorcht
f23b20f91f cpu/esp: use FLASHFILE_POS for image position in flash
Instead of using a fixed position of the image file in the flash, the variable `FLASHFILE_POS` is used which allows to override the default position of the image in the flash at 0x10000.
2022-12-31 14:10:57 +01:00
bors[bot]
11d81d28f4
Merge #19064
19064: native: Remove code used for __MACH__ target r=benpicco a=Teufelchen1

### Contribution description

This PR removes code that was used to support macOS as native target. 
macOS / `__MACH__` is no longer supported by RIOT on master.

### Testing procedure

If murdock is happy, that should be enough.


Co-authored-by: Teufelchen1 <bennet.blischke@haw-hamburg.de>
2022-12-27 20:41:23 +00: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
Teufelchen1
c9e9a8d2f1 native: Remove code used for __MACH__ target 2022-12-22 17:57:25 +01:00
Gunar Schorcht
4f1b4ba0c9 cpu/esp_common: remove double defines from Makefile 2022-12-22 12:18:34 +01:00
iosabi
073b2209da cpu/esp8266: Build the SDK bootloader from source.
We had four versions of pre-built bootloaders for the esp8266 with
different settings of logging and color logging. These bootloaders were
manually built from the SDK and shipped with RIOT-OS source code.
However there are more settings that affect the bootloader build that
are relevant to the app or final board that uses this bootloader. In
particular, flash size and flash speed is important for the bootloader
to be able to load an app from a large partition table at the fastest
speed supported by the board layout and flash chip.

Another example is the UART baudrate of the logging output from the
bootloader. The boot ROM will normally start at a baud rate of 74880
(depending on the crystal installed), so it might make sense to keep
the UART output at the same speed so we can debug boot modes and
bootloader with the same terminal.

This patch builds the bootloader.bin file from the ESP8266 SDK source
code. The code is built as a module (esp8266_bootloader) which at the
moment doesn't generate any object code for the application and only
produces a bootloader.bin file set to the BOOTLOADER_BIN make variable
for the esptool.inc.mk to flash.

The code needs to be compiled and linked with custom rules defined in
the module's Makefile since the bootloader.bin is its own separate
application.

The `BOOTLOADER_BIN` variable is changed from a path relative to the
`$(RIOTCPU)/$(CPU)/bin/` directory to be full path. This makes it easier
for applications or board to provide their own bootloader binary if
needed.

As a result of building the bootloader from source we fixed the issue of
having a large partition table. Fixes #16402.
2022-12-22 12:18:34 +01:00
Teufelchen1
2629e81b3b cpu/sam0_common/periph: Fix compilation with LLVM 2022-12-19 15:19:51 +01:00
bors[bot]
f539035c86
Merge #18756
18756: drivers/usbdev_synopsys_dwc2: add EFM32 support r=chrysn a=gschorcht

### Contribution description

This PR provides the changes for the Synopsys USB OTG IP core DWC2 driver for EFM32 MCUs. It also provides the changes of the board definition for `stk3600` and `stk3700` for testing.

### Testing procedure

`tests/usbus_hid` should work on the EFM32 boards `stk3600` (EFM32LG family) and `stk3700` (EFM32GG family).

It is already tested for a `sltb009a` board (EFM32GG12 family).

### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2022-12-19 12:55:57 +00:00
Benjamin Valentin
a9120a38ca cpu/lm4f120: remove stdlib include 2022-12-14 00:22:02 +01:00
Benjamin Valentin
aa376f05c0 cpu/arm7_common: drop cyclic include 2022-12-13 15:55:17 +01:00
Joakim Nohlgård
b3d04d8270 riscv: Reduce reset trampoline code size by 2 bytes
`addi` with 20 bit immediate does not have a compressed representation,
so using `jalr` with immediate offset uncompressed is smaller than using
`addi`+`c.jr`
2022-12-08 13:26:07 +01:00
Gunar Schorcht
c6bae0b4bf cpu/efm32: increase RIOTBOOT_LEN for riotboot_dfu 2022-12-07 16:38:51 +01:00
Gunar Schorcht
4f47dc13fe cpu/efm32: add CPU_FAM_EFM32xx define 2022-12-07 16:38:51 +01:00
Gunar Schorcht
dd6c46e289 cpu/efm32: fix PM configuration
`cpu/cortexm_common/include/cpu.h` has to be included in `cpu/efm32/periph_cpu.h` so that `PROVIDES_PM_SET_LOWEST` is defined if only `periph_cpu.h` is included. Otherwise `pm_set_lowest` is defined multiple times if the `pm_layered` module is not used. `PROVIDES_PM_OFF` has to be defined in case `pm_layered` is not used, e.g. in riotboot.
2022-12-07 16:38:51 +01:00
Gunar Schorcht
6d233f1308 cpu/efm32: enable usbdev_synopsys_dwc2 driver as periph_usbdev 2022-12-07 16:34:34 +01:00
Gunar Schorcht
6146a3ea91 cpu/efm32: add support for Synopsys USB OTG FS IP core 2022-12-07 16:34:34 +01:00
Antonio Galea
ee76e21c33 sam0_common: use size_t len for I2C transfers, as declared (fixes #19008) 2022-12-04 16:57:00 +01:00
Marian Buschsieweke
0d85356180
cpu/qn908x: use bitarithm_test_and_clear() & fix cb
Previously, the callback was incorrectly passed a channel of zero as
argument regardless of the channel that triggered the IRQ. This fixes
the issue and also uses `bitarithm_test_and_clear()` to only iterate
over the channels that actually have an IRQ flag set, rather than
all channels.
2022-11-28 16:43:24 +01:00
Marian Buschsieweke
c95028655d
cpu/qn909x/periph_timer: make clangd happy
The linter was unhappy that `unsinged long` and `uint32_t` were used
inconsistency (in the `timer_init()` declaration, implementation, as
well as in the `DEBUG()` format specifiers).
2022-11-28 16:43:24 +01:00
Marian Buschsieweke
476dca2e8f
Merge pull request #18978 from maribu/cpu/atmega_common/periph_timer/spurious_irqs
cpu/atmega_common/periph_timer: fix spurious IRQs
2022-11-26 16:29:18 +01:00
benpicco
1a73fb0593
Merge pull request #18795 from benpicco/irq-track
debug_irq_disable: add module to debug time spent in irq_disable
2022-11-25 19:10:10 +01:00
Marian Buschsieweke
787884aa95
cpu/atmega_common/periph_timer: fix spurious IRQs 2022-11-25 14:46:16 +01:00
f1a8e1f636
Merge pull request #18970 from maribu/cpu/nrf5x_common/periph_timer/fix_spurious_irqs
cpu/nrf5x_common/periph_timer: fix spurious IRQs
2022-11-25 08:23:34 +01:00
Marian Buschsieweke
c89c75dbc9
Merge pull request #18971 from maribu/cpu/esp
cpu/esp{32,8266}/periph_timer: allow changing callback or freq
2022-11-25 08:22:26 +01:00
Marian Buschsieweke
03b7fe8f0c
cpu/esp8266/periph_timer: allow changing callback or freq
Allow multiple calls to timer_init(), as this is the only way to
change the timer frequency or the callback function.
2022-11-24 22:39:49 +01:00
Marian Buschsieweke
e8fd65566a
cpu/esp32/periph_timer: allow changing callback or freq
Allow multiple calls to timer_init(), as this is the only way to
change the timer frequency or the callback function.
2022-11-24 22:38:15 +01:00
Marian Buschsieweke
fbd7b77331
cpu/nrf5x_common/periph_timer: fix spurious IRQs 2022-11-24 22:36:42 +01:00
Marian Buschsieweke
20fc71dd65
cpu/stm32/periph_timer: fix spurious IRQs 2022-11-24 22:34:10 +01:00
Marian Buschsieweke
93c5755649
cpu/stm32/periph_timer: fix race conditions
Allow two threads to share the same timer - provided they use distinct
sets of timer channels - without occasionally corrupting registers or
state flags.
2022-11-24 22:34:03 +01:00
Benjamin Valentin
59a3e613fe cpu/cortexm_common: measure time spent with IRQ disabled 2022-11-24 21:27:20 +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
Juergen Fitschen
a6ff838a4b
Merge pull request #18933 from jue89/feature/cpu_efm32_series_2_adc
cpu/efm32: add periph_adc support for Gecko Series 2
2022-11-24 11:32:56 +01:00
benpicco
86d72c7b85
Merge pull request #18940 from krzysztof-cabaj/nucleo-l496zg-ADC
boards/nucleo-l496zg: add ADC support
2022-11-23 20:34:08 +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
Marian Buschsieweke
232c70ba53
Merge pull request #18948 from maribu/boards/common/nrf52
boards/common/nrf52: fix timer config
2022-11-23 10:47:26 +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
Juergen Fitschen
97bc8252d9
Merge pull request #18920 from jue89/fix/sam0_rtt_rtc
sam0/rtc_rtt: optimizations to get around the painful long syncwaits
2022-11-22 18:12:06 +01:00
Juergen Fitschen
18e9167c73 cpu/efm32/adc: add support for Gecko Series 2
Series 2 features IADCs instead of ADCs.
2022-11-22 14:44:56 +01:00
Marian Buschsieweke
b533fcf543
cpu/nrf5x_common: improve doc on timer_conf_t::channels 2022-11-22 13:43:05 +01:00
Jue
2a81a2ab5c cpu/efm32: provide periph_uart_modecfg feature for every board 2022-11-21 23:20:19 +01:00
Jue
80b491d7dd cpu/efm32/uart: add modecfg support for Gecko Series 2 2022-11-21 23:17:52 +01:00
krzysztof-cabaj
afbb568306 cpu/stm32/l4: add ADC support for l496zg 2022-11-21 05:52:02 -05:00
Marian Buschsieweke
6b759c2a7d
Merge pull request #18935 from benpicco/makefiles/gnu-version
makefiles/gnu.inc.mk: set flags based on compiler version
2022-11-20 08:11:57 +01:00
Benjamin Valentin
b30efeeb65 makefiles/gnu.inc.mk: set flags based on compiler version 2022-11-19 23:14:54 +01:00
Benjamin Valentin
dd5c876034 cpu/native: replace RIOT_FILE_RELATIVE with __FILE__ 2022-11-19 01:48:42 +01:00
Benjamin Valentin
8777584ac8 cpu/lpc23xx: core: replace RIOT_FILE_RELATIVE with __FILE__ 2022-11-19 01:48:42 +01:00
benpicco
e1aa925c35
Merge pull request #18913 from benpicco/macro-prefix-map
makefiles/cflags.inc.mk: don't include absolute path in __FILE__ macro
2022-11-18 16:43:35 +01:00
benpicco
2f122769c3
Merge pull request #18921 from benpicco/cpu/stm32-bkup_heap
cpu/stm32: add unused backup RAM as extra heap
2022-11-18 15:48:36 +01:00
Benjamin Valentin
6f05daceb3 cpu/stm32: add unused backup RAM as extra heap 2022-11-18 12:19:10 +01:00
Gunar Schorcht
4b7578b2eb pkg/tinyusb: fix USB speed selection for STM32 2022-11-17 14:07:38 +01:00
Juergen Fitschen
268bdfec29 sam0/rtc_rtt: don't block until set_alarm has been propagated to periph
rtc_set_alarm() / rtt_set_alarm() are heavily used by ztimer during ISR. This will reduce time spent during ISR drastically. We trust that the peripheral is able to propagate the alarm asynchronously.
2022-11-16 17:02:19 +01:00
Juergen Fitschen
9c6f07f80a sam0/rtc_rtt: optimize pm_unblock/pm_block ping-pong during set alarm 2022-11-16 16:54:29 +01:00
benpicco
b33688dec4
Merge pull request #18919 from gschorcht/cpu/stm32/fix_ram_len_stm32f4{2,3}{7,9}
cpu/stm32: fix RAM_LEN for F427, F429, F437, F439 models
2022-11-16 11:32:13 +01:00
Gunar Schorcht
7b99a5152f cpu/stm32: fix RAM_LEN for F427, F429, F437, F439 models
These models have 256 kByte RAM, but the upper 64 kByte are used as CCM data RAM accessible at 0x1000:0000. The access to 0x2003:xxxx leads to a hard fault.
2022-11-15 22:29:34 +01:00
Benjamin Valentin
5b359108f7 cpu/esp8266: blacklist -fmacro-prefix-map
This requires at least GCC 8
2022-11-15 20:39:49 +01:00
Marian Buschsieweke
35149bd1c2
Merge pull request #18797 from MrKevinWeiss/pr/fixstmclk
cpu/stm32: Fix stm clock configuration
2022-11-15 11:39:25 +01:00
Benjamin Valentin
0bd67d98d9 cpu: always rely on stdio.inc.mk for default stdio selection 2022-11-09 10:42:47 +01:00
benpicco
8559472179
Merge pull request #18821 from jue89/feature/saml21_pheriph_pm
cpu/saml21: add interaction with pm_layered for peripheral drivers
2022-11-07 19:53:57 +01:00
benpicco
384e3ca534
Merge pull request #18847 from krzysztof-cabaj/nucleo-f207zg-ADC
boards/nucleo-f207zg:  support for ADC
2022-11-05 01:55:30 +01:00
krzysztof-cabaj
aa426bd3aa cpu/stm32/f2: add ADC support for f207zg 2022-11-04 18:02:28 -04:00
Jue
73e6886b2c cpu/saml21: define required power modes
We can get rid initially blocked pm modes \o/
2022-11-03 14:53:45 +01:00
Jue
24461b43f8 cpu/sam0/spi: generalize pm_layered interaction
In DMA mode SPI transfers are carried out by HW. We need to block certain pm modes during transfer.
2022-11-03 14:53:44 +01:00
Jue
db9263eeca cpu/sam0/rtc_rtt: integrate pm_layered 2022-11-03 14:53:43 +01:00
Jue
cc4e880aa8 cpu/sam0/rtc: remove overflow IRQ
Due to the RIOT_EPOCH of 2020 this overflow will happen in year 2084. It would be scary if IoT devices are still around then.

We can save RAM and ROM. Furthermore, this overflow handling should block BACKUP power mode in order to keep track of the reference year.
2022-11-03 14:52:38 +01:00
Jue
5866262122 cpu/sam0/usbdev: generalize pm_layered interaction
periph_cpu.h should define the required pm modes.
Additionally, some CPUs require a certain pm mode in USB IDLE mode.
2022-11-03 14:27:47 +01:00
Jue
220be1da7e cpu/sam0/gpio: integrate pm_layered 2022-11-03 14:27:47 +01:00
Jue
ae9190da30 cpu/sam0/uart: integrate pm_layered 2022-11-03 14:27:47 +01:00
Jue
aa5ad12f37 cpu/sam0/uart: skip uart_write() if uart isn't active
Otherwise we get stuck in an endless loop ...
2022-11-03 14:27:47 +01:00
Jue
cf5e207d62 cpu/sam0/uart: enable peripheral clock before accessing regs 2022-11-03 14:27:47 +01:00
Jue
4f25c1017d cpu/sam0/timer: integrate pm_layered 2022-11-03 14:27:47 +01:00
Gunar Schorcht
31efa61eda cpu/stm32: improvement of USB driver selection
There are STM32 families where all models use only the Synopsys DWC2 USB OTG core while others completely use only the USB Device FS core. For these families then either the driver `drivers/usbdev_synopsys_dwc2` or the driver `cpu/stm32/periph/usbdev` is used depending on the respective family. However, the STM32 families F1 and L4 use both cores. The correct driver must therefore be selected depending on the CPU line or CPU model.
2022-11-03 13:52:01 +01:00
MrKevinWeiss
28aed3cb97
cpu/stm32/kconfig: rework clock tree
This splits up the clock configs.
It allows CPU_FAM based file sourcing and also common CPU_FAMs.
The dependancies are also included in wildcards would be used for the CPU_FAM macro.
This should be much more readable.
This also takes into account the HSE speeds in order to match the make/header resolution.
Some hidden symbols were added to make sorting many CPU_SERIES dependencies easier.
2022-11-03 11:37:33 +01:00
MrKevinWeiss
ba4843b5f4
cpu/stm32/Kconfig: Fix help indent 2022-11-03 11:37:32 +01:00
MrKevinWeiss
641d539092
cpu/stm: Fix clock settings F303* 2022-11-03 11:37:31 +01:00
MrKevinWeiss
17cce015d4
treewide/stm32: Make CLOCK_HS* configurable 2022-11-03 11:37:28 +01:00
Gunar Schorcht
ccbb304eae
Merge pull request #18814 from jue89/fix/efm32_series2_timer
cpu/efm32/timer_series2: fix interaction with pm_layered
2022-11-02 16:30:13 +01:00
Jon-Mailes Graeffe
b0686ce4dd cpu/esp32: set bootloader XTAL frequency configuration to automatic 2022-11-01 03:22:38 +01:00
Jue
75295df810 cpu/saml21/pm: allow blocking IDLE mode 2022-10-31 22:18:00 +01:00
Jue
d0c11e568a cpu/saml21/pm: specify power mode names 2022-10-31 22:18:00 +01:00
krzysztof-cabaj
f82f856c63 cpu/cc26xx_cc13xx: remove broken HTML links and headings from doc 2022-10-28 08:57:17 -04:00
Jue
54e915e40d cpu/efm32/timer_series2: sync STATUS register
Make sure the STATUS register has been synced between the different clock domains.

Especially the LETIMER needs some time to update the STATUS register after it has been enabled. If the LETIMER is started and stopped with just a short delay, pm_layered gets confused because the timer seems to be inactive ...
2022-10-28 11:34:55 +02:00
Jue
e6d18af3ad cpu/efm32/timer_series2: fix timer_start() interaction with pm_layered
The timer hasn't been enabled yet, if the STATUS isn't RUNNING, yet ...
2022-10-28 11:34:55 +02:00
Juergen Fitschen
41251507a2
Merge pull request #18806 from jue89/fix/efm32_startup
cpu/efm32: include periph_conf.h for system-related methods
2022-10-27 23:26:42 +02:00
benpicco
ed1d8e0a3d
Merge pull request #18785 from maribu/boards/blxxxpill/periph_conf
boards/common/blxxxpill: Fix pin conflicts in periph_conf
2022-10-27 21:22:10 +02:00
Juergen Fitschen
6190738bf0 cpu/efm32: include periph_conf.h for system-related methods
This allows boards to define different crystal frequencies. The correct frequency is required by the system-related methods to ensure proper function of the underlying emlib.
2022-10-27 15:22:58 +02:00
benpicco
578d328ff4
Merge pull request #18711 from Enoch247/cpu-stm32-dma-fixes
cpu/stm32: fix periph_dma
2022-10-27 14:36:10 +02:00
Marian Buschsieweke
5ddc332b52
cpu/stm32/periph_pwm: support pin remap for F1
Add support to route timer peripheral to alternative pins for the
STM32F1.
2022-10-27 14:28:06 +02:00
Marian Buschsieweke
b6845cef79
cpu/stm32/periph_qdec: support pin remap for F1
Add support to route peripheral to alternative pins for the STM32F1
family.
2022-10-27 14:28:06 +02:00
Juergen Fitschen
0151279ffe
Merge pull request #18780 from jue89/feature/efm32-series2
EFM32: add cpu family EFR32ZG23 and board xG23-PK6068A
2022-10-26 19:18:30 +02:00
Joshua DeWeese
4e2c63ce8c cpu/stm32/periph/dma: make dma_prepare() generic
This patch makes dma_prepare() handle register names a bit more
generically.
2022-10-26 09:36:45 -04:00
Joshua DeWeese
c888c103c2 cpu/stm32/periph/dma: fix dma_resume
As implmented, dma_resume assumed that transfers widths were 1 byte and
that the memory address incrmenting was always on and periphial address
incrementing always off. This resulted in memory corruption anytime
these assumptions were not true and a dma was resumed. The DMA module
allows intitiating transfers that did not meet these assumption.

This patch adds proper handling inside dma_resume to safely resume any
transfer. Clearifications and errors are added/fixed in the module's
header file. Also, a few constants are removed from the gobal namespace.
2022-10-26 09:36:45 -04:00
Joshua DeWeese
264a7c8ef9 cpu/stm32/periph/dma: fix DMA2 on STMF3 families
As it was, the calculation of DMA2's IRQ number was inccrorect for some
STM families. The implmentation alocates streams numbers 0 to 7 for the
first DMA controller and 8 and up for the second DMA controller. This
offset of +8 was not accounted for when IRQ's of the second DMA
controller was calculated. This patch corrects this.
2022-10-26 09:36:44 -04:00
Martine Lenders
669e21c7f5
Merge pull request #18735 from Teufelchen1/chore/native_macos
boards/native: Remove macOS as native target
2022-10-26 12:48:00 +02:00
Teufelchen1
35a06c4806 boards/native: Remove macOS as native target 2022-10-25 19:11:23 +02:00
Jue
ee2f5e981c cpu/efm32: add efr32zg23 family
Generated with the EFM2RIOT tool: https://github.com/basilfx/EFM2RIOT
2022-10-24 23:16:39 +02:00
Jue
2ce1df5cd6 cpu/efm32/wdt: add series 2 support 2022-10-24 23:16:39 +02:00
Jue
ccf327a32b cpu/efm32/hwrng: add series 2 periph driver 2022-10-24 23:16:39 +02:00
Jue
53e444ebc7 cpu/efm32/i2c: add series 2 support 2022-10-24 23:16:39 +02:00
Jue
2c2790dde2 cpu/efm32/spi: add series 2 support 2022-10-24 23:16:39 +02:00
Jue
568448f68c cpu/efm32/timer: add series 2 periph driver 2022-10-24 23:16:39 +02:00
Jue
42c9a3c9f1 cpu/efm32/uart: add series 2 periph driver 2022-10-24 23:16:38 +02:00
Jue
2b1a260c43 cpu/efm32/gpio: fix clock enable sequence for series 2 2022-10-24 23:16:38 +02:00
Jue
1c60c95733 cpu/efm32: setup EM4 mode for series 2 CPUs 2022-10-24 23:16:38 +02:00
Jue
775861510c cpu/efm32: allow series 2 boards to setup clock trees flexibly 2022-10-24 23:16:38 +02:00
Benjamin Valentin
04287b4795 cpu/cortexm_common: improve formatting of irq_arch.h 2022-10-24 18:08:33 +02:00
benpicco
21956db2fd
Merge pull request #18776 from gschorcht/pkg/tinyusb_otg_hs_ulpi
pkg/tinyusb: add ULPI and UTMI+ HS PHY support for STM32 USB OTG HS ports
2022-10-21 20:19:23 +02:00
Gunar Schorcht
9c8ec851ce cpu/stm32: define CFG_TUSB_RHPORT{0,1}_MODE dependent on used USB ports 2022-10-21 11:43:55 +02:00
benpicco
f02113081b
Merge pull request #18779 from benpicco/socket_zep-crc16_ccitt
socket_zep: make use of crc16_ccitt_false_update()
2022-10-21 11:01:56 +02:00
Benjamin Valentin
2bb657c72c socket_zep: make use of crc16_ccitt 2022-10-20 13:08:30 +02:00
Juergen Fitschen
67b380034a cpu/efm32/pm: add debug output 2022-10-19 18:17:43 +02:00
Juergen Fitschen
360b36af16 cpu/efm32/pm: allow blocking EM1
Aligns pm logic to #17883
2022-10-19 17:51:12 +02:00
Juergen Fitschen
dc8fe69789 cpu/efm32: satisfy vera++ 2022-10-18 23:30:08 +02:00
Jue
68625e5aa9 cpu/efm32/gpio: block power modes if IRQs are enabled 2022-10-18 23:30:08 +02:00
Jue
f6016d3999 cpu/efm32: keep debug unit active during EM2 when DEVELHELP is active 2022-10-18 17:34:27 +02:00
Jue
bc51071d44 cpu/efm32: define EFM power modes for pm_layered 2022-10-18 17:34:27 +02:00
Jue
b3989bc11f cpu/efm32: remove ADC defintion for CPUs without ADC
Gecko Series 2 is shipped with a new IADC peripheral which is backed by its own emlib driver.
2022-10-18 16:39:18 +02:00
benpicco
da5cd8fa88
Merge pull request #18755 from gschorcht/boards/sltb009a
boards: add support for EFM32GG12 Thunderboard Kit (SLTB009A)
2022-10-18 11:12:28 +02:00
Gunar Schorcht
1dfe79fe7c drivers/usbdev_synopsys_dwc2: use DWC2_USB_OTG_FS_TOTAL_FIFO_SIZE
Use `DWC2_USB_OTG_FS_TOTAL_FIFO_SIZE` instead of `USB_OTG_FS_TOTAL_FIFO_SIZE` since the latter is only defined in the vendor headers for STM32 MCUs. The STM32-specific problem that `USB_OTG_FS_TOTAL_FIFO_SIZE` is not defined in the vendor headers for all STM32 families has therefore been moved from the driver to the STM32-specific USB device header.
2022-10-17 20:03:57 +02:00
Gunar Schorcht
d9dbaa3c2c cpu/esp32s{2,3}: DWC2_USB_OTG_FS_TOTAL_FIFO_SIZE must not overridable
Since the total USB OTG FIFO size is a hardware propertie, it must not be overridable.
2022-10-17 20:03:51 +02:00
Gunar Schorcht
59a84285ae cpu/esp32s{2,3}: fix MODULE_USBDEV_SYNOPSYS_DWC2 dependency in Kconfig
`MODULE_USBDEV_SYNOPSYS_DWC2` depends already on `HAS_PERIPH_USBDEV`.
2022-10-17 20:03:23 +02:00
Gunar Schorcht
a7bf2d74ba cpu/esp32: fix usbdev_synopsys_dwc2 on ztimer_msec
The `usbdev_synopsys_dwc2 driver` requires the `ztimer_msec` module and is therefore responsible for pulling it in. Therefore, the dependency on `ztimer_msec` can be removed here.
2022-10-17 20:03:04 +02:00
Gunar Schorcht
550a599da9 cpu/efm32: fix RTT_MAX_VALUE selection
EFM32GG12 have both a RTC and a RTCC. `_RTC_CNT_MAX` is used as `RTT_MAX_VALUE` in this case.
2022-10-17 08:19:08 +02:00
Gunar Schorcht
ae98c3e6d3 cpu/efm32: add EFM32GG12 family (generated with EFM2RIOT) 2022-10-17 08:19:08 +02:00
benpicco
4fded73f63
Merge pull request #18742 from maribu/cpu/stm32/KConfig2
cpu/stm32: fix periph_usb modeling for STM32F1
2022-10-15 21:13:47 +02:00
Marian Buschsieweke
c58817f839
Merge pull request #18739 from jue89/feature/pkg-gecko_sdk_41
pkg/gecko_sdk: Bump to version 4.1.2
2022-10-15 18:11:23 +02:00
Jue
f3d1773483 cpu/efm32/gpio: fix deprecated GPIO_IntConfig() call 2022-10-15 15:43:17 +02:00
Jue
65d4c046a8 cpu/efm32/efr32*: model librail integration 2022-10-15 15:43:17 +02:00
Marian Buschsieweke
40dd3bd68e
cpu/stm32: fix periph_usb modeling for STM32F1
- Fix source selection for STM32F105xx and STM32F107xx
- Fix KConfig modeling for STM32F105xx and STM32F107xx
2022-10-14 16:20:04 +02:00
Marian Buschsieweke
ea53b35d75
cpu/stm32: fix KConfig modeling for STM32F1 / usbdev_synopsys_dwc2
This fixes incorrect module selection for STM32F1 boards with feature
periph_usbdev, a regression introduced by
https://github.com/RIOT-OS/RIOT/pull/17812
2022-10-14 10:05:12 +02:00
Marian Buschsieweke
ea0a53521f
Merge pull request #17812 from benpicco/boards/blxxxpill-usb
boards/blxxxpill: configure usbdev_fs
2022-10-14 01:10:23 +02:00
Marian Buschsieweke
22c2e85f1d
Merge pull request #18641 from maribu/cpu/arm7_common/alignment
cpu/arm7_common: align stacks correctly
2022-10-13 13:59:18 +02:00
Benjamin Valentin
aa6e8cafcf cpu/stm32: enable usbdev_fs for STM32F1 2022-10-13 12:00:22 +02:00
benpicco
5f75f7fa7d
Merge pull request #18729 from gschorcht/cpu/stm32/periph/usbdev_fs/pma_access
cpu/stm32/periph/usbdev_fs: support for STM32F1 family
2022-10-13 03:27:01 +02:00
Marian Buschsieweke
f57a15131e
cpu/arm7_common: align stacks correctly
`thread_stack_init()` didn't correctly set up the stack alignment.
This fixes the issue and brings the function closer to the Cortex M
version, laying the groundwork for future code duplication.

This fixes https://github.com/RIOT-OS/RIOT/issues/11885
2022-10-12 21:53:16 +02:00
Gunar Schorcht
96fad3fb3b
Merge pull request #18720 from maribu/cpu/esp32/uart
cpu/esp_common/periph_uart: fix call to _uart_set_mode
2022-10-12 15:17:01 +02:00
Gunar Schorcht
a76297c55e cpu/stm32/periph/usbdev_fs: small cleanup of comment formatting 2022-10-12 15:15:10 +02:00
Gunar Schorcht
dde72ad41b cpu/stm32/periph/usbdev_fs: implement PMA access schemes
There are two schemes for accessing the packet buffer area (PMA) from the CPU:
 - 2 x 16 bit/word access scheme where two 16-bit half-words per word can be accessed. With this scheme the access can be half-word aligned and the  PMA address offset corresponds therefore to the local USB IP address.  The size of the PMA SRAM is usually 1024 byte.
- 1 x 16 bit/word access scheme where one 16-bit half word per word can be  accessed. With this scheme the access can only be word-aligned and the  PMA address offset to a half-word is therefore twice the local USB IP  address. The size of the PMA SRAM is usually 512 byte.
Which access scheme is used depends on the STM32 model.
2022-10-12 15:15:10 +02:00
Gunar Schorcht
0177018277 cpu/stm32/periph/usbdev_fs: always use 16-bit addresses for PMA
The addressing of the Packet buffer Memory Area (PMA) is done locally in the USB IP core in half-words with 16-bit. The `_ep_in_buf` and `_ep_out_buf` arrays which hold these USB IP local addresses in the PMA for initialized EPs therefore always use `uint16_t`.
2022-10-12 14:19:30 +02:00
Gunar Schorcht
add766f3e1 cpu/stm32/periph/usbdef_fs: emulate disconnect/connect
If the MCU does not have an internal D+ pullup and there is no dedicated GPIO to simulate a USB disconnect, the D+ GPIO is temporarily configured as an output and pushed down to simulate a disconnect/connect cycle to allow the host to recognize the device. However, this requires an external pullup on D+ signal to work
2022-10-12 14:19:23 +02:00
Gunar Schorcht
58ebf02e58 cpu/stm32/periph/usbdev_fs: configure USB clock predivider
If `RCC_CFGR_USBPRE` is defined, the USB device FS clock of 48 MHz is derived from the PLL clock. In this case the PLL clock must be configured and must be either 48 MHz or 72 MHz. If the PLL clock is 72 MHz it is pre-divided by 1.5, the PLL clock of 48 MHz is used directly.
2022-10-12 14:18:55 +02:00
Martine Lenders
b35a291332
Merge pull request #18718 from MrKevinWeiss/pr/fixnightlies
Fix kconfig models breaking nightlies
2022-10-11 15:07:50 +02:00
Gunar Schorcht
65d5d28e09
Merge pull request #18717 from maribu/cpu/esp32/ESP32_SDK_DIR
cpu/esp32: move ESP32_SDK_DIR definition here
2022-10-11 11:06:19 +02:00
Marian Buschsieweke
c1a62f316e
cpu/esp32: move ESP32_SDK_DIR definition here
The definition in `pkg/esp32_sdk/Makefile.include` was evaluated by
`make` after the include paths were already set, resulting in
`ESP32_SDK_DIR` being empty in

    INCLUDES += -I$(ESP32_SDK_DIR)/components
    [...]

This in turn resulted in

    cc1: error: /components: No such file or directory [-Werror=missing-include-dirs]
    [...]
2022-10-10 20:39:47 +02:00
Marian Buschsieweke
6d874c2882
cpu/esp_common/periph_uart: fix call to _uart_set_mode
The parameters for parity and stop bits was confused, resulting in
the following compilation error with GCC 12.2.0:

    /home/maribu/Repos/software/RIOT/cpu/esp_common/periph/uart.c: In function '_uart_config':
    /home/maribu/Repos/software/RIOT/cpu/esp_common/periph/uart.c:394:61: error: implicit conversion from 'uart_stop_bits_t' to 'uart_parity_t' -Werror=enum-conversion]
      394 |     if (_uart_set_mode(uart, _uarts[uart].data, _uarts[uart].stop,
          |                                                 ~~~~~~~~~~~~^~~~~
    /home/maribu/Repos/software/RIOT/cpu/esp_common/periph/uart.c:395:42: error: implicit conversion from 'uart_parity_t' to 'uart_stop_bits_t' -Werror=enum-conversion]
      395 |                              _uarts[uart].parity) != UART_OK) {
          |                              ~~~~~~~~~~~~^~~~~~~
    cc1: all warnings being treated as errors

This swaps the parameters.
2022-10-10 14:27:27 +02:00
MrKevinWeiss
82dca7841f
cpu/stm32: fix stm32f3 kconfig model
MODULE_USBDEV_SYNOPSYS_DWC2 was being selected when it shouldn't
2022-10-10 12:37:10 +02:00
MrKevinWeiss
842ba5f51c
cpu/stm32: fix kconfig model usb clock 2022-10-10 12:10:29 +02:00
Benjamin Valentin
cd9c8c354e cpu/esp32: allow GPIO_UNDEF in SPI config
e.g. a display or string of LEDs might not have a MISO pin defined
2022-10-08 22:02:49 +02:00
Benjamin Valentin
2b2298b796 cpu/esp32: implement periph_spi_reconfigure 2022-10-08 22:02:49 +02:00
Marian Buschsieweke
90c92797bd
Merge pull request #18697 from kaspar030/cortexm_clear_fpu_state_on_thread_exit
cpu/cortexm: clear FPU state in `cpu_switch_context_exit()`
2022-10-06 19:05:38 +02:00
5cc43e5d5e cpu/cortexm: clear FPU state in cpu_switch_context_exit() 2022-10-05 22:17:26 +02:00
Dylan Laduranty
d7d91935a4
Merge pull request #18680 from gschorcht/drivers/usbdev_stm32f3
cpu/stm32/periph/usbdev_fs: add support for STM32F3 family
2022-10-05 18:35:53 +02:00
Dylan Laduranty
1a1b41bea5
Merge pull request #18688 from benpicco/cpu/sam0_common-muxpos
cpu/sam0_common: ADC keep muxpos as legacy define
2022-10-05 16:56:26 +02:00
Marian Buschsieweke
f02bc5791a
Merge pull request #18571 from maribu/sys/tiny_strerror
sys/tiny_strerror: add tiny `strerror()` implementation
2022-10-05 09:24:40 +02:00
Gunar Schorcht
08bd418baa cpu/stm32/periph/usbdev_fs: coding style fix 2022-10-05 09:15:29 +02:00
Gunar Schorcht
7f4613da34 cpu/stm32/periph/usbdev_fs: changes to support STM32F3 2022-10-05 09:15:29 +02:00
Gunar Schorcht
1fde5a4401 cpu/stm32/periph/usbdev_fs: support GPIO for USB connect/disconnect
Since some STM32 MCU don't have internal D+ pullup, there are boards that use a GPIO for USB bus connect/disconnect.
2022-10-05 09:15:29 +02:00
Benjamin Valentin
5843ff4127 cpu/sam0_common: ADC keep muxpos as legacy define 2022-10-04 15:45:25 +02:00
Gunar Schorcht
3d1a3bf560 cpu/stm32/periph/usbdev_fs: allow USB signals as additional function
For a number of STM32 MCUs with the USB-FS device interface the signals USB_DP and USB_DM are not defined as GPIO alternative function but as additional function. Additional functions are directly selected/enabled through peripheral registers hand have not to be configured. In this case, the configuration defines GIO_AF_UNDEF as alternative function.
2022-10-04 13:59:43 +02:00
Gunar Schorcht
20bdd3452e cpu/stm32/periph/usbdev_fs: conditional configuration of CRS
Conditional configuration of CRS_CR_AUTOTRIMEN allows the compilation of the driver for STM32 MCUs that don't have Clock Recovery System.
2022-10-04 13:59:43 +02:00
Gunar Schorcht
66d0f948ba cpu/stm32/periph/usbdev_fs: fix register name
RCC_APB1SMENR1 is used if RCC_APB1SMENR_USBSMEN is defined. Without this fix, the conditional doesn't have any effect.
2022-10-04 13:59:43 +02:00
benpicco
429ee839cc
Merge pull request #18676 from krzysztof-cabaj/nucleo-l4r5zi-ADC
boards/nucleo-l4r5zi:  support for ADC
2022-10-04 13:26:16 +02:00
Dylan Laduranty
11aebb6003
Merge pull request #18592 from gschorcht/pkg/tinyusb
pkg/tinyusb: add tinyUSB as package
2022-10-04 13:08:36 +02:00
Gunar Schorcht
75071319de cpu/stm32: define HSE_VALUE for tinyUSB Synopsys DWC2 driver 2022-10-04 11:10:43 +02:00
Gunar Schorcht
9cf0119233 pkg/tinyusb: add tinyusb_hw_defaults.h for platform specific defaults 2022-10-04 07:40:18 +02:00
krzysztof-cabaj
3a23f2632e boards/nucleo-l4r5zi: add ADC support 2022-10-03 17:13:20 -04:00
Marian Buschsieweke
3227fb3b17
Merge pull request #18619 from maribu/core/mutex/cleanup
core/mutex: clean up
2022-10-03 10:58:07 +02:00
benpicco
da6b16da7e
Merge pull request #18669 from benpicco/mtd_native_ftell
cpu/native: get mtd size from file size
2022-10-01 16:47:48 +02:00
Gunar Schorcht
76848492b0 cpu/stm32: add tinyUSB package support 2022-09-30 19:05:51 +02:00
Gunar Schorcht
8696783853 cpu/esp32: enable tinyUSB package for ESP32-S2 and ESP32-S3 2022-09-30 19:05:51 +02:00
3ee3d1b9ac
Merge pull request #18562 from MrKevinWeiss/pr/removemips
cpu/mips: Remove all mips
2022-09-30 10:47:09 +02:00
Benjamin Valentin
debdbf91d9 cpu/native: get mtd size from file size 2022-09-29 14:55:30 +02:00
Benjamin Valentin
0aa931ad7d cpu/native: povide real_ftell() function 2022-09-29 14:55:27 +02:00
benpicco
45afb8f986
Merge pull request #18644 from gschorcht/drivers/synopsys_dwc2
drivers: add driver for Synopsys DWC2 that is used as USB OTG peripheral on STM32 and ESP32x SoCs
2022-09-29 04:44:32 +02:00
benpicco
81a00f0056
Merge pull request #18658 from benpicco/cpu/sam0_adc-rework
cpu/sam0_common: adc: drop pin from adc_conf_chan_t
2022-09-28 17:27:38 +02:00
benpicco
09fd98c0c6
Merge pull request #18636 from benpicco/cpu/cortexm.ld
cpu: make use of `cortexm.ld`
2022-09-28 14:41:23 +02:00
benpicco
eed92cdb73
Merge pull request #18494 from chrysn-pull-requests/pkg_version-makefile-is-not-shell
pkg: Move versions to dedicated line
2022-09-28 13:24:33 +02:00
Benjamin Valentin
a7c0bf5341 cpu/sam0_common: adc: drop pin from adc_conf_chan_t 2022-09-27 19:36:10 +02:00
benpicco
baf1687951
Merge pull request #18146 from benpicco/cpu/sam0_common/adc-diffmode
cpu/sam0_common: adc: add support for differential mode
2022-09-27 17:34:07 +02:00
MrKevinWeiss
6cad5d2477
cpu/mips: Remove all mips 2022-09-27 13:42:37 +02:00
c8a57747dd cpu/atxmega: update ASPACE <-> ASIZE condition 2022-09-27 10:20:22 +02:00
Gunar Schorcht
9d5a7ac083 cpu/esp32: use usbdev_synopsys_dwc2 driver as periph_usbdev 2022-09-27 01:00:57 +02:00
Gunar Schorcht
78fc60c700 cpu/stm32: use usbdev_synopsys_dwc2 driver as periph_usbdev 2022-09-27 01:00:57 +02:00
Gunar Schorcht
ac075ee320 cpu/esp32: add USB interrupt for periph_usbdev 2022-09-27 01:00:57 +02:00
Gunar Schorcht
1eb8012de9 cpu/esp32: add feature periph_usbdev for ESP32-S2 and ESP32-S3 2022-09-27 01:00:57 +02:00
Gunar Schorcht
8e351b3d5b cpu/esp32: add vendor header file for periph_usbdev
This file is an excerpt of STM32 header file `stm32/smsis/f7/include/stm32f767xx.h` since the ESP32x SoCs use the same Synopsys DWC2 IP core as USB peripherals.
2022-09-27 01:00:57 +02:00
Gunar Schorcht
23b5a785b8 cpu/esp32: add ESP-IDF USB code as module esp_idf_usb 2022-09-27 01:00:57 +02:00
Gunar Schorcht
7db66e49b3 drivers: add USB OTG FS/HS driver for Synopsys DWC2 IP core 2022-09-27 01:00:57 +02:00
Gunar Schorcht
da2f024f8b cpu/esp32: remove include of esp_can.h
Since `esp_can.h` is included by main `cpu/esp32/include/periph_cpu.h` after the include of the specific `periph_cpu_$(CPU_FAM)`, it is not necessary to include `esp_can.h` in each specific `periph_cpu_$(CPU_FAM)`.
2022-09-27 00:57:42 +02:00
Marian Buschsieweke
0ba5c314c1
cpu/atxmega: add missing includes 2022-09-26 18:54:39 +02:00
chrysn
feff412bcc pkg: Move versions to dedicated line
Makefiles don't do comments, so these were forwarded into the variable.
*Most* users would expand the arguments to a shell where it'd be
ignored, but not all of them.

Contributes-To: https://github.com/RIOT-OS/RIOT/pull/18489

(This is also where the one version that is added here was removed).
2022-09-26 17:45:54 +02:00
Marian Buschsieweke
d75722b227
Merge pull request #18638 from maribu/cpu/arm7_common
cpu/arm7_common: fix compilation with 12.2.0
2022-09-24 13:47:55 +02:00
benpicco
a0ddf006af
Merge pull request #18623 from maribu/cpu/avr8_common/strings
cpu/avr8_common: add strings.h for compatibility
2022-09-23 20:35:23 +02:00
Marian Buschsieweke
e7c030cc86
cpu/arm7_common: fix compilation with 12.2.0
This fixes:

    Assembler messages:
    Fatal error: unknown option `-ggdb'
2022-09-23 18:41:12 +02:00
Benjamin Valentin
a3b23827e1 cpu/lm4f120: make use of cortexm.ld 2022-09-23 15:55:30 +02:00
Benjamin Valentin
adeeb2a3e4 cpu/lpc1768: make use of cortexm.ld 2022-09-23 15:55:21 +02:00
Benjamin Valentin
338f0ff604 cpu/sam_common: make use of cortexm.ld 2022-09-23 15:55:12 +02:00
Benjamin Valentin
516b4b6c7f cpu/nrf51: use cortexm.ld 2022-09-23 15:55:05 +02:00
Marian Buschsieweke
023b6ae7cf
cpu/atxmega: fix building with avr-libc 2.1.0
Due to the lack of new official avr-libc releases (which includes the
vendor header files needed to support different version of MCUs),
support for new MCUs was lacking. Distributions such as Debian addressed
this by extending the upstream code with vendor header files directly
obtained from Atmel / Microchip, but without paying attention to
details. As such, a naming inconsistency (ASIZE vs ASPACE) between
officially supported MCUs and new MCUs was introduced.

Now that avr-libc 2.1.0 is officially released, hardware support for new
MCUs is provided by upstream out of the box and only ASIZE is used as
name. This commit adds a bit of glue code to create aliases for ASIZE on
older avr-libc versions where needed. This fixes compilation with the
new avr-libc release and results in more consistent code.
2022-09-22 13:56:53 +02:00
Marian Buschsieweke
f1da9f6695
cpu/avr8_common: add strings.h for compatibility 2022-09-22 08:33:37 +02:00
Marian Buschsieweke
f6ed9fd781
cpu/avr8_common: use tiny_strerror_as_strerror
The custom `strerror()` is dropped and replaced by the module
`tiny_strerror_as_strerror`.
2022-09-20 15:51:11 +02:00
Marian Buschsieweke
e402f1d885
Merge pull request #18418 from maribu/cpu/stm32/periph/stm32_eth_tracing
cpu/stm32/periph_eth: Add stm32_eth_tracing
2022-09-18 22:19:34 +02:00
Benjamin Valentin
838a5e4bd3 netdev_drivers: make sure to signal LINK_UP at least once 2022-09-16 22:57:28 +02:00
Benjamin Valentin
66153a47cf treewide: fix typos 2022-09-15 23:31:40 +02:00
Marian Buschsieweke
6790167a18
Merge pull request #18226 from benpicco/cpu_get_last_instruction
cpu: cpu_print_last_instruction() -> cpu_get_caller_pc()
2022-09-15 20:06:10 +02:00
b3e99c6b8d
Merge pull request #18596 from benpicco/fix_typos
treewide: fix typos
2022-09-15 19:22:26 +02:00
Benjamin Valentin
7abaae7bbd treewide: fix typos 2022-09-15 12:12:23 +02:00
benpicco
b992b73087
Merge pull request #18594 from benpicco/socket_zep-chan
socket_zep: ignore packets sent on the wrong radio channel
2022-09-15 11:50:13 +02:00
Benjamin Valentin
ea917f4b07 cpu: cpu_print_last_instruction() -> cpu_get_caller_pc() 2022-09-15 10:49:56 +02:00
benpicco
b5bf5da38d
Merge pull request #18444 from kfessel/p-fix-doc-grp
doc: fix unbalaced grouping
2022-09-14 22:19:28 +02:00
benpicco
276195e0ff
Merge pull request #18548 from yarrick/lwip_init
pkg/lwip: Set netdev callback before driver init
2022-09-14 15:20:18 +02:00
Karl Fessel
05f114d0af doc: fix unbalaced grouping
- most were trivial
    - missing group close or open
    - extra space
    - no doxygen comment
- name commad might open an implicit group
    this hould also be implicit cosed but does not happen somtimes
- crazy: internal declared groups have to be closed internal
2022-09-14 15:05:25 +02:00
Marian Buschsieweke
44b62e879d
cpu/stm32/periph_eth: add stm32_eth_tracing
Add tracing support via GPIOs to trace the basic state of the Ethernet
peripheral. The following signals are provided:

- One GPIO pin is toggled on entry of the Ethernet ISR
- On TX start an GPIO is set, on TX completion it is cleared
- On RX complete an GPIO is set, once this is passed to the upper layer
  the GPIO is cleared again

In order to reduce the overhead, GPIO LL is used. By default the
on-board LEDs are used as tracing GPIOs. This makes it easy to debug
when the state machine gets stuck without the need to attach a scope or
logic analyzer.
2022-09-14 14:00:27 +02:00
Marian Buschsieweke
efc307455e
cpu/stm32/periph_eth: increase debug output 2022-09-14 13:58:40 +02:00
Benjamin Valentin
bf1c580b0c socket_zep: ignore packets sent on the wrong radio channel 2022-09-14 11:50:14 +02:00
Gunar Schorcht
a0a0b64f40
Merge pull request #18544 from gschorcht/cpu/esp/improve_thread_safety_of_malloc
cpu/esp: improve thread safety in newlib locking functions
2022-09-05 13:29:03 +02:00
Erik Ekman
d568a6dba1 Revert "esp32/eth: Don't overwrite queued event with RX packet"
This reverts commit 95196fb7e4.

Not needed since the initial event is now processed properly.
2022-09-03 14:11:06 +02:00
Gunar Schorcht
b37338ba0b cpu/esp32: changes for periph/gpio_ll in ESP-IDF interface API 2022-09-02 15:03:45 +02:00
Gunar Schorcht
94b4f03b47 cpu/esp32: implement periph/gpio_ll_irq 2022-09-02 15:03:45 +02:00
Gunar Schorcht
581c2dd9be cpu/esp32: implement periph/gpio_ll 2022-09-02 15:03:45 +02:00
Gunar Schorcht
48d59e97a2 cpu/esp32: replace macros for GPIO access by inline functions 2022-09-02 15:03:45 +02:00
Gunar Schorcht
f1830294c0 cpu/esp8266: adjust THREAD_STACKSIZE_{SMALL/TINY} 2022-09-02 08:57:09 +02:00
Gunar Schorcht
6386580b8f cpu/esp_common/freertos: lock/unlock mutex if scheduling is not active
If module `core_mutex_priority_inheritance` is enabled, the scheduling has to be active to lock/unlock the mutex/rmutex used by FreeRTOS semaphores. If scheduling is not active FreeRTOS semaphore function always succeed.
2022-09-02 08:54:31 +02:00
Gunar Schorcht
e1a613ac5c cpu/esp_common: improve thread safety for locking functions
For ESP32x, the operations on recursive locking variables have to be guarded by disabling interrupts to prevent unintended context switches. For ESP8266, interrupts must not be disabled, otherwise the intended context switch doesn't work when trying to lock a rmutex that is already locked by another thread.
2022-09-02 08:54:31 +02:00
Gunar Schorcht
1eb18c2949 cpu/esp_common: improve thread safety for locking functions
Dynamic allocation and initialization of the mutex used by a newlib locking variable must not be interrupted. Since a thread context switch can occur on exit from an ISR, the allocation and initialization of the mutex must be guarded by disabling interrupts. The same must be done for the release of such a locking variable.
2022-09-01 15:50:26 +02:00
Gunar Schorcht
270001a42e cpu/esp_common: move ESP32 specific locking variables to cpu/esp32 2022-09-01 15:09:58 +02:00
Gunar Schorcht
2092c35ef6 cpu/esp32: module malloc_thread_safe not needed any longer
With the improvements of the locking mechanism, thread safety of malloc/realloc/calloc/free is guaranteed. Module malloc_thread_safe is not needed any longer.
2022-09-01 15:08:09 +02:00
Benjamin Valentin
361a94460a cpu/sam0_common: add ADC pin aliases 2022-08-31 18:23:44 +02:00
Gunar Schorcht
b94931191e cpu/esp32: small cleanups in periph/gpio 2022-08-31 12:21:46 +02:00
Gunar Schorcht
af719f9c3b cpu/esp32: fix doc for gpio_flank_t 2022-08-31 12:21:46 +02:00
benpicco
2917c0f51e
Merge pull request #18506 from gschorcht/cpu/esp32/add_esp32s2_cpu_support
cpu/esp32: add support for ESP32-S2
2022-08-30 21:24:36 +02:00
Kevin "Tristate Tom" Weiss
8a340fec11
Merge pull request #18223 from benpicco/cpu/sam0_common-spi_clk
cpu/sam0_common: spi: limit clock to source clock
2022-08-30 19:30:49 +02:00
benpicco
c9bbac816c
Merge pull request #18527 from dylad/pr/fix_sam0_timer_stop
cpu/sam0/timer: supply all clocks before accessing any regs
2022-08-30 15:21:31 +02:00
Gunar Schorcht
d130f8cc8c cpu/esp_common: fix thread_arch.c for ESP32-S2 2022-08-30 15:08:39 +02:00
Gunar Schorcht
b96aac842b cpu/esp32: export FLASH_* settings
To get FLASH_* settings visible in cpu/esp32/bootloader/Makefile, they have to be exported in cpu/esp32/Makefile.include
2022-08-30 15:08:39 +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
Dylan Laduranty
950a7d51e9 cpu/sam0/timer: supply all clocks before accessing any regs
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2022-08-30 09:25:46 +02:00
Gunar Schorcht
14edc937bf cpu/esp_common: add ESP32-S2 support in module esp_xtensa 2022-08-29 17:19:39 +02:00
Gunar Schorcht
06bb755c03 cpu/esp32: add ESP32-S2 support in peripheral drivers 2022-08-29 17:19:39 +02:00
Gunar Schorcht
dac197031e cpu/esp32: add ESP32-S2 specific configuration header files 2022-08-29 17:19:39 +02:00
Gunar Schorcht
67183a196d cpu/esp32/bootloader: add ESP32-S2 support 2022-08-29 17:19:39 +02:00
Gunar Schorcht
60c681a2c3 cpu/esp32/esp-ble-nimble: fix too many empty lines in syscfg.h 2022-08-27 17:27:23 +02:00
Gunar Schorcht
5e0b1d665b cpu/esp32: add BLE support for ESP32-S3 2022-08-26 21:16:09 +02:00
Gunar Schorcht
b13bc776c2 cpu/esp_common/freertos: changes required for BLE 2022-08-26 21:16:09 +02:00
Gunar Schorcht
ce215f5be6 cpu/esp32: add BLE support in linker scripts for ESP32-S3 2022-08-26 21:16:09 +02:00
benpicco
5b6dff045a
Merge pull request #18510 from gschorcht/cpu/esp32/add_esp32c3_ble_support
cpu/esp32: enable BLE and NimBLE host support for ESP32-C3
2022-08-26 21:04:49 +02:00
Gunar Schorcht
aba5e35ac4 cpu/esp32: add BLE support for ESP32-C3 2022-08-26 17:10:42 +02:00
benpicco
28cedd52a0
Merge pull request #18201 from benpicco/slip_dose_rxqueue
drivers/{dose, slipdev, sam0_eth}: generate RX event for queued packets
2022-08-26 13:25:13 +02:00
benpicco
ffc657071e
Merge pull request #18509 from gschorcht/cpu/esp32/add_esp32s2_linker_scripts
cpu/esp32: add linker scripts for ESP32-S2
2022-08-24 21:41:53 +02:00
benpicco
d1377eb0bd
Merge pull request #18505 from gschorcht/cpu/esp32/add_esp32s2_support_in_doc
cpu/esp32: add ESP32-S2 support in documentation
2022-08-24 20:36:47 +02:00
benpicco
0fff68dc9b
Merge pull request #18504 from gschorcht/cpu/esp32/add_esp32s2_support_in_kconfig
cpu/esp32: add ESP32-S2 support in Kconfig
2022-08-24 20:30:48 +02:00
Gunar Schorcht
2ec9ca1276 cpu/esp32: add BLE support in linker scripts for ESP32-C3 2022-08-24 18:08:31 +02:00
Gunar Schorcht
0574f463bb cpu/esp_common/freertos: changes required for BLE 2022-08-24 18:02:21 +02:00
Gunar Schorcht
e216a7d719 cpu/esp32: add linker scripts for ESP32-S2 2022-08-24 17:58:41 +02:00
Gunar Schorcht
8ee714cc9b cpu/esp*: cleanup of CPU_ARCH* and CPU_CORE* 2022-08-24 17:15:37 +02:00
Gunar Schorcht
f848f668e3 cpu/esp32: add some debugging info in esp_ble_nimble 2022-08-24 09:05:25 +02:00
Gunar Schorcht
35676ca712 cpu/esp_common: fix of blocking mechanism in FreeRTOS queus
When FreeRTOS semaphores, as required by ESP-IDF, are used together with `gnrc_netif`, RIOT may crash if `STATUS_RECEIVE_BLOCKED` is used as a blocking mechanism in the FreeRTOS adaptation layer. The reason for this is that `gnrc_netif` uses thread flags since PR #16748. If the `gnrc_netif` thread is blocked because of a FreeRTOS semaphore, and is thus in `STATUS_RECEIVE_BLOCKED` state, the `_msg_send` function will cause a crash because it then assumes that `target->wait_data` contains a pointer to a message of type `msg_t`, but by using thread flags it contains the flag mask. This situation can happen if the ESP hardware is used while another thread is sending something timer controlled to the `gnrc_netif` thread.

To solve this problem `STATUS_MUTEX_LOCKED` is used instead of `STATUS_RECEIVE_BLOCKED` and `STATUS_SEND_BLOCKED`
2022-08-24 09:05:25 +02:00
Gunar Schorcht
26956a9a2b cpu/esp_common: use BLE as netdev_default if nimble_netif is used
To reduce the required RAM in default configuration, the BLE interface is used as netdev_default instead of ESP-NOW. Further network interfaces can be enabled with the modules `esp_now`, `esp_wifi` or `esp_eth`.
2022-08-24 09:05:25 +02:00
Gunar Schorcht
56e59eb036 cpu/esp32: add NimBLE support for ESP32 2022-08-24 09:05:25 +02:00
Gunar Schorcht
abccc41db7 cpu/esp32: add BLE support for ESP32 2022-08-24 09:05:25 +02:00
Gunar Schorcht
48e7263674 cpu/esp32: add BLE support in linker scripts for ESP32 2022-08-24 09:03:38 +02:00
Gunar Schorcht
e257652e1d cpu/esp32/esp-idf: add ESP-IDF module for BLE support 2022-08-24 09:03:38 +02:00
Gunar Schorcht
cdc8a725a4 cpu/esp_common/freertos: changes required for BLE 2022-08-24 09:03:38 +02:00
Gunar Schorcht
b74bf015ef cpu/esp32: change the UART interrupt number
When using Bluetooth LE, the former UART interrupt number 5 is occupied by the ESP32 Bluetooth Controller. Therefore, another interrupt number has to be used for UART.
2022-08-24 09:03:38 +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
53376ce2d3 cpu/esp32: add ESP32-S2 support in doc 2022-08-23 17:36:13 +02:00
Gunar Schorcht
13e3e09414 cpu/esp32: add ESP32-S2 support in Kconfig 2022-08-23 17:35:32 +02:00
Gunar Schorcht
fbdad5fe02 cpu/esp32: add ESP32-S2 support to ESP-IDF compilation 2022-08-23 17:34:38 +02:00