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

8765 Commits

Author SHA1 Message Date
Benjamin Valentin
00c1f4ea4d cpu/cortexm_common: print last active thread on stack corruption 2024-05-29 18:27:27 +02:00
Dylan Laduranty
0ce8780dfa cpu/saml1x: avoid the use of bitfield
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-05-29 17:45:25 +02:00
Marian Buschsieweke
9187d16c78
features.yaml: s/esp_eth/periph_eth/
Use periph_eth instead of esp_eth for the Ethernet peripheral on ESP
MCUs for consistency
2024-05-28 20:59:29 +02:00
Marian Buschsieweke
798793e60a
build system: add netif_openwsn feature
Boards / MCUs now provide the newly introduced  netif_openwsn feature
if they have a network interface supported by OpenWSN.
2024-05-27 22:56:37 +02:00
Marian Buschsieweke
b55d79f5c6
Merge pull request #20666 from benpicco/cpu/sam0_common-netdev_new_api
sam0_eth: implement .confirm_send() to fix fragmented sending
2024-05-24 15:38:26 +00:00
benpicco
fb4e0ccf10
Merge pull request #20609 from Enoch247/improve-stm32-periph-enable.2
cpu/stm32: de-duplicate ifdefs
2024-05-24 09:52:06 +00:00
Joshua DeWeese
6c91865916 cpu/stm32: add missing include of cpu_common.c's header
Following best practice, this patch adds the module's header as its
first include. Resulting compiler errors are also fixed by adding the
header's missing include of cpu_conf.h.
2024-05-23 22:27:01 -04:00
Joshua DeWeese
c05b119fa9 cpu/stm32: de-duplicate ifdefs
This patch consolidates mutliple conditional compile blocks. This is
done to simplify adding new STM32 CPU's and ease maintenance of existing
ports.
2024-05-23 22:27:01 -04:00
Dylan Laduranty
47b74fc021
Merge pull request #20667 from firas-hamdi/feat/samd5x_can_handle_errors
cpu/samd5x: handle CAN errors
2024-05-23 20:12:08 +00:00
Benjamin Valentin
d6d7d90a2a cpu/sam0_common: eth: reduce TX buffer count 2024-05-23 17:19:32 +02:00
Benjamin Valentin
4d1a5aa62c cpu/sam0_common: eth: port to new netdev API 2024-05-23 17:19:32 +02:00
Marian Buschsieweke
97a6543c10
tree-wide: Introduce netif feature and use it
This gets rid of a long list of boards with network interfaces and
instead let's boards (or MCUs with peripheral network interfaces)
provide the netif feature.

The apps that before used the long list are not depending on the
feature instead (in case of the default example, this is an
optional dependency).

