Commit graph

99482 commits

Author SHA1 Message Date
Dominik Ermel
2f530cfbbd samples/soc_flash_nrf: Fix soc_flash_nrf doc and printfs
The commit fixes soc_flash_nrf sample documentation where incorrect
partition names has been used and removes information of
CONFIG_TRUSTED_EXECUTION_NONSECURE affecting which partition is used
as this is no longer true.

The printf message reporting start of sample has been modified
to print "Nordic nRF5 Flash Sample" instead of
"Nordic nRF5 Flash Testing", which is more accurate for code
residing in samples.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-08-01 16:48:30 +01:00
Carles Cufi
e898de52df github: workflows: Update manifest action to detect impostor commits
See additional info in:
https://github.com/zephyrproject-rtos/action-manifest/pull/12

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-08-01 16:47:43 +01:00
Nikodem Kastelik
43128052e7 drivers: serial: nrf: add default value for frame timeout cfg
This is needed to avoid warnings about uninitialized
structure member, which was added in nrfx 3.6.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-01 16:45:04 +01:00
Nikodem Kastelik
443276eccb modules: hal_nordic: nrfx: sync configs for UARTE MAGIC_BYTE option
New option is used in RX FIFO flush workaround
performed by the nrfx_uarte driver.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-01 16:45:04 +01:00
Nikodem Kastelik
c0ede7106e modules: hal_nordic: nrfx: remove nrfx_uarte rx cache for nrf54l15 enga
This option is no longer valid for nRF54L15 Eng A target.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-01 16:45:04 +01:00
Nikodem Kastelik
492a474c62 manifest: update hal_nordic revision to integrate nrfx 3.6.0
New nrfx version contains support
for nRF54L20 Eng A and nRF9230 Eng B devices.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-01 16:45:04 +01:00
Théo Battrel
c1a2c5b8a8 Drivers: ssd1306: Respect segment-offset DTS property
Update `ssd1306_write_default` to take into account the `segment_offset`
property. This is needed for some displays to show the image correctly.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-01 16:44:24 +02:00
Théo Battrel
bfb541ccbe Drivers: ssd1306: Add use_internal_iref DTS option
Necessary for supporting for EastRising 0.42 OLED display/board.

Some boards don't have external Iref set up. This is probably done in an
effort to save on component cost. This command is only documented in the
V1.1 revision of the SSD1306 datasheet.

See issue https://github.com/olikraus/u8g2/issues/1047

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-01 16:44:24 +02:00
Martin Stumpf
77eafac1bf linker: section_tags: fix missing include
If using `<zephyr/linker/section_tags.h>` without including
`zephyr/linker/sections.h` as well, we get a warning an the linker fails
to place the data in the desired section.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-08-01 16:44:05 +02:00
Mathieu Choplain
94c375ed2f drivers: sensor: stm32_vref: update incorrect comment
The ICACHE must be disabled on STM32H5 series due to documented
behaviour of the flash controller, not to an errata.

For a more technical explaination: (see RM0492 for references)
 -  on STM32H5, the ICACHE block is interposed on C-bus between
    the Cortex-M33 and the FLASH (§2.1.1)
 -  the ICACHE determines if accesses are cacheable or non-cacheable
    based on an AHB attribute; the Cortex-M33 sets this attribute or
    not depending on the MPU configuration (§8.4.6)
 -  when a cacheable access is requested by the Cortex-M33, if the
    requested data is not present in ICACHE (cache miss), a cache line
    refill (128-bit burst read) is performed (§8.4.7)
 -  however, all accesses to OTP and Read-Only regions of the FLASH must
    be done with caching disabled (§7.3.2); indeed, the accesses MUST be
    16 or 32-bit sized - otherwise, the flash interface raises a bus
    error (§7.5.9 / Table 38 "OTP/RO access constraints").

    This is the behaviour that was observed and lead to the introduction
    of ICACHE disable code in 065a8f25e1.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
