1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-15 01:23:49 +01:00

8833 Commits

Author SHA1 Message Date
MrKevinWeiss
f770f72202
treewide: Fix spelling mistakes 2025-03-13 13:59:07 +01:00
benpicco
a042d66e68
Merge pull request #21283 from carl-tud/native-gardening
cpu/native: Gardening/QoL
2025-03-12 17:54:07 +00:00
Marian Buschsieweke
571a87358d
cpu/samd5x/periph_can: fix use of format specifiers
Use correct format specifiers to make clangd happy.
2025-03-12 16:05:41 +01:00
Marian Buschsieweke
d9ab9585d9
cpu/samd5x: add enable pin to CAN configuration
This extends the `can_conf_t` CAN configuration to allow power
management of the CAN transceiver to be done by the CAN driver.
2025-03-11 21:17:05 +01:00
carl
9cad51126e cpu/native: add missing signal.h import 2025-03-11 16:19:39 +01:00
carl
e95be58fb9 cpu/native: rename native_cpu.c, irq_cpu.c, tramp.S 2025-03-11 16:19:39 +01:00
carl
6e5260c2d5 cpu/native: enable 64-bit thread arguments 2025-03-11 16:19:39 +01:00
carl
7d83850395 cpu/native: assembly: gardening 2025-03-11 16:19:39 +01:00
carl
ccc97b0018 cpu/native: restructure CPU 2025-03-11 16:19:39 +01:00
carl
9c96c18566 cpu/native: move valgrind imports into separate header 2025-03-11 16:19:39 +01:00
carl
b5eff6a107 cpu/native: unify ucontext manipulation 2025-03-11 16:19:39 +01:00
carl
64283b52aa cpu/native: doxygen gardening 2025-03-11 16:19:39 +01:00
carl
90a3f3ffcc cpu/native: docs and descriptive naming 2025-03-11 16:19:39 +01:00
carl
aff3b107c1 cpu/native: log with prefix 2025-03-11 16:19:39 +01:00
carl
cf54187b7c cpu/native: move syscalls into separate header 2025-03-11 16:19:39 +01:00
Marian Buschsieweke
f0d53789e4
Merge pull request #21245 from gschorcht/cpu/esp32/fix_compile_problem_gcc_14.2
cpu/esp32: Fixes of compile problems with GCC 14.2
2025-03-02 13:18:36 +00:00
Gunar Schorcht
689883c583 cpu/esp32: fix bus_width in periph_sdmmc 2025-03-02 12:40:27 +01:00
Gunar Schorcht
4f136fb3ad cpu/esp32: add missing atomic built-in functions
Atomic built-in function __atomic_test_and_set seem to be missing in GCC 14.2.0 for some ESP32x SoCs.
2025-03-02 12:39:18 +01:00
Mikolai Gütschow
7ef1f7ed89
cpu/nrf52: do not select nrf52840 if nrfble is selected already 2025-02-27 15:40:25 +01:00
Mikolai Gütschow
5dc3c1b576
cpu/nrf5x_common: prohibit selecting multiple radio mode features 2025-02-27 15:40:25 +01:00
Mikolai Gütschow
9a45c30222
examples: shorten subfolders' names 2025-02-21 09:55:24 +01:00
fabian18
8bbeba10cb
Merge pull request #21169 from fabian18/pr/mtd_sdmmc_remove_MTD_DRIVER_FLAG_DIRECT_WRITE
{cpu/sam0_common/sam0_sdhc,drivers/mtd}: do not allocate `work_area` twice
2025-02-19 17:02:42 +00:00
krzysztof-cabaj
a2dfd78b27 treewide: fix double the in doc and comments 2025-02-18 13:25:02 +01:00
Dylan Laduranty
cdceb084f2
Merge pull request #21201 from dylad/pr/cpu/sam4s/add_support
cpu/sam4s: add initial support with SAM4S-XPRO board
2025-02-17 15:39:06 +00:00
dylad
8cfc42b562 cpu/sam_common: move some SAM3 drivers to common folder
This commit allows to share GPIO, Timers and UARTs driver across SAM3/SAM4s MCUs as they relies on the same IPs

Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2025-02-17 16:29:25 +01:00
dylad
6b74c45a9b cpu/sam3: miscellaneous cleanup
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2025-02-17 10:04:45 +01:00
dylad
f9cc15e4f3 cpu/sam4s: introduce initial support
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2025-02-17 10:03:39 +01:00
Mikolai Gütschow
ca5fe72bf8
treewide: fix example references in docs
adapt to folder structure from #21135
2025-02-14 19:14:22 +01:00
Fabian Hüßler
452f75fa3c cpu/sam0_common/sam0_sdhc: prevent work_area double allocation 2025-02-12 16:25:31 +01:00
benpicco
837bc0c5ed
Merge pull request #20428 from cogip/fdcan
can: add CAN FD support to STM32G4 and native architecture
2025-02-10 16:31:39 +00:00
Dylan Laduranty
17bceaba09
Merge pull request #21179 from dylad/pr/cpu/sam3/optimize_gpio_isr
cpu/sam3: optimize gpio ISR processing
2025-02-05 20:55:02 +00:00
Marian Buschsieweke
423e5ad690
cpu/esp_common: create partitions.csv more robustly
The generated `partitions.csv` needs to state the size of the flash
file. This so far used `ls -l | awk '{print $5}'` to achieve that, but
that is not robust, as the columns of `ls -l` depend on the tool and
system configuration used.