Co-authored-by: mguetschow <mikolai.guetschow@tu-dresden.de>
Co-authored-by: mewen.berthelot <mewen.berthelot@orange.com>
2024-05-22 10:39:56 +02:00
Firas Hamdi
59c9f68307 cpu/samd5x: Enable and handle errors interrupts 2024-05-16 15:00:28 +02:00
Firas Hamdi
b35e60e720 cpu/samd5x: add CAN error codes 2024-05-16 15:00:28 +02:00
Mikolai Gütschow
6af809041b
cpu/nrf5x_common: properly calibrate RC-based low-frequency clock 2024-05-14 16:23:28 +02:00
Mikolai Gütschow
350399d1c2
cpu/nrf5x_common: do not rely on latched register for LFCLK state 2024-05-13 14:35:21 +02:00
Joshua DeWeese
410e55d912 cpu/{gd32v,stm32}/periph/adc: ensure max ADC speed is honored
This patch ensures that the ADC's max clock speed is not exceded.
2024-05-10 22:06:10 -04:00
Joshua DeWeese
4218fca673 cpu/{gd32v,stm32}/periph/adc: make ADC clock setable
This patch allows boards to select a max ADC clock speed. This could be
handy if the board wants to clock the ADC differently according to the
board's front end analog circuitry or MCU model's ADC capabilities.
2024-05-10 21:58:22 -04:00
benpicco
1b9716c96d
Merge pull request #18428 from maribu/cpu/stm32/periph/stm32_eth/confirm_send
cpu/stm32/periph/stm32_eth: provide confirm_send
2024-05-09 08:20:28 +00:00
Karl Fessel
d387f323aa
Merge pull request #20644 from kfessel/p-fix-can
cpu/samd5x/can: fix flag handling on receive
2024-05-08 23:04:09 +00:00
Karl Fessel
c623c50fcf cpu/samd5x/can: assert eff-flag if extended id range 2024-05-08 22:43:01 +02:00
Karl Fessel
2bdca8d6c9
Merge pull request #16809 from kfessel/p-backtrace-fix
native/backtrace: improve its print capabilitys and test
2024-05-08 19:57:18 +00:00
Marian Buschsieweke
14795d4de0
cpu/stm32/periph/eth: update to new API 2024-05-08 21:06:00 +02:00
Karl Fessel
37627ce2b8 native/backtrace: improve print capabilitys and test 2024-05-08 12:53:57 +02:00
Teufelchen
e2541c8528
Merge pull request #20525 from Teufelchen1/deprecate/muxpos
cpu/sam0: Remove deprecated muxpos
2024-05-07 14:15:04 +00:00
Karl Fessel
1d53d31339 cpu/samd5x/can: set EFF and RTR Flag if received 2024-05-07 10:48:14 +02:00
Marian Buschsieweke
59956fd371
Merge pull request #20613 from maribu/cpu/msp430/pm
cpu/msp430: implement power management
2024-05-07 06:13:50 +00:00
Marian Buschsieweke
2e9ce4d6b4
Merge pull request #20633 from dylad/pr/cpu/cortexm33/add_splim_support
cpu/cortexm: add stack limit support for Cortex-M33
2024-05-06 17:05:20 +00:00
Dylan Laduranty
683d4a249d cpu/cortexm: add stack limit support for CM33
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-05-06 17:14:49 +02:00
Marian Buschsieweke
751d96fe04
Merge pull request #20643 from maribu/mulle/fixup
boards/mulle: fix flashing
2024-05-06 13:49:54 +00:00
benpicco
3791db3941
Merge pull request #18427 from maribu/lwip/confirm_send
pkg/lwip: make use of confirm send
2024-05-06 11:05:10 +00:00
Marian Buschsieweke
d1167d9d77
cpu/kinetis/dist-check-fcfield.sh: minor fixes
- `printf "%d" ""` triggers an "invalid number" warning on ash, so
  let's use `0` as portable default for zero
- add quotes where needed to make shellcheck happy
2024-05-01 14:05:36 +02:00
Marian Buschsieweke
dd585f9e9d
cpu/esp32/gpio_ll: fix & cleanup
- `gpio_ll_toggle()` now is race-free
- avoid using a look up table but branch to the two different registers
  in the `gpio_ll*()` functions
    - in most cases the GPIO port is a compile time constant and the
      dead branch is eliminated by the optimizer, making this vastly
      more efficient
    - some MCUs do only have a single port, in which case
      `GPIO_PORT_NUM(port)` is known to return `0` even if `port` is
      not known, resulting in one of the branch being eliminated as
      dead branch no matter what
    - in case it really is unknown at compile time which port to work
      on, the branch can still be implemented efficiently by the
      compiler e.g. using a conditional move; likely more efficient
      than fetching a value from the look up table.
2024-04-30 14:16:28 +02:00
Marian Buschsieweke
9462ab576e
cpu/native: netdev_tap implements the legacy netdev API 2024-04-30 09:49:36 +02:00
Marian Buschsieweke
b5650915c9
cpu/esp_common: esp_eth implements the legacy netdev API 2024-04-30 09:49:36 +02:00
Marian Buschsieweke
4824bb38e0
cpu/nrf5x: nrfmin implements the legacy netdev API 2024-04-30 08:41:07 +02:00
Marian Buschsieweke
43f07fa261
cpu/msp430: implement power management
This implements `pm_set_lowest()` for the MSP430. Unlike most other
platforms, it intentionally does not use pm_layered. It is pretty
similar to `pm_layered` in that is does use reference counters, but it
uses them for two independent clock sources.

