Commit Graph

85730 Commits

Author SHA1 Message Date
Mulin Chao 0d59aa1ab4 sensor: adc_cmp: npcx: use BUILD_ASSERT to check `thr-sel` value
This CL uses BUILD_ASSERT macro to check whether `thr-sel` is out of
range instead of using NPCX series definitions.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-10-20 15:07:21 +02:00
Mulin Chao a6496e056b soc: npcx: replace Nuvoton NPCX series definitions in the npcx drivers
Replace Nuvoton NPCX series definitions with new Kconfig definitions in
the npcx drivers. The benefit of this approach is that we won't touch
the npcx driver sources again during introducing a new npcx series next
time.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-10-20 15:07:21 +02:00
Erwan Gouriou 7b50c38ec9 tests: drivers: serial: async: Add configuration for STM32WBA tests
Add STM32WBA test configuration to enable async API serial tests.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-20 15:05:59 +02:00
Erwan Gouriou 1e46413729 boards: nucleo_wba52cg: Add LPUART node description
Enable LPUART1 node on nucleo_wba52cg so it could be used to performed
uart tests.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-20 15:05:59 +02:00
Erwan Gouriou 52d47fcf96 dts: stm32wba: Add GPDMA support
Add GPDMA1 node description to STM32WBA devices.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-20 15:05:59 +02:00
Emil Gydesen a38d534ae0 Bluetooth: BAP: Shell: Add better checks for bis_sync
Since the BIS indexes start at 0x01, then BIT(0) is a
invalid BIS sync value and shall not be sent by the
broadcast assistant.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-20 15:05:51 +02:00
Jonathan Rico 028cf8037b tests: Bluetooth: add sleep in notify cb testcase
Validates that nothing nefarious happens if the application decides to
wait an arbitrary amount of time in notification callbacks.

Also validates that a disconnection during said waiting works as
expected.

E.g. in #48505, the user was trying to send data synchronously over UART
_inside_ the notification callback. Then the device was disconnected
whilst still waiting.

This kind of pattern is not recommended, but the stack should still
function correctly, stalling the "BT RX" thread shouldn't result in
state corruption or resource leakage.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-10-20 15:05:45 +02:00
Emil Gydesen 779f725db3 Bluetooth: CAP: Add verification of CCIDs as the initiator
When the initiator provides CCID in the metadata, we verify
that the CCIDs exist on the device.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-20 15:05:33 +02:00
Lukasz Hawrylko a422e1d8fb boards: arm: nucleo_wb55rg: enable aes1
Enable AES1 peripheral by default to add support for drivers/crypto sample.

Signed-off-by: Lukasz Hawrylko <lukasz@hawrylko.pl>
2023-10-20 15:05:26 +02:00
Lukasz Hawrylko 6424949dfd dts: arm: stm32: add AES1 peripheral to stm32wb family
STM32WB MCUs has two AES peripeherals. Add AES1 definition, AES2 must not
be used by application CPU core.

Signed-off-by: Lukasz Hawrylko <lukasz@hawrylko.pl>
2023-10-20 15:05:26 +02:00
Lukasz Hawrylko 5d113be341 drivers: crypto: add support for stm32wb family
STM32WB MCUs have two AES peripherals: AES1 for application use and AES2
dedicated for network stack. This patch modifies stm32 crypto driver to
use AES1 peripheral when building for STM32WB.

Signed-off-by: Lukasz Hawrylko <lukasz@hawrylko.pl>
2023-10-20 15:05:26 +02:00
Troels Nilsson 7d96c997e2 Bluetooth: Controller: Fix endianness issues for SyncInfo
Fix bitfield crossing byte boundary - replaced with macros for
setting/getting the values

Fix missing endianness conversion for evt_cntr

Changed aa from uint32_t to uint8_t[4] to align with the rest of
the code and avoid any potential endianness issues

