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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>