Commit graph

9067 commits

Author SHA1 Message Date
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
Zhaoxiang Jin a3bad67696 samples: drivers/adc: Support adc example for NXP frdm_mcxn947
Support adc example for NXP frdm_mcxn947

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-05-15 17:28:38 +02:00
Karol Lasończyk 64d79ea45c samples: adc: Add overlay for nRF54L15 PDK
New file with ADC configuration for nRF54L15 PDK.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-05-15 15:33:41 +01:00
Piotr Kosycarz 243f114d51 samples: boards: nrf: nrfx_prs: extend regex to test default task
Verifies that at least SPIM is initialized properly.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-05-15 16:07:51 +02:00
Seppo Takalo 01b57b4999 net: lwm2m: Add offset to post-write callback
When Block-Wise transfer restarts, the post-write callback should
receive some indication that the block is actually a beginning of new,
instead of part of previous transfer.

Fixes #71351

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-05-15 14:58:15 +02:00
Sebastian Głąb b3004be0a7 samples: drivers: watchdog: Add overlay files for nrf54l15/cpuflpr
Both nrf54l15pdk/cpuflpr and nrf54l15pdk/cpuflpr_xip have
watchdog on the list of supported periperals.
As a result, Twister tries to build samples/drivers/watchdog
for these two targets.
Since overlays are missing, build is failing.

Add missing overlay files.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-15 14:57:48 +02:00
Sebastian Głąb 7b2e20946d samples: drivers: watchdog: Run sample on nrf54h20
Add overlay that enables selected WDT instance on
nrf54h20 Application core.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-15 14:57:48 +02:00
Francois Ramu 0289105758 samples: drivers: include the stm32 xspi node for running the samples
The stm32 xspi node is another possible multi-spi for connecting
external NOR flash memories.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-15 10:56:04 +02:00
Jukka Rissanen aad76a9416 samples: net: http_server: Add example of passing Content-Type field
Show how to pass Content-Type header field to client.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-14 20:22:58 -04:00
Johann Fischer 859cc2f1fe samples: usb: add HID keyboard sample
Add HID keyboard sample for the new experimental USB device support.
This is a limited and not fully compliant HID keyboard implementation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-14 18:24:45 -04:00
Johann Fischer fce6b20f61 samples: hid-mouse: add support for the new HID implementation
Add support for the new HID implementation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-14 18:24:45 -04:00
Declan Snyder 595ee908ba samples: dac: Enable RW612 DAC
Enable RW612 RD board for the DAC sample

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Declan Snyder 14ef7d2d21 tests: adc: Test RW612 ADC
Enable RW612 RD board to test ADC

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-14 18:23:22 -04:00
Daniel DeGrasse 33f90e1eab samples: drivers: memc: support PSRAM on RW612 while using XIP mode
RW612 has one FLEXSPI controller, which is capable of supporting
multiple external devices on one board. However, care must be taken when
configuring the FLEXSPI to use multiple devices, as if the FLEXSPI is
configured incorrectly in XIP mode it will fail to read from the
external flash, and the chip will crash.

Make the following changes to the RW configuration for the MEMC sample,
in order to support executing from flash while accessing PSRAM:
- initialize the FLEXSPI MEMC driver first, before the flash or PSRAM
  drivers are initialized
- force the FLEXSPI MEMC driver to reconfigure the FLEXSPI at boot, so
  we can configure the DQS sampling mode for the PSRAM on port B
- only configure the PSRAM pins during FLEXSPI init, so XIP is not
  disrupted
- configure the flash device at boot. This is required so that the MEMC
  driver will not replace the LUTs programmed in the FLEXSPI by the
  bootrom, as it would otherwise not be aware of their existence.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-14 18:21:57 -04:00