The main difference is that the low frequency clock domain can be
disabled even when the high frequency clock is still active. With the
layers, disabling layer n-1 while layer n is still blocked would not
work.
2024-04-26 15:52:41 +02:00
Marian Buschsieweke
01caa1900b
cpu/msp430: use SR alias instead of r2
The register r2 is the status register, which has the SR alias. Using
SR is a lot more readable than r2.
2024-04-26 15:52:41 +02:00
benpicco
70c70e2afc
Merge pull request #20623 from maribu/cpu/msp430/periph_usci/fix-prescaler
cpu/msp430/perriph_usci: fix prescaler values for ACLK
2024-04-26 09:42:25 +00:00
Marian Buschsieweke
4c0d6f8f7d
cpu/msp430/perriph_usci: fix prescaler values for ACLK
For super low symbol rates the auxiliary clock (ACLK) is used to
conserve power. But with only 32,678 Hz clock just prescaling will
result in poor bit timing, hence correct modulation control settings
to compensate are needed. Since computing this is too expensive, a
look-up table (as switch statement) for the four most common symbol
rates was used.

The datasheet gave the prescaler values ordered by ascending symbol
rate, the switch statement was ordered descending.
This changes the order to match the datasheets order and matches the
correct prescaler setting to the corresponding symbol rate.

Fixes https://github.com/RIOT-OS/RIOT/issues/20620
2024-04-25 22:39:45 +02:00
Teufelchen
925644e4ce
Merge pull request #20596 from Teufelchen1/fix/esp_print
cpu/esp: Handle format print errors
2024-04-25 13:58:12 +00:00
Teufelchen1
01e78ed333 cpu/esp: Handle format print errors 2024-04-25 15:19:02 +02:00
Dylan Laduranty
e784794b37 cpu/cortexm: uncrustify panic.c
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-04-24 13:20:59 +02:00
Dylan Laduranty
5d3324d3a9 cpu/cortexm: rework bkpt instruction call on panic
Only call this instruction if a debug session is active otherwise it will trigger a hardfault

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-04-24 13:19:45 +02:00
Marian Buschsieweke
a8ffb340fc
Merge pull request #20599 from crasbe/pr/nrf52840_jlink
boards/nRF52xx: correctly set JLINK_DEVICE
2024-04-22 11:53:15 +00:00
crasbe
6f0e81fb34 boards/nRF52xx: correctly set JLINK_DEVICE 2024-04-22 11:25:08 +02:00
benpicco
5a7bcc9f87
Merge pull request #20601 from maribu/cpu/msp430/clock
cpu/msp430: clean up and fix clock driver
2024-04-22 08:44:20 +00:00
benpicco
3cd83c7709
Merge pull request #20602 from maribu/cpu/msp430/get_caller_pc
cpu/msp430: implement get_caller_pc
2024-04-22 08:41:56 +00:00
Marian Buschsieweke
f01fb53529
cpu/msp430: implement get_caller_pc
This "implements" the `get_caller_pc()` function by simply wiring up
compiler intrinsics.
2024-04-19 21:21:32 +02:00
Marian Buschsieweke
024832aa6d
cpu/msp430: clean up and fix clock driver
- The validity test for the high frequency crystal did not take
  into account the higher range supported by the MSP430 F2xx / G2xx
  family. This fixes the issue.
    - The CPU family used is exposed to C as `CPU_FAM_<NAME>` macro
- Unused headers where dropped
- The status register is aliased `SR`, so let's use that more readable
  name.
2024-04-19 19:17:18 +02:00
Dylan Laduranty
efab4dd9ea
Merge pull request #20593 from firas-hamdi/fix/correct_debug_output
cpu/samd5x: reword & correct debug output
2024-04-18 14:36:40 +00:00
Firas Hamdi
599967fe26 cpu/samd5x: reword & correct debug output 2024-04-18 15:42:57 +02:00
Dylan Laduranty
7aa7e7954e cpu/nrf5x: implement pm_off() for nRF53/9160
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-04-18 13:33:36 +02:00
Teufelchen
5bc8ca5318
Merge pull request #18093 from Ollrogge/remove_flashpage_free_funcs
periph/flashpage: remove deprecated flashpage_*_free functions
2024-04-16 08:47:11 +00:00
Marian Buschsieweke
03914582ea
Merge pull request #20567 from krzysztof-cabaj/esp8266-DOC
cpu/esp8266: fix doxygen unbalanced grouping
2024-04-16 06:04:10 +00:00
Marian Buschsieweke
30c9204322
Merge pull request #20572 from maribu/cpu/msp430/uart_usci
cpu/msp430/periph_uart: Fix uart_write() for USCI peripheral
2024-04-15 13:52:45 +00:00
Marian Buschsieweke
f4baa0f2e1
cpu/msp430/periph_uart: Fix uart_write() for USCI peripheral
In TX-only mode the UART was previously release before all bits of the
last byte were shifted out. This adds a busy loop waiting while the
peripheral is still busy, fixing the issue.