bbfe499874 boards: nucleo_h753zi: disable Vbat sensor
This commit disables the Vbat sensor on the Nucleo-H753ZI
board, as the corresponding ADC is not enabled.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
0a16d6fc2d boards: stm32h735g_disco: disable Vbat sensor
This commit disables the Vbat sensor on the STM32H735G
Discovery board, as the corresponding ADC is not enabled.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
c77d5b8c3b drivers: sensor: stm32_vbat: handle disabled ADCs more gracefully
This commit modifies the STM32 battery voltage sensor driver
to handle erroneous usage more gracefully. More precisely,
it now fails builds with an explicit error message when the
sensor is enabled but the corresponding ADC is not. This can
only happen on STM32 series with more than one ADC (e.g., H7).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
1e0e3a874f drivers: sensor: stm32_vref: handle disabled ADCs more gracefully
This commit modifies the STM32 internal voltage reference sensor
driver to handle erroneous usage more gracefully. More precisely:
  - driver no longer builds if no ADC node is enabled
  - fail builds with an explicit error message when the sensor
    is enabled but the corresponding ADC is not. This can only
    happen on STM32 series with more than one ADC (e.g., H7).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
8d40279644 drivers: sensor: stm32_temp: handle disabled ADCs more gracefully
This commit modifies the STM32 internal temperature sensor driver
to handle erroneous usage more gracefully. More precisely:
 - driver no longer builds if no ADC node is enabled
 - fail builds with an explicit error message when the sensor
   is enabled but the corresponding ADC is not. This can only
   happen on STM32 series with more than one ADC (e.g., H7).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
47187a9ec9 dts: bindings: STM32 ADC: don't require pinctrl
This commit removes the requirement for pinctrl in the STM32 ADC binding.
This allows usage of ADC with internal channels only (no GPIO pin waste).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Armin Brauns
cd7a6a4d55 coredump: use memmove instead of memcpy
With CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_LINKER_RAM, buffer_output() is
called on the entire RAM memory area. This includes the stack for the
coredump thread, which is where tmp_buf is stored. Eventually, it will copy
(parts of) tmp_buf into tmp_buf itself, which invokes Undefined Behaviour
in memcpy():

> The memory areas must not overlap.  Use memmove(3) if the memory areas do
> overlap.
- memcpy(3)

