Commit graph

10700 commits

Author SHA1 Message Date
Sebastian Bøe
9ef16f55cd boards: nordic: 54l: use wdt31 instead of wdt30
Use wdt31 instead of wdt30 as wdt30 is hardware fixed to secure.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2024-05-24 18:00:47 -04:00
Andrzej Głąbek
9c874f0b93 samples: nrfx_prs: Fix pin assignment on nRF5340 DK
Pins P0.06 and P0.07 are shorted on nRF5340 DKs prepared for on-target
tests because that is required for UART tests. That causes background
SPIM transfers in this sample to fail because SPIM is not able to drive
its SCK line configured as P0.06. Rearrange then the pins used in this
sample, so that SCK is not on a pin involved in a GPIO loopback.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-24 10:00:07 -05:00
Babak Arisian
b0dceffacc Bluetooth: Audio: add bt_audio_get_chan_count
Implement a function bt_audio_get_chan_count that takes an enum
bt_audio_location and returns the number of channels in that value.

This PR fixes #69617
(https://github.com/zephyrproject-rtos/zephyr/issues/69617)

Signed-off-by: Babak Arisian <bbaa@demant.com>
2024-05-24 09:55:37 -05:00
Alexander Sarmanow
1ed18ad5b2 samples: bluetooth: df: fix misleading comment in rx overlay
The comment is talking about Tx and AoD, while this sample code is about
Rx and AoA.

Signed-off-by: Alexander Sarmanow <asarmanow@gmail.com>
2024-05-24 08:05:19 -04:00
Celina Sophie Kalus
59bfe591ef samples: drivers: mbox: Add support for stm32h747i_disco board
With the addition of the STM32 hardware semaphore MBOX driver, this
sample is now supported by the board.

Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
2024-05-24 07:52:06 -04:00
Celina Sophie Kalus
3290da8f1d samples: ipc: icmsg: Add support for stm32h747i_disco
With the addition of the STM32 hardware semaphore MBOX driver, ICMsg is
now supported on the stm32h747i_disco board.

Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
2024-05-24 07:52:06 -04:00
Celina Sophie Kalus
7da8ca3113 samples: ipc: icmsg: Do not return busy error codes
When sending a lot of data, a busy error code returned by the IPC is to
be expected. But if the last attempted send returns busy, this error
code is returned to the calling function, causing an error log message.
Fix this by setting return variable to 0 on this acceptable error.

Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
2024-05-24 07:52:06 -04:00
Celina Sophie Kalus
9e0d4ef88f samples: ipc: icmsg: Add received bytes metric
By adding this metric, any problem with the remote core sending messages
is observable.

Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
2024-05-24 07:52:06 -04:00
Andrew Davis
39863b66bd lib: open-amp: Use struct fw_resource_table type instead of void
The type of the resource table is known, casting to and from void* only
hides this type which can prevent the compiler from giving helpful
warnings. One warning would have been the accidental use of
"st_resource_table" in a cast, a struct which does not exist.

Use the fw_resource_table type when dealing with resource tables.

Signed-off-by: Andrew Davis <afd@ti.com>
2024-05-24 07:51:42 -04:00
Piotr Kosycarz
8ba222c56a samples: subsys: ipc: ipc_service: keep using remote harness
Temporary solution as there is no such harness as remote.
However console regex are not defined yet.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-05-24 07:49:57 -04:00
Yong Cong Sin
e993e994ea sensors: add new channel SENSOR_CHAN_POS_DXYZ
Add new channel: `SENSOR_CHAN_POS_DXYZ`, so that it is
consistent with other 3-axis channels.

Updated pytest, `sensor_shell` & `fake_sensor` accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-24 07:49:27 -04:00
Yong Cong Sin
c13105750d samples: sensor: sensor_shell: update pytest to validate fix
Update the pytest script to exercise the entire
`sensor_channel_name` table with `parse_named_int()`.

The `gauge_desired_charging_current` is selected because
it is the last one in the table before `all`, `all` is not
used because `sensor get sensor@0 all` doesn't return anything.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-24 07:49:27 -04:00
Emil Gydesen
04e38ae176 samples: Bluetooth: Fix incorrect comments about adv sets
Several places we simply had
/* Create a non-connectable non-scannable advertising set */
regardless of the type of advertising it was.

Modified the comment to omit the scannable part
and corrected the connectable part.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-24 07:46:43 -04:00
Valerio Setti
2adb4cac17 mbedtls: default enable USE_PSA_CRYPTO when CRYPTO_C
Now that support for all PSA_WANT symbols is in place, we can
enable MBEDTLS_USE_PSA_CRYPTO when MBEDTLS_PSA_CRYPTO_C is
enabled as well.

Note: this commit also moves USE_PSA_CRYPTO out of CRYPTO_C
dependency in config-tls-generic.h because TLS/DTLS/X509 modules
of MbedTLS can rely on *any* implementation of PSA crypto APIs
not only the MbedTLS one. TFM is for example an alternative
to this.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-23 11:53:02 -04:00
Ioannis Karachalios
db67eaa346 samples: drivers: memc: Add support for Smartbond Pro DevKit.
Add configuration and overlay files to support the DA1469x development kit.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-23 07:51:41 -04:00
Jason Murphy
55d6e4cb10 samples: net: add secure MQTT sensor/actuator device sample
This sample demonstrates the implementation of an (industrial) IoT
sensor/actuator device. The application uses the MQTT protocol to
securely send sensor data to a remote MQTT broker, while responding
to commands received over the MQTT connection.

Signed-off-by: Jason Murphy <jason.murphy@analog.com>
2024-05-23 07:51:04 -04:00
Filip Kokosinski
49998d93ac samples/subsys/shell/shell_module/overlays: revert to the default prompt
This commits reverts two targets back to the default prompt in the Shell
Sample:
* intel_socfpga_agilex_socdk
* intel_socfpga_agilex5_socdk

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-05-23 07:48:13 -04:00
Andrzej Głąbek
0268b9358f samples: drivers: adc_sequence: Fix expected console output regex
Add a missing space in the regular expression that defines the expected
console output so that it matches what the sample actually produces.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-23 07:46:58 -04:00
Jens Rehhoff Thomsen
1c70e87047 Bluetooth samples: Fix broadcast source device name
The device name explicitly added in the advertising data.

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
2024-05-22 13:45:11 -05:00
Vinayak Kariappa Chettimada
bd3a2f5bd1 samples: Bluetooth: hci_ipc: Use LTO when building ISO features
Use Link Time Optimisation (LTO) when building Controller
with Isochronous channels support.

nRF53x SoCs has 256KB flash and using speed optimisation,
which is the default today, overflows flash when adding
new features related to ISO support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-05-22 13:38:14 -05:00
Paul He
027e00955d samples: pktqueue: remove main.h
Normally main.c file doesn't have a header file, because it doesn't
need to declare any interface to other modules.

In this sample, it makes more sense to put all the relevant macro
definitions in main.c directly.

Signed-off-by: Paul He <pawpawhe@gmail.com>
2024-05-21 20:54:13 -04:00
Robert Lubos
1ee4a8b52c samples: net: tftp-client: Configs cleanup
As native_posix is no longer supported, due to incompatibility with
CONFIG_POSIX_API, remove a dedicated config for it.
A config for qemu_cortex_m3 needed to enable RNG, as otherwise it's not
available for the platform and gives build error.
Finally,  enable qemu_cortex_m3 build in the CI.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-21 11:51:27 +01:00
Yong Cong Sin
46ed467339 samples: sensor: sensor_shell: add pytest
Use pytest to test the shell commands.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-20 22:56:11 +03:00
Yong Cong Sin
d462ed4d95 samples: sensor: sensor_shell: add fake sensor driver
Add a simple fake sensor driver so that the sample is more fun
for boards without real sensor.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-20 22:56:11 +03:00
Bjarki Arge Andreasen
84e9f52fc4 samples: net: cellular modem: Select modem backend statistics
select modem backend statistics and enable shell in cellular
modem sample. This will help advertise the feature, and can
help quickly identify issues with to small buffers.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-20 14:40:06 +03:00
Jukka Rissanen
e670637f42 samples: net: Add net_if.h include
Because of changes in other network header files, the net_if.h
was not included so add it directly to the echo-client and
mqtt_azure sources.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen
07d64352fe samples: mgmt: updatehub: Fix build failure on frdm_k64f board
The CONFIG_MAX_THREAD_BYTES=3 needs to be set otherwise this error
is printed by CI.

    Too many thread objects (17)
    Increase CONFIG_MAX_THREAD_BYTES to 3

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jukka Rissanen
d5cd41a0fe net: llmnr_responder: Convert LLMNR responder to use socket service API
Instead of using net_context API directly, the LLMNR responder is
changed to use the socket service API. This allows DNS access
for offloaded sockets and can lower overall memory consumption.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-20 14:25:44 +03:00
Jeppe Odgaard
69065fa317 samples: sensors: add veaa_x_3 sample
Add sample for VEAA-X-3 sensor.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-18 15:56:09 +03:00
Emil Gydesen
f58ac3476f Bluetooth: CAP: Add reference to the set member for CAP discover
Since the CSIP API expects a set member struct for nearly all
functionality, the reference to the full set member (along with
the CAS specific CSIS) should be given to the application.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-18 15:51:26 +03:00
Karthikeyan Krishnasamy
5e7d74bd23 samples: bluetooth: hci_uart: fix dtsi path in overlay
fix dtsi overlay include path for nrf9160dk_nrf52840

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-05-17 14:40:15 -05:00
Karthikeyan Krishnasamy
89fcb5a9b4 samples: cellular: fix dtsi path in overlay
fix dtsi include path for board nrf9160dk_nrf52840

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-05-17 14:40:15 -05:00
Benjamin Cabé
bdfb6afe70 samples: net: http_server: add link to HTTP Server doc page
Improve navigability in the documentation by adding a link to the main
HTTP Server documentation page to the HTTP Server sample.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-05-17 14:38:15 -05:00
Johann Fischer
64894e8798 sample: hid-mouse: exclude frdm_mcxn947
Board does not specify "zephyr,code" and is fails in twister.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 16:25:02 +01:00
Johann Fischer
7328690799 samples: usb: add a sample USB 2.0 Extension Descriptor
Add a sample USB 2.0 Extension Descriptor.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 16:25:02 +01:00
Johann Fischer
4f17bc6051 usb: device_next: store bDescriptorType and bLength in descriptor node
It simplifies the macros to create the string descriptors. We also no
longer need placeholders for the SerialNumber descriptor when it is
generated from hwid. In the future, we can store other descriptor types
in the same list.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 16:25:02 +01:00
Ederson de Souza
972eecfc17 samples/subsys/llext: EDK sample
Shows a simple application which loads extensions and some simple
extensions. While everything is inside Zephyr tree, everything can
actually be build from different directories (even machines), as long as
the EDK is generated from the application and used by the extensions.
More information is available at sample's README.

This sample is build only for twister, as it requires a few steps to be
properly run, namely build the EDK, install it somewhere, build the
extensions using the EDK and finally build the application with the
extensions.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-05-17 16:21:48 +01:00
Piotr Dymacz
35c08ea636 boards: st: nucleo_wba55cg: define all LEDs and buttons
This board includes three gpio-connected LEDs and push-buttons. Include
all missing defines in board's DTS and while at it, fix existing button
definition (missing pull-up enable) and align node names with other
boards (e.g. 'nucleo_wb55rg').

Provided changes were tested on real board with 'blinky' and 'button'
samples.

Additionally, duplicated LED nodes no longer required were removed from
overlay file for this board, in 'suspend_to_ram' sample.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2024-05-17 15:07:54 +02:00
Alberto Escolar Piedras
19df415f91 samples/posix/env: Change integration platform
There is some instability problems with qemu_riscv32
https://github.com/zephyrproject-rtos/zephyr/issues/72858
which cause this sample test to fail in CI at random.
Let's change the integration platform to a reliable one,
so this test focuses on the sample and does not produce
false test failures due to the platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-17 15:07:46 +02:00
Johann Fischer
619dd3022d samples: usb: add nrf54h20dk to allowed platforms
nRF54H20DK board is first major user of new UDC DWC2 driver.
Add nRF54H20DK (Application CPU) to allowed platforms in USB device
samples.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 14:05:08 +01:00
Johann Fischer
6d06a8cea9 drivers: udc_dwc2: use devicetree to configure endpoint capabilities
Although we can get the number of configured OUT and IN endpoints and
endpoint capabilities from the DWC GHWCFGn registers, we need to
configure the number of endpoint configuration structs at build time. On
some platforms, we cannot access the hardware register at pre-init, so
we use the GHWCFGn values from the devicetree to provide endpoint
capabilities. This can be considered a workaround, and we may change the
upper layer internals to avoid it in the future.

Also, add a new vendor quirk to fill in platform-specific controller
capabilities.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-17 14:05:08 +01:00
Jens Rehhoff Thomsen
a2ebe49259 Bluetooth samples: Keep broadcast assistant connected
When Broadcast Sink is connected to Broadcast Assistant then keep
connection when Broadcast Source is removed.

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
2024-05-17 12:41:04 +02:00
Marcin Niestroj
a15cc704e0 samples: net: echo_server: set IPV6_V6ONLY
This sample assumes that two separate sockets can be bound on IPv4 and
IPv6. On Linux (via Native Simulator Offloaded Sockets) this is possible
when there is no IPv4 to IPv6 mapping. Same can be true to other offloaded
sockets.

CONFIG_NET_IPV4_MAPPING_TO_IPV6 is disabled for this sample, so IPv4 to
IPv6 mapping is disabled for Zephyr native IPv6 layer. For offloaded
sockets this option does not define whether mapping is enabled or not, so
try to unconditionally (and without error checking) disable it.

This patch fixes compatibility with NSOS, since two separate sockets can be
bound on the same address and port, one for IPv4 and second for IPv6.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-17 11:12:43 +02:00
Chaitanya Tata
29f81872ce samples: drivers: spi_flash: Add nRF54H20DK support
Verified on nRF54H20DK, useful for testing external flash access.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-05-17 10:34:31 +02:00
Armin Brauns
e7a53cf03b samples: code_relocation_nocopy: add stm32f769i_disco board
This board has memory-mapped QSPI flash.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-05-16 15:52:01 +02:00
Henrik Brix Andersen
0f7cd6128e drivers: can: set default initial bitrates via Kconfig
Set the default initial bitrates globally via Kconfig. The initial bitrates
can still be overridden using the "bus-speed" and "bus-speed-data"
devicetree properties.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-16 09:23:59 +02:00
Lyle Zhu
4c7b19fa5a samples: Bluetooth: HFP_AG: Initialize version
Add a new example handsfree_ag to demonstrate
usage of the handsfree audio gateway APIs.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-05-16 09:15:49 +02:00
Johann Fischer
bc183d1278 samples: usb: cdc_acm: set USBD_CDC_ACM_LOG_LEVEL to error
Set USBD_CDC_ACM_LOG_LEVEL to error.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-15 17:29:24 +01:00
Johann Fischer
2c0187ae84 samples: usb: cdc_acm: enable USB support only when device is connected
If the controller can detect VBUS state changes, enable USB support only
when the device is connected and disable it when the device is
disconnected.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-15 17:29:24 +01:00
Johann Fischer
693191467d usb: device_next: add USB device context to message delivery callback
Add USB device context argument to message delivery callback.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-15 17:29:24 +01:00