Co-authored-by: benpicco <benpicco@googlemail.com>
2024-04-15 14:43:10 +02:00
Marian Buschsieweke
53edb4e981
Merge pull request #20571 from maribu/cpu/msp430/timer
cpu/msp430/periph_timer: add a static_assert() for clear mask
2024-04-15 10:21:52 +00:00
Marian Buschsieweke
5adf1f1a28
cpu/msp430/periph_timer: fix timer_query_freqs()
`timer_query_freqs()` should return 0 when index is out of range
according to the doc. This changes the code to live up to the
spec.
2024-04-14 20:20:36 +02:00
Marian Buschsieweke
49d59d166d
cpu/msp430/periph_timer: add a static_assert() for clear mask
The driver assumes that timer A and timer B have the same register
layout regarding all the features exposed by the driver. This is
backed by the MCU family datasheets for the MSP430 x1xx and the
MSP430 G2xx / F2xx MCUs (and likely more families).

The assert() is pretty limited in coverage, but more to document why
a "timer A clear" mask is used but still claiming the driver also
works for timer B. It just looks too much like a bug otherwise.
2024-04-14 16:01:58 +02:00
krzysztof-cabaj
2f0a78640f cpu/esp8266: fix issue found by static tests 2024-04-11 19:19:58 +02:00
krzysztof-cabaj
569b4b5294 cpu/esp8266: fix doxygen unbalanced grouping 2024-04-11 19:04:06 +02:00
Teufelchen1
c8d5fe2352 boards/cpu: Add limited GBA boot support to RIOT 2024-04-10 17:06:14 +02:00
Dylan Laduranty
d75595751c cpu/nrf9160: fix gpiote0 vector isr
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-04-08 20:13:45 +02:00
Ollrogge
6a8bbe0240 Revert "cpu/cortexm_common: extend flashpage API"
This reverts commit d38f6c68b5.
2024-04-04 17:57:40 +02:00
Ollrogge
4b8355e1d3 Revert "cpu/msp430_common: extend flashpage API"
This reverts commit 741943f021.
2024-04-04 17:57:19 +02:00
Ollrogge
7595d533b4 Revert "cpu/riscv_common: extend flashpage API"
This reverts commit 3a11b1fbd2.
2024-04-04 17:37:16 +02:00
Ollrogge
7c5b16abe5 Revert "cpu/lpc23xx: extend flashpage API"
This reverts commit 4fa25af86c.
2024-04-04 17:37:16 +02:00
Ollrogge
2f67249ae1 Revert "cpu/native: extend flashpage API"
This reverts commit cdd9f303cf.
2024-04-04 17:37:15 +02:00
Teufelchen1
1cb2d7caed cpu/sam0: Remove deprecated muxpos 2024-04-03 11:59:48 +02:00
Joshua DeWeese
aef5dfec2b cpu/stm32/gpio_ll: make style consistent
This block of code inconsistently made use of else-if statments. The
patch makes the use consistent. The change also makes the code a bit
simpler to read.
2024-04-02 11:51:20 -04:00
Joshua DeWeese
1b1fbfeb5c cpu/stm32/gpio_ll: fix ifdef
APB12 is never defined as a macro. It is an element in the bus_t enum.
Therefore, the test to check if it is defined will always fail.

