Commit graph

10700 commits

Author SHA1 Message Date
Rafał Kuźnia
bcc756223f samples: drivers: counter: add nRF54L20 config
Added build configuration for nRF54L20.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-12-13 20:04:51 +01:00
Johann Fischer
9911bd07e0 samples: hci_uart: fix UART IRQ API usage
uart_irq_update() should always be called in IRQ processing callback.
From API documentation:
"This function should be called the first thing in the ISR. Calling
uart_irq_rx_ready(), uart_irq_tx_ready(), uart_irq_tx_complete()
allowed only after this."

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-12-12 18:39:05 +01:00
Johann Fischer
8f44b86bd2 samples: hci_uart_3wire: remove USB related code
There is no advantage to using the USB CDC ACM UART in this sample.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-12-12 18:38:40 +01:00
Phi Bang Nguyen
a03a32b0ac samples: video: capture: rt10xx: Do hflipping at camera level
Do hflipping at camera level to avoid using PxP which impacts camera
framerates on RT10xx. Moreover, on RT11xx, PxP is already reserved
for 90 CCW image rotation.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-12-12 16:21:43 +01:00
Phi Bang Nguyen
8939a6cc7e samples: video: capture: Add hflip option
Add an option to mirror the video image horizontally. This helps
to avoid doing so at the post-processing step by using additional
HW such as PxP on i.MX RT platforms.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-12-12 16:21:43 +01:00
Marek Matej
e1b4320722 samples: driver: ipm: esp32 sysbuild refactor
Make APP_CPU board name auto generated and remove the related config.
Remove the boards overlay and replace with a socs overlays.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-12-12 11:38:22 +01:00
Nhut Nguyen
cd495936cf drivers: gpio: Add support for RZ/G3S
This adds GPIO driver for Renesas RZ/G3S.

Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Binh Nguyen <binh.nguyen.xw@renesas.com>
2024-12-12 11:12:22 +01:00
Neil Chen
ef4e2b2463 samples: usb: Exclude frdm_mcxc444 platform from dfu sample
frdm_mcxc444 does not support MCUboot. Exclude the platform from dfu
sample.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-12-12 11:09:03 +01:00
Hake Huang
19155bdb26 samples: magic_addr: add pytest check for magic_addr
use pytest script to check result

fixes: #82759

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-12-12 11:05:14 +01:00
Fengming Ye
d77fb49ac3 samples: wifi: nxp: separate wifi example user config file
Separate wifi example user config file to wifi network configurations
and hostap configurations.
User can set EXTRA_CONF_FILE as overlay-hostap.conf file to get
external hostap support.
Without overlay-hostap.conf, we will have embedded hostap.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-12-12 11:05:02 +01:00
Valerio Setti
7c4abb1eb9 samples: sockets: exclude nrf5340dk with TF-M from http_server
When the sample is built for this platform a build error is generated
due to ROM being overflowed.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-12 00:15:39 +00:00
Valerio Setti
a4b9ef69c3 Revert "samples/tests: bluetooth: remove ENTROPY_GENERATOR selection"
This reverts commit 30f6dc43bab8ae1f26497eb000ff1ab4fb379c00.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-12 00:15:39 +00:00
Valerio Setti
e5ebd9bc28 Revert "samples: mcumgr: smp_svr: disable "zephyr,entropy" in mcuboot"
This reverts commit 6f4326ace0febed1f01f935dbcc3761173d79ca1.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-12 00:15:39 +00:00
Matt Rodgers
8f07784e9f tests: http_server: fix failing TLS tests due to moved certificates
Testcase uses certificates from the sample application at
samples/net/sockets/http_server. These were modified and moved into a
different folder by a previous commit, causing a build failure in the
test.

Testcase updated to:
- use new path to certificates
- update available cipher suites, since certificates now use ECDSA
- update expected hostname in certificate

The CA certificate in the sample app is also converted to .der format
for inclusion in the test (the content is exactly the same as the PEM
version, just converted to DER).

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-11 06:32:53 -05:00
Benjamin Cabé
1441436a92 samples: echo_server: fix rw612_openthread_rcp_host build in CI
MONOLITHIC_NXP_NBU cannot be used in CI as it relies on firmware blobs
to be fetched.
Disabling the feature so the CI can pass.
Also tagging this test as build_only.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-12-11 07:57:06 +01:00
Armin Kessler
1baf93b1d1 drivers: video: Add timeout tovideo_buffer_alloc
This PR fixes a blocking call to video_buffer_alloc in case of memory
shortage by addign a timeout parameter to the API.

