Commit graph

10700 commits

Author SHA1 Message Date
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
Dinesh Kumar K
e57c6f9d2b drivers: sensor: grow_r502a: move enroll, search, delete to application
Removed fps_enroll, fps_search and fps_delete from
driver code, since they did application usage inside
driver. add the following attributes to achieve the
above functionality from application.
1. SENSOR_ATTR_R502A_CAPTURE
2. SENSOR_ATTR_R502A_TEMPLATE_CREATE
3. SENSOR_ATTR_R502A_RECORD_ADD
4. SENSOR_ATTR_R502A_RECORD_LOAD
5. SENSOR_ATTR_R502A_COMPARE

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Valerio Setti
f539b661d6 mbedtls: add specific Kconfig option for MBEDTLS_USE_PSA_CRYPTO
MBEDTLS_PSA_CRYPTO_C and MBEDTLS_USE_PSA_CRYPTO are 2 different
things and the former should not automatically enable the
latter. The reson is that the user might want the MbedTLS
PSA crypto toolbox to be built, but at the same time he/she
does not want TLS/DTLS (and other intermediate modules such
as PK, MD and Cipher) to use PSA APIs.

For this reason this commit introduces a new Kconfig option
named CONFIG_MBEDTLS_USE_PSA_CRYPTO to enable the corresponding
build symbol. By default USE_PSA_CRYPTO is disabled. It is
only explicilty enabled in tests/samples that were previously
setting CRYPTO_C (since in those cases USE_PSA was set).

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-05-09 10:27:30 +02:00
Jukka Rissanen
c9aac6efeb samples: net: http_server: Add websocket support
Add code for creating a websocket support to the http_server.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-08 15:02:16 -05:00
Benjamin Cabé
b0605b6a7d samples: fix bad SPDX-License-Identifier header
fix typo in SPDX header

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-05-08 09:23:16 -04:00
Nicolas Goualard
e7113700b9 boards: Round Display for Xiao
Added the Round Display for Xiao boards as a shield.
Added a xiao_adc node to Xiao board dtsi files.

Signed-off-by: Nicolas Goualard <nicolas.goualard@sfr.fr>
2024-05-07 17:57:23 -04:00
Sylvio Alves
427919ee7e samples: wifi: use soc conf and overlay for espressif boards
Currently wifi sample code contains a pair of .conf and .overlay
for every single esp32-based board. Files are usually identical.
This PR remove all esp32* board files and use common socs instead.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-05-07 15:12:33 -05:00
Daniel DeGrasse
ce3c28bae0 samples: drivers: memc: add support for RW612 BGA board
Since the RW612 BGA board's FlexSPI configuration prevents the board
from executing from flash while the PSRAM is configured (unless both are
configured by a bootloader prior to XIP), run the MEMC sample from
internal code SRAM, and write data to the external PSRAM block via the
FlexSPI.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-07 15:06:25 -05:00
Rafał Kuźnia
b1de9a6c46 samples: drivers: jesd216: add nRF54H20 overlay
Configure the sample for nRF54H20 CPUAPP.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-05-07 09:52:53 +01:00
Fin Maaß
571ad19b0d mgmt: hawkbit: change the tls certificate tag
Be able to change the tls certicicate tag.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-06 22:50:44 +01:00
Jukka Rissanen
b26b0e7d10 samples: net: echo-server: Prefer public IPv6 addresses
As a server it makes sense to prefer public IPv6 addresses
so mark the socket so.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 22:50:18 +01:00
Jukka Rissanen
fb16600689 samples: net: echo-client: Avoid flooding output
Do not print progress report so that makes debugging things
a lot harder. It is still possible to enable printouts if needed
by setting PRINT_PROGRESS symbol.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 22:50:18 +01:00
Jukka Rissanen
3046e95d85 samples: net: echo-client: Check IPv6 address deprecation
If the IPv6 address that our socket is bound to deprecates, then
re-create the socket so that we avoid using deprecated IPv6 address.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 22:50:18 +01:00
Jukka Rissanen
e2792c6509 samples: net: echo-client: Prefer temporary IPv6 addresses
As a client it makes sense to prefer temporary IPv6 addresses
so mark the socket so.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-06 22:50:18 +01:00
Brandon Allen
5e0a21c54c samples: Bluetooth: broadcast_audio_sink: rm nrf52820 from sample.yaml
nrf52833dk/nrf52820 does not compile so remove it from platform_allow list