Signed-off-by: Troels Nilsson <trnn@demant.com>
2023-10-20 15:05:20 +02:00
Emil Gydesen 3b58fec96c Bluetooth: CAP: Add size and rank checks for CAS register
For the CAP acceptor the size and rank characteristic shall
be set as per the CAP spec. Add checks for 0, as 0 indicates
not initializing the characteristics in the CSIS instance.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-20 15:05:00 +02:00
Anders Storrø 49bd77ad54 tests: Bluetooth: Mesh: Priv Proxy GATT test
Adds test verifying that Private Beacons are received
over a GATT proxy connection.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-10-20 15:04:54 +02:00
Anders Storrø 6f2ebb963a Bluetooth: Mesh: Add proxy test API
Adds internal proxy API to enhance testabillity of
the proxy implementation.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-10-20 15:04:54 +02:00
Anders Storrø 5551b4cfad Bluetooth: Mesh: Priv net id parse on proxy cli
Adds parsing of Private Network Identity parsing in the proxy client,
allowing the client to use these messages to establish a GATT
connection.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-10-20 15:04:54 +02:00
Andrei Emeltchenko 76c73938e7 drivers: ncp5623: Fix error check
num_colors cannot be not equal to different values at the same time.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-10-20 15:04:46 +02:00
Anas Nashif 488e959f03 manifest: zsclib module sha
Remove usage of obsolete Kconfig in module.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Anas Nashif 719fee2bbc doc: ztest: adapt ztest docs
Remove remaining usage and documenation of dropped kconfig that is now
the default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Anas Nashif 996c8457d7 ztest: remove old ztest api
Remove old Ztest API entirely. New API is the now the default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Anas Nashif 85c4703a46 drivers: fake: now just check for CONFIG_ZTEST
Old ztest API is deprecated, so only check for CONFIG_ZTEST.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Anas Nashif f067bc43c9 tests: sensor: do not depend on ZTEST_NEW_API
Old ztest API is deprecated, so no need for the conditional code here.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Anas Nashif e77a659698 cmsis_dsp: remove handling of old ztest API
Old ztest API is deprecated, so no need for the conditional code here.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Anas Nashif 345735d0a8 tests: remove CONFIG_ZTEST_NEW_API in all tests
Remove all usage of CONFIG_ZTEST_NEW_API from tests and sample as this
is now enabled by default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Anas Nashif 01281ed8af ztest: enable ZTEST_NEW_API by default
Enable by default so we can remove kconfigs from tests/samples and keep
things working as before.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Adam Wojasinski 97b351fb66 drivers: i2c: i2c_nrfx_twim: Add support for new instances
This patch intoduces new instances in TWIM SHIM for i2c driver.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-10-20 15:04:10 +02:00
Adam Wojasinski 5685af0923 modules: hal_nordic: Add support for new TWIM instances
Add Kconfig and symbols for twim: 20-22, 30, 121, 130-137 instances

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-10-20 15:04:10 +02:00
Dmitrii Golovanov c8d6a62b9d samples: gdbstub: doc: Remove redundant sample
Remove gdbstub sample (samples/subsys/debug/gdbstub) as duplicated
by a test (tests/subsys/debug/gdbstub).

Update the GDB stub documentation.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-10-20 15:03:55 +02:00
Dmitrii Golovanov 664d96785b tests: gdbstub: qemu: Cross-validate test behavior
Add a testcase to run the same test application and GDB script
which we use for Zephyr GDB stub testing, but now with
the GDB stub enabled at QEMU itself using it as a reference
RDP backend implementation. This allows to check the Zephyr's
gdbstub implementation has similar behavior as the reference.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-10-20 15:03:55 +02:00
Dmitrii Golovanov 236c1ac5de tests: gdbstub: Add GDB remote target parameter
Add `gdb_target_remote` test parameter for GDB `target remote`
command instead of its hardcoded value to allow different types
of gdbstub serial interfaces as well as different TCP ports in
gdbstub test suites possibly run in parallel on the same host.

Move all GDB log configuration parameters from GDB script to
the fixture code.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-10-20 15:03:55 +02:00
Dmitrii Golovanov 5008c31f8c config: qemu: Add QEMU_EXTRA_FLAGS config option
Add QEMU_EXTRA_FLAGS as QEMU board config option.

This allows Twister tests to provide additional device setup
commands to QEMU in prj.conf or testcase.yaml configuration files.

Example use case: to setup TCP or UDP network interfaces
with non-conflicting port numbers in different test suites
to avoid conflicts when Twister run tests in parallel on the
same host.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-10-20 15:03:55 +02:00
Dmitrii Golovanov cbbb1cabd6 tests: gdbstub: Improve test case
Gdbstub test improvements: using pytest fixtures, parametrization, and
expected pattern matching on outputs from GDB and the test application.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-10-20 15:03:55 +02:00
Dmitrii Golovanov c9e651b12c tests: samples: gdbstub: make test out of the sample
Clone samples/subsys/debug/gdbstub to tests and convert it back
to a build-only sample aligned with documentation.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-10-20 15:03:55 +02:00
Rubin Gerritsen 65501061ed Bluetooth: Controller: Kconfig: Move out BT_LL_SW_SPLIT configs
BT_CTLR_ISOAL_LOG_DBG_VERBOSE, BT_CTLR_ISO_TX_SEG_PLAYLOAD_MIN, and
BT_CTLR_CONN_ISO_AVOID_SEGMENTATION are very tied to the BT_LL_SW_SPLIT
implementation. It is very unlikely that these will ever be used by
another controller