Signed-off-by: Armin Kessler <ake@espros.com>
2024-12-10 20:39:57 +01:00
Axel Le Bourhis
9fb546f85e samples: echo_client: fix rw612_openthread_rcp_host build in CI
MONOLITHIC_NXP_NBU cannot be used in CI as it relies on firmware blobs
to be fetched.
Disabling the feature so the CI can pass.
Also tagging this test as build_only.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2024-12-10 20:37:03 +01:00
Matt Rodgers
6ebac0bd4e samples: http_server: document process to use HTTP/2 with web browser
Using HTTP/2 to communicate with the sample application using a web
browser requires some additional steps. Add documentation describing
this to the sample README file.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-10 10:43:38 -05:00
Matt Rodgers
f9b685d3fe samples: http_server: add option to use ALPN for HTTP2 support
Add application level Kconfig option to enable ALPN usage for
negotiating HTTP/2 connection with web browsers.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-10 10:43:38 -05:00
Matt Rodgers
bd83c19cc7 samples: http_server: update cipher suites and certificates
Existing cipher suites and certificates used by HTTP server sample are
included in RFC9113 Appendix A: Prohibited TLS 1.2 Cipher Suites. The
RFC specifies that when using HTTP/2, these cipher suites may be treated
as an error of type INADEQUATE_SECURITY, and in practice it seems that
Chrome and Firefox do implement this.

The certificates have been updated to use ECDSA-P265 signatures, and
supported cipher suites updated to include ECDH key exchange and AES GCM
and CCM modes.

Some scripts are included to allow users to generate their own
certificates if desired.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-10 10:43:38 -05:00
Matt Rodgers
45c6553567 samples: http_server: consolidate certificate options
Remove the CONFIG_NET_SAMPLE_CERTS_WITH_SC option and make the CA-signed
certificate the only option - there is no real downside to this over
using the unsigned certificate.

Remove adding of CA certificate as a TLS credential on the server, since
this credential is not used by the server. It may be useful to include
in any client code used to communicate with the server, so the
certificate itself is retained.

After this, some TLS tag enumerations are unused so have been removed.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-10 10:43:38 -05:00
Emil Gydesen
778a9afae3 tests: Bluetooth: Audio: Remove uses of K_FOREVER in syswg for TX
Several tests were using K_FOREVER when allocating the
buffer for TX in the system workqueue, which is illegal behavior.

The solution chosen was to create a TX thread to handle TX,
similar to the solution used in the audio shell and some
sample applications.

This way we can continue to use K_FOREVER when allocting buffers
and it will always be done in a round-robin fashion while
TXing as much as possible, by always enqueuing all the buffers
with mock data.

Since this works for all streams (both broadcast and unicast),
it was obvious to use the same implementation for all tests,
and thus cleaning up the tests a bit and more them more similar.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-10 16:23:10 +01:00
Neil Chen
f6490bf33d samples: sensor/mcux_lpcmp: Add LPCMP use case
Enable LPCMP use case on NXP frdm_mcxa156 board.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-12-10 16:22:55 +01:00
Ioannis Damigos
29430e68c6 samples: susbsys: tracing: Fix harness configuration
Fix harness configuration for sample.tracing.gpio

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-12-10 16:22:27 +01:00
Axel Le Bourhis
5dfd41e51a nxp: combine MONOLITHIC_BT and MONOLITHIC_IEEE802154
Combine BLE and 802.15.4 monolithic build under a single config to make
it less error prone.
The choice between a BLE/802.15.4 combo firmware and a BLE only firmware
is done depending on the Soc (like RW610 vs RW612).

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2024-12-10 11:11:38 +01:00
Simon Guinot
c650720a83 samples: led_strip: fix bbc_microbit.conf location
Commit 55d9d1c6ba
("samples: led: consolidate LED samples under same directory")
moved the led_strip sample from samples/drivers to samples/drivers/led.