With picolibc, this is detected in __memcpy_chk() and causes a fault in
__chk_fail().

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-08-01 16:43:41 +02:00
Jordan Yates
21a6d5608b tests: unit: list: test "safeness" of safe iteration
Add tests for removing and adding nodes to a list under
`SYS_SLIST_FOR_EACH_NODE_SAFE` and `SYS_SLIST_FOR_EACH_CONTAINER_SAFE`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-01 16:41:16 +02:00
Andrej Butok
7a1c286f5c tests: flash: erase_blocks: Add support of flash program size > 128
Fix failed test for platforms with flash program size > 128 bytes.
Update supported program size to 512 bytes, the highest supported
program size by Zephyr platforms.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-08-01 16:40:53 +02:00
Armin Brauns
12435442d2 coredump: significantly increase efficiency for small write block sizes
With FLASH_WRITE_SIZE==1, this would do a separate flash write for every
single byte.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-08-01 16:40:26 +02:00
Ioannis Damigos
bf7c05d147 maintainers: Fix label for Renesas RA Platforms
Fix label for Renesas RA Platforms

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-08-01 16:40:20 +02:00
Ioannis Damigos
02d2a3e213 maintainers: Add boards' files to Renesas RA Platforms
Add board files to Renesas RA Platforms

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-08-01 16:40:20 +02:00
Maureen Helm
e4f6553ec0 MAINTAINERS: Add ADI collaborators
Add ozersa and ttmut as collaborators on ADI areas. Both are ADI
employees that have contributed multiple PRs in these areas.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-08-01 16:40:11 +02:00
Robert Lubos
9764755bf8 tests: net: http_server: tls: Reduce test memory footprint
Tweak some Kconfig variables to reduce the overall memory footprint of
the test application. For some reason x86 MMu throws errors when
accessing iterable section entries when the image size is too large.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-08-01 16:40:03 +02:00
Pieter De Gendt
9894b84a2d scripts: west_commands: build: Fix empty testcase
An empty but specified testcase does not build, check if the test key
exists instead.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-01 16:39:51 +02:00
Fabio Baltieri
bb4af13da0 samples: fix adafruit_feather board name
This has been renamed in b6ed4ba761, the current entry is causing a CI
breakage for unrecognized platform.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-01 14:56:25 +02:00
Jakub Zymelka
72dd6bb554 samples: subsys: ipc: icmsg: Align to NO MULTITHREADING
Removed k_sleep dependencies and added 'printk' instead of LOG
in non-multithreaded runs.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-08-01 13:31:53 +02:00
Jakub Zymelka
485a2cc0bf samples: mbox: Align to NO MULTITHREADING
Removed k_sleep dependencies in non-multithreaded runs.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-08-01 13:31:53 +02:00
Jakub Zymelka
bb5b98f16c ipc: icmsg: Align to NO MULTITHREADING
Adapting icmsg to work without the MULTITHREADING functionality.
Dependencies for kernel work_queue, mutexes and other functions
related to running multithreaded applications have been 'ifdefed'.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-08-01 13:31:53 +02:00
Chen Xingyu
e503799f3d boards: nucleo_f030r8: Utilize probe-rs
This commit introduce probe-rs runner to nucleo_f030r8 board for
demonstration.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-08-01 12:39:28 +02:00
Chen Xingyu
0095c224fa scripts: west_commands: runners: Add support for probe-rs
probe-rs is a new programming and debugging tool written in Rust, supports
many probes and targets.

This commit introduces initial support for probe-rs to Zephyr.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-08-01 12:39:28 +02:00
Fin Maaß
d71ad169d4 drivers: spi: litex: add litespi driver
add litespi driver for flash.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 12:39:02 +02:00
Fin Maaß
0f3955cc80 drivers: spi: litex: rework spi driver
rework the litex spi driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 12:39:02 +02:00
Fin Maaß
9a7037683d drivers: spi: litex: rename driver
rename litex spi driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 12:39:02 +02:00
Chun-Chieh Li
11d086e539 samples: usb-c: sink: add support for numaker_m2l31ki
Add support for NuMaker-M2L31 board

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-08-01 12:38:53 +02:00
Chun-Chieh Li
9e9e409cb9 drivers: usb_c: numaker: support Nuvoton's M2L31 series
1. Support USB-C drivers TCPC, PPC, and VBUS with UTCPD H/W IP
2. UTCPD is interconnected with Timer-triggered EADC for updating
   VBUS/VCONN voltage periodically

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-08-01 12:38:53 +02:00
Krzysztof Chruściński
c84c2fc37d soc: nordic: common: dmm: Initialize dmm as early as possible
DMM shall be initialized as early as possible to allow drivers to
use it. For example, uart may need it early since it starts
RX during initilization in some configurations.

