Commit graph

16700 commits

Author SHA1 Message Date
Mark Chen
f4da9b9705 drivers: sensor: Add sensor clock API support
This commit introduces a new Sensor Clock API, enabling the retrieval
of cycle counts and conversion to nanoseconds based on the system or
external clock. The API includes:

- `sensor_clock_get_cycles()` to get the current cycle count from the
  sensor clock.
- `sensor_clock_cycles_to_ns()` to convert cycles to nanoseconds using
  the clock's frequency.

The implementation supports both system clocks and external clocks
defined in the device tree, making the sensor clock integration more
flexible for various sensor use cases.

Signed-off-by: Mark Chen <mark.chen@cienet.com>
2025-01-15 19:03:13 +01:00
Fabian Blatz
705365c747 drivers: stepper: Change stepper velocity to step interval
Change the stepper API to instead of changing the stepper speed based on
the velocity in microsteps per second to use the delay in usec between
successive steps. Also remove the velocity from the `stepper_run` function
as typical API usage is enable -> set step interval -> run.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-01-15 15:06:37 +01:00
Krzysztof Chruściński
0359f37263 tests: kernel: gen_isr_table: Fix test for nRF VPR targets
Test was using interrupt lines which does not exist on nRF VPR
targets. nRF54Lx FLPR has interrupts >= 16 and nRF54Hx PPR does
not have interrupt 17. Added configuration which works for
nrf54h20_cpuppr and nrf54lx_flpr.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-15 15:05:38 +01:00
Pieter De Gendt
5d23996361 tests: application_development: Add spdx SBOM test
Add a test where the software bill of materials is generated using the
west spdx extension.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-01-15 15:03:59 +01:00
Rafał Kuźnia
6f419cd6fb tests: nrf: enable twister tests for nrf54l09pdk
Enabled tests:
- clock_control_api
- nrf_clock_calibration
- nrf_lf_clock_start
- clock_control/onoff
- counter_basic_api
- flash/common
- flahs/negative_tests
- retained_mem/api
- nrf_grtc_timer
- wdt_error_cases
- fs/fcb
- stream/stream_flash

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2025-01-15 11:52:03 +01:00
Jilay Pandya
c5aed65a54 dts: bindings: gpio: use hyphens instead of underscore
replace underscore with hyphens to comply with device tree spec

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-01-15 11:51:33 +01:00
Andriy Gelman
9eb036cccd tests: drivers: dma: Add xmc4x_relax_kit overlays to loop_transfer test
Adds overlays for xmc45_relax_kit and xmc47_relax_kit boards.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2025-01-15 01:36:59 +01:00
Gerson Fernando Budke
ea7922195b clocks: atmel: sam0: Fix gclk and mclk clock bindings
The Atmel SAM0 SoC enable peripherals clocks in distinct places: PM and
MCLK. The old devices had defined the peripheral clock enable bit at PM.
On the newer devices this was extracted on a dedicated memory section
called Master Clock (MCLK). This change excludes the dedicated bindings
in favor of a generic approach that cover all cases.

Now the clocks properties is complemented by the atmel,assigned-clocks
property. It gives the liberty to user to customize the clock source
from a generic clock or configure the direct connections.

All peripherals drivers were reworked with the newer solution.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-01-14 20:49:03 +01:00
Neil Chen
0f64fe4cf8 tests: adc: Enable ADC tests for frdm_mcxc444 board
Enable ADC tests for frdm_mcxc444 board.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-01-14 17:57:23 +01:00
Lucien Zhao
5c3efe1e68 samples: userspace: shared_mem: remove mimxrt700_evk cm33 cores
The number of mpu regions that can be configured is less than four cases.
Therefore, only remove this case on cm33 cores, failed log show below:
"num_parts of 4 exceeds maximum allowable partitions (3)"

samples: kernel: mem_protect: userspace: remove mimxrt700_evk cm33 cores

