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

8653 Commits

Author SHA1 Message Date
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