Making dmm_init() public and calling it in soc init function.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-08-01 12:38:44 +02:00
Jonathan Rico
11b3aa1f1f tests: Bluetooth: Add multi-central robustness test
This test's purpose is to verify we (as a peripheral) don't leak resources
when communicating with multiple centrals that connect and disconnect
intermittently.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-01 12:38:36 +02:00
cyliang tw
406d17c3c5 samples: boards: Add numaker system_off sample
Increase numaker board and add system_off sample
to illustrate power down by sys_poweroff API.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-08-01 12:37:47 +02:00
cyliang tw
5b921c53b0 soc: nuvoton: numaker: add poweroff for m46x
Add support of sys_poweroff API on m46x series.
It could support SPD standby or DPD deep power down mode.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-08-01 12:37:47 +02:00
Bjarki Arge Andreasen
371206d254 drivers: i2c: i2c_ll_stm32: Remove redundant last msg stop
The I2C API itself now enforces last msg stop, remove duplicate code
from driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Bjarki Arge Andreasen
3cc8350396 drivers: i2c: i2c_gd32: Remove redundant last msg stop
The I2C API itself now enforces last msg stop, remove duplicate code
from driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Bjarki Arge Andreasen
d8b49b0aa4 drivers: i2c: i2c_esp32: Remove redundant last msg stop
The I2C API itself now enforces last msg stop, remove duplicate code
from driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Bjarki Arge Andreasen
580bdafb81 drivers: i2c: i2c_dw: Remove redundant last msg stop
The I2C API itself now enforces last msg stop, remove duplicate code
from driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Bjarki Arge Andreasen
2b007ab784 drivers: i2c: enforce i2c stop flag in last i2c_transfer_cb msg
The i2c_transfer API specifies that the I2C_MSG_STOP flag implicitly
is set for the last message in a i2c_transfer(). This is identical to
explicitly setting the I2C_MSG_STOP flag in the last message, which is
what every driver which properly adheres to this specification does.

The i2c_transfer_cb API is seemingly identical to the i2c_transfer_api,
it references it using @see i2c_transfer(), while providing a callback,
and being available from isr context. This commit extends the wrapper
to provide the following guarantees also present in the i2c_transfer API:

- If num_msgs is 0, no transfer will occur
- The last message of the transfer implies a stop condition

This allows for users to use both functions interchangeably, while
removing handling of num_msgs = 0 and last message missing stop cond
from device drivers.

Additionally a check for num_msgs == 0 is added to prevent any transfer
and immediately call back with success then return without invoking
the transfer_cb API.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Bjarki Arge Andreasen
e7487f1777 drivers: i2c: enforce i2c stop flag in last i2c_transfer msg
The i2c_transfer API specifies that the I2C_MSG_STOP flag implicitly
is set for the last message in a i2c_transfer(). This is identical to
explicitly setting the I2C_MSG_STOP flag in the last message, which is
what every driver which properly adheres to this specification does.

This commit updates the i2c_transfer() API wrapper to explicitly set
the flag before calling the drivers API implementation, which ensures
the specification is followed, while moving this additional complexity
from the device drivers themselves.

Additinally it checks for the num_msgs being 0, in which case no
transfer shall occur, nor shall any stop condition be set. This removes
an additional check from device drivers.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Anke Xiao
bd7a6b5d79 samples: sensor: mcux_acmp: add acmp configuration for ke17z
Add acmp pinctrl configuration to support ACMP driver for NXP frdm_ke17z
and frdm_ke17z512, tested 'sample.sensor.mcux_acmp' case.
Update the index.rst to add acmp description for ke17z.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-01 12:37:23 +02:00
Anke Xiao
643e464c76 modules: Kconfig.mcux: remove HAS_MCUX_ACMP
Remove the ‘HAS_MCUX_ACMP’ Kconfig, and also remove it from
driver and soc Kconfig files. It is not needed since we already
depend on 'ACMP' enabled in the dt file, the 'HAS_MCUX_ACMP'
kconfig is a relic of the past before devicetree was stable.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-01 12:37:23 +02:00
Anke Xiao
d96b301de5 dts: arm: nxp: nxp_ke1xz.dtsi: add acmp information
Add acmp driver address and interrupt informations.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-01 12:37:23 +02:00
Francois Ramu
1c59fa5231 doc: release 3.6: no CACHE_MANAGEMENT by default on stm32h7/f7
Mentioning that stm32h7 and stm32F7 series do not have the
CONFIG_CACHE_MANAGEMENT by default. The application must
explicitly set CONFIG_CACHE_MANAGEMENT=y to activate
the cache (Icache, Dcache) on those stm32 series.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:37:14 +02:00