APB12 is not a real bus. It is the second register of the APB1 bus. I am
not aware of any STM32 family where the ABP2 bus is implmented (ie
RCC_APB2ENR_SYSCFGEN is defined) and devices attached to said bus are
enabled via the APB1 second register. For this reason, the fix is to
simply remove the check.
2024-04-02 11:34:50 -04:00
benpicco
ad51739c26
Merge pull request #20521 from Ollrogge/rtc_support
cpu/stm32u5: Enable rtc support
2024-04-01 19:06:06 +00:00
Ollrogge
013e884550 cpu/stm32u5: Enable rtc support 2024-03-29 10:19:42 +01:00
Karl Fessel
3e2ab59f4d
Merge pull request #20431 from cogip/native_fixes
cpu/native: add gpio-mock
2024-03-28 22:07:10 +00:00
Karl Fessel
9d2dda27ce
Merge branch 'master' into cpu/samd5x-write-CAN-driver 2024-03-28 09:52:26 +01:00
Marian Buschsieweke
4b3308cdef
Merge pull request #20357 from maribu/cpu/msp430/usci
cpu/msp430/f2xx: clean up periph_uart,periph_spi
2024-03-27 19:57:47 +00:00
Marian Buschsieweke
aef5b65244
cpu/msp430/f2xx: clean up periph_uart,periph_spi
This cleans up the USCI based UART and SPI implementations and allows
multiple instances of either interface to be configured by the
boards. In addition, it allows sharing the USCI peripherals to provide
multiple serial interfaces with the same hardware (round-robin).
2024-03-27 18:54:07 +01:00
Marian Buschsieweke
04620d471c
Merge pull request #20438 from MrKevinWeiss/pr/kconfig/dep/removal
Remove Kconfig dependency modelling
2024-03-27 16:39:56 +00:00
MrKevinWeiss
e0fdc3c16c
*Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
Benjamin Valentin
16cfaab235 cpu/samd5x: fix C++ build 2024-03-27 00:15:36 +01:00
Firas Hamdi
e4e5558694 cpu/samd5x: implement driver for samd5x CAN controller
cpu/samd5x: load RX mailbox
2024-03-26 15:17:48 +01:00
Kevin "Tristate Tom" Weiss
6c6d2f9100
Merge pull request #20410 from benpicco/cpu/esp8266-spi_clk
cpu/esp8266: allow arbitrary SPI clocks
2024-03-26 14:15:50 +00:00
MrKevinWeiss
7a68fb0d5e
*Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
MrKevinWeiss
0a9c51fdf9
*.config: Modify all .config kconfig files 2024-03-26 14:53:40 +01:00
MrKevinWeiss
0f2b71c60e
*Makefile.features: Remove TEST_KCONFIG includes 2024-03-26 14:53:39 +01:00
Gilles DOFFE
ebf95d2545 cpu/native: enhance GPIO mocking with 2D array representation
This commit introduces a more robust GPIO mocking mechanism by utilizing
a 2-dimensional array. Each element of the array holds a gpio_mock_t
structure describing a pin's attributes such as value, mode, flank,
interruption callback, and callback argument.

This enhancement allows for the arbitrary simulation of GPIOs across
various microcontroller architectures using the current API, while
maintaining consistency through the use of the GPIO_PIN macro.

Additionally, it should be noted that only the maximum number of ports
and maximum number of pins can be altered according to the context.

The implemented API in gpio_mock.c remains rudimentary, providing no
validation but fulfilling the required functions. However, it remains
customizable as all its functions are marked as weak.

Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
2024-03-24 23:12:24 +01:00
9f51daeb53
Merge pull request #20495 from Enoch247/simplify-stm32-clk-includes
cpu/stm32: remove redundant conditional compile block
2024-03-22 12:04:49 +00:00
Joshua DeWeese
1e4526111f cpu/stm32: moved includes out of header where not used 2024-03-21 11:02:29 -04:00
Marian Buschsieweke
ad4b8f202c
Merge pull request #20479 from Enoch247/simplify-stm32-gpio-code
cpu/stm32/periph/gpio: simplify condition code
2024-03-21 12:33:25 +00:00
Joshua DeWeese
fd105b7e77 cpu/stm32: remove redundant conditional compile
This patch removes a largely redundant block of conditional includes.