Therefore move them out to the BT_LL_SW_SPLIT specific configuration
file. This will likely create less confusion when using another
controller.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2023-10-20 15:03:46 +02:00
Daniel DeGrasse a9aad1de31 samples: modules: lvgl: enable widgets demo
Enable LVGL widgets demo within Zephyr. This demo requires additional
stack and heap space in order to execute correctly, so raise the stack
and heap size to enable it to run.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-10-20 15:03:37 +02:00
Dennis Grijalva 78b4735e07 drivers: led: led_pwm: Fix PM callback error logging
If the underlying PWM device does not have a PM callback,
the PWM LED driver will flood the console with error logs.
The change ignores the error if there is no PM callback
for the PWM device.

Signed-off-by: Dennis Grijalva <dennisgrijalva@meta.com>
2023-10-20 15:03:27 +02:00
Adam Wojasinski 30b8d4ca99 drivers: spi: spi_nrfx_spim: Add new SPIM instances in driver
Add support for new instances.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-10-20 15:03:17 +02:00
Adam Wojasinski 5c1daef5ab drivers: spi: nrfx: Add SPIM Kconfig symbols for new instances
Add support for upcomming SPIM instances.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-10-20 15:03:17 +02:00
Emil Gydesen 6054714a08 Bluetooth: BAP: Add PSN debug log support
Add a Kconfig that enables support for logging and
debugging invalid sequence numbers.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-20 15:02:55 +02:00
Adrian Wojak 5b9a7d0553 drivers/sensor: lis2dw12: add wakeup_duration support
Add wakeup_duration support. (WAKE_DUR in WAKE_UP_DUR)
Value is configurable through DT per instance.

Signed-off-by: Adrian Wojak <adrian.wojak@outlook.com>
2023-10-20 15:02:41 +02:00
Michele Imbriani - Oticon a8f2dc21b5 bluetooth: audio: added broadcast source filtering
Added filtering the broadcast sources by CONFIG_BT_DEVICE_NAME.

Signed-off-by: Michele Imbriani - Oticon <mbim@demant.com>
2023-10-20 15:02:28 +02:00
Michele Imbriani - Oticon b435dc1c6a bluetooth: shell: Fixed logic in is_substring function
Fixed the character check in is_substring function.

Signed-off-by: Michele Imbriani - Oticon <mbim@demant.com>
2023-10-20 15:02:28 +02:00
Alberto Escolar Piedras a12dff48ac samples net/posix: Rename old Makefiles and clarify READMEs
The old Makefiles which can be used to build this samples
directly as Linux apps and the description in the READMEs
could be quite missleading.

Building this apps in this way has nothing to do with the
Zephyr native_posix/sim targets. This is about building
them as actual Linux applications without Zephyr or any
HW models.

So let's rename the Makefiles and change the description
in the docs to avoid confusion.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-20 15:01:42 +02:00
Alberto Escolar Piedras 5f8057e262 libC kconfig: default to PICOLIBC for NATIVE_LIBRARY if POSIX_API
When building with the POSIX_API we cannot use the host libC.
When using GETOPT it is similarly quite difficult for users
to use the host libC.
So to make it easier for users, let's just default to PICOBLIC
in those cases,
while we continue defaulting to the host library in other cases
so users can use the Linux APIs for whatever test functionality
they want.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-20 15:01:34 +02:00
Alberto Escolar Piedras 826c54efc9 tests posix pthread_pressure: Fix for native targtets
The infinite loop during the test needs to be broken
with a small delay when built for native targets.
Let's add it.
Note that this delay is only added for ARCH_POSIX targets
and not any other.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-20 15:01:25 +02:00
Alberto Escolar Piedras 5acca099ff POSIX API: Fix posix_types.h for native builds
The inclusion of the compiler provided sys/types.h
should depend on not using the host C library,
and not just of building for a native target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-20 15:01:25 +02:00
Alberto Escolar Piedras 11aa5c513f tests posix getopt: Minor fix for native targets
This test should be compiled without host headers
when built without the host libC, and at the same
time, it does not support building with the host
libC, so let's remove the condition that includes
the host libC header to avoid extra confusion.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-20 15:01:25 +02:00
Alberto Escolar Piedras 50793e32a8 tests posix event_fd: Fix for native targets
The infinite loop during the stress needs to be broken
with a small delay when built for native targets.
Let's add it.
Note that this delay is only added for ARCH_POSIX targets
and not any other.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-20 15:01:25 +02:00
Jeppe Odgaard f1ae151ef6 samples: flash_shell: remove sample code and use FLASH_SHELL
The flash sample and flash shell have implementations that differ
providing similar features.
This commit removes all the code in main.c, only `main()` remains to
reduce redundancy.

Features or improved implementations has not been merged into the flash
shell in this commit.
It should be possible to do in future commits if desired.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-10-20 15:01:17 +02:00
Jeppe Odgaard 921104042d drivers: flash: enable MPU_ALLOW_FLASH_WRITE for ARM MPUs
Select MPU_ALLOW_FLASH_WRITE to avoid write test failure for ARM MPUs.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-10-20 15:01:17 +02:00