The maximum number of partitions is less than the number of partitions
currently required, causing case to be unable to apply for or delete
excess regions.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-01-14 17:56:53 +01:00
Robin Kastberg
3f3c66f664 tests: kernel: timer_behaviour shouldnt use fabs
Currently the timer_behavior test uses fabs.
Since the C library functions being used in the kernel
is restricted in Rule A.4 in the Coding Standard
We should probably not use these functions in tests either.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-01-14 15:39:38 +01:00
Adam Kondraciuk
eb7e947d78 tests: kernel: Fix for nRF54H20
Fix failing tests for nRF54H20 target.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-01-14 15:38:32 +01:00
Adam Kondraciuk
2b91df8810 tests: arch: arm: arm_irq_vector_table: Fix for nRF54H20
Fix failing tests for nRF54H20 targets.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-01-14 15:38:32 +01:00
Jakub Zymelka
fc59ce3970 tests: drivers: mspi: make MSPI API test more generic
Add ifdefs to make MSPI API test more generic.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2025-01-14 15:38:16 +01:00
alperen sener
35aea49096 tests: bluetooth: tester: Increase number of PSA key slots for mesh
MESH PTS tests require different number of keys, as an example; only
one netkey requires 8 key slots and there are test cases that use at
least two netkeys which consume the default 16 slots, so it is better
to have enough slots all times. Setting slot count to 32.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
2025-01-14 13:38:15 +01:00
Robin Kastberg
75daa436ec tests: kernel: workq_stop uninitialized variable
test_k_workqueue_stop uses an uninitialized variable, causing
sporadic test failures.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-01-14 13:25:35 +01:00
James Roy
d1b782e5b3 dts: bindings: counter: Change the property names in the overlay
Rename the following properties in binding and overlay:
-- primary_source => primary-source
-- secondary_source => secondary-source
-- filter_count => filter-count
-- filter_period => filter-period

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-01-14 13:24:14 +01:00
Aleksandr Khromykh
967b096ad9 Bluetooth: Mesh: use secure storage in ble mesh
Commit:
 - adds dependency of the mbedtls psa usage on secure storage
 - removes PSA ITS emulator and enables usage of
   the secure storage in ble mesh bsim tests
 - enables secure storage in all ble mesh and related samples

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2025-01-14 13:23:47 +01:00
Krzysztof Chruściński
70118c06a5 drivers: serial: nrfx_uarte: Deprecate non-legacy shim
Some time ago a new shim for nRF UARTE was added (uart_nrfx_uarte2.c)
which used nrfx_uarte.c driver underneath. It was supposed to support
nrf54x platforms. However, later on legacy driver (uart_nrfx_uarte.c)
was extended to support nrf54x platforms and it takes less code size,
has better performance and more features. Shim uart_nrfx_uarte2 will
no longer be supported. As new shim is the default and there is a
Kconfig to pick the legacy shim (CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y)
it cannot be deprecated in the normal way. Additional Kconfig option
is created (DEPRECATED_UART_NRFX_UARTE_LEGACY_SHIM) which is enabled
if CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n and it selects DEPRECATED.
A warning was also added to the CMakeLists.txt.

Patch removes use CONFIG_UART_NRFX_UARTE_LEGACY_SHIM in tests.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-14 13:23:32 +01:00
Kyra Lengfeld
64d8713683 Bluetooth: Mesh: use settings priority feature
By using `SETTINGS_STATIC_HANDLER_DEFINE_WITH_CPRIO` we can ensure that
BT subsystems always get loaded after BT, and BT Mesh after both of
them.

This solves the host having to register a GATT service in a delayed
manner, as we are sure to now register the GATT service after sc_commit
sets `SC_LOAD`.

Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
2025-01-14 00:00:56 +01:00
alperen sener
917683a46b tests: bluetooth: mesh: Add PB-GATT provisioning test cases
Extending existing provisioning test code to use PB-GATT and adding
test cases for provisioning over PB-GATT. Test names are changed to
represent both provisioning brearers. Enabled required kconfigs for
PB-GATT and GATT proxy features in overlay_gatt.conf. Test argument
prov-bearer is added to provisioning tests to select bearer.

Following tests are renamed and extended to use PB-GATT
- pb_adv_multi
- pb_adv_no_oob
- pb_adv_oob_auth_ib_pk
- pb_adv_oob_auth_ignore_oob_pk
- pb_adv_oob_auth_oob_pk
- pb_adv_reprovision