The removed includes are moved into the family specific headers so that
the more specific headers may override defaults defined in the shared
headers.
2024-03-20 11:29:25 -04:00
Teufelchen
30e745d242
Merge pull request #20467 from dylad/pr/cpu/stm32/usbdev_fs/dont_autopull_ztimer
cpu/stm32/periph/usbdev_fs: avoid using ztimer when not needed
2024-03-20 12:03:32 +00:00
Marian Buschsieweke
23d30cb106
Merge pull request #18870 from Teufelchen1/fix/llvm_gnrc_lorawan
llvm: Fix unused function warning
2024-03-19 20:00:58 +00:00
Teufelchen1
d19182c3e6 llvm: cpu/stm32: Fix unused function warning 2024-03-19 17:20:17 +01:00
Dylan Laduranty
92c36df77b cpu/sam0: don't enable TRFAIL interrupts
these interrupts were used to generate USBDEV_EVENT_TR_FAIL which is deprecated and will be removed

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-03-19 16:39:59 +01:00
Joshua DeWeese
8555a66e23 cpu/stm32/periph/gpio: simplify conditional code
This patch similifies some of the handling of differences between STM32
chips. The intent is to improve scaling of the code as more chips are
added.
2024-03-19 09:04:21 -04:00
Dylan Laduranty
ba8b3dc2b4 cpu/rpx0xx: add PWM support
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-03-18 21:04:27 +01:00
Gilles DOFFE
24d9657b40 cpu/native: mark gpio_mock function as weak
This allows developpers to override gpio behavior into their
applications.

Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
2024-03-15 20:27:11 +01:00
Gilles DOFFE
5b4c8fe92d cpu/native: return 0 for all gpio_init*() calls
If the gpio is initialized as an input or interruptable pin, the
gpio_mock driver returns -1 leading to failed initialization.
However that is not because nothing can change the GPIO state that it
has to be an error.
Return 0 in all cases.

Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
2024-03-15 20:27:11 +01:00
Gilles DOFFE
3bfabb4a6c cpu/native/periph/qdec: remove useless loop
Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
2024-03-15 20:27:11 +01:00
Dylan Laduranty
df044f4f56 cpu/stm32/periph/usbdev_fs: avoid using ztimer when not needed
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-03-13 21:39:07 +01:00
Benjamin Valentin
6389b3c83b Revert "cpu/sam0_common: RTC: avoid negative month after POR"
This reverts commit 897a3ceda9.
2024-03-07 13:52:35 +01:00
Benjamin Valentin
8c4d0c53f2 cpu/sam0_common: RTC: avoid negative month after POR 2024-03-07 13:52:35 +01:00
Benjamin Valentin
897a3ceda9 cpu/sam0_common: RTC: avoid negative month after POR 2024-03-06 18:48:26 +01:00
Benjamin Valentin
5164a6cc59 cpu/native: return _native_retval with NATIVE_AUTO_EXIT 2024-03-04 14:08:52 +01:00
benpicco
ba171a1075
Merge pull request #20444 from Ollrogge/u575zi-q-board
boards/nucleo-u575zi-q: Add support
2024-03-01 17:33:14 +00:00
Ollrogge
53d53d8cc8 boards/nucleo-u575zi-q: Add support 2024-03-01 11:18:18 +01:00
Benjamin Valentin
d26937fe9c cpu/gd32v: don't set FW_ROM_LEN to ROM_LEN
FW_ROM_LEN is supposed to be a subset of ROM_LEN that contains the firmware
(without bootloader, AUX slot).
2024-02-28 13:49:12 +01:00
Benjamin Valentin
a417a3e72c cpu/riscv_common: allow to define AUX slot on flash 2024-02-28 11:49:05 +01:00
Benjamin Valentin
308374fc29 cpu/cortexm_common: allow to define AUX slot on flash 2024-02-28 11:49:05 +01:00
chrysn
6714a77026
Merge pull request #20339 from chrysn-pull-requests/native64-rust
cpu/native: Enable Rust on 64bit
2024-02-23 10:41:47 +00:00
chrysn
1070175da8 cpu/native: 64bit works with Rust 2024-02-23 11:24:02 +01:00
Marian Buschsieweke
047fb8d3c7
Merge pull request #20419 from benpicco/cpu/native_assert-reval
cpu/native: return error code on failed assertion
2024-02-22 16:31:51 +00:00
Benjamin Valentin
9e9a906f4d cpu/native: return error code on failed assertion 2024-02-22 16:06:32 +01:00
chrysn
6e892d9b1c
Merge pull request #20416 from chrysn-pull-requests/alt20415
cpu/esp: Use CPU_ESP8266 define instead of the removed MCU_ESP8266
2024-02-22 14:31:43 +00:00
chrysn
c3020ce3b7 cpu/esp: Use CPU_ESP8266 define instead of the removed MCU_ESP8266
Follow-up-for: https://github.com/RIOT-OS/RIOT/pull/20397
Closes: https://github.com/RIOT-OS/RIOT/pull/20409
Closes: https://github.com/RIOT-OS/RIOT/pull/20415
2024-02-22 14:26:43 +01:00
benpicco
d83ec632e3
Merge pull request #20406 from FlapKap/fix_eeprom_debug_off_by_one
periph/eeprom: fix off-by-one error in debug statement
2024-02-22 08:48:41 +00:00
Benjamin Valentin
75bf0e33e0 cpu/esp8266: allow arbitrary SPI clocks 2024-02-21 23:15:21 +01:00
Kasper Hjort Berthelsen
9e6276351d periph/eeprom: fix off-by-one error in debug statement
Since p is incremented DEBUG prints the next value instead of the current
I also took the liberty to add debugs to the `write` function
2024-02-21 13:26:36 +01:00
chrysn
756a384442 makefiles, treewide: Remove MCU variable 2024-02-18 20:46:09 +01:00
Marian Buschsieweke
aeca9a52c6
cpu/stm32: implement periph_spi_reconfigure
Fixes https://github.com/RIOT-OS/RIOT/issues/20227
2024-02-15 19:11:37 +01:00
Mihai Renea
fc3d0d8676 cpu/native: fix native_async_read_remove_handler() + enable all baudrates 2024-02-10 15:46:00 +01:00
benpicco
9501f64c4e
Merge pull request #20365 from derMihai/mir/native_uart_poweroff
cpu/native/periph/uart: uart_poweroff() closes the file descriptor + extended baud-rate support on Linux
2024-02-10 10:35:31 +00:00
benpicco
55b6728224
Merge pull request #19738 from benpicco/stdio_dispatch
stdio_dispatch: allow to select multiple stdio methods at the same time
2024-02-09 16:13:27 +00:00
Benjamin Valentin
35ef7ca389 cpu/esp32/stdio_usb_serial_jtag: port to new interface 2024-02-09 15:24:22 +01:00
Mihai Renea
795415d59e cpu/native/periph/uart: uart_poweroff() closes the file descriptor 2024-02-09 12:55:40 +01:00
Marian Buschsieweke
26946a721b
Merge pull request #20360 from maribu/stm32-adc-typo
cpu/stm32/periph_adc: fix register access
2024-02-08 16:31:46 +00:00
Marian Buschsieweke
4ed287cec8
cpu/stm32/periph_adc: fix register access
The register access to SMPR1/SMPR2 was incorrect in three aspects:

1. For channels < 10, SMPR1 was cleared but SMPR2 should have been
   cleared
2. The code was not thread-safe
3. An unneeded write was issued. (The compiler won't combine the
   in-place bitwise operations into a single read-modify-write
   sequence on `volatile` memory.)

Fixes https://github.com/RIOT-OS/RIOT/issues/20261
2024-02-08 14:51:25 +01:00
benpicco
c07eca7696
Merge pull request #20356 from maribu/boards/msp-fixup
boards/olimex-msp430-h2618: change UART config
2024-02-08 10:18:02 +00:00
Marian Buschsieweke
cbd918daab
cpu/msp430/x1xx: fix typo in doc 2024-02-07 20:07:53 +01:00
Benjamin Valentin
453a8be4f3 sys/cpp_new_delete: always enable the module when C++ is used 2024-02-07 11:40:23 +01:00
benpicco
4d9e8a8dde
Merge pull request #20335 from fzi-haxel/pr/native64-board
native64: Separate board for 64-bit native
2024-02-05 22:58:02 +00:00
Frederik Haxel
0c2cfe99e6 native64: Add Linux/x86_64 board
Adds a separate board for native64 instead of the `NATIVE_64BIT` workaround.
The files in `boards/native64` are more or less dummy files and just include
the `boards/native` logic (similar to `openlabs-kw41z-mini-256kib`).
The main logic for native is in `makefiles/arch/native.inc.mk`, `cpu/native`
and `boards/native`.