Johan Hedberg 18c23daee3 Bluetooth: Kconfig: Merge BT_HCI_VS_EXT into BT_HCI_VS
The naming of these two options was problematic, since it's both of them
are about vendor extensions, even though one has _EXT in the name and
the other doesn't. Just merge one option into the other. This has a
slight overhead on the controller side of enabling some more vendor
features if BT_HCI_VS is enabled, but that should hopefully be
acceptable.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-05-14 18:21:11 -04:00
Dominik Ermel 6c2e661da0 samples/littlefs: Fix rcar boards selecting Flash API
The rcar boards use block variant of LittleFS and Disk Access API,
but have been using proj.conf for Flash API based access.
The commit adds section building boards with pro_blk.conf
into sample.yaml, where rcar boards will now be allowed,
and removes redundant configuration lines from board specific
conf files.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-05-14 16:54:55 +02:00
Sebastian Głąb 3a711143f4 samples: subsys: settings: Run sample on nrf54h20
Add Kconfig file that makes the sample working
on nrf54h20 Application core.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-14 15:52:42 +02:00
Sebastian Głąb f84e082f73 samples: sensor: qdec: Run sample on nrf54h20
Add overlay file that enables sample on nrf54h20 Application core.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-14 13:25:27 +02:00
Jamie McCrae 92145a22d3 samples: drivers: led_strip: Remove length Kconfig
The chain-length DTS property is now mandatory, so remove the
optional Kconfig for setting the length

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae 8ca399919b boards: Add chain length and colour mapping to LED strips
Adds chain length and colour mapping properties to LED strip devices
on boards where these parameters are now required

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jordan Yates 23ca74b756 convert: use k_uptime_seconds
Replace usage of `k_uptime_get() / MSEC_PER_SEC` and
`k_uptime_get() / 1000` with dedicated function.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-14 09:32:01 +02:00
Jukka Rissanen fb1ec14938 samples: net: http_server: Close websocket connection properly
Use the websocket_unregister() to close both sockets related
to a connected websocket.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-14 09:31:37 +02:00
Gerard Marull-Paretas 0630c5cfb5 samples: sysbuild: add hello world for multiple board targets
Add a new "hello world" sample that can be built for multiple board
targets. This sample can be used to see if Zephyr boots successfully
with _minimal_ configuration on SoCs with multiple cores, or boards with
multiple SoCs.

The following configurations are provided for now:

- nRF5340 DK: cpuapp+cpunet
- nRF54H20 DK: cpuapp+cpurad, cpuapp+cpuppr, cpuapp+cpuppr(xip)

Note that because of a quoting bug somewhere in the build system,
SB_CONFIG_REMOTE_BOARD is specified in .conf files (see the sysbuild/
directory). This should be fixed in the near future.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-13 16:09:01 -04:00
Gerard Marull-Paretas 8120bd7519 samples: move with_mcuboot sample to samples/sysbuild
This creates a new category of samples that demonstrate certain features
of sysbuild. "application development" was a very generic name.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-13 16:09:01 -04:00
Henrik Brix Andersen 423f18c4dd samples: modules: canopennode: make sample configurations depend on nvs
Make two of the CANopenNode sample configurations depend on "nvs" instead
of trying to establish a local rule for which boards have the needed
functionality.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-05-13 09:50:37 -05:00
Pieter De Gendt db1a4a61be samples: net: sockets: coap_server: Support CMAKE_LINKER_GENERATOR
Add support for the CMake linker generator.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-05-13 09:46:44 +02:00
Reto Schneider dc4bd6fc75 samples: drivers: crypto: Align error message
'But got:' should be vertically aligned with the message 'Was waiting
for:'.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-05-12 11:01:33 -04:00
Glenn Andrews 69fa94f761 Samples: SMF: Add sample for SMF framework
This PR adds a sample demonstrating the use of the
State Machine Framework (SMF)

Instructions are in the README.rst for the sample.

Miro Samek was contacted and gave approval to use the state
diagram in this demo.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-05-10 18:13:08 -04:00
Robert Lubos 7b55805a3e doc: net: Add HTTP server documentation
Add documentation page for HTTP server functionality.
Rename existing HTTP documentation to HTTP client, as it only covers the
client library.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-10 14:43:38 -05:00
Johan Hedberg 28bdcbd3c5 Bluetooth: samples: hci_uart_async: Use existing H4 defines
Use existing H4 defines from hci_types.h instead of redefining them.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-05-10 14:37:57 -05:00
Vinayak Kariappa Chettimada 2c6306d099 Bluetooth: Controller: BT_CTLR_ISO_TX_BUFFER_SIZE from BT_ISO_TX_MTU
Derive BT_CTLR_ISO_TX_BUFFER_SIZE from BT_ISO_TX_MTU to have
optimal Controller memory allocations.
BT_CTLR_ISO_TX_BUFFER_SIZE can be set lower than
BT_ISO_TX_MTU in which case upper layer can send fragmented
SDU to the Controller.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-05-10 15:02:10 +02:00
Dinesh Kumar K 5e60656aeb samples: sensor: Modified Readme for grow_r502a
Modified readme for grow_r502a sample w.r.t
latest changes on driver like attributes and
LED controlling via zephyr LED subsystem APIs.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K 7ae0158e35 drivers: sensor: grow_r502a: add set/read system parameter
Add functionality for read and set system
parameter of sensor device.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K 3c8bd0bc2b drivers: sensor: grow_r502a: add built-in LED control
Add LED control attribute for sensor device's
built-in LED using zephyr's led driver APIs.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00