PB-GATT test cases will run only with PSA encryption since tinycrypt
is to be deprecated.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
2025-01-14 00:00:44 +01:00
Krzysztof Chruściński
72d0ed7782 tests: drivers: uart: Add nrf54l09pdk_nrf54l09_cpuapp target
Add new target to the following tests:
- uart_elementary
- uart_async_api
- uart_mix_fifo_poll
- uart_pm

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-13 20:24:43 +01:00
Jukka Rissanen
ee22f5ed63 tests: net: http: server: Add static fs tests
Add tests for serving static files.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-01-13 20:23:18 +01:00
Yago Fontoura do Rosario
ee326138ca tests: bluetooth: Add missing mocks after fix on host
* Two mocks were missing in kernel mocks

Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
2025-01-13 20:22:20 +01:00
Lucien Zhao
f039ad57df tests: drivers: uart: uart_async_api: fix build error for RT1180
Due to cm7 on RT1180 is secondary core, and dtcm have been used
as sram directly, so there is no need to define zephyr,dtcm node.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-01-13 10:08:36 +01:00
Lucien Zhao
6c24c2e0a0 boards: nxp: mimxrt1180_evk: enable lpspi3 and edma4 instance support
Add pinctrl and dma channel/mux information for lpspi3 on cm33/cm7 cores.
Set dma4 status is OK.
Add pinctrl for lpuart3

tests: driver: spi: support spi_loopback case on MIMXRT1180_EVK
Add .config/.overlay files for cm33/cm7 cores
Link to ocram1 as RAM region on cm7 core
Link to dtcm as RAM region on cm33 core

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-01-13 10:08:36 +01:00
Raffael Rostagno
d20140d014 tests: esp32c3: Add USB variant
Add USB variant config files for esp32c3 boards.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-10 18:57:07 +01:00
Henrik Brix Andersen
557515884b tests: drivers: build_all: eeprom: use unique SPI CS lines
Use unique SPI CS lines in the EEPROM build-all test.

Fixes: #83696

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-01-10 14:48:35 +01:00
Nazar Palamar
01252ad877 drivers: dma: initial implementation CAT1 DMA driver
Initial implementation of DMA driver for CAT1 device

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2025-01-10 14:48:24 +01:00
Eric Ackermann
4921ce2118 tests: llext: Add RISC-V CB-Type edge case test
All immediates in RISC-V are encoded as two's complement. This commit
adds a test for relocating jumps that utilize the full range of the
immediate, in both positive and negative direction.
To this end, the test uses the compressed b-type (CB) instruction to
branch to its maximum negative (-256) and maximum positive (+254)
targets.
In case of test failure, expect relocating the corresponding llext to
fail.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2025-01-10 14:47:39 +01:00
Luca Burelli
ddd795a028 tests: llext-edk: get the Zephyr SDK path from build_info.yml
The LLEXT EDK test works by packaging an EDK and then testing its
functionality to build the extension in an external CMake build step.
That CMakelists.txt file currently references the required tools using
the ZEPHYR_SDK_INSTALL_DIR environment variable, which must be manually
set by the user.

This change modifies the test to read the newly added 'build_info.yml'
file, generated by Zephyr during the first build step. This allows to
set the ZEPHYR_SDK_INSTALL_DIR environment variable automatically based
on the (possibly auto-discovered) SDK path.

A few minor compliance cleanups are also included.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-01-10 09:51:54 +01:00
Nicolas Pitre
46aa6717ff Revert "arch: deprecate _current"
Mostly a revert of commit b1def7145f ("arch: deprecate `_current`").

This commit was part of PR #80716 whose initial purpose was about providing
an architecture specific optimization for _current. The actual deprecation
was sneaked in later on without proper discussion.

The Zephyr core always used _current before and that was fine. It is quite
prevalent as well and the alternative is proving rather verbose.
Furthermore, as a concept, the "current thread" is not something that is
necessarily architecture specific. Therefore the primary abstraction
should not carry the arch_ prefix.

Hence this revert.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-01-10 07:49:08 +01:00
Pieter De Gendt
4895b1f47b tests: Add CTest base harness testing
Add a testcase to validate the added CTest twister harness.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-01-10 04:12:42 +01:00
Marcin Lyda
5c8cf4c127 drivers: rtc: Add Micro Crystal RV-8803-C7 RTC driver
This PR adds support for Micro Crystal RV-8803-C7
RTC chip.

Supported functionalities:
* Update interrupt
* Alarm interrupt
* Time setting/reading
* Alarm setting/reading
* Aging offset calibration setting/reading
* CLKOUT configuration

Tested on nRF52833-DK using rtc_api test set.

Signed-off-by: Marcin Lyda <elektromarcin@gmail.com>
2025-01-09 23:26:37 +01:00
Maciej Baczmanski
b46f72009a net: openthread: radio: Fix platform radio state machine
Fix platform radio state machine to be compliant with one shown in
OpenThread's `include/openthread/platform/radio.h`