The remaining changes concern the build system, and change native board checks
to native CPU checks to cover both boards.
2024-02-05 22:01:40 +01:00
Marian Buschsieweke
06a05370a2
cpu/sam0_common: Implement gpio_ll_switch_dir 2024-02-05 10:56:16 +01:00
Marian Buschsieweke
c011764022
cpu/atmega_common: implement gpio_ll_switch_dir 2024-02-05 10:56:16 +01:00
Marian Buschsieweke
8bf61336a2
Merge pull request #20290 from maribu/drivers/periph/gpio_ll/features
drivers/periph_gpio_ll: Fix GPIO_DISCONNECT handling and add compile time feature checks
2024-02-05 07:30:54 +00:00
Marian Buschsieweke
f10a994a9e
cpu/gd32v/periph_gpio_ll: fix and clean up
Use analog mode for GPIO_DISCONNECT, as this is said to have the lowest
current leakage due to disabling the Schmitt trigger and correctly
detect this in `gpio_ll_query_conf()`.

Also drop the `schmitt_trigger_disabled` member in `gpio_conf_t`, as
the Schmitt trigger is only ever disabled in Analog mode anyway and
cannot be freely configured.
2024-02-05 08:21:52 +01:00
Marian Buschsieweke
1351c61c6a
cpu/efm32: expose pull up on GPIO_DISCONNECT
Allow enabling the pull on on `GPIO_DISCONNECT` and query that
correctly.
2024-02-05 08:21:51 +01:00
Marian Buschsieweke
6028097132
cpu/stm32/periph_gpio_ll: Fix and clean up
The separate Schmitt trigger bit in the configuration is dropped, as
the Schmitt trigger is only every disabled when in `GPIO_DISCONNECT`
mode. So no need to encode the same information twice.

The `gpio_state_t` is improved to be a bitmask that holds the
MODER register value and a flag indicating whether open-drain mode
should be enabled.

Finally, `GPIO_DISCONNECT` is implemented. This is done by placing the
GPIO in analog mode, which by disabling the Schmitt trigger reduces
power consumption.
2024-02-05 08:21:51 +01:00
Benjamin Valentin
895a6f87ed cpu/stm32/rtc: add support for STM32G0 2024-02-04 19:44:56 +01:00
Marian Buschsieweke
3b3da09ec6
Merge pull request #20313 from maribu/sys/byteorder/cleanup-implementation
sys/byteorder: clean up implementation
2024-02-02 05:38:33 +00:00
benpicco
5bd879b406
Merge pull request #20315 from fzi-haxel/native-x86-64-support
native: Linux/x86_64 support
2024-02-01 17:11:56 +00:00
benpicco
ad743820f4
Merge pull request #20317 from Wer-Wolf/native_timer_init
Fix for `periph_timer` on `native`
2024-02-01 09:08:20 +00:00
benpicco
4ea27d4c13
Merge pull request #20300 from jparker324/stm32c0_and_nucleo_c031c6
cpu/stm32: add support for STM32C0 and NUCLEO-C031C6
2024-01-31 15:09:25 +00:00
Marian Buschsieweke
b42b1998ec
cpu/sam0_common: fix vendor header files
Ran the `fix_headers.sh` to fix the vendor header files and removed
the no longer needed work around for them.
2024-01-31 14:46:23 +01:00
Marian Buschsieweke
1425dc0652
cpu/sam0_common: Update script to fix vendor headers
The script to fix the vendor header files has been renamed to
`fix_headers.sh` and now does two things:

1. Strip bogus type qualifiers in front of padding (as before)
2. Strip bogus `LITTLE_ENDIAN` defines.
2024-01-31 14:46:23 +01:00
Armin Wolf
d8dc6d3963 cpu/native: timer: Delete POSIX timer upon error
If `register_interrupt` somehow fails, we leak the already created
POSIX timer by returning immediately.

Fix this by calling `timer_delete` before returning.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
2024-01-30 22:28:13 +01:00
Armin Wolf
eac719166b cpu/native: timer: Stop using err
When using `err`, no stacktrace is generated and the standard panic
functionallity of RIOT is sidestepped.

Use `core_panic` instead.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
2024-01-30 22:28:13 +01:00
Armin Wolf
acbe7a8af3 cpu/native: timer: Remove unnecessary uses of (void)
In `timer_init`, `freq` is being check so its not unused.
In `timer_set_periodic`, `flags` is being used too.

Remove the uses of `(void)` in both cases.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
2024-01-30 22:11:14 +01:00
Benjamin Valentin
a21acf0858 cpu/sam0_common: flashpage: disable interrupts while writing 2024-01-30 18:48:01 +01:00