Signed-off-by: Brandon Allen <bwallen1997@outlook.com>
2024-05-06 14:59:52 +01:00
Tomasz Moń
2f24adbe0f usb: device: Do not claim to be USB 3.2 device
The bcdUSB value 0x0210 defined in USB 3.2 Specification indicates USB
3.2 device operating in one of the USB 2.0 modes. USB 2.0 Link Power
Management Addendum defines bcdUSB value 0x0201 to indicate that USB 2.0
device supports the request to read the BOS Descriptor.

The main difference between bcdUSB 0x0210 and 0x0201 is that the USB 3.2
device must support LPM, while USB 2.0 devices can (but are not required
to) support LPM.

The difference is respected by USB 3 Gen X Command Verifier (2.3.0.0)
Chapter 9 Tests [USB 2 devices], where the test behaves as follows:
  * For bcdUSB 0x0200:
      Checking Device Under Test for LPM L1 Compatibility...
      USB version of device is 2.00.
      DUT is NOT compatible with LPM.
      LPM is NOT required for DUT
      LPM is only supported in USB version 2.01 and above.

  * For bcdUSB 0x0201:
      Checking Device Under Test for LPM L1 Compatibility...
      USB version of device is 2.01.
      DUT IS compatible with LPM.
      LPM is NOT required for DUT
      USB 2.0 Extension Descriptor bmAttributes:
        LPM Capable = 0
        BESL and Alternate HIRD Supported = 0
        Baseline BESL Valid = 0
        Deep BESL Valid = 0
        Baseline BESL: 0d
        Deep BESL:  0d
      LPM is not supported

  * For bcdUSB 0x0210:
      Checking Device Under Test for LPM L1 Compatibility...
      USB version of device is 2.10.
      DUT IS compatible with LPM.
      LPM IS required for DUT
      USB 2.0 Extension Descriptor bmAttributes:
        LPM Capable = 0
        BESL and Alternate HIRD Supported = 0
        Baseline BESL Valid = 0
        Deep BESL Valid = 0
        Baseline BESL: 0d
        Deep BESL:  0d
      (USB: 9.6.2.1.6) Bit 1 in Attributes field of a USB 2.0 Extension
      descriptor returned in response to a GetDescriptor(BOS) request
      must be 1 for LS/FS/HS devices that support LPM L1.

The test fails when LPM bit is not set in USB 2.0 Extension Descriptor
only when bcdUSB is 0x0210. The test failure was incorrectly fixed in
commit 312429be3c ("usb: samples: Add Extension descriptor to webUSB
sample."). Properly fix the issue by changing bcdUSB to 0x0201 and
removing the false LPM support claim.

The false LPM claim was leading to device ceasing to work after some
time if there was no traffic from host to device (when the host is
likely to have executed the LPM L1 transition that was not properly
handled by the device).

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-06 14:54:23 +01:00
Fabio Baltieri
06236ba883 drivers: ht16k33: convert from kscan to input
Convert the ht16k33 to use the input subsystem. This can still be used
with the kscan API with the zephyr,kscan-input driver, or use the
input-keymap one to generate input codes instead.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-05-06 14:53:36 +01:00
TOKITA Hiroshi
eef3e85c09 samples: drivers: display: Fix drawing on non-x8 height VTILED display
VTILED displays with a height other than x8 fail to draw bottom-row
tiles.  This is because it extends beyond the display area.

I fixed the drawing area to be cropped to fit within the display.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-05-06 14:53:27 +01:00