But commit f54a53b4b3
("drivers: ws2812_gpio: Make timing configurable and less hardware
dependend") was merged at the same time and added the bbc_microbit.conf
file to the old location.

This patch moves bbc_microbit.conf to its correct location.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
2024-12-10 11:09:00 +01:00
Valerio Setti
4c43e3b756 samples: mcumgr: smp_svr: disable "zephyr,entropy" in mcuboot
If/when "zephry,entropy" is enabled CONFIG_ENTROPY_GENRATOR is
automatically enabled, therefore enabling the corresponding
platform entropy driver. On some platform this is a problem
because the entropy driver is not used directly as random
source, but only to seed the ctr-drbg algorithm provided
by Mbed TLS. Unfortunately CONFIG_MBEDTLS_CIPHER_MODE_CTR_ENABLED
cannot be directly enabled because CONFIG_MBEDTLS_CFG_FILE used
in mcuboot is different from the "config-tls-generic.h" which
is required to use Kconfig symbols defined in
"zephyr/modules/mbedtls/Kconfig.tls-generic".
Moreover entropy and random number generators are not required
in mcuboot because signature verification is a
deterministic operation.
In conclusion this commit disables "zephyr,entropy" in
mcuboot DTS overlay file.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Valerio Setti
8564df571a samples/tests: bluetooth: remove ENTROPY_GENERATOR selection
ENTROPY_GENERATOR is now automatically enabled if the board
has "zephyr,entropy" chosen property set, so there is no need
to manually select it.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-10 08:05:33 +01:00
Emil Gydesen
a4df95f390 samples: Bluetooth: BAP: Refactor stream_recv_lc3_codec
Refactor the function to use net_buf_pull_mem instead of the
offset variable when decoding.

Since the offset value was always 0 before, this fixes the
incorrect decoding.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-09 15:11:23 +01:00
Andrzej Głąbek
6e22d19fd2 samples: drivers: spi_flash: Remove unnecessary Kconfig option changes
It is no longer needed to enable a specific flash driver in the sample
configuration. An appropriate driver (together with its dependecies,
like the SPI bus) for a given target will be enabled automatically
based on what is enabled in DTS.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-12-09 15:10:47 +01:00
Andrzej Głąbek
cd3a78056d samples: drivers: jesd216: Remove unnecessary Kconfig option changes
It is no longer needed to enable a specific flash driver in the sample
configuration. An appropriate driver (together with its dependencies,
like the SPI bus) for a given target will be enabled automatically
based on what is enabled in DTS.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-12-09 15:10:47 +01:00
Marcio Ribeiro
7c12e86e06 boards: esp32: correct "zephyr,sram" property under /chosen node
Correct "zephyr,sram" property under /chosen node to make board and samples
compatible with new SoC memory description.

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-12-07 11:02:46 +01:00
Emil Gydesen
13c42bd8a3 samples: Bluetooth: Use broadcast sink cbs in broadcast sink sample
Use the broadcast sink callbacks to set the semaphores
rather than the stream callbacks, as the broadcast sink callbacks
are better for that as they are called when all streams are ready.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-06 15:17:06 +01:00
Emil Gydesen
6e86b67afb samples: Bluetooth: Use broadcast source cbs in broadcast source sample
Use the broadcast source callbacks to set the semaphores
rather than the stream callbacks, as the broadcast source callbacks
are better for that as they are called when all streams are ready.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-06 15:17:06 +01:00
Lyle Zhu
2b27b1cdd7 Bluetooth: HFP_AG: Update SDP discovery
Add set the parameter `type` to value
`BT_SDP_DISCOVER_SERVICE_SEARCH_ATTR`.

Update the SDP discovery callback function by adding a third parameter
`const struct bt_sdp_discover_params *params`. Make it align with
`bt_sdp_discover_func_t`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-12-06 12:14:29 +01:00
Krzysztof Chruściński
384e940c66 drivers: serial: nrfx_uarte: Deprecate CONFIG_UART_x_NRF_HW_ASYNC
Deprecate mode which is using TIMER+(D)PPI for reliable byte counting.
Recently a new approach is added (CONFIG_UART_NRFX_UARTE_ENHANCED_RX)
which supports reliable byte counting without additional HW resource.
This mode is planned to be the only supported RX path mode.

Enhanced RX has slightly different behavior. There are no partial RX
packets (events with non-zero offset). There is UART_RX_BUF_RELEASED
after each UART_RX_RDY event.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-06 12:14:02 +01:00
Neil Chen
3f389d5b86 samples: drivers/adc: Support adc example for NXP frdm_mcxa156
Support adc example for NXP frdm_mcxa156

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-12-06 10:01:26 +01:00
Francois Ramu
17fcb33eae samples: boards: stm32 mco output control
This sample enables and configures the MCO1/2 output
for stm32 target boards.
MCO_PRE_DIV_n is defined by the stm32XX_clock.h

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-05 19:59:47 -05:00
Olivier Lesage
3feb1378d6 bluetooth: host: simplify enums for SNR control
It works the same on both sides, so there's no point having two of
these.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-12-05 12:30:09 +01:00
Duy Nguyen
689d1f2ca9 sample: net: Add initialize for dup_flag when publish
When publish message, the dup_flag is not intialize
causing it to have random value and making the AWS MQTT
broker to reject the message
Add initialize dup_flag as 0

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-12-05 07:45:19 +01:00
Jordan Yates
422d612cdc samples: lora: receive: update SNR unit to dB
Signal-to-noise ratio is a unitless quantity, so its unit is dB, not
dBm (dBm is the power relative to 1 milliwatt). At the same time output
the received payload using `LOG_HEXDUMP_INF`, instead of limiting the
sample solely to string payloads.

Fixes #82414

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-12-04 18:19:41 -05:00
Gerard Marull-Paretas
d4a67e321b samples, tests: remove usage of space-separated lists
Convert them to native YAML lists. Support for space-separated
lists was deprecated in Twister a long time ago.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-12-04 14:14:53 -05:00
Matt Rodgers
ddaeb1379a net: http_server: fix header capture on concurrent http2 streams
Concurrent HTTP POST requests on different HTTP2 concurrent streams
require that the client's header_capture_context is re-used to capture
headers on a second stream before all of the body data has been received
(and sent to the application) on the first stream.

As a result, any captured headers must be sent to the application
callback before any headers can be received on a different stream. In
practice this means that for HTTP2 the application callback is called
for the first time on receiving a headers frame, before any data frames
are received. All subsequent application callbacks will not include the
request header data.

While this mechanism is not necessary for HTTP1, it is also updated to
only send headers in the first application callback for consistency.

Fixes #82273

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-04 14:13:24 -05:00
Alexander Lay
d356403664 samples: tracing: update sample app for gpio tracing
Implement a sample app to perform basic GPIO tracing.

Signed-off-by: Alexander Lay <alexanderlay@tenstorrent.com>
Signed-off-by: Yang Xu <yangxu@tenstorrent.com>
2024-12-04 14:12:58 -05:00
Alexander Lay
8f2dd90088 tracing: add gpio tracing support
If GPIO tracing is enabled, then the system will track
various GPIO pin events.

Signed-off-by: Alexander Lay <alexanderlay@tenstorrent.com>
Signed-off-by: Yang Xu <yangxu@tenstorrent.com>
2024-12-04 14:12:58 -05:00
Anas Nashif
c6b3527d44 samples: watchdog: fix board identifiers
Use full board target name in cases with multiple variants or cpu
clusters.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-12-04 16:11:29 +01:00
Sergey Korotkov
2ee0e38929 Bluetooth: Host: more secure defaults for key size and legacy pairing
Default the Minimum encryption key size to 16.
Key with reduced size is easier to brut force.
Disable LE legacy pairing by default since it's not secure.

These defaults should suite majority of newly developed applications.
It's better to use sensible more secure defaults,
so applications that really need less secure option consciously change it,
not the other way around.
This may help to prevent downgrade attacks.

Signed-off-by: Sergey Korotkov <sergey.korotkov@nordicsemi.no>
2024-12-04 12:10:54 +01:00
Pieter De Gendt
9ca1b0ffe7 samples: boards: coresight_stm: pytest: Shorten long lines
Simplify string building and reduce line length.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-03 23:30:00 +00:00
Johan Hedberg
8b02141ca7 Bluetooth: Controller: Replace BT_CTLR with HAS_BT_CTLR
Deprecate BT_CTLR, and add a new HAS_BT_CTLR as a virtual option which
specific users (like BT_LL_SW_SPLIT) select. This also means that we can
remove all places that were forcefully enabling the BT_CTLR option, and
instead we now depend on devicetree to get some local LL HCI driver
enabled which in turn also enables the HAS_BT_CTLR option.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-12-03 10:16:44 +01:00
Neil Chen
3407675479 samples: drivers/dac: Support dac example for NXP frdm_mcxa156
Support dac example for NXP frdm_mcxa156

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-12-03 08:27:08 +01:00