This commit replaces the call with `wc -c`, which should be more robust,
as `wc -c` behavior is POSIX specified.

Co-Authored-By: Karl Fessel <karl.fessel@ml-pa.com>
Co-Authored-By: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2025-02-04 17:51:12 +01:00
Marian Buschsieweke
c48525fc4e
cpu/samd5x/periph_can: fix RX
CAN required CLK_CANx_APB and CLK_CANx_APB to be running and will not
request any clock by itself. We can ensure both clocks to be running
by preventing the MCU from entering IDLE state.

The SAMD5x/SAME5x Family Data Sheet says in Section
"39.6.9 Sleep Mode Operation" says:

> The CAN can be configured to operate in any idle sleep mode. The CAN
> cannot operate in Standby sleep mode.
>
> [...]
>
> To leave low power mode, CLK_CANx_APB and GCLK_CANx must be active
> before writing CCCR.CSR to '0'. The CAN will acknowledge this by
> resetting CCCR.CSA = 0. Afterwards, the application can restart CAN
> communication by resetting bit CCCR.INIT.

tl;dr: At most SAM0_PM_IDLE is allowed while not shutting down the CAN
controller, but even that will pause communication (including RX).

Apparently, the CAN controller was never tested without also using the
USB peripheral, which kept the clocks running as side effect.
2025-02-01 14:13:42 +01:00
dylad
193390bbdd cpu/sam3: optimize gpio ISR processing
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2025-01-31 10:24:34 +01:00
Dylan Laduranty
6d641ffcf5 cpu/sam3: fix hwrng peripheral register access
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2025-01-30 20:59:09 +01:00
Benjamin Valentin
c791ff278f cpu/sam0_eth: fix hang with broken PHY 2025-01-30 11:16:18 +01:00
Gilles DOFFE
f5ee91d357 cpu/native: enable CAN FD support
As CAN FD is already supported by SocketCAN on Linux, just enable the
fdcan pseudomodule and allow CAN FD frames.

Signed-off-by: Gilles DOFFE <gilles.doffe@rtone.fr>
2025-01-29 20:51:23 +01:00
Gilles DOFFE
5d48376a21 cpu/stm32: add FDCAN support to STM32G4 family
Until now, STM32 MCUs classic CAN support is coded in can.c file.
However CAN FD in STM32G4 family is designed in a very different way:
* CAN FD channels are independant
* CAN FD channel configuration is done in a dedicated RAM block called
  message RAM, with one message RAM per channel
* Each message RAM is divided this way:
  - 11-bit filter (28 elements / 28 words)
  - 29-bit filter (8 elements / 16 words)
  - Rx FIFO 0 (3 elements / 54 words)
  - Rx FIFO 1 (3 elements / 54 words)
  - Tx event FIFO (3 elements / 6 words)
  - Tx buffers (3 elements / 54 words)

Due to these design differences with other STM32 MCUs, the choice is
made to split the driver in two files:
* classiccan.c for STM32 MCUs that support classical CAN. This file
  has just been renamed (previously can.c) to avoid build conflicts
  but does not introduce changes
* fdcan.c for STM32 MCUs that support CAN FD

Message RAM definitions is not provided in CMSIS headers of the STM32G4
family, they are defined in fdcandev_stm32.h. Those definitions could be
extracted to a new file for each STM32 families as some differences
exist with other STM32 families that support CAN FD (for instance
STM32H7). This could be done in a futher commit, according to new
families requirements.

CAN hardware parameters stay similar and are kept in can_params.h.