Align twister tests to verify proper behavior of the
state machine.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2025-01-09 15:49:21 +01:00
Emil Gydesen
48ac31c7a2 Bluetooth: TMAP: Remove double definitions of TMAP roles support
Both the TMAP kconfig file and public header file defined
which roles were supported.

The Kconfig file options were recently added and were more
up to date (and correct), and allows for other Kconfig files
to use these values, thus allowing for more flexibility when
implementing applications.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-01-09 15:49:10 +01:00
Mathieu Choplain
f994de862b tests: adc: adc_api: add overlay for Nucleo-WB07CC
Add an overlay to allow the test to build and run on Nucleo-WB07CC.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-01-09 15:48:59 +01:00
Mathieu Choplain
2c53fd78a4 tests: dma: loop_transfer: add overlay for Nucleo-WB07CC
Add an overlay to the test so that proper DMA behavior can
be verified on STM32WB07 SoC.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-01-09 15:48:59 +01:00
Mathieu Choplain
45008430f1 tests: dma: chan_blen_transfer: add overlay for Nucleo-WB07CC
Add an overlay to the test so that proper DMA behavior can
be verified on STM32WB07 SoC.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-01-09 15:48:59 +01:00
Matt Rodgers
b7091ed439 net: http_server: serve resources only for their defined services
Ensure that HTTP resources can only be served to a client connected on
the specific service(s) that the resource was registered against using
the HTTP_RESOURCE_DEFINE macro.

This allows different resources to be registered to different services,
for example to make some resources only available via an HTTPS service
and not via unencrypted HTTP.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2025-01-09 14:13:57 +01:00
Chaitanya Tata
1d5447d32b tests: boards: nrf70: Add tags
Add appropriate tags for these to be run in CI.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-01-09 11:51:17 +01:00
Ilya Tagunov
48d2382874 tests: math: interpolation: disable floating point contraction
This test cannot tolerate any loss of precision, including the one
caused by the compiler contracting floating points operations together,
like in fused multiply-add (FMA). Some toolchains enable FP contraction
by default, so disable it for the specific test and let the user decide
themselves whether precision or performance is needed for their
specific application.

Co-authored-by: Jordan Yates <jordan@embeint.com>
Co-authored-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2025-01-09 09:51:39 +01:00
Luis Ubieda
19a4261517 tests: sensor: generic_test: Remove special-handling for axis values
Since now they're treated as q31 values when individually queried, as
opposed to lump them in a triplet.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-01-09 08:20:32 +01:00
Stephan Linz
7cd7c82aa1 drivers: mipi-dbi-spi: use string for xfr-min-bits property
Use a string for the xfr-min-bits property over an integer value, as this
significantly improves the readability of the MIPI DBI SPI device binding.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2025-01-08 21:01:51 +01:00
Krzysztof Chruściński
d5637ec374 tests: lib: cpp: cxx: Filter out all ARMs from nRF54x and nRF92
Instead of extending list of unsupported platforms use filter that
will exclude or current and next ARM cores from platforms with HAL
that does not support C++98.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-08 19:10:24 +01:00
Andries Kruithof
c9a9f0ab08 Bluetooth: Audio: Add tests for the CAP cancel command
This adds unittests and babblesim tests for the CAP cancel command

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2025-01-08 19:10:11 +01:00
Krzysztof Chruściński
1115cd5698 tests: drivers: uart: async_api: nrf54h20dk: Enable device PM
Enable device runtime PM for nrf54h20dk/nrf54h20/cpuapp where
fast UARTE (uart120) is tested.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-08 19:09:57 +01:00
Khoa Nguyen
5acf8a2935 tests: drivers: flash: Support test common for RA6, RA4
Add overlay to support test flash/commone for: ek_ra6m1,
ek_ra6m2, ek_ra6m3, ek_ra6m4, ek_ra6m5, ek_ra6e2, fpb_ra6e1,
fpb_ra6e2, ek_ra4m2, ek_ra4m3, ek_ra4e2

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
2025-01-08 17:02:36 +01:00
Neil Chen
96a9a5ea90 tests: drivers: uart: add uart_async_api support for frdm_mcxa156 board
add uart_async_api test support for frdm_mcxa156 board

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-01-08 17:01:53 +01:00
Anas Nashif
08ed0f3282 tests: kernel: common: use integration_toolchains
Use new keyword integration_toolchains to build test using additional
toolchains.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-08 12:58:59 +01:00