There are 36 filters per channel:
* 28 first filters are standard ID (11 bit) filters
* 8 last filters are extended ID (29 bit) filters

On each Tx frame sent, the STM32G4 can store Tx events in a dedicated
FIFO. This feature is not yet implemented and Tx event FIFO is disabled
by default.
Automatic retransmission on arbitration loss is enabled by default by
the STM32G4.

About Rx, if no filter is configured, all frames are accepted by
default.

Signed-off-by: Gilles DOFFE <gilles.doffe@rtone.fr>
2025-01-29 20:51:23 +01:00
Gilles DOFFE
ae51a22fbb can: use frame len instead of can_dlc
RIOT implementation of CAN bus relies on SocketCAN model.
Since commit c398e56 (can: add optional DLC element to Classical CAN
frame structure), '__u8 can_dlc' attribute of struct can_frame is
considered as deprecated in SocketCAN and kept for legacy support.
Attribute '__u8 len' should be used instead.

	union {
		/* CAN frame payload length in byte (0 .. CAN_MAX_DLEN)
		 * was previously named can_dlc so we need to carry that
		 * name for legacy support
		 */
		__u8 len;
		__u8 can_dlc; /* deprecated */
	};

Moreover, CAN FD frame structure does not support legacy attribute
'can_dlc', making 'len' mandatory for incoming CAN FD support in RIOT.

	struct canfd_frame {
		canid_t can_id;  /* 32 bit CAN_ID + EFF/RTR/ERR flags */
		__u8    len;     /* frame payload length in byte */
		__u8    flags;   /* additional flags for CAN FD */
		__u8    __res0;  /* reserved / padding */
		__u8    __res1;  /* reserved / padding */
		__u8    data[CANFD_MAX_DLEN]
__attribute__((aligned(8)));
	};

Signed-off-by: Gilles DOFFE <gilles.doffe@rtone.fr>
2025-01-29 20:51:22 +01:00
mguetschow
4321173610
Merge pull request #20982 from Lukas-Luger/pr/nrf802154-beacon
cpu/nrf52/radio/nrf802154: fix beacon acceptance
2025-01-28 18:37:28 +00:00
lulu254b
a5823397bc cpu/nrf52/radio/nrf802154: fix beacon frame acceptance in _l2filter 2025-01-28 19:28:34 +01:00
mguetschow
e8be6eec09
Merge pull request #21168 from dylad/pr/cpu/sam3/fix_pmc_access
cpu/sam3: fix PMC enable/disable peripheral clock access
2025-01-28 09:13:45 +00:00
Dylan Laduranty
b4d061943d cpu/sam3: fix PMC enable/disable peripheral clock access
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2025-01-27 21:38:14 +01:00
Kevin "Tristate Tom" Weiss
a3836cfdd2
Merge pull request #21097 from benpicco/riotboot/minimal
bootloaders/riotboot: don't change CPU/pin state
2025-01-20 16:20:01 +00:00
Benjamin Valentin
581bd8afad cpu: add documentation for DISABLE_BOARD_INIT/DISABLE_CPU_INIT 2025-01-20 13:20:35 +01:00
Benjamin Valentin
5e2ec9d51d cpu/cortexm_common: add option to skip hardware init 2025-01-20 13:20:35 +01:00
Gunar Schorcht
ba3224310e cpu/esp32: changes for the future gcc version 14.2.0
To avoid type conflicts between the `pthread_rwlockattr_t` definition in RIOT's `pthread` implementation and newlibc's `sys/_pthreadtypes.h`, the macro `_POSIX_READER_WRITER_LOCKS` must be undefined.
2025-01-20 09:06:59 +01:00
Gunar Schorcht
8b791dae7b cpu/esp32: cleanup in syscalls_init_arch
The cleanup removes the code that is no longer needed with the cleanup of the linker scripts for ESP ROMs.
2025-01-19 18:51:25 +01:00
Gunar Schorcht
ba6c2061fb cpu/esp32: cleanup used linker scripts
The cleanup reduces the number of linker scripts used for the ESP32x ROMs and thus the symbols used from the ESP32x ROMs. It works with both gcc 12.2 and gcc 14.2. The latter gcc version is a prerequisite for ESP-IDF v5.2 and higher and thus a prerequisite for starting the work on the RIOT-OS port for the latest version of ESP-IDF.
2025-01-19 18:51:25 +01:00
Gunar Schorcht
68ea25967d cpu/esp32: use ESP32x ROM libgcc linker Script for all ESP32x SoCs 2025-01-19 18:51:25 +01:00