Commit graph

9378 commits

Author SHA1 Message Date
Alberto Escolar Piedras
b32e57391b samples/net: Move from native_posix to native_sim
For several samples that today have native_sim
enabled, enable them also for native_sim.

And set native_sim as default integration_platform
instead of native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras
eae281bb33 samples sntp_client: Move from native_posix to native_sim
* In the sample doc, replace native_posix references with native_sim
* Enable native_sim in the sample yaml

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras
1d6cfc0543 samples coap_server: Move from native_posix to native_sim
* In the sample doc, replace native_posix references with native_sim
* Enable native_sim in the sample yaml, and switch
  integration_platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras
3e4b393909 samples coap_server: Move from native_posix to native_sim
* In the sample doc, replace native_posix references with native_sim
* Provide overlays for native_sim
* Enable native_sim in the sample yaml
* Remove native_posix from the sample yaml platform_allow as it was
  filtered out by the host libC

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras
2cadcb3df4 samples/net/mqtt_sn_publisher: Move from native_posix to native_sim
* In the sample doc, replace native_posix references with native_sim
* Provide overlays for native_sim
* Enable native_sim in the test yaml

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras
01ae8079e5 samples/net/gptp: Move from native_posix to native_sim
* In the sample doc and shell script,
  replace native_posix references with native_sim
* Provide overlays for native_sim(_64)
* Enable native_sim in the test yaml

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras
d0f554dd6a docs: networing: Replace references to native_posix w native_sim
Let's replace the references to native_posix with native_sim.

Background: during this release native_sim is replacing
native_posix as the main host test/development platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras
e44c43cc2c docs: Networking with native_posix: Rename
Rename
Networking with native_posix
to
Networking with native_sim
replace all links to this page accordingly
and replace its references to native_posix with native_sim.

Background: during this release native_sim is replacing
native_posix as the main host test/development platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras
f4a63aa7ae samples/net/tftp_client: Move from native_posix to native_sim
* In the sample doc, replace native_posix references with native_sim
* Provide an overlay for native_sim
* Enable native_sim in the test yaml

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Alberto Escolar Piedras
51ce9c583c samples/net/lwm2m_client: Move from native_posix to native_sim
* In the sample doc, replace native_posix references with native_sim
* Provide an overlay for native_sim
* Enable native_sim in the test yaml

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-15 10:03:17 +01:00
Mariusz Skamra
ba61420504 Bluetooth: audio: ascs: Retry ASE state notifications on error
This adds retry logic for ASE state notifications if failed due to
insufficient number of buffers to send ATT PDU. The state transition is
retried after connection interval delay.

Fixes: #64574
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-11-15 10:03:07 +01:00
Krzysztof Chruściński
6022a413d6 samples: drivers: uart: native_tty: Add dependency to UART runtime conf
Force enabling of the UART runtime configuration in the sample.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-11-15 10:02:18 +01:00
Alberto Escolar Piedras
b4d0791d1a services/tracing doc & samples: Replace native_posix w native_sim
In the docs replace the references to native_posix with native_sim.
In the sample, add overlays for native_sim, and add native_sim to filter
and as default integration platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Alberto Escolar Piedras
6e2deeebbc samples/modules/chre: Switch from native_posix to native_sim
In the docs replace the references to native_posix with native_sim.
And switch the default test platform to native_sim from native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Alberto Escolar Piedras
32000aafa1 samples/modules/lvgl: Switch from native_posix to native_sim
In the docs replace the references to native_posix with native_sim.
And switch the default test platform to native_sim from native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Alberto Escolar Piedras
374ecf706d samples drivers eeprom: Switch from native_posix to native_sim
In the docs replace the references to native_posix with native_sim.
Enable this test in natives_sim.
And switch the default test platform to native_sim from native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Alberto Escolar Piedras
388f82f6b3 samples/basic: Switch from native_posix to native_sim
In the docs replace the references to native_posix with native_sim.
And switch the default test platform to native_sim from native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Alberto Escolar Piedras
d800634515 samples sensing: Switch from native_posix to native_sim
In the docs replace the references to native_posix with native_sim.
And switch the overlays and default test platform to native_sim
from native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Alberto Escolar Piedras
bf02cbc51f samples display: Switch from native_posix to native_sim
In the docs replace the references to native_posix with native_sim
Enable native_sim in the tests, and replace native_posix as integration
platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Alberto Escolar Piedras
2777461858 samples kernel: Replace references to native_posix w native_sim
Let's replace the references to native_posix with native_sim in
the documentation, and enable this tests by default in
native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Alberto Escolar Piedras
fd281f5ea2 samples native_tty docs: Replace references to native_posix w native_sim
Let's replace the references to native_posix with native_sim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 13:06:01 +01:00
Andrei Emeltchenko
a3ff8d5b90 tests: samples: Add up_squared_pro_7000 overlay
Add up_squared_pro_7000 overlay for watchdog test and sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-11-14 09:23:18 +01:00
Daniel DeGrasse
d6d3f9f16a boards: shields: add support for low power on G1120B0MIPI using RT595
Add support for low power mode on the G1120B0MIPI using the RT595. This
configuration is tested via a testcase in samples/drivers/display, which
should validate that the display can be driven by the RT595 when
CONFIG_PM and CONFIG_PM_DEVICE are set.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-14 09:22:59 +01:00
Lars Knudsen
78714b193a samples: Add USB Audio to broadcast audio source
Adds support for using a connected host to
broadcast audio via USB Audio.

Offload LC3 encoding to separate thread.

Signed-off-by: Lars Knudsen <LAKD@demant.com>
2023-11-14 09:22:28 +01:00
Benjamin Cabé
fc4967e71f samples: lz4: reduce malloc arena size
PR #63332 introduced a change to the LZ4 sample that set the malloc
arena to an unnecessarily large size.
After testing on native_posix, qemu_m3, and esp32s3_devkitm_appcpu, it
would appear 24K is a much more reasonable (and sufficient) size.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-14 09:04:11 +01:00
Alberto Escolar Piedras
d427169845 docs: bluetooth: Replace reference to native_posix w native_sim
Let's replace the references to native_posix with native_sim,

Background: during this release native_sim is replacing
native_posix as the main host test/development platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 09:52:34 +02:00
Alberto Escolar Piedras
49bccb5839 samples/bluetooth/tmap*: Enable in native_sim
Let's enable these samples in the native_sim target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 09:52:34 +02:00
Alberto Escolar Piedras
e444f49540 samples/bluetooth/hap_ha: Enable in native_sim
Enable this test in the native_sim target

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 09:52:34 +02:00
Charles Dias
c9e6ac54d6 samples: maxim_ds3231: increase variable size in min_alarm_handler
Change the variable name from **us** to **ms** and increase its size
to **uint16_t** within the min_alarm_handler function. This update
allows the function to correctly handle the millisecond values in the
range of 0 to 999.

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2023-11-13 12:19:17 -05:00
Jeppe Odgaard
171dbd0435 samples: sensors: add generic co2 sensor polling
Add polling sample for any CO2 sensor.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-11-13 12:14:08 -05:00
Maxin John
461cc8c136 samples: sensor: dht: add longan_nano overlay
Add an overlay to use DHT11 temperature/humidity sensor in Longan Nano.

Signed-off-by: Maxin John <maxin.john@gmail.com>
2023-11-13 12:13:12 -05:00
Armando Visconti
6dd2336a50 sample: board: sensortile_box_pro: extend with lps22df
Extend sensor sample reading also lps22df data.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-13 16:08:46 +00:00
Dominik Kilian
23254f2a16 samples: ipc: Modify icmsg_me sample allowing any multiendpoint backend
There are more ipc_service backends that supports multiple endpoint.
This sample can be used for any of those backends, so this commits
makes the sample more generic. The default backend it still icmsg_me,
but now, the sample has files and instructions for icmsg_with_buf
backend.

Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
2023-11-13 11:11:43 +01:00
Marcin Niestroj
498888d764 samples: sockets: echo_client: assume connected without connmgr
When connection manager (CONFIG_NET_CONNECTION_MANAGER) is disabled,
application starts right away. Scenario that it covers is when static
networking is used, like with emulators (QEMU, Native Sim, ...).

Since 'connected' flag was not set in such scenario, the internal loop
inside start_client() has ended up early and stop_udp_and_tcp() was called
quickly after starting TCP and UDP clients.

Set 'connected = true', when connection manager is disabled, so that it is
assumed that connection is working for the whole duration of the
echo-client sample.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-11-13 09:52:12 +01:00
Dat Nguyen Duy
18a0660be0 samples/tests: skip samples/tests disable MPU for s32ze series
On SoC series s32ze, Zephyr application cannot run with MPU
disabled, skipping relevant samples/tests

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-11-13 09:48:43 +01:00
Daniel Istvan Nemeth
e5dbb26c72 samples: drivers: led_ws2812: nRF5340DK support
New config files to support nrf5340-based boards

Signed-off-by: Daniel Istvan Nemeth <nemeth.daniel.istvan@hallgato.ppke.hu>
2023-11-13 09:45:49 +01:00
Declan Snyder
31eb944fcd samples: boards: mimxrt11xx_cm7: Magic addr sample
Add magic address sample to show how to use flexram
magic address using memc flexram driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-13 09:42:28 +01:00
Yuval Peress
94dc05b3f2 sensors: Add streaming APIs
Introduce a streaming API that uses the same data path as the async API.

This includes features to the decoder:
* Checking if triggers are present

Adding streaming features built ontop of existing triggers:
* Adding 3 operations to be done on a trigger
  * include - include the data with the trigger information
  * nop - do nothing
  * drop - drop the data (flush)
* Add a new sensor_stream() API to mirror sensor_read() but add an
optional handler to be able to cancel the stream.

Signed-off-by: Yuval Peress <peress@google.com>
topic#sensor_stream
2023-11-10 12:16:46 -06:00
Pieter De Gendt
1f63c32c03 samples: net: sockets: Add CoAP service example
Replaced the CoAP server example with CoAP services.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-09 11:21:42 +01:00
Manuel Argüelles
db0ec23ba4 tests: samples: watchdog: add s32z270dc2_r52 rev.D
Twister treats board revisions as separate boards, so s32z270dc2_r52
revision D must be added to the filters.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-09 10:20:27 +00:00
Emil Obalski
f93243b68f ipc: Remove nocopy feature from icmsg_me backend
Remove nocopy feature from icmsg_me backend.
The backend is not meant to be used to send big
data chunks thus no-copy feature is removed.
If one wants to use no-copy it is recommended
to use icmsg_me only for control messages while
allocator will shall be written seperately.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2023-11-09 10:18:37 +00:00
Aleksandr Khromykh
7a32e1d84b samples: Bluetooth: Mesh: add main stack for mesh provisioner
The current main stack size is not enough for any platform.
This commit stack size was checked for nrf52840 and nrf5340.
Everything works.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-11-08 15:09:50 +00:00
Aleksandr Khromykh
c5ee143d77 Bluetooth: Mesh: no more tinycrypt in ble mesh tfm image
PR allows to get rid of tinycrypt objects from
the final binary of the ble mesh apps based on
PSA TFM crypto.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-11-08 15:09:50 +00:00
Nazar Palamar
4fd732a738 drivers: wifi: added Infineon AIROC WIFI driver
Added initial version of Infineon AIROC WIFI  driver

Added initial version of binding file for Infineon AIROC WIFI
driver

Rename CONFIG_ABSTRACTION_RTOS_COMPONENT_ZEPHYR to
CONFIG_USE_INFINEON_ABSTRACTION_RTOS

Exclude cy8cproto_062_4343w platform from
drivers.modem.esp_at.build test

Change revision hal_infineon to
69c883d3bd9fac8a18dd8384624b8c472a68d06f

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-11-08 15:07:37 +00:00
Murali Karicheri
2c5f5bfd0a samples: fs: fat_fs: support on stm32h747i-disco board
This patch allow demonstrating fat_fs sample application on
stm32h747i-disco  board with SD card.

Build fs_sample using following command

west build -p always -b stm32h747i_disco_m7 \
	samples/subsys/fs/fs_sample

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2023-11-08 10:08:19 +01:00
Tom Burdick
79c9f17320 samples: llext shell_loader reduced size
Reduce the heap and stack sizes needed for the shell loader sample app
so more devices may try it out.

Tried on a mimxrt1010_evk and noted the total ram usage was
approximately 44000 bytes. Prior to this change the mimxrt1010_evk was
unable to run the sample as the bss section overflowed the ram size.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-11-08 10:07:50 +01:00
Guillaume Gautier
2caf720c51 samples: board: stm32 pm: add adc power management sample
Add a sample for STM32 ADC power management

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-11-08 10:06:32 +01:00
Murali Karicheri
ec031029f4 samples: fs: littlefs: sdmmc: remove fstab and fixed partition
For littleFS, the fstab entries in DTS are ignored currently.
So remove the overlay entries for the same. Also fixed-partitions
can't be used for sdmmc-disk. So remove the same. We just need to
have sdmmc node with zephyr,sdmmc-disk compatible string to have
littleFS working on disk.

build littleFS sample as follows:-

west build -p always -b stm32h747i_disco_m7 \
samples/subsys/fs/littlefs/ -- \
-DOVERLAY_CONFIG=boards/stm32h747i_disco_m7.conf \
-DCONF_FILE=prj_blk.conf

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2023-11-07 14:11:06 +01:00
Seppo Takalo
0a104185fe tests: lwm2m: Add Qemu X86 and fix Qemu Cortex-M3
* Add support for running interoperability tests with
  Qemu X86.
* Remove some debugging messages to allow binary to
  fix Qemu Cortex-M3 board.
* Tune buffer and stack sizes to fit all boards.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-11-07 09:47:00 +01:00
Alberto Escolar Piedras
3dce4c7ba3 samples/net/cloud/aws_iot_mqtt: Fix sample yaml
The sample yaml filter syntax was incorrect.
Fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 16:06:36 +01:00
Alberto Escolar Piedras
b3447ec068 tests bsim: Add simple tests for broadcast audio source/sink samples
Add an initial test based on the broadcast audio source/sink samples
which runs them together and after waiting for a predefined
amount of time, checks how many audio packets has the
sink received, and if over a threshold, passes the test.

This test can be expanded after to cover more functionality from
these samples.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 15:17:15 +01:00
Alberto Escolar Piedras
11fddf4a41 Bluetooth samples: broadcast audio: Improve documentation
With examples of how to build for several boards.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 15:17:15 +01:00
Alberto Escolar Piedras
c929ac5c23 Bluetooth samples: broadcast audio: Add support for more nrf targets
Add support for the simulated nrf5340 and nrf52 in these samples,
as well as explicit overlays for the nrf5340dk.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 15:17:15 +01:00
Alberto Escolar Piedras
1aa6f85252 Bluetooth samples: broadcast audio sink: Fix overlay for nrf52
Fix controller configuration overlay used when
building the controller (for nrf52 targets),
so the sample can connect to the source and get
audio through.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 15:17:15 +01:00
Alberto Escolar Piedras
c9f09b1d66 Bluetooth samples: broadcast audio: Add more test Kconfig options
Instead of handling some of the configuation thru
board overlays let's handle it thru the sample Kconfig
file, which reduces the amount of duplicate lines.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 15:17:15 +01:00
Alberto Escolar Piedras
631a6a765a Bluetooth samples: broadcast audio source: Add sysbuild support
So that for both the simulated nrf5340 and real HW nrf5340dk
we build both network and application core images.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 15:17:15 +01:00
Alberto Escolar Piedras
c4628a795f Bluetooth samples: broadcast audio sink: Add sysbuild support
So that for both the simulated nrf5340 and real HW nrf5340dk
we build both network and application core images.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 15:17:15 +01:00
Francois Ramu
0dcaa4c668 boards: arm: stm32f746 with all mpu regions when testing in userspace
Disable the  quadspi mpu region of the nucleo_f746zg
when testing the samples/userspace/shared_mem
or tests/kernel/mem_protect/userspace
The stm32f7 cortex M7 has 8 MPU regions and the one for quadspi prevents
the testcase to PASS.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-11-06 12:32:08 +01:00
Alberto Escolar Piedras
c914c512a0 samples/tests: Remove REQUIRES_FULL_LIBC=y due to LIBLC3
As now this is handled by the LIBLC3 kconfig

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 10:10:27 +01:00
Francois Ramu
6b87eedee0 samples: drivers: jesd216 reading jedec IDs from stm32 boards
Add the stm32-ospi-nor or  stm32-qspi-nor compatible to run the sample
on stm32 boards without jedec,spi-nor compatible.
No more config file needed to get the jedec ID and SFDP info from the
external quad- or octo-SPI flash of the stm32 disco boards.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-11-03 11:46:58 +01:00
Anas Nashif
1a9de05767 syscall: rename Z_SYSCALL_DRIVER_ -> K_SYSCALL_DRIVER_
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif
9c4d881183 syscall: rename Z_SYSCALL_ to K_SYSCALL_
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif
9c1aeb5fd3 syscall: rename z_user_ to k_usermode_
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif
56fddd805a syscall: rename z_user_from_copy -> k_usermode_from_copy
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif
4e396174ce kernel: move syscall_handler.h to internal include directory
Move the syscall_handler.h header, used internally only to a dedicated
internal folder that should not be used outside of Zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Armando Visconti
22295ee47a sample: board: add SensorTile.box Pro sample for testing sensors
Add sample to test SensorTile.box Pro sensors on board.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-03 11:46:22 +01:00
Murali Karicheri
b235372546 samples: fs: littlefs: add sample on stm32h747i-disco board
This adds the required conf and dts overlays required for the
application on stm32h747i-disco board.

Also moved CONFIG_SDMMC_STM32_HWFC option from prj_blk.conf to
nucleo_h743zi_blk.conf as that is STM specific option.

Build the application as

west build -p always -b stm32h747i_disco_m7 \
samples/subsys/fs/littlefs/ -- \
-DOVERLAY_CONFIG=boards/stm32h747i_disco_m7.conf -DCONF_FILE=prj_blk.conf

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2023-11-03 11:45:47 +01:00
Ali Hozhabri
0584321ba2 samples: bluetooth: hci_usb: Test exclusion for stm32l562e_dk
STM32L562 Discovery kit is not compatible with Bluetooth over USB
application.

Add missing information related to the BLE capability of this board.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2023-11-03 11:45:38 +01:00
Michele Imbriani
bd498178d3 bluetooth: audio: added support for 24kHz frequency to broadcast source
Added option to support 24kHz frequency for broadcast_sample_source
Signed-off-by: Michele Imbriani <mbim@demant.com>
2023-11-03 09:55:35 +01:00
Alberto Escolar Piedras
2ff4ae6a25 Bluetooth samples: unicast audio: Add nrf5340_audio_dk to sysbuild
Add support for the nrf5340_audio_dk to the sysbuild files

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras
1f2ef32ad8 Bluetooth samples: unicast audio: Change integration_target
Change the integration target to something more meaningfull,
i.e. something users are more likely want to try it on,
and therefore in which it is better to do more testing.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras
ff064f6f59 Bluetooth samples: unicast audio: Remove useless test targets
Remove the qemu targets for the controller configuration.
As those do not support the controller, it is just meaningless.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras
942923edaf Bluetooth samples: unicast audio: Provide configuration for native_sim
Provide configuration for native_sim instead of native_posix
and enable it in the samples.yaml
native_posix is being deprecated in favour of native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras
d561548863 Bluetooth samples: unicast audio: Improve documentation
With examples of how to build for several boards

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras
a0ed29409b tests bsim: Add tests for unicast client/server samples
Add a test based on the unicase client/server samples
which runs them together and after waiting for a predefined
amount of time, checks how many audio packets has the
client received, and if over a threshold, passes the test.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras
4368765e3c Bluetooth samples: unicast server: L2CAP configuration workaround
Due to this bug:
https://github.com/zephyrproject-rtos/zephyr/issues/64574
We need to increase the number of L2CAP Tx Buffers
so this sample can be used.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras
2ffe02b2d9 Bluetooth samples: unicast: Fix configuration for nrf5340
Provide a configuration for the sample we can use
by default with the ISO capable hci_rpmsg controller
sample.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras
cbe1025bf9 Bluetooth samples: unicast audio server: Add sysbuild support
So that for both the simulated nrf5340 and real HW nrf5340dk
we build both network and application core images.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras
ea8d18f742 Bluetooth samples: unicast audio client: Add sysbuild support
So that for both the simulated nrf5340 and real HW nrf5340dk
we build both network and application core images.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Alberto Escolar Piedras
979f8ebead Bluetooth samples: unicast audio: Add support for simulated nrf5x
Add support for the simulated nrf5340 and nrf52 in these samples.
And enable building in twister both for these and for the
already supported nrf5340dk.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Anas Nashif
4c21090dcb samples: net: fix twister filter
Use not for negation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-02 13:19:56 -04:00
Daniel DeGrasse
7cbdbaf146 samples: ipc: openamp: fix build for IMXRT11xx
Fix build for IMXRT11xx SOCs. The ARM MPU header was missing for the CM4
board overlays, add the required header so the sample can build.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-02 09:45:29 +01:00
Carles Cufi
9cf07bbdb5 bluetooth: Rename rpmsg HCI driver and sample to ipc
The existing driver and sample:

- drivers/bluetooth/hci/rpmsg
- samples/bluetooth/hci_rpmsg

are no longer correctly named, since they now use the IPC subsystem to
send and receive data. The IPC subsystem can use RPMsg as a transport,
but that is one of several selectable backends.

I initially wanted to deprecated both the BT_RPMSG Kconfig option as
well as the zephyr,bt-hci-rpmsg-ipc chosen node in Devicetree. However,
this proved to be undoable in the case of the Kconfig option. This is
because it's a choice option, and those have special behavior. In
particular, the only practical way to deprecate would've been to keep
the old Kconfig option outside the choice (much like it's done in this
commit) but then also add a 'depends on !BT_RPMSG' on each of the
remaining choice symbols *except* on the new BT_HCI_IPC one. This, however,
only works correctly for .conf files. If a board instead sets the
default BT_HCI_BUS_TYPE in the Kconfig.defconfig file then the Kconfig
tree parsing would fail, because it'd try to set it to a value
(BT_RPMSG) that is no longer part of the choice.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-11-02 08:32:20 +02:00
Henrik Brix Andersen
5d5249d85b drivers: can: unify spelling of CAN Flexible Data-rate abbreviation
Unify spelling of CAN Flexible Data-rate abbreviation to "CAN FD" instead
of "CAN-FD". The former aligns with the CAN in Automation (CiA)
recommendation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-11-01 11:17:17 +00:00
ingram weeks
ad813977c5 doc: README updated for lora driver send sample
README now cross-references the lora receive sample
so that both can be used together more easily.

Signed-off-by: ingram weeks <ingram.weeks@gmail.com>
2023-11-01 11:00:29 +00:00
ingram weeks
74ee677e40 doc: README added to lora driver receive sample
README added to lora driver receive sample.

Signed-off-by: ingram weeks <ingram.weeks@gmail.com>
2023-11-01 11:00:29 +00:00
Alberto Escolar Piedras
f4ee15e939 Bluetooth samples: unicast audio client: Fix build warnings
In 85bb2624bc
init_lc3()'s prototype was changed to return an int,
but the code was not updated to return something !=0
on all errors, or 0 on error.

Fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-31 09:02:07 +01:00
Alberto Escolar Piedras
4d7c8790d7 Bluetooth samples: unicast audio server: Fix codec initialization
The lc3_enable code was refering to a variable that does not exist.
Fix it.

Issue was introduced in 9c47eb924f.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-31 09:02:07 +01:00
Bjarki Arge Andreasen
b6a8424e95 samples: gnss: Add GNSS sample application
This commit adds a sample which configures a GNSS modem
to enable all available systems, registers callbacks to
the GNSS data and satellites callbacks, and prints the
GNSS data and satellites from the callbacks when invoked
using printk.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00
Benedikt Schmidt
6202459d9f samples: fix thread function signatures
Fix thread function signatures to avoid stack corruption on thread exit.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-10-30 12:24:34 +01:00
Ping Wang
f0728ce0aa samples: Bluetooth: Add LC3 to broadcast audio samples
The broadcast audio samples (broadcast_audio_sink
and broadcast_audio_source) are sending mock data,
the apps are improved by using the LC3 module as
the unicast audio samples do.

Signed-off-by: Ping Wang <pinw@demant.com>
2023-10-30 09:27:17 +01:00
Henrik Brix Andersen
49f0c9f221 samples: modules: canopennode: suggest using manifest.project-filter
Suggest users to use "west config manifest.project-filter +canopennode"
instead of "west config manifest.group-filter +optional" in the sample
documentation to avoid pulling in unrelated, optional modules.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-27 13:30:50 -05:00
Andriy Gelman
d0961756a6 drivers: watchdog: Add xmc4xxx support
Adds watchdog support for Infineon xmc4xxx MCUs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-10-27 12:58:07 -05:00
Alberto Escolar Piedras
e75e04d2d2 samples/bluetooth/hci_rpmsg: Allow building for simulated nrf5340
Allow building these samples for the simulted nrf5340 net core.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-27 10:52:10 +02:00
Alberto Escolar Piedras
c6fab4ac77 samples logger multidomain: Add run test for simulated target
Add a runtest for the simulated target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-27 10:51:36 +02:00
Alberto Escolar Piedras
b9023d3885 samples logger multidomain: Add support for nrf5340bsim
Add support for this sample on the simulated nrf5340

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-27 10:51:36 +02:00
Alberto Escolar Piedras
ee7e6d47d1 samples logger multidomain: Convert to sysbuild
Convert this sample application build to sysbuild.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-27 10:51:36 +02:00
Alberto Escolar Piedras
6196acf1d0 samples/drivers/mbox: Add run test for simulated target
Add a runtest for the simulated target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-26 12:32:53 -05:00
Alberto Escolar Piedras
eab2d89f53 samples/drivers/mbox: Convert to sysbuild and add support for nrf5340bsim
Convert this sample application build to sysbuild,
and add support for the nrf5340bsim target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-26 12:32:53 -05:00
Alberto Escolar Piedras
f871bf9a02 samples 802154_rpmsg: Enablel on simulated nrf5340
Enable building this sample on the simulated nrf5340 net
core.
Note that this sample does nothing on its own, as it
requires a companion application core sample to driver it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-26 12:31:08 -05:00
Anas Nashif
51f6c4269b soc: microchip_mec: do not enable PM in soc
PM should not be enabled by default at the soc level. This is an
application decision and not a platform decision whether to enable or
disable PM features.

Enabling PM by default will result in descripencies and test scope and
failures in tests that do not account for PM being enabled.

Fixes #60359

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-26 12:28:18 -05:00
Alberto Escolar Piedras
7f43b00e23 nrf53_bsim doc: Add paragraph about using sysbuild
And a link to an example sample and its sysbuild.cmake file

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-26 17:33:16 +02:00
Alberto Escolar Piedras
13c0657bdc samples: nrf53_sync_rtc: Add run test for simulated target
Add a runtest for the simulated target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-26 17:33:16 +02:00
Alberto Escolar Piedras
4b90dec91f samples: nrf53_sync_rtc: Convert to sysbuild
Convert this sample application build to sysbuild,
and update documentation.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-26 17:33:16 +02:00
Alberto Escolar Piedras
851e5cdbe2 samples: nrf53_sync_rtc: Add support in nrf5340bsim
Add support for this sample in the simulated nrf5340

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-26 17:33:16 +02:00
Erwan Gouriou
88de0d15a6 samples: stm32: pm_ble: Enable DEBUG when run with twister
Make sure DEBUG is enabled if this test is run in CI.

Also re-instantiate CONFIG_PM=y which was abusively removed in a previous
change.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-26 09:49:42 +02:00
Henrik Brix Andersen
7579eadaaf modules: canopennode: make the CANopenNode module optional
Make the CANopenNode module, which provides a CANopen protocol
implementation, optional.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-26 09:48:26 +02:00
Andreas Sandberg
b41853127f samples: usb_c: Rename port1 to port0 for consistency
Aliases, including usbc_port0, start counting from zero. This meant
that the DT alias is inconsistent with the port numbering in the
samples. Change the numbering scheme to start from zero to make this
consistent.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2023-10-25 18:37:53 -07:00
Andreas Sandberg
d36e42c975 usbc: Use a DT alias to identify USB-C port
Samples sometimes need to identify a default USB-C port. Instead of
hard-coding a node label, use the usbc-port0 alias to point to the
correct node.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2023-10-25 18:37:53 -07:00
Alberto Escolar Piedras
adf9e4000f samples ipc static_vrings: Convert to sysbuild
Convert this sample application build to sysbuild.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 17:31:27 +03:00
Alberto Escolar Piedras
19cc0fe099 samples ipc icmsg: Convert to sysbuild
Convert this sample application build to sysbuild.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 17:31:27 +03:00
Alberto Escolar Piedras
433f47ee57 samples ipc icmsg_me: Convert to sysbuild
Convert this sample application build to sysbuild.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 17:31:27 +03:00
Jamie McCrae
f2b3a5ea3a samples: mgmt: mcumgr: smp_svr: Fix start if USB already init
Fixes an issue whereby the application init will stall if USB init
failed if it's already been setup, this is likely due to USB CDC
being enabled in which case the failure can be ignored

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-10-25 10:05:37 +02:00
ingram weeks
6b739a7684 doc: README added to lora send sample
README added to lora send sample

Signed-off-by: ingram weeks <ingram.weeks@gmail.com>
2023-10-25 10:05:17 +02:00
Alberto Escolar Piedras
7159522597 samples posix uname: Fix sample yaml filtering
The sample was at the same time filtered for the whole
posix architecture and had native_posix as its integration platform.
This is selfcontradictory.

In any case, this sample cannot run in native_posix but
can run in native_sim.
So let's fix the filtering.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 09:57:58 +02:00
Sylvio Alves
c179f17836 samples: boards: esp32: add memory-mapped sample code
This sample shows how to use flash_mmap() call to enable custom flash
area to be mapped into data region.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-10-25 09:57:48 +02:00
Keith Packard
1e5c46df3d samples: Switch from NEWLIB_LIBC to REQUIRES_FULL_LIBC
Instead of forcing use of NEWLIB_LIBC, select any available complete C
library implementation. Add CONFIG_REQUIRES_FLOAT_PRINTF and adjust
CONFIG_LIBC_MALLOC_ARENA_SIZE as needed.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-10-25 08:32:06 +02:00
Nikodem Kastelik
c0ff691a3c samples: boards: nrf: nrfx_prs: align to new nrfx_uarte struct member
One of the nrfx_uarte event structure members was renamed,
so the sample code has to be aligned.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2023-10-24 11:13:53 +02:00
Pieter De Gendt
ae26f1ef9d samples: modules: nanopb: Update requirements
Add installation instruction for adding nanopb to the west workspace.
This is required because it is optional and not installed by default.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-10-24 09:05:50 +02:00
Alberto Escolar Piedras
886d6a9f1f samples subsys logger: Exclude some subtests from posix arch
Two substests (userspace and rtt) cannot be run in the posix
architecture.
Today they are filtered by kconfig, which works but spends
time running cmake.
As native_posix is a default test platform it is better
to filter it alltogether by arch, which saves quite a lot
of time.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-24 09:05:29 +02:00
Alberto Escolar Piedras
befc96f22e userspace tests/samples: Exclude in posix arch
These samples & tests cannot be run in this architecture
as it does not support userspace.
Today they are filtered by kconfig, which works but spends
time running cmake.
As native_posix is a default test platform it is better
to filter it alltogether by arch, which saves quite a lot
of time.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-24 09:05:29 +02:00
Fabian Blatz
d72159d288 samples: modules: lvgl: demo: Add widgets entry to README
Adds a short description and build command for the widgets demo to the
README.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-10-24 09:05:12 +02:00
Flavio Ceolin
564adad952 treewide: Add CODE_UNREACHABLE after k_thread_abort(current)
Compiler can't tell that k_thread_abort() won't return and issues a
warning unless we tell it that control never gets this far.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-24 09:04:42 +02:00
Emil Gydesen
7ec0be76ae samples: Bluetooth: Add missing reset of sems in iso_receive
In the iso_receive sample, the semaphores were not reset in
each iteration.

This caused the ISO receiver to act incorrectly and cause
issues with some controllers.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-24 09:04:25 +02:00
Jukka Rissanen
8a4ef3e67a samples: net: sockets: echo: Convert to work both IPv6 and IPv4
The sample enables CONFIG_NET_IPV4_MAPPING_TO_IPV6 and then
turns off IPV6_V6ONLY option which allows it to support both
IPv6 and IPv4 using the same socket.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-10-23 09:57:22 -05:00
Andries Kruithof
8b3b8cf2ad Bluetooth: ISO: extend API for setting SDU interval
The BT Core Spec v5.4 allows separate SDU_Interval to
be set on C_To_P and P_To_C directions,
but this is not possible with the existing interface.

This PR splits the interval parameter in the call to
bt_iso_sig_create into one for C_To_P
and one for P_To_C

It also splits the latency parameter into one for
C_To_P and one for P_To_C

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>

Bluetooth: ISO: update UI for extended API

The API for setting the SDU interval and latency have been updated.
This PR also updates the setting of these by the user in the shell
and the iso_connected_benchmark sample

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-10-23 15:22:10 +02:00
Alberto Escolar Piedras
e1de306854 doc: samples nrf53_sync_rtc: Fix flash command
Fix the west flash command example using the new flash-args
option.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-23 12:54:31 +02:00
Alberto Escolar Piedras
201a48889c doc: samples net mqtt_sn_publisher fix west invokation
Fix the west invokation. "-t" is added automatically
to the run goal, otherwise we get a "-t -t" command.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-23 12:54:31 +02:00
Jamie McCrae
a2b22cbe82 samples: mgmt: mcumgr: smp_svr: Select CRC for SMP over console
CRC support is needed for SMP over console support, therefore
enable it

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-10-23 12:15:41 +02:00
Tomasz Moń
afc034e294 samples: cdc_acm: Throttle RX when ringbuf is full
Prevent infinite loop inside interrupt handler when there is incoming
data available and ring buffer is full.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-10-23 12:04:15 +02:00
Maxin John
acaaa9e2c5 boards: riscv: longan_nano: add adc support
Add ADC support for longan nano.

Tested using samples/drivers/adc. Also added longan_nano.overlay
and updated documentation.

Signed-off-by: Maxin John <maxin.john@gmail.com>
2023-10-20 15:10:20 +02:00
Seppo Takalo
2df58f65ce samples: lwm2m: Add docker test script
Add test script that uses same configuration that the
interoperability test.

This is only checking that unsecure client registers and
responds to a GET query.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-10-20 15:07:34 +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
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
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
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
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
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
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
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
Emil Gydesen
82552b8627 samples: Bluetooth: Add rx stats for BAP Broadcast Sink
Add additional RX stats for the BAP broadcast sink so that a
user can easily follow how well the RX is working, and
for several streams.

This also adds some additional logging to better see
what we are syncing to.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-20 15:00:49 +02:00
Jukka Rissanen
7b40014504 samples: net: Remove eth_native_posix sample app
This application is no longer needed as we have removed
the automatic startup support which was used by this sample.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-10-20 15:00:41 +02:00
Benjamin Cabé
17fad703c5 samples: lvgl: sensor: Add LVGL sample for real-time sensor data chart
This adds a new sample for LVGL that displays a real-time chart for
accelerometer data acquired from &accel0 sensor.

This also adds the appropriate overlays so that the sample can also run
on native POSIX and native sim using emulated BMI160.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-20 15:00:02 +02:00
Seppo Takalo
8ffb64d46f net: lwm2m: Allow configuring update period
Add new configuration value CONFIG_LWM2M_UPDATE_PERIOD
that allows calculating update period from last update,
instead of calculating it from the lifetime.

In runtime, server is allowed to change the lifetime of the
registration which causes update perdiod to be effected.

When fixed update period is preferred, UPDATE_PERIOD
config is then used.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-10-20 14:57:38 +02:00
Emil Gydesen
9c47eb924f Bluetooth: Audio: Refactor codec_cfg_get_frame_duration_us
Refactor the codec_cfg_get_frame_duration function to return the
assigned numbers value, instead of a converted value, but with
support for converting the value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-20 14:56:13 +02:00
Ricardo Rivera-Matos
2107c9109f samples: charger: Creates a generic sample application for chargers
Creates a generic sample application that executes a simple charging
task loop capable of completing a basic charge cycle.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2023-10-20 14:55:22 +02:00
Daniel DeGrasse
96d6d70f13 samples: drivers: memc: get AHB address dynamically
Use MEMC API to extract AHB address from FlexSPI when using it with the
MEMC sample.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-10-20 14:53:10 +02:00
Emil Gydesen
0521ffd5a3 Bluetooth: ISO: Rename BT_ISO_ADVANCED to BT_ISO_TEST_PARAMS
Rename the Kconfig option from BT_ISO_ADVANCED to
BT_ISO_TEST_PARAMS to more explicitly denote that it
enables support for using the ISO test parameters.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-20 14:50:48 +02:00
Andrei Emeltchenko
d2c78faf75 doc: samples: smbus: Add console highlight to code block
Display Zephyr console as 'code-block:: console'.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-10-18 17:58:52 +03:00
Benjamin Cabé
9b8b7b36be doc: samples: edac: add syntax highlight to code blocks
display Zephyr shell snippets as "console" code blocks.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-18 15:51:22 +03:00
Tom Burdick
c678f25bc1 llext: Fix a bug in section linking
When relocating section symbol addresses the value where the
relocation is to be written is an offset into the section to load.

Simply rewriting it with the section address is not enough, we need
to write the address of the section with the offset into it.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-10-13 16:47:02 +01:00
Andries Kruithof
125e65a976 samples: Bluetooth: remove dup pointer in broadcast_audio_sink
In the broadcast_audio_sink sample there are two pointers defined,
both referencing the same address. We reduce this to one pointer

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-10-11 18:29:34 +03:00
Flavio Ceolin
e7bd10ae71 random: Rename random header
rand32.h does not make much sense, since the random subsystem
provides more APIs than just getting a random 32 bits value.

Rename it to random.h and get consistently with other
subsystems.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-10 14:23:50 +03:00
Erwan Gouriou
1a00636895 samples: tfm_regression_test: Provide a working partition for nucleo_l5
This partition is designed to work regression TFM configuration.

Fixes #59794

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-10 11:18:48 +02:00
Tom Burdick
ee588bae7a llext: Update the sample readme with a board
The commands showing west build had -b None which isn't quite right. Add
a :board: property with the tdk_robokit1 as its what I tested on myself.
Also noted that llext isn't supported on every architecture but
intentionally left this a bit vague as updating this little comment
every time something is added seems like a recipe for doc rot.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-10-06 20:53:04 +01:00
Emil Gydesen
8db7be7a6f samples: Bluetooth: Fix seq_num in broadcast audio source
When using multiple streams the seq_num provided to the
controller would be incorrect as we used a single global
seq_num rather than a proper seq_num per stream.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-06 16:18:06 +03:00
Andries Kruithof
e04c963d9c Test: Bluetooth: controller: add CI testing for advertising chaining
Update babblesim tests for testing chaining for advertising to ensure that
we spill over to the next PDU

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-10-06 16:04:11 +03:00
Andries Kruithof
d00d44c925 Bluetooth: controller: fix failing EBQ advertising tests
Updates the chaining for advertising.
Instead of unconditionally adding a new PDU when new data
is added we now instead fill the last PDU in the chain with
the incoming data, only adding a new PDU when there is
not enough room.

This reduces the nr. of PDUs used for advertising, and also
fixes some qualification failures

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-10-06 16:04:11 +03:00
Benjamin Cabé
fc13204937 sensors: mpu6050: samples: fix wrong channel fetch
The MPU6050 does not have SENSOR_CHAN_AMBIENT_TEMP. It should be
SENSOR_CHAN_DIE_TEMP.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-04 10:07:43 +02:00
Benjamin Cabé
d24de87aed samples: tfm: wrap lines at 100 characters.
Run formatter to wrap lines at 100 characters.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-03 17:38:36 +02:00
Benjamin Cabé
496faf8677 samples: tfm: fix 404 link to tfm docs
Fix HTTP 404 in link to "Adding Secure Partition" external doc page.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-03 17:38:36 +02:00
Johann Fischer
9dc12095a0 samples: usb: mass: update build instruction using RAM disk
Follow up on commit f67dd39bb2
("drivers: ramdisk: use devicetree to instantiate RAM disk").
Unfortunately, the additional argument must be passed for the default
build. Using app.overlay would not always help since the sample has few
board-specific overlays.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-10-03 14:41:49 +01:00
Johan Hedberg
dee64613c2 samples: tracing: Reenable the percepio test case
Update to a fixed percepio tree, which allows the build to pass for valid
version numbers with 0 being one of the version number components.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-10-02 16:17:10 +03:00
Johan Hedberg
021003c5c0 samples: tracing: Skip broken percepio test case
The percepio build seems to have a bug and fail whenever the major, minor
or patchlevel numeric value is 0:

Invalid version specified: major: 3, minor: 5, patchlevel: 0

Disable the sample until a proper fix is available.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-10-01 20:29:10 +03:00
Anas Nashif
a3eff88792 samples: tfm: depend on psa-arch-tests
Those samples/tests depend on psa-arch-tests module.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-01 09:21:50 +03:00
Anas Nashif
2ed4cf0fde samples: tflite-micro: depend on module
The sample depends on on the tflite-micro module.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-01 09:21:50 +03:00
Anas Nashif
a0005188ce samples: compression: add dependency on lz4 module
This sample depends on lz4.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-01 09:21:50 +03:00
Tom Burdick
9c366973e4 llext: Shell loader sample
Adds a sample application that can be used for trying out llext
with the shell. The docs cover how to load a hello world ELF
on to the device, assuming its an arm v7 architecture.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-09-29 20:50:38 -04:00
Jukka Rissanen
a59b67c521 samples: net: socket: echo_server: conn mgmt header file missing
The conn_mgr_monitor.h was not included so the compilation
gave warning for missing conn_mgr_ignore_iface() function.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-09-29 18:57:07 +03:00
Emil Gydesen
f5dd62bbec Bluetooth: Audio: Update codec_cfg_get_chan_allocation
Update the function name from codec_cfg_get_chan_allocation_val
to just codec_cfg_get_chan_allocation, and add
codec_cfg_set_chan_allocation.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-29 16:29:58 +02:00
Anisetti Avinash Krishna
0ed8d90444 samples: drivers: misc: Added sample application for timeaware-gpio
Added sample application for timeaware-gpio uasge.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-09-29 16:28:09 +02:00
Juha Heiskanen
647fb4dc8f net: lwm2m: RD client Deregister event indicate
Added a new event for LWM2M_RD_CLIENT_EVENT_DEREGISTER for
indicate LwM2M client dereistartion.

Updated unit test and sample for new event type

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2023-09-29 16:53:55 +03:00
Henrik Lindblom
1f65c9be87 samples: modbus: add user function code example
Demonstrate user function codes with a simple example with a user defined
fc that maps to a function that just increments a counter every time it's
read.

Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
2023-09-29 13:05:42 +02:00
Jeppe Odgaard
a2f1e6222e samples: led_ws2812: adjustable led update delay
Add a Kconfig option to adjust update frequency of the LED strip.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-09-29 12:59:04 +02:00
Robert Lubos
815e7a1e34 samples: net: sockets: socketpair: Replace integration platform
mps2_an385 was excluded from networking tests, therefore can no longer
be used as an integration platform. Replace it with qemu_x86.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-09-28 17:29:00 -04:00
Benjamin Cabé
79674debcb samples: bindesc: doc: Describe sample using zephyr:code-sample
Describe the code sample using zephyr:code-sample directive to help
with making it easier to find from API reference.
Also cross-referenced main bindesc page from the sample.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-28 23:04:47 +03:00
Yonatan Schachter
f4e2a669eb samples: hello_bindesc: Improved README.md
Improved the README.md of the hello_bindesc sample by adding a
note about non existing bin files and referencing the relevant
parts of the documentation.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2023-09-28 23:04:47 +03:00
Daniel Leung
0a50ff366e kernel: rename z_current_get() to k_sched_current_thread_query()
The original idea of z_current_get() was to be the counterpart
of k_current_get() when thread local variable for current has
not been initialized if TLS is enabled, otherwise they are
the same function. Now since z_current_get() is being used
outside of core kernel, rename it under kernel namespace so
other subsystem can conceptually use them too.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-28 16:15:46 +02:00
Emil Gydesen
85bb2624bc Bluetooth: Audio: Refactor codec_cfg_get_freq
Refactor the codec_cfg_get_freq function to return the assigned
numbers value, instead of a converted value, but with
support for converting the value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-28 14:05:18 +02:00
Yonatan Schachter
fd5fe8fe10 samples: bindesc: Add hello_bindesc sample
Add the hello_bindesc sample which shows the basic usage of
binary descriptors.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2023-09-28 07:39:09 -04:00
Vinayak Kariappa Chettimada
28ed48cbac Bluetooth: Controller: Fix connected ISO dynamic tx power
Fix connected ISO dynamic tx power support compilation
error.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-09-28 13:31:40 +02:00
Emil Gydesen
34c9587539 samples: Bluetooth: Add broadcast sink data validation
Add validation of incoming ISO data for the broadcast sink
sample.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-28 13:18:07 +02:00
Aleksander Wasaznik
347ce7aa7f bluetooth: samples: Add hci_uart_async
This sample is an alternative implementation of hci_uart. The new sample
differs from the existing sample in that it uses the async UART API
instead of the interrupt driven API.

Included in this commit is a new test for HCI UART flow control. It's
enabled for hci_uart_async. The test can excercise also the existing
hci_uart sample (with some minimal changes to allow compiling in the
mock controller and test suite). The existing hci_uart sample currently
fails the flow control test.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-09-28 14:07:52 +03:00
Rodrigo Peixoto
94f98b6cf0 samples: zbus: add Message subscriber sample
This sample illustrates how to use message subscribers with ZBus.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-09-27 20:03:43 +03:00
Aaron Massey
12cbfcf397 fuel_gauge: Repl property struct w/ union
Based on review of the similar charger driver API, it's been demonstrated
from the community that embedding a per value property type when fetching
properties. Separating off the property types from the property values
themselves also allow an array of property types to declared as static
const.

Break up fuel_gauge_property struct into a fuel_gauge_prop_val union and a
fuel_gauge_prop_t property type as inputs into fuel gauge API functions.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-27 12:07:59 +02:00
Aaron Massey
329ecd1e12 fuel_gauge: Remove status from fuel gauge properties
Based on review of the similar charger driver API, it's been demonstrated
from the community that embedding a per value status code when fetching
multiple properties isn't particularly wanted or needed. It was largely
considered not worth the additional maintenance to have the extra per
property error information.

Remove the status field from the fuel_gauge property value structs.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-27 12:07:59 +02:00
Aaron Massey
e294b16a2f fuel_gauge: Add fuel_guage_get_props()
The fuel_gauge_get_prop() function prototype declares a function that
retrieves multiple fuel gauge properties at once. The naming suggests it
ought to fetch a singular property at a time. Moreso, some clients may just
want to fetch properties one at a time and may feel uncomfortable using a
prototype for fetching multiple properties when wanting to fetch them one
at a time.

Modify fuel_gauge_get_prop() to fetch a single property and add
fuel_gauge_get_props() to support fetching multiple properties. Modify
existing tests/drivers/samples.

This is part of #61818 work.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-27 12:07:59 +02:00
Sylvio Alves
18eff4ea00 samples: ipc: update esp32 board reference
After esp32 board was split into several different models,
rpmsg sample code was missing the change. Make esp32_devkitc_wrover
the default option.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-09-27 12:07:21 +02:00
Sylvio Alves
41e615c7ac samples: ipc: add esp32s3_devkitm as supported board
Add IPC same code for esp32s3_devkitm enabling second core.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-09-27 12:07:21 +02:00
Fabian Blatz
c7f8033f2b modules: lvgl: simplify sys_heap memory size configs
Changes the Kconfig symbols for the sys_heap based memory management option
and removes the notion of `BLOCKS` with a more concise single
`LV_Z_MEM_POOL_SIZE` option. Also adds `LV_MEM_CUSTOM` to the lv_conf.h,
since in any option the memory management is considered to be custom.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-27 09:54:08 +02:00
Robert Lubos
bcea9f7c92 samples: net: sockets: big_http_download: Align documentation
Update the TLS part of the big_http_download sample to reference the
currently used server used for file download.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-09-27 09:53:58 +02:00
Robert Lubos
36dec835c4 samples: net: sockets: big_http_download: Update root certificate
The download server that the origin server redirects to seems now to
use different certificate (signed by a different root CA). Therefore
add the additional root CA to the certificate list and refactor the
sample code a bit to allow to easily extend/replace certificates in the
future.

Bump the mbed TLS heap size a bit to accommodate the extra registered
certificate.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-09-27 09:53:58 +02:00
Anas Nashif
31c22c9a77 samples: gdbstub: test using pytest
Test gdb stub using pytest.

Co-developed-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-27 09:53:23 +02:00
David Corbeil
d732a8678b logging: runtime setting of syslog server ip address
Added functionality to change the syslog server's
ip address at runtime as well as sample for
syslog network backend

Signed-off-by: David Corbeil <david.corbeil@dynon.com>
2023-09-27 09:13:23 +02:00
Benjamin Cabé
14c92da96d doc: stm32: Update all st.com links to use HTTPS
While recent browsers seem to transparently try to use https for
http://www.st.com/... URLs, they are effectively not working anymore, so use
https://www.st.com/... URLs instead.

curl http://www.st.com/en/evaluation-tools/nucleo-g070rb.html -m 5 -v
*   Trying 104.89.117.48:80...
* Connected to www.st.com (104.89.117.48) port 80 (#0)
> GET /en/evaluation-tools/nucleo-g070rb.html HTTP/1.1
> Host: www.st.com
> User-Agent: curl/8.1.2
> Accept: */*
>
* Operation timed out after 5002 milliseconds with 0 bytes received
* Closing connection 0
curl: (28) Operation timed out after 5002 milliseconds with 0 bytes
received

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-26 16:55:08 +02:00
Iuliana Prodan
8148643881 ipm: imx: send firmware ready reply to check for fw boot completion
Send a fw ready reply message as soon as possible.
This is usually used on host side which is waiting
for this message in order to establish the
communication with the remote processor - see
imx_dsp_rproc driver from Linux.

This can be enabled by IPM_IMX_FW_READY_REPLY config,
which is by default N.

Set CONFIG_IPM_IMX_FW_READY_REPLY as Y for
openamp_rsc_table sample, running on nxp_adsp_imx8m.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-09-26 16:54:04 +02:00
Dominik Ermel
11ab88f10c samples/mcumgr/smp_svr: Build for DirectXIP with revert
Adds sample build for
 CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP_WITH_REVERT=y

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-09-26 13:40:11 +02:00
Benjamin Cabé
2479af21f6 doc: samples: Fix incorrect maxdepth for some toctrees
The table of contents for the samples' catalog was showing too many
levels for some sections.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-26 12:02:54 +02:00
Benjamin Cabé
7a6f251edb doc: samples: tfm: remove extra title
Removed the redundant title heading from this page.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-26 12:02:54 +02:00
Benjamin Cabé
d0f27ac7ed doc: samples: Fix typos introduced by f6a4217a
Fixed typos in references to several doc pages introduced
with f6a4217a.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-26 08:38:42 +02:00
Lucas Dietrich
66b131928b lorawan: Set dev_nonce to 0 during join_cfg initialization
Ensure the LoRaWAN dev nonce is initialized with a known state in the
class_a sample.

Signed-off-by: Lucas Dietrich <lucas.dietrich@socomec.com>
2023-09-26 08:38:05 +02:00
Anas Nashif
a833d20ffb boards: nucleo_g0b1re: add arduino_serial as supported
To make some tests requiring the dependency happy.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-25 18:42:05 -04:00
Anas Nashif
3e2ada7451 tests: tracing: TraceRecorderSource was renamed to percepio
Change module name in dependencies of test.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-25 18:42:05 -04:00
Pavlo Havrylyuk
3a119979d6 samples: userspace: exclude cy8cproto boards from sample
Excluded cy8cproto_062_4343w and cy8cproto_063_ble from
samples/userspace/shared_mem sample due to a hardware
limitation with number of available MPU regions.
Sample throws warning:
`num_parts of 4 exceeds maximum allowable partitions (2)`
With the Cortex M4 on the boards only 2 mpu regions are left
and available to be used with the sample.

Signed-off-by: Pavlo Havrylyuk <pavlo.havrylyuk@infineon.com>
2023-09-25 19:42:13 +02:00
Benjamin Cabé
32dcd2e523 samples: shields: Update Nucleo shields to new code-sample extension
Update all Nucleo shield samples and references to them so that they
use the new zephyr:code-sample extension.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-25 16:43:05 +02:00
Jamie McCrae
c350c65be8 samples: mgmt: mcumgr: smp_svr: Add sysbuild file
Adds a sysbuild file which includes MCUboot, as the sample is
dependent upon it.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-25 12:47:22 +02:00
Nick Ward
ead0c4f865 drivers: adc: use adc_read_dt api
Where struct adc_dt_spec is in use use adc_read_dt().

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-09-25 09:52:16 +02:00
Benjamin Cabé
c702b03abd samples: webusb: Fix HTML validator issues
Running the HTML code through W3C Validator revealed several issues with
the markup that this commit fixes.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-25 09:48:01 +02:00
Andrei Emeltchenko
5942343a81 samples: webusb: Update README
Update webusb README with recent changes after index.html was moved to
sample from the external repository.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-25 09:48:01 +02:00
Andrei Emeltchenko
17fcf58a5e doc: samples: usb: Include only README to TOC
Include only README.rst to docs, skipping helpers included with :doc:
directive.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-25 09:48:01 +02:00
Benjamin Cabé
43c139a5f6 samples: webusb: Include demo.rst to documentation
Include demo.rst to the webusb sample documentation.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-25 09:48:01 +02:00
Andrei Emeltchenko
0aaa5a9ac2 samples: webusb: Copy needed file from the external repository
Copy file index.html from the external repository
finikorg/webusb-sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-25 09:48:01 +02:00
Ryan McClelland
65a15e9299 samples: tflite-micro: update samples for latest tflite-micro
tflite-micro now uses MicroPrintf instead of MicroErrorReporter. Update
the samples to use this function instead. AllOpsResolver is now removed
from tflite-micro. AllOpsResolver was also removed in the latest
tflite-micro. Use MicroMutableOpResolver and only include the kernels
used instead.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-25 09:46:33 +02:00
YuLong Yao
0b1cc77aff samples: sensor: qdec: add esp32s3_luatos_core
add support for esp32s3_luatos_core

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-22 15:58:11 +02:00
YuLong Yao
cf8ac53d0d samples: basic: blinky_pwm: add esp32s3_luatos_core
add support for esp32s3_luatos_core

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-22 15:58:11 +02:00
YuLong Yao
e69616291b samples: drivers: counter: add esp32s3_luatos_core
add support for esp32s3_luatos_core

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-22 15:58:11 +02:00
YuLong Yao
24b35d0ddb samples: drivers: adc: add esp32s3_luatos_core
add support for esp32s3_luatos_core

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-22 15:58:11 +02:00
YuLong Yao
196ce41f63 samples: subsys: settings: add esp32s3_luatos_core
add support for esp32s3_luatos_core

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-22 15:58:11 +02:00
YuLong Yao
3ebb8953e4 samples: net: wifi: support esp32s3_luatos_core
add overlay and conf for esp32s3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-22 15:58:11 +02:00
Fabian Blatz
b94641697f samples/modules: Add LVGL demo sample
Adds a sample which allows to build the LVGL upstream demo applications
(music, benchmark, stress).

Resolves issue #62744.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-22 09:26:29 +02:00
Jaxson Han
5b8df16ef6 samples: arch: smp: pi: fix the stack overflow issue
The stack guard report this testcase has the stack overflow issue. To
fix the issue, slightly increse the stack size.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2023-09-22 09:25:12 +02:00
Emil Gydesen
2147eefa15 Bluetooth: PACS: Remove CONFIG_BT_PACS_{SNK,SRC}_CONTEXT
The Kconfig option was never used by the stack and should
thus be removed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-22 09:21:53 +02:00
Benjamin Cabé
f6a4217a88 doc: driver: samples: Update driver samples to use new Sphinx extension
Migrated existing driver samples to use the new code-sample directive
and role.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-22 09:21:43 +02:00
Benjamin Cabé
336941a1e5 samples: drivers: cleanup led_xec README
The README file for led_xec sample had several formatting issues
causing it to render very poorly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-22 09:21:43 +02:00
Saw Xu
8951bab7e7 samples: subsys: usb: audio: Add volume control case
Add sample code for getting volume to headset sample and
headphone_microphone sample

Signed-off-by: Saw Xu <Saw1993@126.com>
2023-09-21 15:04:14 +02:00
Erwan Gouriou
235319cfaa samples: boards: stm32: power_mgmt: Disable exclusive device PM
Disable exclusive PM run time handling as PM_DEVICE_RUNTIME is not
supported in all drivers.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-09-21 15:04:05 +02:00
Anas Nashif
42d8f7ff17 samples: pm: fix init priority after init level change
Moving from APPLICATION level to POST_KERNEL and keeping both parent and
child on the same level is causing problems, so fix this by putting them
on different priorities in POST_KERNEL.

Also, this sample runs fine in qemu, so make it the integration
platform.

Fixes #62772

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-21 13:59:46 +02:00
Benjamin Cabé
4f1cd0e428 doc: Migrate subsys/ code samples to new Sphinx extension
This migrates the subsys code samples to the new Sphinx code-sample
extension, making it easier to find relevant samples when browsing
API reference.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-21 09:28:31 +02:00
Vinayak Kariappa Chettimada
e8fe144f3a Bluetooth: Controller: Fix missing PHY_CODED cond compile
Fix missing Coded PHY implementation conditional compile
causing compile error when disabling Coded PHY support in
SoCs that have radio that support Coded PHY.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-09-21 09:27:15 +02:00
Pavlo Havrylyuk
166d89c69e tests: drivers: Added overlays to tests for 063_ble
Fixed pinout in adc overlays to align with board
Allowed adc driver sample
Added overlay for gpio_basic_api test support
Added overlay for i2c_api test support

Signed-off-by: Pavlo Havrylyuk <pavlo.havrylyuk@infineon.com>
2023-09-20 20:23:20 +01:00
Emil Gydesen
f93caa3903 Bluetooth: Audio: BT_AUDIO_CODEC_LC3_ID -> BT_HCI_CODING_FORMAT_LC3
Replace the BT_AUDIO_CODEC_LC3_ID macro with the
BT_HCI_CODING_FORMAT_LC3 as there is no reason to
define and use the LC3 ID different than the other
allowed codec IDs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-20 20:19:50 +01:00
Steve Boylan
0341c6cbcf samples: sensor: bme280: Demonstrate RP2040 PIO
Demonstrate use of the Raspberry Pi Pico PIO SPI driver.
Added rpi_pico test cases to sample.yaml

Signed-off-by: Steve Boylan <stephen.boylan@beechwoods.com>
2023-09-20 20:18:54 +01:00
Emil Gydesen
d327b1625c Bluetooth: BAP: Broadcast source reconfig with subgroups
Modify the bt_bap_broadcast_source_reconfig to use the same
parameter struct as bt_bap_broadcast_source_create so that
the two are more similar, since they both set the same values.

This allow for full control of which subgroups and stream
are updated.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-20 20:16:52 +01:00
Anas Nashif
78eda66eb5 samples: synchronization: build this sample on all platforms
Try to catch issues related to platforms and HAL changes using this
basic sample. We have the same flag for a kernel test, but this is
skipped if no kernel changes are present in the PR, so we were missing
some coverage of platform related changes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-20 10:05:14 -04:00
Benjamin Cabé
944f0d4875 samples: net: fix bad gsm-modem code-sample id
The GSM Modem sample is referred to as gsm-modem, not gsm-modem-sample.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-20 11:36:12 +01:00
Benjamin Cabé
d65d3046a5 samples: usb: wpanusb: fix bad code-sample id
The WPAN USB sample is referred to as wpan-usb,
not _wpansub.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-20 11:36:12 +01:00
Benjamin Cabé
a4cabee9d8 samples: net: doc: fix bad code-sample id
The Echo server simple sample is referred to as sockets-echo,
not socket-echo.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-20 11:36:12 +01:00
Pavlo Havrylyuk
dfd3d6e6cb samples: sensor: die_temp_polling: add @ symbol to regex
Added @ symbol for when address of dietemp sensor is printed

Signed-off-by: Pavlo Havrylyuk <pavlo.havrylyuk@infineon.com>
2023-09-19 15:23:52 +01:00
Benjamin Cabé
994558ef8e samples: net: doc: Use new Sphinx extension to document networking samples
Use the new code-sample directive and roles to document the networking
samples so that they show up as "Related samples" when browsing the
various relevant networking APIs.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-19 15:22:59 +01:00
Benjamin Cabé
b0f92e13b9 doc: video: samples: Use new Sphinx extension to document samples
Use the new code-sample directive and roles to document the video
capture samples so that they show up as "Related samples" when browsing
the API documentation.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-19 15:22:37 +01:00
Emil Gydesen
3cb0d7ad6f samples: Bluetooth: TMAP Peripheral fix appearance
Use the defind value, BT_APPEARANCE_WEARABLE_AUDIO_DEVICE_EARBUD,
instead of the hard coded "magic numbers".

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-19 15:21:42 +01:00
Emil Gydesen
88fa4904ab samples: Bluetooth: TMAP peripheral context fixes
The sample did not properly include the source
context in the advertising data.

It also set different contexts for PACS and the advertising data

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-19 15:21:42 +01:00
Johann Fischer
f67dd39bb2 drivers: ramdisk: use devicetree to instantiate RAM disk
Rework RAM disk driver to be configured using devicetree and
support multiple instances.

This patch also removes a copy of the RAM disk driver,
tests/subsys/fs/fat_fs_dual_drive/src/disk_access_test_drv.c,
that was there for testing multiple disk drivers support.

Bonus: one SYS_INIT() less and a memory region can be exported to the
host.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-09-18 17:36:50 +02:00
Flavio Ceolin
efea1ad398 samples: userspace: Remove unnecessary build options
This sample is selecting many things that are not needed,
just remove them.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-18 10:44:04 +01:00
Alberto Escolar Piedras
ff14d64086 samples zbus benchmark: Fix twister filter
For the posix arch, this sample only works for native_posix,
all others will get a build error:
https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/subsys/zbus/benchmark/src/benchmark.c#L20
So let's filter them.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-18 10:43:17 +01:00
Aaron Massey
a7b25d599b fuel_gauge: Join get/set prop structs
The fuel gauge API uses separate get/set property structs to indicate what
properties are readable or writable. This lead to duplication in property
names and potential confusion for new users of the API. See issue #61818.
In addition to above, drivers already determine at runtime if a property is
supported for read or write actions.

Join the get/set fuel gauge property structs as a single struct.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
2023-09-18 10:38:59 +01:00
Manuel Argüelles
c9cc03b6ef samples: tracing: exclude mr_canhubk3 board
The mr_canhubk3 board enables by default an off-chip watchdog that must
be serviced to avoid triggering a reset and cannot be disabled on a
per-test basis.

The amount of data printed on this test prevents to initialize the
on-board watchdog within the expected window, causing a board reset.
Hence do not run the test on mr_canhubk3 board.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-18 10:37:22 +01:00
Gerard Marull-Paretas
4dd7bc997f samples: pm: move to POST_KERNEL
There's no need to use APPLICATION level.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-15 16:04:19 +02:00
Gerard Marull-Paretas
4f80e50b55 bluetooth: controller: coex: convert to DT device
Convert the driver to a dt-based device. Also update Kconfig so that it
depends on the right compatible being enabled, initialize in POST_KERNEL
(APPLICATION should not be used for devices) and remove one redundant
include.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-15 16:04:19 +02:00
YuLong Yao
49e5394e1c samples: basic: blinkypwm: add esp32s3_luatos_core
add overlay and conf file for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
YuLong Yao
8092b8d96b samples: sensor: die temp: add esp32s3_luatos_core
add overlay and conf file for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
YuLong Yao
75778574da samples: drivers: adc: add esp32s3_luatos_core
add overlay and conf file for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
YuLong Yao
8876e9d733 samples: drivers: counter: add esp32s3_luatos_core
add overlay and conf file for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
YuLong Yao
ff264dc03e samples: boards: deepsleep: add esp32s3_luatos_core
add overlay and conf file for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
YuLong Yao
8a29fb5fa5 samples: subsys: settings: add esp32s3_luatos_core
add conf file for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
YuLong Yao
10d66c4f63 samples: subsys: nvs: add esp32s3_luatos_core
add conf file for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
YuLong Yao
8704419126 Samples: net: wifi: add esp32c3_luatos_core board
add overlay and conf for esp32c3_luatos_core board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-09-15 14:17:50 +02:00
Pieter De Gendt
0357b4d4f5 modules: nanopb: Add helper function to generate sources
Introduce a helper function zephyr_nanopb_sources to generate
source files and add these to a target.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-09-15 12:57:40 +02:00
Carlo Caione
e4a125b6a4 dt: Make zephyr,memory-attr a capabilities bitmask
This is the final step in making the `zephyr,memory-attr` property
actually useful.

The problem with the current implementation is that `zephyr,memory-attr`
is an enum type, this is making very difficult to use that to actually
describe the memory capabilities. The solution proposed in this PR is to
use the `zephyr,memory-attr` property as an OR-ed bitmask of memory
attributes.

With the change proposed in this PR it is possible in the DeviceTree to
mark the memory regions with a bitmask of attributes by using the
`zephyr,memory-attr` property. This property and the related memory
region can then be retrieved at run-time by leveraging a provided helper
library or the usual DT helpers.

The set of general attributes that can be specified in the property are
defined and explained in
`include/zephyr/dt-bindings/memory-attr/memory-attr.h` (the list can be
extended when needed).

For example, to mark a memory region in the DeviceTree as volatile,
non-cacheable, out-of-order:

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-attr = <( DT_MEM_VOLATILE |
			       DT_MEM_NON_CACHEABLE |
			       DT_MEM_OOO )>;
   };

The `zephyr,memory-attr` property can also be used to set
architecture-specific custom attributes that can be interpreted at run
time. This is leveraged, among other things, to create MPU regions out
of DeviceTree defined memory regions on ARM, for example:

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-region = "NOCACHE_REGION";
       zephyr,memory-attr = <( DT_ARM_MPU(ATTR_MPU_RAM_NOCACHE) )>;
   };

See `include/zephyr/dt-bindings/memory-attr/memory-attr-mpu.h` to see
how an architecture can define its own special memory attributes (in
this case ARM MPU).

The property can also be used to set custom software-specific
attributes. For example we can think of marking a memory region as
available to be used for memory allocation (not yet implemented):

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-attr = <( DT_MEM_NON_CACHEABLE |
			       DT_MEM_SW_ALLOCATABLE )>;
   };

Or maybe we can leverage the property to specify some alignment
requirements for the region:

   mem: memory@10000000 {
       compatible = "mmio-sram";
       reg = <0x10000000 0x1000>;
       zephyr,memory-attr = <( DT_MEM_CACHEABLE |
			       DT_MEM_SW_ALIGN(32) )>;
   };

The conventional and recommended way to deal and manage with memory
regions marked with attributes is by using the provided `mem-attr`
helper library by enabling `CONFIG_MEM_ATTR` (or by using the usual DT
helpers).

When this option is enabled the list of memory regions and their
attributes are compiled in a user-accessible array and a set of
functions is made available that can be used to query, probe and act on
regions and attributes, see `include/zephyr/mem_mgmt/mem_attr.h`

Note that the `zephyr,memory-attr` property is only a descriptive
property of the capabilities of the associated memory  region, but it
does not result in any actual setting for the memory to be set. The
user, code or subsystem willing to use this information to do some work
(for example creating an MPU region out of the property) must use either
the provided `mem-attr` library or the usual DeviceTree helpers to
perform the required work / setting.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-09-15 12:46:54 +02:00
Mahesh Rao
dec80da4c0 samples: subsys: shell_module: Add support for intel_socfpga_agilex series
Add sip_svc shell support to intel_socfpga_agilex_socdk
and intel_socfpga_agilex5_socdk boards.

Signed-off-by: Mahesh Rao <mahesh.rao@intel.com>
2023-09-15 09:26:49 +02:00
Mahesh Rao
5a7552bce8 samples: sip_svc: Add support for intel_socfpga_agilex5_socdk
Add support for intel_socfpga_agilex5_socdk for
sip_svc sample application.

Signed-off-by: Mahesh Rao <mahesh.rao@intel.com>
2023-09-15 09:26:49 +02:00
Benjamin Cabé
30cd9a22cf doc: fs: samples: Use new Sphinx extension to document samples
Use the new code-sample directive and roles to document the filesystem
samples so that they show up as "Related samples" when browsing the API
documentation.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-14 15:07:12 +02:00
Yicheng Li
6ead139b4b mbox: Add NXP MU as a MBOX device
Add a MBOX driver wrapper around the NXP MU, simular to
the existing wrapper around the NXP S32 MRU. This allows Zephyr IPC
to work based on the MU, on a number of NXP boards.

Also update the SHA of NXP HAL to enable the Kconfig for this driver.

Signed-off-by: Yicheng Li <yichengli@google.com>
2023-09-14 14:34:05 +02:00
Gerard Marull-Paretas
577fd949c2 samples: boards: nrf: system_off: update readme
- Remove obsolete information
- Remove redundant details, e.g. how to flash
- Adjust output

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas
2cbc452d1d samples: boards: nrf: system_off: suspend console
To achieve minimal power consumption, only the console (ie UART) needs
to be suspended. Note that this is a temporary workaround, UART driver
should be using device runtime PM so that this is not needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas
1f40012c00 samples: boards: nrf: system_off: use standard GPIO API
Wake-up from pin is already supported when configuring GPIO interrupt as
GPIO_INT_LEVEL_ACTIVE, so there's no need to resort to HAL.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas
aa1dd87313 samples: boards: nrf: system_off: add missing dependency
APP_RETENTION depends on having CRC enabled.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas
6b56c9d8e5 samples: boards: nrf: system_off: remove redundant prj.conf comment
Not needed, already mentioned in sample.yaml.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas
7fb662032d samples: boards: nrf: system_off: fix includes
Include only what is needed, also sort includes properly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Gerard Marull-Paretas
d8571ef2a9 samples: boards: nrf: system_off: s/printk/printf
Use printf instead of printk, samples should prefer standard C APIs.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:50:13 +02:00
Grzegorz Chwierut
f618522144 twister: pytest: Move fixtures to one file
Fixtures in pytest-twister-harness plugin are moved to one
file to simplify adding new fixtures in the future - no
need to add pytest_plugins entry and register asserts.
Moved also shell fixture from sample dir, because that
fixture can be reused in new tests.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-09-14 05:58:25 -04:00
Grant Ramsay
09912b74e9 samples: canbus: isotp: Add support for CAN-FD
Enable this sample to be used with CAN-FD

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-09-14 08:34:09 +02:00
Andrei Emeltchenko
c709b3d97f samples: Using zephyr:code-samples for smbus and edac
Using zephyr:code-sample:: for SMBus and EDAC samples docs.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-13 17:32:52 -04:00
Andrei Emeltchenko
05afc13f5f samples: smbus: Update documentation
Update README.rst for smbus sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-13 17:32:52 -04:00
Andrei Emeltchenko
ed61709405 samples: edac: Correct README
Correct build and run instructions.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-13 17:32:52 -04:00
Sylvio Alves
a6756c36e9 samples: wifi: esp32s2_saola: reduce RAM usage
This modification frees up around ~10kB of RAM and make sample code
working again.

1) Reduced net packet size and count.
2) Increase Wi-Fi heap to avoid memory allocation failure.
3) Keep log as minimal.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-09-13 17:00:28 +02:00
Marko Sagadin
5f0bb1d277 samples: drivers: uart: native tty: Add native_sim overlay
Also include it in the twister tests.

Signed-off-by: Marko Sagadin <marko.sagadin42@gmail.com>
2023-09-13 16:36:43 +02:00
Daniel DeGrasse
11f6f2f7e8 samples: subsys: display: Add RK055HDMIPI4M shield testcase to LVGL
Add RK055HDMIPI4M specific testcase to LVGL. This allows LVGL to be
verified on the RT1170 and RT595 EVKs from NXP, which support LVGL using
this shield.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-09-13 16:36:10 +02:00
Andrzej Głąbek
e3ee5c09f2 samples: code_relocation_nocopy: Make linker script more generic
Instead of depending on the nRF5340 DK, use a path specific to just
the nRF5340 SoC and get the size of the external flash in this case
from devicetree so that the sample could be easily run on other boards
based on the nRF5340 SoC (after just adding proper overlays).

On the occasion, correct the attributes of the EXTFLASH memory region.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-09-13 16:20:34 +02:00
Andrzej Głąbek
6bd6f4be65 samples: code_relocation_nocopy: Use nrf_qspi_nor driver to init XIP
Use the Nordic QSPI NOR flash driver instead of the specific code
for the nRF5340 DK to initialize the external flash chip for XIP.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-09-13 16:20:34 +02:00
TOKITA Hiroshi
10057d54d9 samples: drivers: counter: alarm: Add support for rpi_pico
Add the rpi_pico board to the supported boards for the counter
alarm sample

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-09-13 16:18:44 +02:00
Stanley Huang
73a87d14df boards: arm: add raytac_mdbt53v_db_40_nrf5340
Adds new raytac_mdbt53_db_40_nrf5340 board.

Signed-off-by: Stanley Huang <stanley@raytac.com>
2023-09-13 12:06:48 +02:00
Fabian Blatz
c64724e5db samples: subsys: display: lvgl: Add lvgl-encoder-input device
Adds a zephyr,lvgl-encoder-input compatible to the native_posix board
overlay and the required code to control an arc widget.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-13 11:35:04 +02:00
Huifeng Zhang
2c22e83dfb include: arch: arm: Remove aarch32 directory
This commit follows the parent commit work.

This commit introduces the following major changes.

  1. Move all directories and files in 'include/zephyr/arch/arm/aarch32'
    to the 'include/zephyr/arch/arm' directory.

  2. Change the path string which is influenced by the changement 1.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Huifeng Zhang
df41deac1c arch: arm: Remove aarch32 directory
It doesn't make sense to keep the aarch32 directory in the
'arch/arm/core' directory as the aarch64 has been moved out.

This commit introduces the following major changes.

  1. Move all directories and files in 'arch/arm/core/aarch32' to
    'arch/arm/core' and remove the 'arch/arm/core/aarch32' directory.
  2. Move all directories and files in 'arch/include/aarch32' to
    'arch/include' and remove the 'arch/include/aarch32' directory.
  3. Remove the nested including in the 'arch/include/kernel_arch_func.h'
    and 'arch/include/offsets_short_arch.h' header files.
  4. Change the path string which is influenced by the changement 1
    and 2.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Benjamin Cabé
59e4c5aed0 samples: fully migrate basic samples to the new Sphinx extension
- Updated basic samples READMEs to use the new zephyr:code-sample::
  directive. Dropped "-sample" suffix that's not required anymore now
  that samples have their own namespace.
- Updated all references to the samples to use the :zephyr:code-sample:
  role. Checked and updated the wording of said references to account
  for the fact that samples should not have "... sample" in their name
  anymore.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 09:15:34 +02:00
Benjamin Cabé
9d0deabba2 samples: stm32: move board-specific STM32 UART sample
The STM32 single-wire UART sample should live with board-specific
samples.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-13 09:14:06 +02:00
Anas Nashif
fcf50ed6e7 kernel: move timeout_q.h to kernel/include
This is a private kernel header with private kernel APIs, it should not
be exposed in the public zephyr include directory.

Once sample remains to be fixed (metairq_dispatch), which currently uses
private APIs from that header, it should not be the case.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-12 12:55:36 -04:00
Miika Karanki
7ae9a0b55d net: mqtt: change cipher and sec_tag lists to const
cipher_list and sec_tag_list are used only with zsock_setsockopt
in MQTT. For that use, they can be const (and potentially kept
in flash memory).

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
2023-09-12 16:30:28 +02:00
Manuel Argüelles
7ec624c3c4 samples: rtio: disable debug log level
Avoid to build with debug log level enabled and instead register the
test log modules with debug level.

mr_canhubk3 board will fail to initialize the on-board watchdog within
the expected window triggering a reset, due to the amount of log
messages being printed. Other boards may face similar issues.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-09-12 10:56:35 +02:00
Martin Kiepfer
147109adb0 boards: Add lvgl pointer support on m5stack_core2
Added lvgl-pointer definition in devicetree, to enable
touch-support in lvgl applications.
Kscan support has been removed from m5stack_core2 as this was just a
temporary thing.
Has been tested with lvgl hello world sample.

Signed-off-by: Martin Kiepfer <m.kiepfer@teleschirm.org>
2023-09-12 09:23:25 +02:00
Benjamin Cabé
7c4ff77bf3 doc: zbus: samples: Use new Sphinx extension to document samples
Use the new code-sample directive and roles to document the zbus samples
so that they show up as "Related samples" when browsing zbus API.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-11 19:56:57 +02:00
Martin Kiepfer
9339882fbb samples: lvgl: Extend hello world sample button functionality
This commit adds a callback to the button to reset the counter when the
button is pressed. The button is automatically created when lvgl
pointer or kscan support is enabled. The same reset functionality was
already available for possible gpio button.

Please make sure to define a zephyr input device in device
tree (e.g. "zephyr,lvgl-pointer-input").

Signed-off-by: Martin Kiepfer <m.kiepfer@teleschirm.org>
2023-09-11 19:56:37 +02:00
Albort Xue
f5220bd5d1 samples: drivers: dac: Enable dac example on lpcxpresso55s36 board
Added overlay for lpcxpresso55s36, updated README.rst

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2023-09-11 19:55:26 +02:00
Marc Desvaux
15c733a36e samples: net: zperf: add Ethernet twister test
add Ethernet twister test for stm32h573i_dk

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-09-11 11:18:20 +02:00
Benjamin Cabé
faa8bb5bb8 samples: remove leftovers from current_sensing sample
Remove leftovers of a code sample that was (only partially) deleted
with PR #35538

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-08 11:11:38 +02:00
Benjamin Cabé
c26679be42 samples: net: cloud: drop Google Cloud IoT Core
Google Cloud IoT Core has been retired on August 16, 2023.
Removed the sample and the link to it in a previous release note.
Added a redirect to other IoT cloud samples.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-08 11:04:25 +02:00
Benjamin Cabé
2c8dbc4e8b esp32: samples: Use esp32_devkitc_wroom board instead of esp32
Following #58454, fixed a few remaining references to old "virtual"
esp32 board.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-07 20:18:41 +02:00
Fabio Baltieri
2c2124de76 samples: timer_synchronization: exclude qemu_arc_hs5x
Exclude qemu_arc_hs5x from the test, seems to fail since f0daf90. Other
ARC platform works so let's exclude this one while the issue is
investigated.

Link: https://github.com/zephyrproject-rtos/zephyr/issues/62405
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-07 16:22:59 +02:00
Maciej Perkowski
c15ec57e6e Revert "samples: tfm: Fix test definition"
This reverts commit 811b0bd8fb.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-09-07 13:00:49 +02:00
Alberto Escolar Piedras
811b0bd8fb samples: tfm: Fix test definition
32a9d13d61
introduced a new required tag for this test
which the integration platform does not "support"
causing the testplan generation to error out.

Fix it by removing the offending tag from the test.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-07 11:46:20 +02:00
Martin Jäger
f13791d5ba canbus: isotp: use flags for configuration in isotp_msg_id
The previous design with dedicated bits in the structure required a
user to explicitly set each bit.

Using one flags variable allows to extend the features more easily
in the future and avoids breaking existing code.

This change is particularly useful for the FDF and BRS flags required
for CAN-FD support.

See also previous similar change for the CAN driver in
f8a88cdb27

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-09-07 09:43:56 +02:00
David Brown
7c80473e0a samples: tfm: Remove old 'tfm' tag
To avoid confusion having both a 'tfm' and a 'trusted-firmware-m' tag,
remove the old 'tfm' tag entirely.  Any external test frameworks that are
using the 'tfm' tag will need to be changed to account for this.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-09-07 09:43:43 +02:00
David Brown
a5e70cd40d samples: tfm: Also test tfm when mcuboot changes
In addition to running the tfm tests when the trusted-firmware-m module
changes, most of the tests also use MCUboot, which comes from our module.
Add the mcuboot tag to each of these tests, except for the single test that
explicitly builds without using MCUboot.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-09-07 09:43:43 +02:00
David Brown
32a9d13d61 samples: tfm: Update tag to run tests on module change
A recent change #61718, adds support to the twister build to check for
manifest changes, and run tests using tags based on the modules that have
changed.  The tfm tests have an existing tag `tfm` to select these tests,
but the above patch uses a tag named after the module, trusted-firmware-m.
To make this work, add `trusted-firmware-m` in addition to the existing tag
`tfm` so that these tests will run whenever the tfm module is updated.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-09-07 09:43:43 +02:00
Fabio Baltieri
58b927eb70 samples: philosophers: fix wrong assert type
zephyrproject/zephyr/samples/philosophers/src/main.c: In function
'philosopher':

zephyrproject/zephyr/include/zephyr/sys/__assert.h:44:52: warning:
format '%u' expects argument of type 'unsigned int', but argument 2 has
type 'stack_data_t' {aka 'long unsigned int'} [-Wformat=]

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-06 21:56:03 +02:00
Benjamin Cabé
5832f6ed5f doc: Use new Sphinx extension for code samples
Use the new code-sample directive and roles in a few places
to demonstrate how it works.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-06 12:11:28 +02:00
Dat Nguyen Duy
b92ad4b56a boards: mr_canhubk3: enable NXP S32 EMIOS PWM
In this board, there are eight PWM channels from
EMIOS 0 CH0 --> EMIOS 0 CH7 that can be used to
generate PWM pulse to outside of the board.

Moreover, there are three RGB leds that can use
PWM pins for blinking, faded leds

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2023-09-06 11:44:00 +02:00
Grzegorz Swiderski
6640c04df6 sysbuild: Remove IMAGES variable
This variable was originally provided for two indended purposes:

  * Let users manually add a new image in a desired order in the list.
  * Let users set build-only images, which are excluded from the list.

Given the recent additions of the `sysbuild_add_dependencies()` function
and the `BUILD_ONLY` parameter, `IMAGES` should be considered obsolete.

Furthermore, the list of images added to sysbuild should be updated
automatically when calling `ExternalZephyrProject_Add()`. This is now
possible by using a GLOBAL property internal to sysbuild.

With that, the `IMAGES` variable can be removed. Its existing usage for
image ordering is replaced with `sysbuild_add_dependencies()` treewide.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2023-09-05 15:27:04 +02:00
Fabian Blatz
10ca5216bb samples: subsys: display: lvgl: Remove lvgl-pointer-input in overlays
After adding the lvgl pointer device into the board dts the custom overlays
are not needed anymore.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-05 10:05:50 +02:00
Carles Cufi
8c748fd005 kernel: Modify the signature of k_mem_slab_free()
Modify the signature of the k_mem_slab_free() function with a new one,
replacing the old void **mem with void *mem as a parameter.

The following function:
void k_mem_slab_free(struct k_mem_slab *slab, void **mem);

has the wrong signature. mem is only used as a regular pointer, so there
is no need to use a double-pointer. The correct signature should be:
void k_mem_slab_free(struct k_mem_slab *slab, void *mem);

The issue with the current signature, although functional, is that it is
extremely confusing. I myself, a veteran Zephyr developer, was confused
by this parameter when looking at it recently.

All in-tree uses of the function have been adapted.

Fixes #61888.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-09-03 18:20:59 -04:00
Bindu S
18e986029e samples: sensor: Enable bme280 sensor using I2C driver for alder_lake
Added overlay and conf to enable bme280 sensor
using i2c on intel_adl_crb board.

Signed-off-by: Bindu S <bindu.s@intel.com>
2023-09-01 12:10:16 -05:00
Jonathan Rico
434ea2b2ff Bluetooth: hci_rpmsg: flush the logs before locking CPU
The logs were not visible when an assert fired on the controller and
`CONFIG_BT_HCI_VS_FATAL_ERROR` was not set.

Putting the logs in panic mode before entering the infinite loop fixes
that.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-09-01 13:23:17 +02:00
Daniel DeGrasse
299689716e samples: ipc: openamp: update build documentation
Update build documentation for openamp sample, to reflect that sysbuild
is required when building this sample. Sysbuild is needed to build both
core images in one step.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-09-01 09:54:38 +02:00
Witold Lukasik
2530b85932 samples: subsys: logging: logger: remove nRF MDK-based code
k_cycle_get_32() expands to RTC->COUNTER in nrf_rtc_counter_get(),
sys_clock_hw_cycles_per_sec() expands also properly.

Signed-off-by: Witold Lukasik <witold.lukasik@nordicsemi.no>
2023-08-31 20:18:45 +02:00
Gerard Marull-Paretas
e788b8b45b samples: ipc: rpmsg_service: add missing init.h
Sample was using SYS_INIT without including init.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-31 14:43:08 +02:00
Gerard Marull-Paretas
d52c88d4c3 samples: boards: ti: cc13x2_cc26x2: system_off: use sys_poweroff()
Use the new sys_poweroff API to power off the board.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-31 14:42:26 +02:00
Jun Lin
6e785a4886 sample: driver: ps2: use aliases to select the ps2 instance
This sample uses the DEVICE_DT_GET_ONE(COMPAT) to select the ps2 device
for a specific chip. This commit changes it to use the aliases to
let more chips which support the ps2 driver can build this sample.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2023-08-31 10:19:52 +02:00
Gerard Marull-Paretas
825b0fb5d3 samples: boards: stm32: power_mgmt: stm32wb_ble: use sys_poweroff
Use sys_poweroff to power off the system.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-31 10:18:07 +02:00
Gerard Marull-Paretas
60da8d5303 samples: boards: stm32: power_mgmt: standby_shutdown: use sys_poweroff
Use the sys_poweroff() API to power off the board, also adjust messages
accordingly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-31 10:18:07 +02:00
Bjarki Arge Andreasen
c0c9d6f7d6 samples/net: Add cellular modem sample
This commit adds a sample application which demonstrates how
to use the new driver and modules. The sample uses power
management to turn on the modem, uses network management
to wait for L4 connected, then uses DNS to get the IP
of the server running the python script found in the
server folder, which echoes back data recevied to it.
A packet containing psudo random data is then sent to
the server, which the echoes it back. To validate the
capability of the driver to restart the modem, the
modem is restarted, and the packet is sent again.

The server is hosted by linode, and uses the domain
name test-endpoint.com

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-08-30 13:48:51 +02:00
Piotr Golyzniak
63a9f774df samples: pytest: add conditional extra config
Config CONFIG_NATIVE_UART_0_ON_STDINOUT=y should be applied only for
posix architecture platforms.

Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
2023-08-30 06:39:55 -04:00
Piotr Golyzniak
ffbe257663 scripts: pytest: create helper class Shell
Create helper class Shell which can be used in tests which require
interaction with shell application.

Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
2023-08-30 06:39:55 -04:00
Piotr Golyzniak
a4a550888e scripts: pytest: add readlines_until
Add readlines_until method to DeviceAdapter class to simplify using
adapters in tests by give user possibility to read output from device
until following conditions:
- provided regex was found
- provided number of lines was already read
- timeout was occurred

Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
2023-08-30 06:39:55 -04:00
Piotr Golyzniak
f22c2d6388 scripts: pytest: align adapters API
Select and place common code of three adapters (HardwareAdapter,
BinaryAdapterBase and QemuAdapter) into basic DeviceAdapter class.

Introduce new way of reading device output by run separate thread which
try to read device output and place it into internal python queue.
Thanks to this, now it is possible to create readline method for all
adapters, which can be unblock when timeout occur.

Collect all common steps which have to be done before setup device in
launch method. The same was done for teardown operations which were
placed into close method.

Additionally some protection mechanisms were introduced to prevent for
undesirable side-effects when user could try to launch to already
launched device or try to send some data to disconnected device.

iter_stdout method was replaced by two new methods: readline and
readlines. To make it possible to remove all read output from internal
buffer (queue), clear_buffer method was introduced.

Also unit tests were rewritten to work properly with current version
of adapters.

Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
2023-08-30 06:39:55 -04:00
Piotr Golyzniak
c54d55c2d8 scripts: pytest: rename DeviceAbstract
Change name of DeviceAbstract class to more meaningful like
DeviceAdapter.

Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
2023-08-30 06:39:55 -04:00
Gerard Marull-Paretas
8a42903506 samples: usb_c: source: power_ctrl: add missing init.h
File was using SYS_INIT without including init.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-30 11:52:24 +02:00
Nick Ward
d4e1b186ee samples: usb_c: source: use ENODEV and remove \n use
ENOENT was the wrong return code to use.
Newlines not needed in logs.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-08-30 10:19:47 +02:00
Nick Ward
82e8b0e826 drivers: pwm: use pwm_is_ready_dt helper function
Update  `struct pwm_dt_spec` use with pwm_is_ready_dt()

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-08-30 10:19:47 +02:00
Benjamin Lemouzy
d2e420029b drivers: sensor: add NXP TEMPMON driver
Add driver for the NXP TEMPMON to retrieve on-die operational
temperature.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2023-08-30 10:18:27 +02:00
Gerard Marull-Paretas
22e4699967 samples: boards: nrf: dynamic_pinctrl: s/device.h/init.h
File was not using any device.h API, but init.h (SYS_INIT).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-30 10:15:39 +02:00
Gerard Marull-Paretas
aef77099dc samples: boards: mimxrt595_evk_cm33: system_off: misc cleanups
- Remove unnecessary includes
- Remove redundant definitions (sample is not portable anyway)
- Use printf
- Check for device readiness
- Do not check for zero ticks (not possible for the given
  timeout/driver), also, driver should likely error for such case anyway
- Check for all error codes

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-29 16:39:49 +01:00
Georges Oates_Larsen
b25ea4742e net: conn_mgr: Rename connectivity monitor
The connectivity monitoring subfeature of conn_mgr is currently also
named conn_mgr, which is confusing.

This commit renames it to conn_mgr_monitor, or conn_mgr_mon for short,
for clarity.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2023-08-29 16:13:37 +02:00
Emil Gydesen
71b1591337 Bluetooth: CAP: Remove qos from start_stream_param
Remove the qos field from
bt_cap_unicast_audio_start_stream_param as it was not used.

The QOS values are set when creating the unicast group,
and not when starting the streams.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-29 10:22:43 +02:00
Rodrigo Peixoto
4d80338132 samples: zbus: fix samples to work with iterable sections observers
Replace the `CONFIG_ZBUS_RUNTIME_OBSERVERS_POOL_SIZE` with the
`CONFIG_ZBUS_RUNTIME_OBSERVERS` and add the heap. Add user_data to hello
world sample iterator functions.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-08-29 10:18:55 +02:00
Fabian Blatz
6a0de9bb7c samples: subsys: display: lvgl: add lvgl-button-input to native_posix
Adds a lvgl-button-input pseudo device to the lvgl sample. Triggering the
SDL gpio (pressing 'b') on the keyboard should trigger a click event at the
center of the screen.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-29 10:17:52 +02:00
Fabian Blatz
116ec2c41c samples: subsys: display: lvgl: Use input-lvgl for touch input
Changes all board specific configurations to use the new
zephyr,lvgl-pointer-input compatible. The kscan_input node in the boards
remains to have downstream backwards compatibility.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-29 10:17:52 +02:00
Emil Gydesen
6ccd112c56 Bluetooth: Audio: Refactor bt_audio_codec_cfg to flat arrays
Refactor the bt_audio_codec_cfg to use flat arrays to store
metadata and codec specific configurations.

The purpose of this is to make it easier to copy the data
between layers, but also to support non-LTV data for non-LC3
codec configurations.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-28 15:56:53 +02:00
Nick Ward
2d65acca3a drivers: gpio: use gpio_is_ready_dt helper function
Update `struct gpio_dt_spec` use with gpio_is_ready_dt()

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-08-28 08:48:35 -05:00
Nerijus Bendžiūnas
c0c99227c5 doc: fix CCM sample path typo
Found by playing with CCM.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
2023-08-28 08:35:46 +01:00
Anas Nashif
7f201f4ccc samples/tests: littlefs: tag littlefs samples/tests
Tag with required module name to make the tests run when the module has
changed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-24 13:41:26 -04:00
Anas Nashif
7c8e4e7fe4 samples: display: tag lvgl sample with lvgl
This will allow the sample to be built when the lvgl module has changed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-24 13:41:26 -04:00
Ole Sæther
a7df4e5175 samples: Fixed typos
Fixed typos in various files under samples.

Signed-off-by: Ole Sæther <ole.saether@nordicsemi.no>
2023-08-24 15:44:33 +02:00
Alberto Escolar Piedras
9eeb78d86d COVERAGE: Fix COVERAGE_GCOV dependencies
CONFIG_COVERAGE has been incorrectly used to
change other kconfig options (stack sizes, etc)
code defaults, as well as some samples behaviour,
which should not have dependend on it.

Instead those should have depended on COVERAGE_GCOV,
which, being the one which adds special code and
temporary RAM storage for embedded targets,
require changes to many features.

When building for the native targets, all this was
unnecessary.

=> Fix the dependency.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-08-24 15:36:31 +02:00
Gerard Marull-Paretas
9c961571a2 modules: cmsis: move glue code to modules/cmsis
The CMSIS module glue code was part of arch/ directory. Move it to
modules/cmsis, and provide a single entry point for it: cmsis_core.h.
This entry header will include the right CMSIS header (M or A/R).

To make this change possible, CMSIS module Kconfig/CMake are declared as
external, allowing us to add a new Zephyr include directory.

All files including CMSIS have been updated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-08-24 13:20:21 +02:00
Ryan McClelland
8023d59509 samples: logging: dictionary: fix double-promotion warning
Double promotion warnings are generated with the flag -Wdouble-promotion

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-08-23 16:13:48 -04:00
Sachin D Kulkarni
5c399c2d17 net: wifi: Add scan extension for filtering SSIDs
Add scan extension to scan only for specific SSIDs.

Signed-off-by: Sachin D Kulkarni <sachin.kulkarni@nordicsemi.no>
2023-08-23 16:05:08 +01:00
Mariusz Skamra
2b27b4ebe0 Bluetooth: audio: tbs_client: Subscribe to all required notifications
This removes odd `subscribe` parameter from bt_tbs_client_discover
function parameters list. As the API user enables specific
CONFIG_BT_TBS_CLIENT_* option, the client implementation should
subscribe to the characteristic notifications so that the user receives
the value updates.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-08-23 15:44:07 +02:00
Florian La Roche
5727503489 style: move ALWAYS_INLINE to the beginning to resolve compiler warnings
With gcc from the zephyr sdk and -Wold-style-declaration is giving this
output:
zephyr/arch/arm/core/aarch32/cortex_a_r/fault.c:101:1: warning:
  'inline' is not at beginning of declaration [-Wold-style-declaration]
  101 | static void ALWAYS_INLINE
                    z_arm_fpu_caller_save(struct __fpu_sf *fpu)
      | ^~~~~~

I searched to all of the source code to find these further occurances
where inline is not at the beginning of a function declaration.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2023-08-23 14:44:23 +02:00
Florian La Roche
572a23f3d6 samples/net/dhcpv4_client: remove unused var "iface" from sample
The var "iface" is unused in this sample code, so remove from source.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2023-08-23 14:43:56 +02:00
Jeff Daly
f868d391ec Samples: Fix XEC clock control sample code for MEC172x using new GPIOs.
The XEC clock control driver sample code uses enum indexes to offset to
the desired GPIO CTRL register of the package.  These enums are only
used in this example code and are being removed in favor of calculated
indexing into the specific GPIO register memory map.

Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
2023-08-23 10:06:13 +02:00
romain pelletant
4a49b1d867 sample: net: add tftp client sample
Add simple TFTP client code using TFTP client library
Initiate connection (IPv4) with optional DNS resolution
Operate get operation then put operation in octet mode
Tested on native_posix
Issue/Discussion #60985

Signed-off-by: romain pelletant <romain.pelletant@fullfreqs.com>
2023-08-23 10:05:19 +02:00
Florian La Roche
88a3620ff9 samples/basic: print_sys_memory_stats() removed from hash_map, static
Remove print_sys_memory_stats() from hash_map example as it is not used
there at all. For sys_heap make this a static function.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2023-08-22 19:12:59 -04:00
Henrik Brix Andersen
b9585ad96d samples: canbus: isotp: exit if RX thread creation failed, name threads
Exit the sample if creation of any of the RX threads failed. Name the
threads to aid in debugging and monitoring of this sample.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-08-22 18:07:43 +02:00
Henrik Brix Andersen
1f42e14635 samples: canbus: isotp: increase stack size and make it configurable
Increase the stack size of the two RX threads used in the ISO-TP sample
from 512 to 1024 bytes as the former is too small for some CAN
controller/SoC combinations.

Make both the RX thread stack size and priority configurable via Kconfig.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-08-22 18:07:43 +02:00
Daniel Leung
dc0cec972d samples: usb: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
a52abe157b samples: sensors: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
196b6959d7 samples: philosophers: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
732fd2dd0d samples: net: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
b2f2f85ebd samples: lorawan: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
8f756af1e1 samples: ipc: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
ff9ebcb946 samples: fs: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
cf23bac815 samples: drivers: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
f0e0c57ad2 samples: boards: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Daniel Leung
081d5a32f0 samples: arch: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Mariusz Skamra
d28f180473 Bluetooth: audio: ascs: Move metadata validation to stack
As the metadata has to be validated anyway, let the initial vaidation of
metadata to be done in ASCS. The application can still reject the
metadata, but the length validation and supported type validation can be
performed by the stack.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-08-22 09:59:53 +02:00
Jaxson Han
2218e80bc2 samples: posix: uname: Set to 1cpu as shell_thread is not SMP-safe
The sample will leverage shell_thread function, which is not SMP-safe.
This will cause issues on some SMP platform. Set CONFIG_MP_MAX_NUM_CPUS
to 1 to fix the issue.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2023-08-21 13:27:07 +02:00
Andy Sinclair
f9f246fd7e samples: shields: npm1300_ek: Event callbacks added
Added event callback configuration example to npm1300_ek
shield.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-08-21 10:04:03 +02:00
Grant Ramsay
47ca788185 samples: posix: eventfd: Use NET_TEST config
NET_TEST is the approprite config for networking tests that do not
require a network device. This has the same effect of disabling
NET_SLIP_TAP, but also disables other network devices. This is required
to disable e1000 Ethernet driver on the qemu_cortex_a53 board.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-08-18 10:13:12 +02:00
Grant Ramsay
3b7bcfa4ab samples: net: sockets: echo_server: Add QEMU A53 as a supported platform
Add qemu_cortex_a53 as a supported platform

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-08-18 10:13:12 +02:00
Jilay Pandya
7a9cda9199 samples: zbus: fix benchmark duration output
The benchmark duration is in nanoseconds, and it logs the duration to
the console in seconds. The conversion is wrong for scenarios where
the execution lasts less than 100 milliseconds. Fix that by adding
leading zeros while printing duration.

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2023-08-18 10:12:50 +02:00
Rodrigo Peixoto
a658eeecd2 samples: zbus: add confirmed channel sample
This commit adds a new sample to zbus that shows how to implement a
confirmed channel. Developers commonly asked about similar features on
zbus discord channel and RFC (in the past). Adding this sample, we can
show developers how to solve their needs (confirmed channels) without
zbus changes.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-08-18 10:12:43 +02:00
Anas Nashif
c8a9e445bb Bluetooth: BT_OTS_OACP_CHECKSUM_SUPPORT implies CRC support
BT_OTS_OACP_CHECKSUM_SUPPORT requires CRC to be enabled.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-08-18 08:52:16 +03:00
Yong Cong Sin
96dee583c0 sample: tracing: update README for USER
Update the README.rst to include build instruction for
tracing_user.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-08-17 15:13:17 +02:00
Yong Cong Sin
8e27b2ea8b sample: tracing_user: check for lines from the implementation
Updated the sample to check for lines from the tracing user
implementation to make sure that the glue works.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-08-17 15:13:17 +02:00
Yong Cong Sin
3337c15707 tracing_user: let user implementation to do everything
Let's just let the user implementation to its things, like
checking, locking and stuff.
The tracing_user.c now just acts as a glue.

Moved previous implementation to its sample, and cleaned up
headers.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-08-17 15:13:17 +02:00
Ryan McClelland
57f49ca2d2 samples: bluetooth: fix double promotions
Double promotion warnings are generated with the flag -Wdouble-promotion

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-08-17 13:07:10 +02:00
Daniel Leung
eedc0bf0fa samples: bluetooth: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-17 13:00:09 +02:00
Gerard Marull-Paretas
f623fcf398 samples: hello_world: use printf
Instead of printk. This change aligns the sample a bit more to the
canonical "hello world" sample in C. Also, samples should in general be
as portable as possible.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-17 10:38:26 +02:00
Johann Fischer
42ddc614b1 samples: hid-mouse: rework sample to use input subsys
Overall, this makes the sample code much simpler and smaller.
Whit the changes introduced in commit commit 57e0da4d80
("boards: add zephyr,code properties to the various gpio-keys nodes")'
this example will work out of the box with any board that has at least
zephyr,code = <INPUT_KEY_0>; in its devicetree.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-08-17 09:37:03 +01:00
Eric Holmberg
ef2d7283b2 samples/drivers/adc: add esp32s3 sample support
Add single-shot sample mode support for ESP32-S3 and update documentation.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2023-08-17 10:36:20 +02:00
Gerard Marull-Paretas
2f18ee0664 samples: application_development: drop oot board/driver samples
Because there are more comprehensive examples in the Zephyr's
example-application repository. Application development samples page now
points to example-application as well.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-16 20:31:35 +02:00
Gerard Marull-Paretas
f08a652fed samples: application_development: add link to example-application
Because example-application contains relevant sample code related to
application development.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-16 20:31:35 +02:00
Andrzej Głąbek
993cb30240 samples: blinky_pwm: Use nRF SW PWM driver on nRF DKs
The default nRF hardware PWM driver is not very suitable for this
sample as that driver does not allow setting a period longer than
~262 ms. Use the nRF SW PWM driver instead. This will also ensure
that the driver is built by CI for nRF52, nRF53, and nRF91 Series.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-08-16 16:33:03 +02:00
Andrzej Głąbek
88ab153ac4 drivers: pwm_nrf5_sw: Rename to pwm_nrf_sw
Since the driver can now be also used on nRF91 Series, its name need to
be updated to not cause confusion.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-08-16 16:33:03 +02:00
Diego Elio Pettenò
00dadc6c38 doc: use a linked reference rather than a GitHub reference.
Instead of sending the user out of the documentation site to GitHub
to read the testing instructions, link to the generated page for the
documentation.

Signed-off-by: Diego Elio Pettenò <flameeyes@meta.com>
2023-08-16 14:58:20 +02:00
TOKITA Hiroshi
cedcd2d94e samples: cfb: support MONO01 pixel format
When the pixel format fails to set to MONO10, try to set it to MONO01.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-08-16 14:47:59 +02:00
Lucas Tamborrino
d45e992e58 samples: drivers: ipm: ipm esp32: add wrover board
Add esp32_devkitc_wrover boards to supported platforms

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-08-16 10:25:49 +02:00
Lucas Tamborrino
7360c2e48b samples: drivers: dac: add esp32 wrover board
Add esp32_devkitc_wrover boards to supported platforms

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-08-16 10:25:49 +02:00
Lucas Tamborrino
ea1297d5c9 samples: drivers: adc: add esp32 wrover board
Add esp32_devkitc_wrover boards to supported platforms

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-08-16 10:25:49 +02:00
Lucas Tamborrino
01fa21523f samples: boards: esp32: flash enc: add wrover board
Add esp32_devkitc_wrover boards to supported platforms

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-08-16 10:25:49 +02:00
Balsundar Ponnusamy
5b533a1aa8 samples: subsys: shell: add timer support for shell
adding shell support for app dw timer

Signed-off-by: Balsundar Ponnusamy <balsundar.ponnusamy@intel.com>
2023-08-16 10:20:31 +02:00
Balsundar Ponnusamy
dadbf281d0 samples: drivers: counter: adding support for alarm app
adding support for counter alarm application for ailex and agilex5
platform

Signed-off-by: Balsundar Ponnusamy <balsundar.ponnusamy@intel.com>
2023-08-16 10:20:31 +02:00
Gerard Marull-Paretas
34102e496e samples: boards: esp32: deep_sleep: use sys_poweroff
Use the new sys_poweroff API.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-15 10:15:38 -07:00
Johan Hedberg
03905f7e55 boards: x86: Add intel_ prefix to Elkhart Lake boards
This follows the same convention that has already been adopted by Intel
Alder Lake and Raptor Lake boards.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-08-15 11:24:35 +00:00
Julio Cesar
5e15e8cb48 boards: xtensa: Add support for YD-ESP32 board
Add `yd_esp32` board:

- Model name: YD-ESP32
- Manufacturer: VCC-GND® Studio
- Espressif module: ESP32-WROOM-32E

Signed-off-by: Julio Cesar <hi@jcsx.dev>
2023-08-15 11:15:39 +00:00
Emil Gydesen
53502cb417 Bluetooth: Audio: Make codec_cap const
There is no reason why the capabilities
should be modified by the stack after registration,
nor any reason why a the unicast client application
needs to modify the reported remote capabilities, so
all have been marked as const.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-15 11:14:29 +00:00
Emil Gydesen
aa990ae6dc Bluetooth: Audio: Refactor bt_audio_codec_cap to flat arrays
Refactor the bt_audio_codec_cap to use flat arrays to store
metadata and codec specific capabilities.

The purpose of this is to make it easier to copy the data
between layers, but also to support non-LTV data for non-LC3
codec capabilities.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-15 11:14:29 +00:00
TOKITA Hiroshi
2c22e067d0 samples: subsystem: display: cfb: Improve to using more CFB functions
Move X position and set  kerning to demonstrate the line wrapping
behavior of characters.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-08-14 18:09:18 +00:00
Emil Gydesen
2c3ee66912 samples: Bluetooth: TMAP BMR: Update to use new sink API
The broadcast sink API has been modified so that all scanning, etc.
will be done by the application, rather than the stack. This commit
updates the sample to use this updated API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-14 13:34:26 +00:00
Emil Gydesen
171273d967 samples: Bluetooth: Broadcast Sink: Update to use new sink API
The broadcast sink API has been modified so that all scanning, etc.
will be done by the application, rather than the stack. This commit
updates the sample to use this updated API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-08-14 13:34:26 +00:00
Johan Hedberg
2b757f1eca boards: x86: Add intel_ prefix to Intel Raptor Lake boards
This is following the same convention that was recently introduced to Alder
Lake boards (intel_adl). Additionally, an "S" suffix is added to the
boards, since what's currently supported is in fact the Raptor Lake S
variant.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-08-11 19:48:32 +00:00
Benjamin Cabé
fe8ced1e5a doc: lwm2m: samples: fix formatting issue
A sneaky whitespace was causing inconsistent rendering in the list of
available overlays.
Fixed by switching to a list table which is arguably now even easier to
read.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-08-11 19:48:08 +00:00
Nicolas Pitre
deb20ef93b samples/basic/minimal: make it smaller
Add a config entry specifically for RISC-V runtime.
Memory usage is 7066 bytes.

Also adjust some library options. This make the ARC runtime binary
smaller as well:

before:

        FLASH:        8808 B
         SRAM:        3672 B

after:

        FLASH:        5596 B
         SRAM:        3672 B

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2023-08-11 19:47:47 +00:00
Iuliana Prodan
61de87bc50 samples: enable build only test for nxp_adsp_imx8m
Test openamp_rsc_table sample also for nxp_adsp_imx8m.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-08-11 12:01:58 +00:00
Andrei Emeltchenko
e17b3e4a52 smbus: Remove unneeded board overlay configurations
Remove unneeded board configurations since those now selected with
selecting PCH SMBUS driver.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-08-10 13:59:15 +03:00
Andrei Emeltchenko
b92e04e636 samples: tests: Add ehl_crb board overlay
Add board overlay to watchdog sample and test.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-08-10 12:57:39 +03:00
Sreeram Tatapudi
fa471172b7 drivers: counter: cat1: Fix test_single_shot_alarm_notop
TC "test_single_shot_alarm_notop" is failing because there were 2 ISR
callbacks instead of one. this is because of invoking
ifx_cat1_counter_set_int_pending incorrectly. Updated
ifx_cat1_counter_set_alarm to fix this

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-08-10 08:13:11 +00:00
Alberto Escolar Piedras
b40c052289 samples drivers led: Fix main return
Since 3a197934fc
main() should be int main(void) instead of void main(void)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-08-09 16:09:47 +00:00
Alberto Escolar Piedras
5d1eae6399 samples sensing simple: Fix main return
Since 3a197934fc
main() should be int main(void) instead of void main(void)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-08-09 16:09:47 +00:00
Johan Hedberg
a88808fc9a samples: watchdog: Add overlay for Intel Alder Lake boards
Add watchdog overlays and necessary metadata to support Intel Alder Lake
boards.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-08-09 13:45:38 +00:00
Jeppe Odgaard
e26d018253 samples: flash_shell: rework dump_buffer()
Add an optional compare buffer to check each byte. If the byte differ
the read value will be printed as an error.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-08-09 13:41:23 +00:00
Jeppe Odgaard
5ad65dfe36 samples: flash_shell: rework do_read()
Add an optional compare buffer to check if bytes read
match a provided buffer and print an error if they differ.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-08-09 13:41:23 +00:00
TOKITA Hiroshi
b2b0901c0d samples: sensor: change to use the app.overlay file
The DTC_OVERLAY_FILE variable is specified on the command line.
It's not preferable to set it in CMakeLists.txt.
The app.overlay file is used as the default overlay file, so use it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-08-09 08:29:28 +00:00
Diego Elio Pettenò
762a1f8b42 ev11l78a: initial import of the UPD301C Basic Sink board.
This board is a relatively inexpensive development kit for USB-PD
controllers, using an UPD301C controller.

This Zephyr config includes support for:

 * UART (present on he debug header of the board), tested with the
   hello_world sample application;
 * the one standalone LED (CAP_MIS), tested with the blinky sample
   application;
 * the rotary encoder (PDO_SEL), via ADC, tested with the adc sample
   application;
 * the current sense amplifier (I_SENSE), currently untested;
 * the SPI bus, connected internally in the UPD301C to the UPD350;
 * the I2C bus, exposed on the debug header, currently untested.

Note that the drivers.uart.async_api.rtt has to be disabled, as it is
for other m0 boards with no dma or it fails to build.

Signed-off-by: Diego Elio Pettenò <flameeyes@meta.com>
2023-08-08 19:02:15 +00:00
Keith Packard
cbc5ee3683 samples/boards/google_twinkie_v2_pda: fix main return
switch to int

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-08-07 19:07:43 +00:00
Maciej Sobkowski
112e48eb28 samples: alarm: Add support for apollo4p_evb
Add support for apollo4p_evb to the counter alarm sample.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2023-08-07 16:12:58 +02:00
Fabio Baltieri
57e0da4d80 boards: add zephyr,code properties to the various gpio-keys nodes
Add gpio-keys codes for all boards. These are mostly INPUT_KEY_0 and so
on but I've used some more specific ones where it was obvious that
there's something else on the boards.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-07 11:26:26 +02:00
Marek Matej
1622210e75 samples: led_ws2812: ESP32 support
Add overlays for esp32s2, esp32s3, esp32c3 based boards, which
has RGB led assembled. Those boards are capable of driving the
RGB led using SPI. The default MOSI idle level is different
to how DI driver expect it to be.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-08-07 11:25:19 +02:00
Florian Grandel
781b6d7b0a samples/doc: segger: rtt: enhanced tracing/logging
Fixes a minor documentation issue and suggests/documents additional RTT
tracing and logging options.

Showcases logging via RTT UART which is now available w/o restrictions
due to the preceding change. This has been tested on CC13/26xx hardware.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-08-06 07:44:06 -04:00
Gerard Marull-Paretas
a99a6756aa samples: boards: mimxrt595_evk_cm33: system_off: use sys_poweroff
Use the new sys_poweroff() API to power off the system.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-04 16:59:36 +02:00
Gerard Marull-Paretas
37b26f40a6 samples: boards: nrf: system_off: use sys_poweroff
Make use of the new sys_poweroff API to actually power off the system.
This lets us remove many hacks present in the sample.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-04 16:59:36 +02:00
Mathieu Anquetin
3f2a6ce86b samples: led_lp50xx: fix color mapping and channel test
Some boards may have less LED child nodes in the DT than the maximum
number of LEDs supported by the chipset. For these boards, the channel
test must skip the missing LEDs when preparing the color buffer and not
exit in error due to missing info.

Also, some boards may have a color mapping that is different from RGB
and this mapping should be used when providing the buffer to
led_set_color().

Signed-off-by: Mathieu Anquetin <mathieu.anquetin@groupe-cahors.com>
2023-08-04 13:18:01 +02:00
Mathieu Anquetin
26f4fab391 drivers: led: lp503x: extend driver to all lp50xx devices
Add support for LP5009, LP5012, LP5018 and LP5024 devices which only
differ by the number of LEDs they can control.

Also, update application sample to run on all these new supported
devices.

Based on initial work from:
  - Marek Janus <marek.janus@grinn-global.com>
  - Rico Ganahl <rico.ganahl@bytesatwork.ch>

Signed-off-by: Mathieu Anquetin <mathieu.anquetin@groupe-cahors.com>
2023-08-04 13:18:01 +02:00
Fabio Baltieri
693b19d0f2 input: add zephyr/ prefix to the event code sample and docs
The system still takes both prefixed and unprefixed dt-bindings files,
but let's use zephyr/ prefixed in the examples and documentation.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-04 10:41:57 +02:00
Johann Fischer
ee43610b96 samples: usb: hid: remove SYS_INIT
There is no need to use SYS_INIT as the HID specific initialisation
can be done in the main before the usb_enable() call.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-08-04 10:41:38 +02:00
David Ullmann
7c76464c14 samples: blinky_pwm: mimxrt685_evk_cm33 use ctimer for pwm
add overlay for using ctimer pwm driver
Signed-off-by: David Ullmann <davidu@meta.com>
2023-08-03 12:39:06 -04:00
Franciszek Zdobylak
16183f665e samples: subsys: fs: create common fs sample
Sample for FAT fs is reworked to run also with Ext2 file system

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-08-03 12:22:01 -04:00
Evgeniy Paltsev
168de28b40 samples: add no-timers configuration which is runtime tested
Add no-timers configuration to sample.minimal to check that
it's actually working in runtime.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-08-03 07:32:03 -04:00
Manuel Argüelles
11b94f3155 boards: mr_canhubk3: enable EMAC
This board has a single instance of EMAC connected to a NXP TJA1103
Ethernet PHY. Currently, there is no driver for this PHY and its
pin strapping configuration allows to use it without software
configuration, so EMAC is configured as fixed link.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-03 10:28:20 +02:00
Wei-Tai Lee
e6d6df579a samples: drivers: spi_flash: add adp_xc7k_ae350 surport
Add adp_xc7k_ae350 support in spi_flash driver sample

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2023-08-03 10:28:02 +02:00
Seppo Takalo
838ab80bca net: coap: Use 64bit timestamps
Use 64bit timestamps from k_uptime_get() so they don't
roll over during the expected device lifetime.

Fixes #60826

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-08-01 15:40:04 +02:00
Seppo Takalo
1dfa711167 net: lwm2m: Create socketpair that can wake up zsock_poll()
Allow socket-loop to wake up immediately, if there are changes,
instead of waiting for zsock_poll() to timeout.
This change makes engine more reactive and removes
hard coded timeout from zsock_poll().

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-08-01 12:07:12 +02:00
Manuel Arguelles
42e8678d2a samples: task_wdt: add scenario without hw fallback
Add new sample scenario without using a hardware watchdog as fallback.
This is used for the moment only for the mr_canhubk3 board, but a
generic configuration is introduced that can be used by other boards if
needed.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-01 09:51:16 +02:00
Manuel Arguelles
cb54a31b28 samples: watchdog: add support for NXP FS26 watchdog
This watchdog doesn't allow to stop on CPU halt by debugger.
It also requires a minimum window value different than zero
so that the watchdog is refreshed during the open window.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-01 09:51:16 +02:00
Emil Gydesen
ef7c775fc2 samples: Bluetooth: ISO broadcash benchmark advanced ISO
Add (optional) advanced ISO support for the benchmark ISO
sample. The CONFIG_BT_ISO_ADVANCED Kconfig simply needs to
be enabled in order to support the advanced settings.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-07-31 09:04:52 +00:00
Emil Gydesen
2187f6b29c samples: Bluetooth: ISO connected benchmark advanced ISO
Add (optional) advanced ISO support for the benchmark ISO
sample. The CONFIG_BT_ISO_ADVANCED Kconfig simply needs to
be enabled in order to support the advanced settings.

This also reduces the number of default channels supported
to 1.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-07-31 09:04:52 +00:00
Francois Ramu
248cd36505 samples: subsys: nvs on nucleo_g474re requires 6kB for storage partition
Add the overlay for running the samples/subsys/nvs/ application
on the nucleo_g474re. Define a 6kB storage_partition at the end of the
512kB flash.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-07-31 10:09:38 +02:00
Cong Nguyen Huu
19f33b8ecb samples: drivers: adc: enbale test for mr_canhubk3
Enable all channels that available connector on board.
ADC0 channel 6 on precision group with normal end chain
callback.
ADC1 channel 2 on precision group with normal end of
conversion callback.
ADC2 channels 3, 4, 5 on precision group with normal end
of conversion callback.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-07-28 08:55:38 -05:00
Gerard Marull-Paretas
bc522affc7 samples: subsys: pm: latency: remove redundant PM_STATE_ACTIVE case
pm_state_set() will never be called with PM_STATE_ACTIVE.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-28 09:09:01 +00:00
Florian Grandel
a4cd5cee40 drivers: ieee802154: consistent high res timestamps
The IEEE 802.15.4 API and networking subsystem were using several
inconsistent timestamp resolutions and types. This change defines all
timestamps with nanosecond resolution and reduces the number of
available types to represent timestamps to two:
* `struct net_ptp_time` for PTP timestamps
* `net_time_t` for all other high resolution timestamps

All timestamps (including PTP timestamps) are now referred to a
"virtual" local network subsystem clock source based on the well-defined
types above. It is the responsibility of network subsystem L2/driver
implementations (notably Ethernet and IEEE 802.15.4 L2 stacks) to ensure
consistency of all timestamps and radio timer values exposed by the
driver API to such a network subsystem uptime reference clock
independent of internal implementation details.

The "virtual" network clock source may be implemented based on arbitrary
hardware peripherals (e.g. a coarse low power RTC counter during sleep
time plus a high resolution/high precision radio timer while receiving
or sending). Such implementation details must be hidden from API
clients, as if the driver used a single high resolution clock source
instead.

For IEEE 802.15.4, whenever timestamps refer to packet send or receive
times, they are measured when the end of the IEEE 802.15.4 SFD (message
timestamp point) is present at the local antenna (reference plane).

Due to its limited range of ~290 years, net_time_t timestamps (and
therefore net_pkt timestamps and times) must not be used to represent
absolute points in time referred to an external epoch independent of
system uptime (e.g.  UTC, TAI, PTP, NTP, ...).

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-28 09:06:35 +00:00
Marc Desvaux
ae72fa7bf6 samples: net: zperf: add Ethernet twister test
add one Ethernet twister test for nucleo_h563zi,
nucleo_h743zi, nucleo_f429zi, nucleo_f746zg.
remove the common: harnesses: net  that are not supported
leave harnesses: net for all other test execpt the one we use

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-07-27 16:24:54 +00:00
Andriy Gelman
d8f955e375 drivers: pwm: Add driver for xmc4xxx using ccu8 module
Adds driver for pwm on xmc4xxx using Capture Compare Unit 8 (CCU8)
module. There are two CCU8 nodes with each one having four slices.
Each slice has two output channels.

Unlike CCU4, this module can generate complementary high-side/low-side
signals for each output channel. A variable dead time can be added
during the off to on transitions to make sure that the
high-side/low-side signals are not on at the same time.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-07-26 15:09:41 +02:00
Andriy Gelman
23b6e4f507 drivers: pwm: Add driver for xmc4xxx using ccu4 module
Adds driver for pwm on xmc4xxx using Capture Compare Unit 4 (CCU4)
module. There are four CCU4 with each one having four channels
Thus it's possible to have up to 16 pwm output signals. The output of
each channel can only be connected to a specific port/pin. The possible
connection and gpio configurations are defined using pinctrl.

The CCU4 module also has a capture mode. Capture support will be added
in the future.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-07-26 15:09:41 +02:00
Gerard Marull-Paretas
7ef8911e8c samples: basic: hash_map: fix libc heap size setting
The malloc arena/heap size setting can be adjusted using different
Kconfig options, depending on the libc implementation. This means
prj.conf can't be used to set this value on projects that can be built
for multiple libcs without generating a Kconfig warning.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-26 14:53:51 +02:00
Johann Fischer
430818ecaa sample/tests: remove CONFIG_USB_COMPOSITE_DEVICE usage
This is no longer necessary, as this option is selected as a dependency
for class implementations where it is required.
Also remove redundant test cases.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-07-26 14:37:15 +02:00
Iuliana Prodan
f4f261bce5 samples: openamp_rsc_table: increase stack size
While testing openamp_rsc_table sample for HiFi4 DSP from
i.MX8MP, realized the stack is not enough.
Increase the size based on Thread Analyzer measurements:

*** Booting Zephyr OS build zephyr-v3.4.0-971-g9415baf2c211 ***
Starting application threads!

OpenAMP[remote]  linux responder demo started

OpenAMP[remote] Linux sample client responder started

OpenAMP[remote] Linux tty responder started
[00:00:00.020,000] <dbg> openamp_rsc_table: mailbox_notify:
mailbox_notify: msg received

[00:00:00.024,000] <dbg> openamp_rsc_table: mailbox_notify:
mailbox_notify: msg received

Thread analyze:
 0x9240c5a0          : STACK: unused 240 usage 1296 / 1536 (84 %); CPU: 10%
      : Total CPU cycles used: 3388523
 0x9240c628          : STACK: unused 240 usage 784 / 1024 (76 %); CPU: 10%
      : Total CPU cycles used: 4086621
 0x9240c6b0          : STACK: unused 408 usage 616 / 1024 (60 %); CPU: 7%
      : Total CPU cycles used: 3553673
 0x9240c738          : STACK: unused 152 usage 872 / 1024 (85 %); CPU: 44%
      : Total CPU cycles used: 25529572
 0x9240c7c0          : STACK: unused 352 usage 672 / 1024 (65 %); CPU: 21%
      : Total CPU cycles used: 13742359
 0x9240c888          : STACK: unused 936 usage 88 / 1024 (8 %); CPU: 0%
      : Total CPU cycles used: 0
 ISR0                : STACK: unused 1536 usage 512 / 2048 (25 %)

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-07-26 14:33:36 +02:00
Iuliana Prodan
393a7e107d samples: add support for nxp_adsp_imx8m in openamp_rsc_table
Add the dts and config overlay for nxp_adsp_imx8m board
in order to have the openamp_rsc_table sample working on
HiFi4 DSP from i.MX 8M Plus.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-07-26 14:33:36 +02:00
Kevin Wang
7bfe096787 samples: drivers: mbox: Support the new board adp_xc7k_ae350
Modify the related source in mbox sample to support board adp_xc7k_ae350.

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2023-07-26 10:51:41 +02:00
Manuel Argüelles
87e40d8b6d samples: enable flash samples for mr_canhubk3 board
Various samples enabled to use the on-board QSPI memory.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-26 09:44:14 +02:00
Pavlo Havrylyuk
f4a1d40924 drivers: counter: Add Infineon CAT1 counter driver
Add initial version of Infineon CAT1 counter driver
Add initial version of binding file for Infineon
Add counters to psco6 dtsi
Add external trigger pin that runs counter

Signed-off-by: Pavlo Havrylyuk <pavlo.havrylyuk@infineon.com>
2023-07-26 09:10:31 +02:00
Pieter De Gendt
8cbb6c8a0c samples: drivers: crypto: Add testcase for NXP MCUX DCP
Add a testcase for mimxrt1064_evk to be able to run the crypto
sample.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-07-26 09:09:48 +02:00
Pieter De Gendt
e1e19732bc samples: drivers: crypto: Aligned AES key
Some drivers require the encryption key to be 4-byte aligned.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-07-26 09:09:48 +02:00
Pieter De Gendt
16f34e969b samples: drivers: crypto: Simplify configuration
Use a default prj.conf to be used for all samples and use
EXTRA_CONF_FILE for specifics.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-07-26 09:09:48 +02:00
Girisha Dengi
ba40e9fded samples: subsys: shell: Custom configs for intel_socfpga_agilex* boards
The intent of this change is to add custom shell configurations for
intel_socfpga_agilex* based boards. As of now, configurations are
added for 'intel_socfpga_agilex5_socdk' board.

Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
2023-07-25 16:58:01 +00:00
Marek Matej
6b57b3b786 soc: xtensa,riscv: esp32xx: refactor folder structure
Refactor the ESP32 target SOCs together with
all related boards. Most braking changes includes:

- changing the CONFIG_SOC_ESP32* to refer to
  the actual soc line (esp32,esp32s2,esp32s3,esp32c3)
- replacing CONFIG_SOC with the CONFIG_SOC_SERIES
- creating CONFIG_SOC_FAMILY_ESP32 to embrace all
  the ESP32 across all used architectures
- introducing CONFIG_SOC_PART_NUMBER_* to
  provide a SOC model config
- introducing the 'common' folder to hide all
  commonly used configs and files.
- updating west.yml to reflect previous changes in hal

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-07-25 18:12:33 +02:00
Marek Matej
3776402f40 boards: xtensa: esp32 board split
Remove virtual esp32 board and replace it with the
real word boards:

- esp32_devkitc_wroom
- esp32_devkitc_wrover (with PSRAM option)

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-07-25 18:12:33 +02:00
Robert Lubos
9866a5229d samples: net: dns_resolve: Improve DHCPv4 handling
There is some ambiguity with the DHCPv4 handling in the dns_resolve
sample. On one hand, the sample uses net_config library, which does
initiate the DHCPv4 on the interface (if enabled) and may block the
initialization until the address is assigned (in case there is no other
statically assigned IPv4 addresses.) On the other hand, the sample
registers for NET_EVENT_IPV4_ADDR_ADD in case DHCPv4 is in use, delaying
the DNS queries until address is assigned.

In case net_config delayed the initialization however, this will not
work, as the event handler will be registered only after DHCPv4 address
is assigned, so the callback will not get executed.

Fix this, by checking if DHCPv4 assigned address already exists on an
interface - if so, schedule DNS queries immediately. Otherwise (for
example in case when net_config was not configured to wait for address)
register an event callback, and schedule queries from there.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-25 14:18:54 +02:00
Carlo Caione
15e84cbfac dts: Move to 'zephyr,memory-attr'
Move to 'zephyr,memory-attr' and use the newly introduced helpers.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-25 11:22:10 +02:00
Daniel DeGrasse
3c23ff051d boards: arm: mimxrt1060_evk: enable PXP rotation for LVGL sample
Enable PXP rotation for LVGL sample. The PXP is configured to
rotate by 0 degrees, so the original image is left untouched.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-25 09:10:52 +02:00
Daniel DeGrasse
d209c837b5 boards: arm: mimxrt1170_evk: enable PXP
Enable PXP engine with RT1170 EVK. The PXP is set to rotate by 0
degrees in the LVGL sample, for testing purposes.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-25 09:10:52 +02:00
Jason Yuan
ad555d08d8 samples: boards: firmware for Twinkie V2
sample firmware for Twinkie V2 that toggles the LED based on charging
status.

Signed-off-by: Jason Yuan <jasonyuan@google.com>
2023-07-25 09:08:19 +02:00
Hiroki Tada
33e0bca014 samples: Remove esp32_temp_sensor
- esp32_temp_sensor is removed as die_temp_polling is used instead of it.

Signed-off-by: Hiroki Tada <tada.hiroki@fujitsu.com>
2023-07-24 13:22:03 +00:00
Hiroki Tada
7e3f0ef407 samples: Add esp32s2_saola overlay
- Add overlay for the esp32s2_saola board to die_temp_polling sample.
- Add aliases for the die_temp_polling sample to esp32s2 dtsi.

Signed-off-by: Hiroki Tada <tada.hiroki@fujitsu.com>
2023-07-24 13:22:03 +00:00
Fabian Blatz
a8b103e4ad samples: lvgl: Enable lvgl shell
Activate the lvgl shell with memory statistics and monkey testing support
for the lvgl sample.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-07-24 09:06:56 +00:00
Daniel DeGrasse
351cb4bafe samples: drivers: add led_is31fl3733 sample to demonstrate usage
Add sample to demonstrate usage of IS31FL3733 LED using the LED API.
This led matrix controller has several custom APIs to expose
functionality not available within the standard led API, such as
limiting LED current.

Signed-off-by: Daniel DeGrasse <daniel@degrasse.com>
2023-07-21 10:51:18 +00:00
Guillaume Gautier
276b5577cb samples: drivers: adc: boards: Add overlay for NUCLEO_WBA52CG
Add overlay for NUCLEO_WBA52CG

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-07-20 16:25:02 +02:00
Felipe Neves
da3ae1af61 samples: drivers: ipm: added IPM over IVSHMEM sample
To demonstrate how to configure Zephyr to use the IPM
driver over the IVSHMEM subsystem. Since this driver
is intended to generate inter QEMU VM notifications
it was better to create a sample app using the shell
for quick demonstration for the users.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2023-07-20 10:44:57 +00:00
Gerard Marull-Paretas
bddf2d9dc0 tests: pm: select HAS_PM
Some tests provide their own PM hooks, adapted for testing purposes. Add
a new option to select HAS_PM, so that CONFIG_PM can be enabled.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-20 10:33:00 +00:00
Michael Zimmermann
0da94225b0 arch/posix: make posix_fuzz_buf const
The original buffer is const as well and we're not allowed to modify it.

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
2023-07-18 19:19:53 +00:00
Michael Zimmermann
8de34fef19 arch/posix: use size_t for posix_fuzz_sz
That's the type of the original argument and we should use it internally as
well to prevent truncating the value.

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
2023-07-18 19:19:53 +00:00
Silviu Petria
f3aaf33422 Bluetooth: Audio: Add TMAP broadcast samples
Add two TMAP broadcast sample applications.

tmap_bms implements the Broadcast Media Sender role. It uses CAP
Initiator broadcast APIs to broadcast an audio stream.

tmap_bmr implements the Broadcast Media Receiver role. It scans and
syncs to the PA having filtered the EA by the presence of TMAP role
information. It also instantiates the VCP.

Signed-off-by: Silviu Petria <silviu.petria@nxp.com>
2023-07-18 11:09:31 +00:00
Chaitanya Tata
631312334e samples: lwm2m: Fix default ID length check for DTLS
If the default which is set to CONFIG_BOARD is used, then the lwm2m
client fails to set the client identity as the default maximum length
allowed is only 16 and for some boards this exceeds.

So, increase the default length to accomodate almost all boards. Also
add a build assert for the length validation.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-07-18 11:08:23 +00:00
Mariusz Skamra
c09c4181cf Bluetooth: audio: tbs_client: Minor Kconfig refactor
This intoduces dedicated Kconfig option to enable TBS client,
that makes the configuration more intuitive.
While configuring GTBS only, the user does not have to explicitly set
the BT_TBS_CLIENT_MAX_TBS_INSTANCES to 0 to disable the TBS client
functionality.
This adds also `tbs_only_client` test case to test the TBS only build
option.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-07-18 11:06:57 +00:00
Wojciech Sipak
6fe016984c boards: efm32pg_stk3402a: use gecko-adc
This adds a proper ADC node that uses the gecko-adc driver.

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
2023-07-18 11:05:39 +00:00
Robert Lubos
87ee12ae72 samples: net: echo_client: Fix build with UDP disabled
In case UDP is disabled, init_udp() is not compiled and the build
fails. Fix this, by providing dummy implementations for UDP functions,
in case UDP is disabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-17 17:21:33 -04:00
Robert Lubos
1f1f550ad6 samples: net: echo_client/server: Fix mbed TLS dependency
All application level TLS operations should be guarded with
"#if defined(CONFIG_NET_SOCKETS_SOCKOPT_TLS)" and not mbed TLS configs
only. Otherwise, in case mbed TLS is enabled, but the sample is not
configured to use TLS (hence TLS credential library is not available
for example), the build may fail or produce spurious warnings.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-17 17:21:33 -04:00
Nerijus Bendžiūnas
397ed142ad doc: fix :zephyr-app: paths
During testing I've found one bad path and looked if
there is more.

I've used this oneliner to find more:

```
rg :zephyr-app: | awk '{ print $3 }' | while read dir
do
    test -d $dir || echo $dir
done | grep '^samples' | grep -v '<' | sort | uniq

```

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
2023-07-17 16:51:16 -04:00
Ryan McClelland
9603c0ce75 samples: sensor: lsm6dso: fix double promotion warning
fix double promotion warning when compiling with
-Wdouble-promotion

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-07-17 13:02:46 -05:00
Nick Ward
371f0f2503 drivers: adc: use adc_is_ready_dt helper function
Update  `struct adc_dt_spec` use with adc_is_ready_dt()

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-07-17 10:16:22 +00:00
Chen Xingyu
18d60b9c5d samples: driver: auxdisplay: Add overlay for PT6314 on esp32c3_devkitm
This demo is done on a Futaba M202MD15FA module, wired as:

* STB   -> PIN5
* SCK   -> PIN6
* SI/SO -> PIN7

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2023-07-14 12:09:03 +02:00
Fabio Baltieri
04e0e458c8 input: convert gt911 from kscan
Convert the GT911 driver to the input subsystem, fix the existing boards
to work in the default config.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-13 14:24:50 +00:00
Loic Poulain
df7749129f samples: cdc_acm: Add 96b_carbon to usbd-next board
This board can rely on udc_stm32 usbd-next driver.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2023-07-13 10:44:42 +02:00
Fabio Baltieri
15f78fa545 samples: input_dump: use CONFIG_INPUT_EVENT_DUMP
Now that input dump functionalities are at subsystem level, drop the
custom code from the sample, just enable CONFIG_INPUT_EVENT_DUMP.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-12 10:53:04 +00:00
Daniel DeGrasse
158feb641a samples: drivers: kscan: enable logging, and add RK055HDMIPI4M shield
Enable logging by default in kscan sample, so that user will see output
even if they do not have a keyboard connected that follows the keymap.
Add a specific testcase for boards that support the RK055HDMIPI4M
display.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-11 09:53:38 -05:00
Daniel DeGrasse
933c9f4351 boards: arm: mimxrt595_evk: remove RK055HDMIPI4M display definition
Remove display definition from RT595 EVK, as this is now supported by
the shield. Add gpio nexus for the FFC connector on this EVK.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-07-11 09:53:38 -05:00
Maximilian Deubel
860515a3ad samples: subsys: usb: webusb: Fix Win10 detection
This patch refactors the usage of MS OS 2.0 descriptors in the
WebUSB sample. The function subset header was removed since it
is not allowed for non-composite devices.
Also, a new random GUID was added for automatic driver installation.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2023-07-10 09:26:30 +02:00
Yong Cong Sin
59adf0bb74 samples: posix: add sample for uname
Add a simple, testable sample to print everything in the utsname struct,
and added a `uname` shell cmd basically copied from nuttx just for fun.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-07-09 16:57:16 -04:00
Francois Ramu
f94fd8e60c samples: subsys: usb cdc acm composite with mini nb of USB EndPoints
The stm32f207 and stm32f429 target boards only have 4 bidir EP
on the USB FS node. This is not enough to run the sample:
simply exclude those 2 target platforms

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-07-07 09:18:09 +02:00
Arnaud Pouliquen
f260dc10a9 samples: ipc: rename virtio_xxx static functions in openamp remote
The "virtio_" prefix is used by the open-amp library API.
Rename local functions using "ipc_virtio_" prefix to avoid
function redefinition.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2023-07-06 09:47:59 +00:00
Alberto Escolar Piedras
c3dc01ddf3 samples zbus remote mock: Add overlay for native_sim
Add overlay configuration for native_sim, and enable it
for this platform in the test yaml filter.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-05 07:01:19 -04:00
Alberto Escolar Piedras
3af65caed0 samples display lvgl: Add overlay for native_sim
Add overlays for the native_sim board

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-05 07:01:19 -04:00
Alberto Escolar Piedras
5abee92a6c samples zbus uart_bridge: Add overlay for native_sim
Add overlay configuration for native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-07-05 07:01:19 -04:00
Jerzy Kasenberg
cc53f3f021 samples: drivers: counter: alarm: add support for the Smartbond Timer
Add support for the Renesas Smartbond Timer IP to the counter alarm sample.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-07-05 13:00:50 +02:00
Arnaud Pouliquen
b227f89bcd samples: ipc: rename virtio_xxx static functions
The "virtio_" prefix is used by the open-amp library API.
Rename local functions using "ipc_virtio_" prefix to avoid
function redefinition.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2023-07-05 09:15:08 +02:00
Jiaxuan Weng
33e3ddd4d5 boards: xtensa: Add support for xiao esp32s3
add board support and overlay for seeed xiao esp32s3.

Signed-off-by: Jiaxuan Weng <1391548050@qq.com>
2023-07-03 09:31:27 +02:00
Vinayak Kariappa Chettimada
121c505153 samples: Bluetooth: iso_broadcast: Sent callback to sync ISO Data send
Use the ISO Data sent callback in iso_broadcast sample to
synchronize the ISO data send. ISO Data sent callback is
generated every SDU interval corresponding to the number of
completed packets event generated by the Controller.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-30 16:11:06 +02:00
Emil Gydesen
db8bb73eae samples: Bluetooth: Add CAP AD for TMAP peripheral
The TMAP peripheral sample was missing the CAP announcement
service data.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-30 16:08:00 +02:00
Jai Arora
cf0ff30b53 bluetooth: ots: Fix bt_ots_init paramter struct naming
Patch to rename struct bt_ots_init to struct bt_ots_init_param
to avoid duplicating the name bt_ots_init.

Fix for issue#45968

Signed-off-by: Jai Arora <infolinesoni@gmail.com>
2023-06-30 16:06:08 +02:00
Emil Gydesen
69f7fd9cb2 Bluetooth: Audio: Rename bt_codec to bt_audio_codec_{cap, conf, data}
Rename the bt_codec struct to bt_audio_codec_conf or
to the new struct bt_audio_codec_cap.
Rename the bt_codec_data to bt_audio_codec_data.

The purpose of this is to split the codec specific configuration
and codec capabilities into seperate structs, as they do not
reflect the same values, or used for the same purpose.

This commit depends on the preset macros workings on either
type of struct (for now), but will be modified in future updates.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-30 12:39:50 +02:00
Mariusz Skamra
17223f136f Bluetooth: audio: Fix metadata length checks
This fixes metadata length checks for BT_AUDIO_METADATA_TYPE_EXTENDED
and BT_AUDIO_METADATA_TYPE_VENDOR that should be at least 2 bytes long.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-06-29 21:06:58 +02:00
Mariusz Skamra
db5767e50f Bluetooth: audio: Accept empty CCID list in audio metadata
The CCID list can be empty, as the Assigned Numbers is not strict
regarding it's minimum length.

Fixes: #59666
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-06-29 21:06:58 +02:00
Daniel DeGrasse
90e3650acf samples: ipc: enable openamp sample for RT1170 EVKB
Enable openamp sample for RT1170 EVKB.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-29 21:05:56 +02:00
Daniel DeGrasse
d5329d1391 boards: arm: mixmrt1170_evkb: enable display support
Enable display support for RT1170 EVKB, using display sample with
RK055HDMIPI4M display.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-29 21:05:56 +02:00
Daniel DeGrasse
74ffb99a72 boards: arm: mixmrt1170_evkb: add support for ADC
Add support for ADC sample and API test on RT1170 EVKB.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-29 21:05:56 +02:00
Kevin Wang
5876cc53d4 tests: drivers: watchdog: wdt_basic_api:
1. Add atcwdt200 options for WDT_NODE in testcase.
2. Add the board overlay file in wdt sample to specify
   the watchdog0 alias

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2023-06-29 10:13:05 +00:00
Vinayak Kariappa Chettimada
87d65dc502 samples: Bluetooth: hci_rpmsg/uart: Fix BT_CTLR_ISO_TX_BUFFER_SIZE
Restore back BT_CTLR_ISO_TX_BUFFER_SIZE to 251 after fix in
commit e460847b60 ("Bluetooth: host: don't fragment ISO
if len <= MTU").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-29 10:06:19 +00:00
Vinayak Kariappa Chettimada
6abef01108 samples: Bluetooth: hci_rpmsg: Fix Rx Prio thread stack usage
Fix Rx Prio thread stack usage value to Kconfig default
value. After long duration use of hci_rpmsg in audio
application, remaining stack was 80 bytes, hence increase
back to 448 as set in the Kconfig defaults.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-29 10:06:19 +00:00
Francois Ramu
fc945035d2 samples: drivers: auxdisplay requires a fixture to run on a platform
Add a config "fixture_auxdisplay" to make the samples/drivers/auxdisplay
runnable on a platform, else the application is useless
This fixture will differ from the existing "fixture_display"

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-06-28 15:20:00 +02:00
Matthias Breithaupt
04ce5b9e58 mgmt: hawkbit: remove NET_SOCKETS_POSIX_NAMES dependency
Currently, it is not possible to use hawkbit with code that requires
POSIX_API to be set due to the dependency on NET_SOCKETS_POSIX_NAMES.
Since a lot of other code has already been moved to `zsock_`, this
commit does the same for hawkbit.

Co-authored-by: rojedag <r.ojeda@vogl-electronic.com>
Signed-off-by: Matthias Breithaupt <m.breithaupt@vogl-electronic.com>
2023-06-28 06:32:45 +00:00
Emil Gydesen
5a4c9a2112 Bluetooth: BAP: Unicast client shall support 0 or > 1 endpoints
As per table 4.2 in BAP v1.0.1, the BAP unicast client shall
support at least 2 (> 1) endpoints in either direction if it
supports that direction.

Since Kconfig does not support such requirements (0 || > 1),
this is done using a BUILD_ASSERT.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-26 12:40:39 +00:00
Seppo Takalo
5c1228770e net: lwm2m: Add support for X509 certificates
Add support for using X509 certificates.
Default settings use ECDSA certificates with SHA256 hash.

When different settings are required clients should overwrite
struct lwm2m_ctx->load_credentials() and
struct lwm2m_ctx->set_socketoptions()

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-06-26 12:35:29 +00:00
Iuliana Prodan
f7c1f91148 samples: openamp_rsc_table: move arch specific config from project
The CONFIG_PLATFORM_SPECIFIC_INIT is ARM specific, so move this to
board config file, rather than project config.
It should be no restriction to run the openamp_rsc_table sample on other,
non-arm, platforms.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-06-24 08:23:13 -04:00
Francois Ramu
e216dcfc3d samples: drivers: quadspi flash of the stm32 boards
This enables the samples/drivers/spi_flash on quad-spi flash
to run on any stm32 target with external NOR quad flash.
The SPI_FLASH_MULTI_SECTOR_TEST test case is possible with
quadspi too.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-06-23 10:51:06 +00:00
Francois Ramu
7f8342775f samples: drivers: jesd216 jedec ID and SFDP from quad-flash
This adds the support jedec configuration to run
the jedec sample application. So target board can display
the content of the quad-NOR flash.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-06-23 10:51:06 +00:00
Andy Sinclair
d79cf205c6 samples: shields: npm1300_ek: Added LED to example
Updated shield sample to drive LED

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-06-23 08:55:13 +00:00
Mykola Kvach
dd733493f5 samples: fs: littlefs: make sample workable for mmc disk driver
The LittleFS sample may be used for both SDMMC and MMC disk drivers,
so make it possible to work with different volume disk driver names.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-06-23 09:20:10 +02:00
Emil Gydesen
ca1fd03520 samples: Bluetooth: Fix TMAP peripheral off-by-one URI schemes
i has to be less than the size of the array, as we use i as the
index.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-22 12:27:50 +02:00
Emil Gydesen
969d279190 samples: Bluetooth: Unicast client missing err check on sem
Added missing error check when taking the sem_stream_qos.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-22 12:27:36 +02:00
Marko Sagadin
54cbf45c74 drivers: uart: add support for serial ports on native posix
Add support for communication with serial ports on native POSIX platform
via UART driver API. Serial port driver supports polling API,
configuration of the serial ports used via devicetree and command line
options, and runtime configuration with `uart_configure`.
Multiple instances of the driver are supported.
Example use and configuration is also demonstrated in the
`samples/drivers/uart/native_tty` sample.

Closes: #56586

Signed-off-by: Marko Sagadin <marko.sagadin42@gmail.com>
2023-06-21 09:27:22 +02:00
Grzegorz Chwierut
732dd4843d twister: pytest: Simplify interface to pytest-twister-harness
Add DeviceAbstract class to default imports from pytest-twister-harness
package to simplify importing DUT package, when creating tests.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-06-20 14:46:55 -04:00
Aleksandr Khromykh
327eb119b6 Bluetooth: Mesh: add tf-m support for ble mesh
This PR adds ability to build mesh with tf-m psa
for platforms those support tf-m.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-06-19 15:04:17 +02:00
Guy Morand
d87d934e75 samples: Add is31fl3216a LED sample
This demonstrates and tests is31fl3216a driver functionality.

Signed-off-by: Guy Morand <guy.morand@bytesatwork.ch>
2023-06-19 11:02:36 +02:00
Saravanan Sekar
026d476a84 samples: websocket_client: close tcp socket after websocket_disconnect
websocket_disconnect api does not closes user tcp socket, so tcp socket
must be closed after done.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
2023-06-19 09:18:45 +01:00
Jonas Remmert
22e7edbbab samples: drivers: led: add a sample for ti lp5569
Add a sample for the ti lp5569 led controller driver.

Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
2023-06-19 09:17:52 +01:00
Ryan Erickson
53843c6464 samples: fat_fs: Add support for MG100 board
Add overlay so the sample can be built for the MG100.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2023-06-19 08:51:27 +02:00
Victor Chavez
bee43bd972 logging: Fixed BLE backend buffer size independent of MTU
The BLE backend has a bug that when the MTU size is less than
the buffer the notification always fails and does not allow
to flush the buffer.

This fix checks for the MTU size of the current connection
and adjusts it. In addition, the buffer size is no longer
settable by the user and depends on the transmission size
of MTU set with CONFIG_BT_L2CAP_TX_MTU.

Signed-off-by: Victor Chavez <chavez-bermudez@fh-aachen.de>
2023-06-19 08:38:08 +02:00
Florian Grandel
1ee4d3ed77 net: l2: ieee802154: document L1/L2 sep. of concerns
The method ieee802154_radio_handle_ack() does not belong to the
PHY/radio layer but to the L2 layer. It is a callback called from the
radio layer into the L2 layer and to be implemented by all L2 stacks.
This is the same pattern as is used for ieee802154_init(). The
'_radio_' infix in this function is therefore confusing and
conceptually wrong.

This change fixes the naming inconsistency and extensively documents
its rationale.

It is assumed that the change can be made without prior deprecation of the
existing method as in the rare cases where users have implemented custom
radio drivers these will break in obvious ways and can easily be fixed.

Nevertheless such a rename would not be justified on its own if it were
not for an important conceptual reason:

The renamed function represents a generic "inversion-of-control" pattern
which will become important in the TSCH context: It allows for clean
separation of concerns between the PHY/radio driver layer and the
MAC/L2 layer even in situations where the radio driver needs to be
involved for performance or deterministic timing reasons. This
"inversion-of-control" pattern can be applied to negotiate timing
sensitive reception and transmission windows, it let's the L2 layer
deterministically timestamp information elements just-in-time with
internal radio timer counter values, etc.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-06-17 16:20:21 -04:00
Daniel DeGrasse
7993e7d1b0 samples: sensor: thermometer: add trigger support to sample
Add optional trigger support to sample. If the selected temperature
sensor supports triggering using the AMBIENT_TEMP channel, then
temperature thresholds will be set for +0.5 and +1.5 degrees celsius
above ambient temperature. Sample overlays are provided for the
FRDM_K22F board to demonstrate enabling this feature.

Signed-off-by: Daniel DeGrasse <daniel@degrasse.com>
2023-06-17 08:01:16 -04:00
Manimaran A
ed27c1b75c drivers: ps2: microchip: PS2 wakeup pin configured in overlay
Updated the overlay files with PS2 wakeup pin

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-06-17 07:59:07 -04:00
Manimaran A
0f6cb5edcd drivers: ps2: microchip: Low power and wakeup enabled
ps2 driver updated to support low power and wakeup.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-06-17 07:59:07 -04:00
Daniel DeGrasse
fcf6efe8ec samples: ipc: set flash location for CM4 in openamp sample
Set flash location for CM4 to ocram, so CONFIG_FLASH_BASE_ADDRESS is
set correctly.

Fixes #59213

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-17 07:50:46 -04:00
Bjarki Arge Andreasen
22152915ab drivers/gsm_ppp: Update existing modules to use PPP L2
This commit replaces the workarounds spread around the
drivers and subsystems with the updated PPP L2
interface.

Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
2023-06-17 07:46:21 -04:00
Aleksandr Khromykh
29895d8275 Bluetooth: Mesh: refactor mesh to use both tinycrypt and psa based crypto
A mesh key type has been added to be able to choose the different
key representation for different security libraries.
The type as well as some functionality related to Mesh key
management has been added as a public API.
If tynicrypt is chosen then keys have representation
as 16 bytes array. If mbedTLS with PSA is used then keys are
the PSA key id. Raw value is not kept within BLE Mesh stack
for mbedTLS. Keys are imported into the security library
and key ids are gotten back. This refactoring has been done
for the network(including all derivated keys), application,
device, and session keys.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-06-17 07:46:03 -04:00
Guangfu Hu
518cfe02a3 samples: sensing: add a simple sensing subsystem app
Add a simple sensing subsystem application.

Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
2023-06-17 07:43:25 -04:00
Keith Packard
a476e87073 samples/cmsis_rtos_v2/timer_synchronization: Set malloc arena size to zero
This test fails when using picolibc with the default malloc arena
value. Fix this by explicitly setting the malloc arena size to zero, as
when using the minimal C library.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-06-17 07:28:42 -04:00
Keith Packard
5dd87e7db3 samples/userspace: Set common malloc arena size to zero for syscall_perf
The default malloc arena when using picolibc is too large for the
hifive1_revb target.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-06-17 07:28:42 -04:00
Keith Packard
2a30acc823 samples/tfm_integration: Remove 'noreturn' attribute from main
This conflicts with what the compiler expects for the definition of 'main'
when -ffreestanding is not used.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-06-17 07:28:42 -04:00
Andrei Hutanu
be04e30a88 samples: net: mqtt_azure: hotfix stack overflow
running samples/net/cloud/mqtt_azure in QEMU with default
configuration crashes with exception. This PR change doubles
the default workqueue stack size in a attempt to fix the issue
reported in: GH#58930.

Signed-off-by: Andrei Hutanu <andrei.hutanu.i@gmail.com>
2023-06-14 09:12:08 -04:00
Anas Nashif
9f37ae902b tests/samples: set ram/rom limits on some samples/tests
Increase RAM requirements for some test, we have many exotic platforms
failing to link due to the size of the test.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-13 09:38:27 -04:00
Anas Nashif
dd43a65540 samples: watchdog: fix twister filter
Fix devicetree filter. dt_has_compat is not a twister support filter.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-13 09:38:27 -04:00
Anas Nashif
8ffb08b10e tests: net: sockets: remove scneario
This scneario does not build and does not fit on hardware, remove.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-13 09:38:27 -04:00
Anas Nashif
5411e7d4a8 tests: synchronization: do not build on all
Do not build on platforms, we have other tests covering this already.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-13 09:38:27 -04:00
Anas Nashif
b835b02136 tests: cleanup metadata and filtering
- Add integration_platforms to avoid excessive filtering
- Make sure integration platforms are actually part of the filter
- Fix some tags and test meta data

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-13 09:38:27 -04:00
Anas Nashif
c1bb577f28 samples: bluetooth: remove duplicate entry in test
Also remove platforms where we overflow on RAM.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-13 09:38:27 -04:00
Rubin Gerritsen
9cb339166e Samples: iso_connected_benchmark: Fix invalid latency
The default transport latency was not valid.
Set it to a value that is large enough.
The minimum possible transport latency is 16580 us,
but this assumes the controller ignores the RTN=2.
If the controller uses the RTN=2, the transport latency will
be slightly larger than 30 ms depending on
how the controller chooses to setup the ISO link.

Therefore, we set it to 40 ms to ensure the default
configuration is valid.

How these numbers were found:

For unframed PDUs this is defined in Core_v5.4, Vol 6,
Part G, Section 3.2.2:
  Transport_Latency =
    CIG_Sync_Delay + FT * ISO_Interval - SDU_Interval

Because unframed PDUs are being used, the ISO interval needs
to be a multiple of SDU interval.
If MaxPDU = MaxSDU and the PHY is 2M, this results in that
the maximum subevent size is:
2120 * 2 + 2 * 150 = 4540.
For 2 CISes this is 9080 us > 7500
Therefore, the controller has to set the ISO interval to a
minimum of 15000 us in order to fit the packets.

Based upon this info, the controller has the freedom to ignore
or use the requested RTN=2.
1. Ignore -> NSE is 2: Minimum ISO interval is 15000 us
2. RTN = 2, Increase NSE: 4 * 4540 = 18160 -> ISO_Interval = 22500 us
3. RTN = 2, Increase the FT to 2, NSE = 2 -> ISO_Interval = 15000 us

For (1):
  Transport_Latency = CIG_Sync_Delay + 15000 - 7500
                    = CIG_Sync_Delay + 7500
For (2):
  Transport_Latency = CIG_Sync_Delay + 22500 - 7500
                    = CIG_Sync_Delay + 15000
For (3):
  Transport_Latency = CIG_Sync_Delay + 2 * 15000 - 7500
                    = CIG_Sync_Delay + 22500

As shown in Core_v5.4, Vol 6, Part B, Section 4.5.14,
CIG_Sync_Delay needs to be larger than or equal to the length of
all ISO events. That is, the sum of the subevents:

For (1): CIG_Sync_Delay = 2 * 4540 = 9080
For (2): CIG_Sync_Delay = 4 * 4540 = 18160
For (3): CIG_Sync_Delay = 2 * 4540 = 9080

This results in the following transport latencies:

For (1): Transport_Latency = 9080 + 7500 = 16580
For (2): Transport_Latency = 18160 + 15000 = 33160
For (3): Transport_Latency = 9080 + 22500 = 31580

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2023-06-09 14:16:34 -04:00
Rubin Gerritsen
faecdff7a2 Samples: iso_connected_benchmark: Use BT_LE_ADV_OPT_ONE_TIME
It is not intentional to continue advertising once a connection has been
established for two reasons:
 1. We do not configure enough connection contexts for this
 2. We don't want to generate controller scheduling conflicts that can
    possibly reduce performance.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2023-06-09 14:16:34 -04:00
Vinayak Kariappa Chettimada
5eb17bca21 samples: Bluetooth: hci_usb: Disable USB_CDC_ACM
BlueZ btusb does not recognize hci_usb sample as Bluetooth
Controller when CDC ACM is enabled in the sample.

Refer to https://github.com/zephyrproject-rtos/zephyr/issues/29107

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-09 11:44:02 -04:00
Francois Ramu
c908aead77 tests: drivers: dac channel structure has a buffered parameter boolean
Add the '.buffered' field to the dac_channel_cfg structure
when testing the DAC.
This boolean parameter is initialised to 'true' to PASS the test.
It follows the https://github.com/zephyrproject-rtos/zephyr/pull/57730
Also changed for the samples/drivers/dac

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-06-08 09:33:11 -04:00
Vinayak Kariappa Chettimada
b7c2ca4bdf samples: Bluetooth: Fix Tx ISO Data packet sequence number
Fix Tx ISO Data packet sequence number increment based on
the send timer timeout value.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-08 06:47:25 -04:00
Vinayak Kariappa Chettimada
7d7d1cbf53 samples: Bluetooth: Relax Tx ISO SDUs dropped in unicast audio samples
Relax Tx ISO SDUs being dropped in unicast audio client and
server samples when using the Zephyr Bluetooth Low Energy
Controller, i.e. Tx ISO SDUs dropped due to delayed ISO data
send calls in upper layer with respect to payload number in
the current ISO radio events in the Controller.

This option is disabled in the sample and users can use it
when need be.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-08 06:47:25 -04:00
Vinayak Kariappa Chettimada
f992029f26 samples: Bluetooth: unicast audio client and server overlay config
Add Zephyr Bluetooth Low Energy Controller overlay config for
the unicast audio client and server samples.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-08 06:47:25 -04:00
Rubin Gerritsen
58cc10b333 Bluetooth: samples: central_iso: Unref if send fails
Fixes a resource leak.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2023-06-07 15:17:36 -04:00
Rubin Gerritsen
57ab4f4cf4 Bluetooth: samples: ISO: Check validity of incoming data
Only print incoming data when the data is valid. Otherwise we also
print incoming data when no data was received.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2023-06-07 15:17:36 -04:00
Jose Alberto Meza
2602b7260f samples: drivers: peci: Exclude MEC172x EVB from test
PECI bus sample requires a controller and a target
Intel system(PECI controller) + Embedded controller(PECI target),
where EC HW can be add-on card (mec172xmodular) or onboard EC.

MEC172x EVB is not intended to be connected hence excluding
the platform.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2023-06-07 13:57:16 -04:00
Théo Battrel
e9ee3e0af0 Bluetooth: Samples: Remove usage of BT_DEBUG_LOG
Remove usage of Kconfig symbol `CONFIG_BT_DEBUG_LOG` from samples. It
has been deprecated since this PR:
https://github.com/zephyrproject-rtos/zephyr/pull/56183

The Kconfig symbols has been replaced by `CONFIG_LOG=y` on most of the
cases. Or it has been removed when not needed anymore.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-06-07 13:56:55 -04:00
Dominik Ermel
e0e7f5888f fs/littlefs/sample: Increase stack size
Increase stack size to prevent sample crashes.

Fixes #57525

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-06-07 13:38:44 -04:00
Benjamin Cabé
21f473aaec samples: doc: fix dead links
Fixed deadlinks reported by Sphinx linkchecker

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Benjamin Cabé
a76396fb7a doc: update stale links to MCUboot documentation
mcuboot.com/documentation --> docs.mcuboot.com

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Benjamin Cabé
23f2a2066f doc: update stale srecord links
Updated 404 links to point to valid locations.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Benjamin Cabé
7cf347769a doc: update LittleFS Github repo URLs
LittleFS now lives in the littlefs-project GH organization.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Tomasz Moń
5d87abccb2 samples: usb: mass: Set next stack max LUNs to 3
Mass storage sample contains separate Kconfig options for RAM, Flash and
SDMMC disk drivers. All disk drivers can be enabled simultaneously and
therefore the maximum number of concurrent LUNs is 3.

Configure Mass Storage class maximum LUNs to 3 to solve initialization
failures on targets that enable more than one disk driver at a time.
Each additional supported LUN increases the Mass Storage class memory
usage by 48 bytes (struct scsi_ctx) on 32-bit targets. Allocating 3 SCSI
context structures allows the sample to work regardless what disk
drivers are concurrently enabled.

Fixes: #57657

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-06-06 11:12:55 -04:00
Mariusz Skamra
21599a6b14 Bluetooth: audio: has: Fix building with preset support disabled
This fixes regression causing compilation errors seen when the
code is built without preset support (BT_HAS_PRESET_COUNT = 0).

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-06-05 16:24:18 +02:00
Matthew Bradbury
74e98d5375 samples: coap_client: Return correct result from send_simple_coap_request
send_simple_coap_request needs to return a result from previous functions
instead of success at the end of the function. Without doing so the example
may wait for a response from a coap sever when a message failed to send.

Signed-off-by: Matthew Bradbury <matt-bradbury@live.co.uk>
2023-06-05 08:30:41 -04:00
Grzegorz Chwierut
ab5b48beed twister: pytest: Wrap iter_stdout
Added waiting for prompt instead of calling time.sleep,
to fix issue with longer setting up platforms with TF-M
enabled. Wrapped iter_stdout generator, to avoid issues
when generator is created and called multiple times
in test scenarios.
Fixes: #58747

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-06-02 18:55:27 -04:00
Anas Nashif
0064b6e8b6 tests: samples: cleanup test tags, add integration_platforms
Use integration platforms and sanitize tags.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-02 04:47:06 -04:00
Anas Nashif
34a4001d49 samples: net: fix tags/identifiers
Add net tag to net samples.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-02 04:47:06 -04:00
Anas Nashif
db4a5f11ea tests: add kernel tag to all benchmarks and samples
All those benchmarks are kernel related, so add the kernel tag to avoid
building them when non kernel changes are being submitted.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-02 04:47:06 -04:00
Anas Nashif
cec8fd1c6e tests: ztest: fix tags for testsuite and unify them
Use test_framework as unified tag so we can filter tests in a consistent
way.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-02 04:47:06 -04:00
Magdalena Kasenberg
169812f84c samples: unicast audio: Wrap start of the send timer
Enable the send timer only when at least one ASE source is enabled,
CONFIG_BT_ASCS_ASE_SRC_COUNT > 0 in case of unicast_audio_server,
CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT > 0 for unicast_audio_client.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2023-06-01 09:06:24 -04:00
Keith Packard
6ccdf47f60 lib/cpp: Remove CONFIG_CPP_MAIN
With Zephyr now always using `int main(void)`, there's no longer any need
for this definition. The last remaining use which gated the declaration of
_posix_zephyr_main isn't necessary as adding that declaration
unconditionally is harmless.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-05-31 06:16:35 -04:00
Keith Packard
3f992162e7 samples/sip_svc: Switch main return type to int
Zephyr now requires that main return int instead of void.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-05-31 10:36:17 +02:00
Keith Packard
c09618cf63 samples/eth_ivshmem: Switch main return type to int.
Zephyr now requires that main return int instead of void.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-05-31 10:36:17 +02:00
Keith Packard
35f445c247 samples/auxdisplay: Switch main return type to int.
Zephyr now requires that main return int instead of void.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-05-31 10:36:17 +02:00
Keith Packard
bcb19a7801 samples/mec172xevb_assy6906: Switch main return type to int
Zephyr now requires that main return int instead of void.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-05-31 10:36:17 +02:00
Andrzej Głąbek
e7fdb31a95 samples: sensor: qdec: Correct encoder emulation
Use phase shift between the emulated A and B signals equal to the half
of the used period instead of a fixed 1 millisecond, to not enforce
decoders to use relatively frequent sampling just to make use of this
emulation.
Add also a few missing `static` keywords.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-05-30 14:01:04 +02:00
TOKITA Hiroshi
5f5b34793d samples: net: dhcpv4_client: Make DHCPv4 requests on all ipv4 interfaces
Send DHCPv4 requests on all available ipv4 interfaces.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-05-29 14:34:46 -04:00
Tristan Honscheid
dc9bd3afe3 sensors: Create sensor trig subcommand
This PR relocates the sensor trigger sample application from the
`sensor_shell` sample to a subcommand in the actual sensor shell. The
subcommand has a UI for enabling a given trigger on a given sensor.
A built-in handler for the data_ready trigger is included that prints
the latest data to the log. Currently, only `SENSOR_TRIG_DATA_READY` is
supported but the groundwork is there to add others. Tested on a
`tdk_robokit1` board.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2023-05-27 05:33:11 -04:00
Anas Nashif
04827ba71f tests/samples: use integration_platforms more where it makes sense
Use integration platforms to limit churn and build time in PR CI .

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-05-26 17:52:02 -04:00
Jamie McCrae
764da7fff1 samples: driver: Add auxdisplay sample
Adds a simple auxdisplay sample which outputs hello world and the
name of the board. A sample overlay is provided for the
nucleo_f746zg board with a Hitachi HD44780-compatible display.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2023-05-26 23:05:58 +02:00
Rajkumar Kanagaraj
682dbae203 samples: tfm: Re-commit psa_crypto sample
Adds a refactored version of the psa_crypto sample back,
which was removed as part of the update to TF-M 1.7.0
due to unresolvable (at the time) issues with use of
MbedTLS instances on the S and NS sides.

This sample takes advantage of changes to MbedTLS and
TF-M that were introduced after the TF-M 1.7.0 and MbedTLS
3.3 release, and cherry-picked in Zephyr, allowing for
improved linking of MbedTLS in secure and non-secure
images. PSA API calls on the non-secure side can now be
correctly routed to the secure partition, while X.509
and TLS calls remain on the non-secure/Zephyr side.

Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
2023-05-26 14:00:18 -04:00
Madhurima Paruchuri
a19d905cc4 USB-C: genVIF: Cleanup and add support to pick static data from input
Removed few VIF properties which are being hardcoded
Updated the script to parse source VIF XML and add information to
the output
Added optional Kconfig option to configure custom source VIF XML path
Cleaned up the code

Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
2023-05-26 13:54:43 -04:00
Grzegorz Chwierut
23b7f0cdb8 samples: testsuite: exemplary pytest shell test
Adding exemplary pytest shell test to show possibilities of new pytest
plugin. This test uses bidirectional communication between tester and
device under test.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-05-26 13:52:15 -04:00
Yuval Peress
ca5bf10143 sensor_shell: Update to new sensor_read API
Update the sensor shell logic to use the new sensor_read() APIs and
make triggers an option of the sensor_shell sample (this avoids the
trigger stealing the interrupt status from one-shot reads).

Signed-off-by: Yuval Peress <peress@google.com>
2023-05-26 11:04:54 -05:00
Manimaran A
b6555ee322 sample: crypto: mchp: Regex pattern updated in yaml file
Updated the sample.yaml file with Console message Regex
pattern to fix Twister error.

Fix: #58074

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-05-26 09:51:47 -04:00
Johann Fischer
9a4ed741d6 usb: device_next: use specific macros for string descriptors
Add and use specific macros for manufacturer, product, and
serial number string descriptors.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-05-26 09:48:19 -04:00
Tyler Ng
ae350a9c77 boards: riscv: opentitan_earlgrey: Add the OpenTitan AON Timer
Adds the AON Timer device in the OpenTitan Earlgrey device tree.
Adds overlay files to enable the watchdog and set the alias to
`watchdog0`.

Adds the AON timer (watchdog part) to the supported features section
of the OpenTitan documentation.

Signed-off-by: Tyler Ng <tkng@rivosinc.com>
2023-05-26 09:45:25 -04:00
Michał Szprejda
cb43d8f525 shell_module: Add a robot test case to sample.yaml
Add a basic Robot Framework test suite utilizing the robot harness
runnable in Renode.

Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2023-05-26 09:43:49 -04:00
Fredrik Danebjer
7457bcf0a2 Bluetooth: Audio: Make HAS optional notify characteristics optional
Added Kconfig options to make HAS characteristics that has notify as
optional property selectable and thus optional. These settings are
global, meaning that a chosen notify property will be used for all
registered has instances.

Signed-off-by: Fredrik Danebjer <frdn@demant.com>
2023-05-26 09:09:06 -04:00
Emil Gydesen
e8ade2356a Bluetooth: BAP: Add unicast client and server write long support
Add support for long writes for the unicast client and server.
This reuses the ATT buffer for long reads.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-26 05:55:15 -04:00
Emil Gydesen
5109c941f2 Bluetooth: Audio: Add TBS client TX buffer count requirement
After removing the high default for MCS, it was discovered that
the TBS client requires a significant amount of buffers to work
properly as well. Added the requirement as a build assert that
depends on which optional TBS client features are enabled.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-26 05:54:58 -04:00
Emil Gydesen
534d6f3b2c Samples: Bluetooth: TMAP peripheral avoid using strtok
strtok should not be used for the purpose it was being used for.
Furthermore, the pointer that was stored from the value is not
a long-living pointer, and would in fact be invalid after the
callback has returned.

Modified the code so that we store the value in the application
and then do a proper search for the first URI in the list.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-25 16:27:26 +02:00
Emil Gydesen
d753a382a1 Samples: Bluetooth: Fix return value of main in TMAP peripheral
The main function is now an int instead of void, and has been
fixed for the sample.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-25 16:27:26 +02:00
Emil Gydesen
23a239e104 Samples: Bluetooth: Fix build errors for TMAP central
The TMAP central had a few bugs. It was also using the old
BAP discovery API.

The commit fixes the bugs, and updates it to use the new BAP
discover API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-25 16:27:26 +02:00
Steffen Jahnke
39b50ee37c boards: shields: Adding a new amg88xx shield
Added the new amg88xx sensor shield with designation
amg88xx_grid_eye_eval_shield and updated the overlay, Kconfig and
documentation files accordingly.
The platforms that are compatible with new shield changed, so
sensor sample yaml file was extended for both available shields.

Signed-off-by: Steffen Jahnke <steffen.jahnke@eu.panasonic.com>
2023-05-25 13:31:29 +00:00
Roman Dobrodii
defb159ab1 soc/arm/silabs: support BLE with PM in Series 2 SoCs
Using EM2 or deeper sleep states (where HF clocks are off) requires
special care if BLE radio is used, since BLE radio relies on that clock,
and its power/clock requirements need to be taken into account
On SiLabs, radio PM is implemented as part of RAIL blob, which relies
on sl_power_manager HAL service. I've implemented SoC PM
state changes using sl_power_manager instead of emlib, and added
call to RAIL PM initialization in Gecko HCI driver.

Signed-off-by: Roman Dobrodii <rdobrodii@antmicro.com>
2023-05-24 13:31:44 -04:00
Andrzej Kuros
174b7f4775 nrf_802154: nrf_802154_serialization_error never returns
Functions nrf_802154_serialization_error and
nrf_802154_sl_fault_handler shall never return.
However `__ASSERT()` might expand to an empty instruction
CONFIG_ASSERT=n and is not enough to stop execution.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2023-05-24 16:41:39 +02:00
Silviu Petria
5096aa1c00 Bluetooth: Audio: Add TMAS and two TMAP samples
Add implementation of the Telephony and Media Audio Service, as well as
two sample applications.

tmap_central reflects a smartphone implementing the Unicast Media Sender
and Call Gateway TMAP roles.

tmap_peripheral reflects an earbud implementing the Unicast Media
Receiver and Call Terminal TMAP roles.

Upon connection, tmap_central starts an audio stream using CAP Initiator
APIs.

CCP, MCP and VCP are discovered and used to send example commands.

Future improvements: 2-earbud support, add TMAP Broadcast roles,
update with new CAP Acceptor/Commander APIs as they become available

Signed-off-by: Silviu Petria <silviu.petria@nxp.com>
2023-05-24 16:39:38 +02:00
Rodrigo Peixoto
caf68d9485 zbus: remove POSIX arch iterable sections restriction
Zbus iterable sections config in Kconfig unnecessarily excluded POSIX
architectures. Remove the constraints and adjust the sample YAML file to
enable that.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-05-23 22:09:33 +02:00
Andy Sinclair
83bde5cf93 samples: shields: npm1300_ek: Enable i2c pullups in overlay
Enable i2c pullups in the nrf52dk overlay
Without this, the first I2C transaction after reset can be corrupted

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-05-23 22:08:46 +02:00
Torsten Rasmussen
a88502783b cmake: align Zephyr module variable to EXTRA_ZEPHYR_MODULES
Align Zephyr modules with other user facing variables where settings
can be defined or extended, meaning Zephyr modules now supports:
ZEPHYR_MODULES and EXTRA_ZEPHYR_MODULES.

Support for ZEPHYR_EXTRA_MODULES is kept foir backward compatibility.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Torsten Rasmussen
1120934874 doc: samples: update OVERLAY_CONFIG to EXTRA_CONF_FILE
Update rst files to use EXTRA_CONF_FILE instead of OVERLAY_CONFIG.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Torsten Rasmussen
391f4c9b0f samples: update nrf53_sync_rtc sample to EXTRA_CONF_FILE
Update nrf53_sync_rtc to use EXTRA_CONF_FILE instead of the old
OVERLAY_CONFIG.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-05-23 16:40:21 +02:00
Erwan Gouriou
5a26397450 sample: shields: Update prj.conf
Before Kconfig clean up to be performed in boards/shields, update samples
to enable the components they require.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-05-23 13:02:36 +02:00
Kenneth J. Miller
daa7b6dca1 samples: sensor: Remove redundant stm32_vbat_sensor
Remove stm32_vbat_sensor sample which has been made redundant by the new
generic soc_voltage sample.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-05-23 08:54:20 +02:00
Kenneth J. Miller
529bdf2f85 samples: sensor: Add generic voltage driver example
Add basic sample to demonstrate voltage driver measurements.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-05-23 08:54:20 +02:00
Matthias Breithaupt
82c576c536 samples: dhcpv4_client: Add option callback
Extend the DHCPv4 sample to make use of the option callback functionality.
This serves as a reference of how to register and use a custom option
callback.

Signed-off-by: Matthias Breithaupt <m.breithaupt@vogl-electronic.com>
2023-05-22 15:25:40 +02:00
Emil Gydesen
3074c72d79 Bluetooth: BAP: Move endpoint discovery to new callback
Add a new endpoint callback that is used to report the found
ASEs during BAP discovery, rather than calling
the discovery callback with optional values.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-22 15:24:28 +02:00
Emil Gydesen
1c304d9d23 Bluetooth: BAP: Move pac record discovery to new callback
Add a new pac_record callback that is used to report the found
PAC records during BAP discovery, rather than calling
the discovery callback with optional values.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-22 15:24:28 +02:00
Emil Gydesen
5d498d78ad Bluetooth: BAP: Remove bt_bap_unicast_client_discover_params
Remove the BAP unicast client specific discover parameter struct.
This make the BAP discover work more similar to the other
profiles.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-22 15:24:28 +02:00
Emil Gydesen
ffca5f9b2f Bluetooth: BAP: Remove dir from BAP discovery parameters
The direction has been moved to a function parameter instead,
and we keep a local copy of the value in the stack instead.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-22 15:24:28 +02:00
Emil Gydesen
1199e46e0b Bluetooth: BAP: Remove num_eps from BAP discover params
The field is not required and is no longer used.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-22 15:24:28 +02:00
Emil Gydesen
0b10498fb1 Bluetooth: BAP: Remove num_caps from BAP discover params
The field is not needed and no longer used.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-22 15:24:28 +02:00
Emil Gydesen
11f5f3b080 Bluetooth: BAP: Move uni cli discov err to callback
Move the err field from the discover parameters to
the callback.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-22 15:24:28 +02:00
Emil Gydesen
39406a4843 Bluetooth: BAP: Move uni cli discover callback
Move the unicast client discover callback from the
parameters to the callback structure.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-22 15:24:28 +02:00
Jerzy Kasenberg
4e3968a507 samples: drivers: adc: Add da1469x_dk_pro overlay
This change creates an overlay file so that the adc sample
can be used with da1469x_dk_pro kit.
Both ADC are configured with several channels.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-05-22 12:41:42 +02:00
Gerard Marull-Paretas
dacb3dbfeb iterable_sections: move to specific header
Until now iterable sections APIs have been part of the toolchain
(common) headers. They are not strictly related to a toolchain, they
just rely on linker providing support for sections. Most files relied on
indirect includes to access the API, now, it is included as needed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-22 10:42:30 +02:00
Chris Morgan
777f88939f samples: net: mdns_responder: Code in example is unrelated to mDNS
Clarify the comment in the code so people looking to use mDNS don't
think that interaction with Zephyr is necessary for mDNS support to
work, its in fact built into the networking stack when the mDNS
feature is enabled.

Signed-off-by: Chris Morgan <chmorgan@gmail.com>
2023-05-22 08:05:49 +00:00
Bill Waters
61246e2592 driver: adc: infineon: Adding ADC driver support to cy8cproto_063_ble
- The boards\arm\cy8cproto_063_ble board now has ADC enabled
- This includes overlay files for the test app and sample app

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2023-05-19 20:22:51 -04:00
Peter Rowley
ff36548616 drivers: fuel_gauge: Add support for RSOC and ASOC
Current driver only allows state-of-charge.  Adding relative-state-
of-charge and absolute-state-of-charge to differentiate between the
different types.  Updated sbs and max drivers to support new enum.
Discussed in issue #57523

Signed-off-by: Peter Rowley <perowle@microsoft.com>
2023-05-19 13:40:19 -04:00
Mykola Kvach
a23b316e29 samples: littlefs: remove flash map configs when we use block device
We don't need anymore enabling of Flash map for building littlefs
sample with block disk device config.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-05-19 15:53:29 +02:00
Sumit Batra
815b8fc664 board: Adds MIMXRT1062-FMURT6 board support package
Also enables all the usable CAN, Ethernet, I2C, PWM,

SPI, UARTs interfaces for this board

Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
2023-05-18 14:08:06 -05:00
Mahesh Mahadevan
df26e99637 pm: rt5xx: Enable OS Timer as wakeup source
1. Enable os_timer as a wakeup-source in the board
   dts file.
2. Enable PM_DEVICE when PM is enabled.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-05-16 18:19:35 +02:00
Maciej Perkowski
75b062a6d6 tests: samples: Resolve duplicates in names.
Several duplicates were found with
scripts/twister -T samples/ -T tests/ --dry-run --list-test-duplicates
This is an issue since duplicated names causes overwriting of
results. Most duplicates looked like obvious copy-pase errors.
New names where addopted looking at other tests in the same yaml
or looking at the directory/descriptio.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-05-16 06:21:25 -04:00
Manimaran A
80777594a1 samples: boards: mec172xevb_assy6906 Crypto hash API sample
Sample application exercising Zephyr crypto hash API using
MEC172x driver.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-05-16 12:07:24 +02:00
Grant Ramsay
83928aaab7 samples: drivers: ethernet: Add Jailhouse IVSHMEM Ethernet sample
Add an IVSHMEM Ethernet sample to communicate between Zephyr
and Linux root cell within the Jailhouse hypervisor.

The supported configuration runs the Jailhouse hypervisor
within QEMU Cortex-A53.

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-05-14 18:17:33 -04:00
Hisanori YAMAOKU
2ed97bc911 samples: die_temp_polling: Add nrf52840dk overlay
Adds overlay for the nrf52840dk.

Signed-off-by: Hisanori YAMAOKU <yamaoku.hisanor@fujitsu.com>
2023-05-12 10:47:20 -05:00
Mizuki Agawa
49fd55cae9 samples: die_temp_polling: Add nrf51dk overlay
Adds overlay for the nrf51dk.
Signed-off-by: Mizuki Agawa <agawa.mizuki@fujitsu.com>
2023-05-12 10:47:20 -05:00
Andreas Sandberg
5f781f4b11 drivers: ssd16xx: Use device-specific compatibles
The SSD16xx driver currently provides basic support for most chips in
the Solomon Systech SSD16xx range of e-paper drivers. We currently use
the SSD1608, SSD1673, SSD1675A, and SSD1681 in various boards
supported by Zephyr.

The main user-facing difference between the various SSD16xx chips is
the resolution they support (sources & gates), but there are other
differences as well. For example:

 * 8 or 16 bits used to represent x coordinates
 * 8 or 16 bits used to represent y coordinates
 * Differences in refresh configuration (SSD16XX_CMD_UPDATE_CTRL2)
 * Differences in LUT sizes

The driver currently assumes that the user specifies the number of
bits used to describe coordinates. However, as we add support for more
chips, more of the differences will become apparent and need
workaround.

Comparing data sheets from different chips in the SSD16xx range
suggests that there are (at least) two different generations
present. These differ in the size of the LUTs they expect and the way
they handle partial refresh. This impacts register layout where
SSD16XX_CMD_UPDATE_CTRL2 uses bit 3 selects "mode 2" whereas older
devices uses this for a mode referred to as "initial".

In order to add support for partial refresh in newer devices, we need
to be able to distinguish between the different generations of the
chip. It might be possible to add a DT property to indicate the
revision, but that seems like a bit of an anti-pattern and it would be
hard for users to specify the correct chip generation.

This change introduces chip-specific compatible strings instead of the
generic SSD16xx. There is unfortunately clear pattern that can be used
to distinguish different generations, so the full chip name must be
specified. A benefit of this is that we don't need to specify the
width of the fields describing coordinates in device trees.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2023-05-11 14:40:50 -07:00
Daniel DeGrasse
77f8848f8e boards: arm: mimxrt1040_evk: enable ADC support
Enable ADC support for RT1040 EVK. Tested using samples/drivers/adc,
using channels 3 and 4 of ADC0.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:35:40 -05:00
Georges Oates_Larsen
5350d417e9 samples: net: sockets: echo_server: Use conn_mgr ignore_iface
conn_mgr now allows applications to request that ifaces be ignored.

This commit changes the echo_server sample to use this feature to
filter out the tunnel iface, instead of manually filtering events
generated by it.

This will allow the echo_server sample to remain compatible with
planned changes to conn_mgr, namely a switch from events being
fired for every individual iface that goes up or down, to only
being fired when connectivity is gained or completely lost.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2023-05-11 12:15:44 +02:00
Georges Oates_Larsen
716c19f7ef net: conn_mgr: Reorganize files
Since conn_mgr is a subsystem rather than a library, relocate it
directly into subsys/net rather than subsys/net/lib/

Rename header files to better match their function.

Remove net_ prefix from conn_mgr types, API, and files, since it is
unnecessary.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2023-05-11 12:15:44 +02:00
Johann Fischer
0929d73788 samples: zperf: add overlays for USBD CDC ECM implementation
Add DT and Kconfig overlay for new experimental CDC ECM
implementation. USB device support configuration and
initialization can be done through shell by following
commands:

uart:~$ usbd config add 1
uart:~$ usbd class add cdc_ecm_0 1
uart:~$ usbd defaults
uart:~$ usbd init
uart:~$ usbd enable

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-05-11 11:26:54 +02:00
Francois Ramu
e9dd412a3d boards: arm: stm32h7b3 disco kit has external octo NOR flash controller
Add the alias to the MX25LM512 octo-NOR flash for the spi-flash node.
Remove the overlay for the samples/drivers/spi_flash as no MDMA driver
exists yet for the stm32h7.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-05-10 19:13:45 +02:00
Lucas Dietrich
e803b77463 samples: net: mqtt: Add a sample to connect to AWS IoT core
This sample application demonstrates the implementation of an
MQTT client that can publish messages to AWS IoT Core using
the MQTT protocol.

Fixes #22866

Signed-off-by: Lucas Dietrich <ld.adecy@gmail.com>
2023-05-10 17:54:56 +02:00
Johann Fischer
0724453c64 samples: cdc_acm: add DT overlay to support snps,dwc2 on nucleo_f413zh
Add DT overlay to be able to support and test usb_dc_dw driver
(snps,dwc2) on nucleo_f413zh board. This disables STM32 shim
driver described and configured on the SoC and board level.

Obviously,it works with other STM32F4 boards as well, but we
do not have a mechanism to apply it generically yet, upcoming
snippet support may fix that. Until then, we need something for
development and as an example.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-05-10 20:07:04 +09:00
Gerard Marull-Paretas
93b63df762 samples, tests: convert string-based twister lists to YAML lists
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-10 09:52:37 +02:00
Tom Burdick
e4b10328b4 rtio: Use mpsc for submission and completion queue
Rather than the rings, which weren't shared between userspace and kernel
space in Zephyr like they are in Linux with io_uring, use atomic mpsc
queues for submission and completion queues.

Most importantly this removes a potential head of line blocker in the
submission queue as the sqe would be held until a task is completed.

As additional bonuses this avoids some additional locks and restrictions
about what can be submitted and where. It also removes the need for
two executors as all chains/transactions are done concurrently.

Lastly this opens up the possibility for a common pool of sqe's to
allocate from potentially saving lots of memory.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-05-10 00:39:43 +09:00
Gerard Marull-Paretas
259ec41c36 samples: boards: nrf: system_off: use PRE_KERNEL_1
Sample was using PRE_KERNEL_2, but the action (lock OFF state) can be
run at any time before the Kernel starts, ie, PRE_KERNEL_1/2. Use
PRE_KERNEL_1 + 99 to preserve similar behavior.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-09 23:40:22 +09:00
Mahesh Rao
b310cf2096 samples: sip_svc: Sample application using sip_svc service.
Sample application to retrieve voltage from SDM in
INTEL AGILEX SOC FPGA

Signed-off-by: Mahesh Rao <mahesh.rao@intel.com>
2023-05-09 08:46:50 -04:00
Keith Packard
bfa6a44746 tests,samples: Fix picolibc malloc arena settings
With picolibc moving to using the common malloc implementation, samples and
tests with picolibc-specific settings need to switch to using the common
malloc settings instead.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-05-09 01:29:16 +09:00
Stephanos Ioannidis
bd1a7a36f4 boards, samples: Fix minimal libc malloc arena settings
With the minimal libc moving to using the common malloc implementation,
boards and samples with minimal libc-specific settings need to switch
to using the common malloc settings instead.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-05-09 01:29:16 +09:00
Sreeram Tatapudi
98858f1e6a drivers: flash: Add Infineon CAT1 Flash driver
- Added initial version of Infineon CAT1 Flash driver
- Added binding file for infineon,cat1-flash-controller.yaml
- Added overlays for subsys/nvs and drivers/flash_shell
to support cy8cproto_063_ble, cy8cproto_062_4343w boards
- Defined erase-block-size in PSoC6 MPN dtsi.

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-05-08 11:16:09 +02:00
Alberto Escolar Piedras
2d5d9fdf77 tests/net: For nrf52_bsim use flash model
Now that the nrf52 HW models support it,
let's use their flash model instead of falling back
to the openthread RAM settings backend.

Note that the flash model defaults to just keeping the
flash content in the Linux process heap.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-05-08 10:08:35 +02:00
Manoel Brunnen
eec73b2432 doc: samples: hawkbit Fix build command
The build command for the hawkbit sample was not correct.

Signed-off-by: Manoel Brunnen <mb@lee-brunnen.de>
2023-05-08 09:59:05 +02:00
Manimaran A
0fde69411e samples: espi: microchip: espi sample compile fix
Updated the initialization of "spi_cs_control" structure
instance.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-05-08 09:58:40 +02:00
Stephan Linz
9f0bc06468 samples: mimxrt1010_evk: exclude various tests
Disable various samples because they require certain digital signals
from the Arduino header, which are not connected when the board is
shipped and therefore not defined via the connector gpio-map.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2023-05-08 09:58:30 +02:00
Pavel Vasilyev
558f482bba samples: bluetooth: mesh_demo: Disable settings thread for bbc_microbit
Disable the thread as it doesn't fit into the device RAM.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-05-08 09:58:21 +02:00
Emil Gydesen
426bc4545a Bluetooth: Use BT_BYTES_LIST_LEXX macros for encoding of data
Modify the BT_UUID_XX_ENCODE and BT_LE_SUPP_FEAT_XX_ENCODE
macros to use the SYS_ENCODE_LEXX macros, instead of re-inventing
the encoding.

Also apply the macros for several other places.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-08 09:56:56 +02:00
Emil Gydesen
2ec1a506a4 Bluetooth: Audio: Fix enum mismatch for codec get chan alloc
The function bt_codec_cfg_get_chan_allocation_val takes a pointer
to an enum, rather than an uint32_t, but was wrongly defined in
the header files and incorrectly used a few places.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-05-05 16:18:07 +02:00
Herman Berget
e28f90f7d2 Samples: Bluetooth: Fix PAwR sample backing store array
The array sizes were in the wrong order.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2023-05-05 15:32:51 +02:00
Vinayak Kariappa Chettimada
ef8b05e83a Bluetooth: Controller: Preliminary Central multiple CIS support
Implementation of preliminary Central with multiple CIS
create support in Lower Link Layer. Uses a simple CIS
offset calculation that works when ACL are created with
connection interval that is multiple of CIG ISO interval.
Each ACLs are offset using BT_CTLR_CENTRAL_SPACING hence
having the same CIG sync delay values for all the ACLs.
Advanced Scheduling to setup CIS in any order of ACL and
CIS combination, ACL placed anywhere in timeline and CIS
creation will come therein will be implemented in later
Pull Requests.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-05-05 12:26:31 +02:00
Adam Wojasinski
b96f6fd618 samples: sensor: qdec: Add overlays for Nordic Semiconductor boards
Add overlay for nrf52840dk_nrf52840 and nrf5340dk_nrf5340_cpuapp

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-05-05 11:47:53 +02:00
Adam Wojasinski
402b95ddae samples: boards: nrf: nrfx: Align nrfx_gpiote API
nrfx 3.0.0 introduces renamed API for GPIOTE nrfx driver

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-05-05 11:47:53 +02:00
Adam Wojasinski
4cab804f06 samples: nrf: nrfx_prs: Align API to new nrfx release
New nrfx release brings API changes. This commit aligns sample to them.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-05-05 11:47:53 +02:00
Adam Wojasinski
beb7313fc4 drivers: clock_control_nrf: Align LF clock sources symbols to new nrfx
New nrfx release brings change of Low frequency sources symbols
in nrf_clock hal to uppercase. This commit aligns all occurrences.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-05-05 11:47:53 +02:00
Alberto Escolar Piedras
e3902cae1d samples: shell: Fix filtering for POSIX arch
One of these samples was filtering all POSIX arch
boards out by explictly listing them by name
(and for the nrf52_bsim by lack of UART).

Instead filter by the architecture.

There is no functional difference in tree with this change.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-05-04 16:48:01 -04:00
Alberto Escolar Piedras
01c9b1483f samples/usb: Fix filtering for POSIX arch
Some of these samples were filtering all POSIX arch
boards out by explictly listing them by name
(and for the nrf52_bsim by lack of usb_device).

Instead filter by the architecture.

There is no functional difference in tree with this change.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-05-04 16:48:01 -04:00
Francois Ramu
6c732185af samples: modules: can openmode runs on stm32h573i_dk
Add an overlay to avoid running the samples/modules/canopennode
on the external octo NOR flash of the stm32h573i disco kit.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-05-04 20:50:27 +02:00
Alberto Escolar Piedras
843ad84db4 samples lvgl: Fix build warning with GPIO=n
The err variable is only used if the GPIO is configured in,
so move it to the right scope to avoid a build warning.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-05-04 21:59:59 +09:00
Armando Visconti
881a777082 sample/shield: x-nucleo-iks01a3: fetch all channels for lsm6dso shub
Change the sensorhub sample using a single trigger (on XL) and
fetching all channels (not only XL) in the callback.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-05-04 10:45:10 +02:00
Kumar Gala
0bae215ba9 samples: modules: thrift: filter on CONFIG_FULL_LIBCPP_SUPPORTED
Change sample to set CONFIG_FULL_LIBCPP_REQUIRED and to filter on
CONFIG_FULL_LIBCPP_SUPPORTED.  Since not all toolchains provide a
full libc++ this will restrict the sample only to those environments
that do.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-05-03 22:39:13 -04:00
Andy Sinclair
7d2fb0fb78 samples: shields: npm1300_ek: Added initial charger sensor
Charger sensor support added to NPM1300_EK sample

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-05-03 15:04:18 +02:00
Joakim Andersson
76d3fa4243 samples: tfm_integration: Add nrf9161dk_nrf9161_ns to TF-M test samples
Add nrf9161dk_nrf9161_ns board to the TF-M integration samples for
testing.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-05-03 12:39:14 +02:00
Jonathan Rico
7d1a5f5554 Bluetooth: iso: use BT_ISO_SDU_BUF_SIZE()
Use BT_ISO_SDU_BUF_SIZE() instead of calculating manually.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-05-03 10:02:44 +02:00
Jonathan Rico
fb10381328 Bluetooth: iso: use kconfig for userdata size
Use BT_CONN_TX_USER_DATA_SIZE when defining pools of buffers that will go
through `bt_conn_send_cb()`.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-05-03 10:02:44 +02:00
Jordan Yates
7fc4c69fb1 samples: bluetooth: hci_spi: IRQ assert delay
Enfore a minimum duration between edges on the IRQ pin to give the HCI
controller time to detect the state change. Without this delay and with
several packets queued on the `rx_queue`, the pin could be re-asserted
almost immediately after being cleared.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-05-02 12:36:09 +02:00
Andriy Gelman
77408116c3 samples: sensor: die_temp_polling: Adds xmc47_relax_kit overlay
Adds overlay to run the sample with the xmc47_relax_kit.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-05-02 12:34:55 +02:00
Yuval Peress
3fd0a1508b rtio: fix bug in mempool release API
It was previously assumed that the 'sys_mem_blocks' struct would maintain
information about contiguous blocks allocated so the release API only
took the starting address. This led to an issue where allocating 2+
blocks would end up with a memory leak because any block not being the
first would never be released.

Add the buffer length as an argument so the correct number of blocks can
be released. Also, ammend the tests to match and verify.

Signed-off-by: Yuval Peress <peress@google.com>
2023-05-01 09:26:06 -05:00
Kumar Gala
340ed20c12 samples, tests: cleanup void main usage.
Some samples, tests got missed in the switch from void main() to
int main().  Cleanup those samples/tests to use int main().

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-28 20:39:14 +02:00
Herman Berget
3c7b3e5648 Samples: Bluetooth: Add samples for PADV Connection Procedure
Samples demonstrating initiating connections from PAwR.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2023-04-28 11:00:48 +02:00
Lucas Tamborrino
f18e640485 samples: subsys: settings: add esp32s3 overlay
Add overlay support for esp32s3.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-04-28 10:08:16 +02:00
Sam Hurst
714eec8496 doc: Document the USB-C Source Subsystem
Documents the USB-C Source Subsystem API.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2023-04-28 10:06:01 +02:00
Sam Hurst
a1d13b3500 samples: usb-c: source: Add USB-C Subsystem Source Sample
Implementing USB-C Source functionality can be difficult.
This sample application serves as an example of how
to create an application with Power Delivery Source
functionality.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2023-04-28 10:06:01 +02:00
Bill Waters
3e02d48e4e driver: adc: infineon: Adding ADC driver
- This includes the driver, test app, and sample app
- Only the boards\arm\cy8cproto_062_4343w board is supported for now

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2023-04-27 10:16:23 -07:00
Keith Packard
71255a210d samples/chre: Filter out targets not providing a full libc
When the only C library available is the minimal one, this test cannot
work. Accept only platforms with full C library support to prevent build
failures.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-27 20:18:11 +09:00
Keith Packard
973dc2a7a4 samples/logging/syst: Use FULL_LIBC_SUPPORTED helper Kconfig symbol
This symbol detects whether there is any available full libc for a
particular target, allowing tests to filter on this condition.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-27 20:18:11 +09:00
Keith Packard
4134858868 tests/samples: Replace minimal libc malloc configs with common ones
With the minimal C library malloc implementation moving to libc/common, all
of the related Kconfig variables have also changed. Update uses within the
tree.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-27 20:17:24 +09:00
Herman Berget
627b340780 Samples: Bluetooth: Add samples for PAwR
Adds samples for both advertiser and sync.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2023-04-26 20:08:16 +02:00
Łukasz Hejnak (LeHack)
1929eb3af7 drivers: sdhc: add support for using CPOL/CPHA SPI clock modes
Make it possible to use CPOL/CPHA SPI clock modes with the SDHC driver.
Some cards require the clock to switch to low when not active.

Signed-off-by: Łukasz Hejnak (LeHack) <lehack-ghub@lehack.pl>
2023-04-26 20:07:53 +02:00
Katherine Watson
cfc4273bbb doc: add ARMv6 expected outputs to mpu_test README
Add expected output for ARMv6 CPUs in the mpu_test README, as this differs
from that for other AArch32 CPUs due to differences in how ARMv6 handles
faults

Signed-off-by: Katherine Watson <katie@radicalsemiconductor.com>
2023-04-26 12:53:57 +02:00
Francois Ramu
29ef82cfaf samples: boards stm32 power mgmt nucleo_wb55rg sets a lptim prescaler
configure the nucleo_wb55rg with a prescaler on the LPTIMer input
clock to increase the max sleep duration.
With 32 the input clock is 1024Hz and max reachable timeout is
64 seconds.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-25 10:37:13 -07:00
Yonatan Schachter
6c93cbf7b4 samples: boards: rpi_pico: Added uart_pio sample
Added a sample for the rpi_pico board showing how to use the UART
over PIO driver.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2023-04-25 13:12:02 +02:00
Gerard Marull-Paretas
3f2c2d4130 drivers: spi: make SPI dt-spec macros compatible with C++
As of today it is not possible to use SPI dt-spec macros in C++,
something known and documented. The main reason is because `cs` property
is initialized using a compound literal, something not supported in C++.
This PR takes another approach, that is to not make `cs` a pointer but a
struct member. This way, we can perform a regular initialization, at the
cost of using extra memory for unused delay/pin/flags if `cs` is not
used.

Fixes #56572

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-24 21:29:55 +02:00
Hein Wessels
9ea250a445 samples: net: sockets: sntp_client: build for native_posix
Extend the sample to be built with native_posix
prevent issues like #57133 in the future. Also extends the qemu
build to build a "raw" configurationw without POSIX_API or
NET_SOCKETS_POSIX_NAMES.

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-04-24 09:23:17 -04:00
Hein Wessels
2689e16670 net: sntp: support building without NET_SOCKETS_POSIX_NAMES
Fixes the compiler error that occurs when attempting to build
the SNTP library with CONFIG_NET_SOCKETS_POSIX_NAMES=n, while
using native_posix.

Closes #57133

Co-authored-by: Chris Friedt <cfriedt@meta.com>
Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-04-24 09:23:17 -04:00
Al Semjonovs
0258b23401 Revert "adc: harness regex string not capturing sample app"
This reverts commit aef973d65b.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2023-04-21 09:39:08 +02:00
Benjamin Björnsson
0a6d65583d samples: remove unnecessary include of adc dt-bindings
Remove include of adc dt-bindings header since these are
already included in the root .dtsi file that adds an adc.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-20 10:48:33 +02:00
Daniel Leung
c4565ad5b6 samples: out_of_tree_driver: fix kconfig dependency
The out_of_tree_driver sample defines syscall functions, and
thus requiring CONFIG_APPLICATION_DEFINED_SYSCALL to be enabled
even if no userspace is involved. This is due to the function
generation for the syscall stubs.

Fixes #56946

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-04-19 21:02:11 -04:00
Sylvio Alves
a6c8c6e546 soc: esp32s3: add Wi-Fi support
This adds Wi-Fi linker areas and also bring wi-Fi entry
into SoC device tree.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-04-19 17:11:58 +02:00
Gerard Marull-Paretas
1eb683a514 device: remove redundant init functions
Remove all init functions that do nothing, and provide a `NULL` to
*DEVICE*DEFINE* macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-19 10:00:25 +02:00
Al Semjonovs
aef973d65b adc: harness regex string not capturing sample app
NTC thermistor changes updated the sample app output,
correcting harness string to match sample app.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2023-04-18 11:25:12 -04:00
Martí Bolívar
26d3157ed4 apps: misc void main -> int main fixes
Fix some additional cases in in-tree applications (samples and tests).

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2023-04-18 05:45:36 -07:00
Ivan Herrera Olivares
37e3e843ed samples: settings: Fix typo in comment
This commit fixes the typo: 'kay-value' to 'key-value'

Signed-off-by: Ivan Herrera Olivares <ivan.herreraolivares@gmail.com>
2023-04-18 09:31:06 +02:00
Keith Short
c752568708 dts: microchip: Remove deleted property
PR https://github.com/zephyrproject-rtos/zephyr/pull/55129 deleted the
"port-sel" property.  Delete this property from remaining Microchip SoC
variants and boards.

Test: west build -b mec172xevb_assy6906 samples/drivers/espi/

Signed-off-by: Keith Short <keithshort@google.com>
2023-04-18 09:30:55 +02:00
Filip Kokosinski
e9e5498a51 samples/bluetooth/central: fix error code reporting
`bt_conn_le_create` returns a signed value. Error message format string
expects an unsigned value.

This commit changes the expected value in the format string to a signed
one, to match what `bt_conn_le_create` returns.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-04-17 15:12:32 +02:00
Stephanos Ioannidis
43fc0f5184 samples: drivers: spi_flash_at45: Add missing return statement
The `main` function now returns `int` instead of `void` and therefore
must return a value.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-04-17 20:19:36 +09:00
Stephanos Ioannidis
db91e81ffe samples: stm32: backup_sram: Fix main function return statement
The `main` function now returns `int` instead of `void` and therefore
any return statements inside it must return a value.

Note that any return values other than 0 are currently reserved.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-04-17 20:19:19 +09:00
Andrzej Głąbek
8cc7ca1208 samples: drivers: adc: Update console output specification
This is a follow-up to commit 9fa35bc9a0.

Align specification of the expected console output with the changes
done to the sample in the above commit.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-04-17 11:24:44 +02:00
Vinayak Kariappa Chettimada
3a9e233089 samples: Bluetooth: hci_rpmsg: Fix stack sizes based on profiling
Fix stack size requirement in hci_rpmsg sample based on
profiling using thread analyzer.

Below is the observed stack usages now under Connected ISO
audio application on nrf5340_audio_dk_nrf5340_cpunet:
Thread analyze:
 0x21001968          : STACK: unused 248 usage 264 / 512 (51 %); CPU: 1 %
      : Total CPU cycles used: 102725
 HCI rpmsg TX        : STACK: unused 560 usage 592 / 1152 (51 %); CPU: 0 %
      : Total CPU cycles used: 73484
 BT RX               : STACK: unused 208 usage 432 / 640 (67 %); CPU: 2 %
      : Total CPU cycles used: 198386
 BT RX pri           : STACK: unused 200 usage 184 / 384 (47 %); CPU: 1 %
      : Total CPU cycles used: 147340
 thread_analyzer     : STACK: unused 544 usage 480 / 1024 (46 %); CPU: 1 %
      : Total CPU cycles used: 169843
 sysworkq            : STACK: unused 208 usage 304 / 512 (59 %); CPU: 0 %
      : Total CPU cycles used: 1
 idle                : STACK: unused 208 usage 48 / 256 (18 %); CPU: 91 %
      : Total CPU cycles used: 8529054
 main                : STACK: unused 144 usage 368 / 512 (71 %); CPU: 1 %
      : Total CPU cycles used: 107724
 ISR0                : STACK: unused 192 usage 832 / 1024 (81 %)

Below is the observed stack usages now under Broadcast ISO
audio application on nrf5340_audio_dk_nrf5340_cpunet:
Thread analyze:
 0x21001968          : STACK: unused 248 usage 264 / 512 (51 %); CPU: 2 %
      : Total CPU cycles used: 622241
 HCI rpmsg TX        : STACK: unused 240 usage 912 / 1152 (79 %); CPU: 2 %
      : Total CPU cycles used: 504720
 BT RX               : STACK: unused 464 usage 176 / 640 (27 %); CPU: 0 %
      : Total CPU cycles used: 3
 BT RX pri           : STACK: unused 200 usage 184 / 384 (47 %); CPU: 0 %
      : Total CPU cycles used: 212981
 thread_analyzer     : STACK: unused 544 usage 480 / 1024 (46 %); CPU: 1 %
      : Total CPU cycles used: 419593
 sysworkq            : STACK: unused 336 usage 176 / 512 (34 %); CPU: 0 %
      : Total CPU cycles used: 1
 idle                : STACK: unused 208 usage 48 / 256 (18 %); CPU: 91 %
      : Total CPU cycles used: 22065557
 main                : STACK: unused 144 usage 368 / 512 (71 %); CPU: 1 %
      : Total CPU cycles used: 388285
 ISR0                : STACK: unused 304 usage 720 / 1024 (70 %)

Relates to commit 3f7fa919d9 ("samples: Bluetooth: hci_rpmsg:
Fix RAM overflow building for DF feature").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-04-17 11:22:00 +02:00
Andrei Emeltchenko
607a56585a samples: ivshmem: Use device_is_ready()
Fix sample to use device_is_ready(dev) when checking for device.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-04-17 10:18:46 +02:00
Rubin Gerritsen
e7262771f0 samples: bluetooth: hci_rpmsg: Discard too long incoming packets
Avoid hitting the assert
```
__ASSERT_NO_MSG(net_buf_simple_tailroom(buf) >= len);
```
when the provided buffer is longer than we can fit. Instead discard the
packet and log an error.

This handling is similar to packets are discarded in hci_uart

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2023-04-17 10:18:36 +02:00
Marc Desvaux
cbd9e2172f samples: boards: stm32: pm: standby_shutdown: use hwinfo_get_reset_cause()
use hwinfo_get_reset_cause() instead of LL_PWR_IsActiveFlag_SB()
remove LL_PWR_ClearFlag_WU() not  mandatory

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-04-17 10:15:35 +02:00
Théo Battrel
12e9be7cc0 Bluetooth: Samples: Add Encrypted Advertising sample
Add a new sample that demonstrate the following points:

- Exchange of Key Material;
- Advertising encrypted data;
- Read advertising data;
- Decrypt advertising data that are encrypted.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-04-17 10:15:04 +02:00
Andy Sinclair
f88d1d0ac0 samples: shields: npm1300_ek: Initial sample for NPM1300 PMIC EK
Initial sample for Nordic NPM1300 PMIC EK.
Supports regulators and GPIO only.

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2023-04-17 10:14:40 +02:00
Rodrigo Peixoto
a24c307baa samples: zbus: fix variable sizes and simplify benchmark sample
The benchmark sample was not suitable for constrained devices.
With u32, the maximum accumulated time was about 4 seconds.
Some devices take more than 4 seconds to finish the benchmark.
This commit fixes the time counting by replacing the variables
and calls to 64 bits and removes all the dynamic allocation
memory on the sample to keep that as simple as possible. It
adjusts the documentation and the tests as well.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2023-04-14 12:14:29 -05:00
Gerard Marull-Paretas
667eeb11fb shell: fix MISRA 5.7 violations on struct shell
MISRA Rule 5.7 requires uniqueness of tag identifiers. Shell is
frequently problematic because many code uses `const struct shell
*shell`. This causes CI noise every time one of these shell files is
edited, so let's update all of them with `const struct shell *sh`
instead.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-14 12:21:08 +02:00
Alberto Escolar Piedras
aee70b0ff6 samples/bluetooth/broadcast_audio_sink: Fix return to int
Main now has a int return type.
Fix return values, so this sample can be compiled.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-04-14 09:55:48 +02:00
Keith Packard
1d5e644d12 samples, tests: Switch main return type from void to int
This applies the coccinelle script to another set of files:

   samples/bluetooth/bthome_sensor_template/src/main.c
   samples/boards/stm32/power_mgmt/standby_shutdown/src/main.c
   samples/drivers/smbus/src/main.c
   samples/drivers/virtualization/ivshmem/doorbell/src/ivshmem.c
   samples/fuel_gauge/max17048/src/main.c
   samples/hello_world/src/main.c
   samples/sensor/proximity_polling/src/main.c
   samples/subsys/logging/ble_backend/src/main.c
   tests/drivers/build_all/mfd/src/main.c

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
Keith Packard
7d4a7d79a8 doc/releases: Note "main" return type change for 3.4
Add a paragraph explaining the change from void main(void) to int
main(void) and the requirement for main functions to return zero.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
Keith Packard
f12853004e samples/drivers/display: Eliminate control flow in macro
Remove RETURN_FROM_MAIN macro which performed control flow, violating
compliance tests. Replace with explicit use of posix_exit_main or return as
appropriate.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
Keith Packard
0b90fd5adf samples, tests, boards: Switch main return type from void to int
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.

Most of these changes were automated using coccinelle with the following
script:

@@
@@
- void
+ int
main(...) {
	...
-	return;
+	return 0;
	...
}

Approximately 40 files had to be edited by hand as coccinelle was unable to
fix them.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
Guillaume Gautier
ce5de8557b samples: sensor: stm32_temp_sensor: remove stm32_temp_sensor sample
Now that there is a generic die_temp_polling sample, this specific STM32
sample is redundant and can be removed.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-04-13 09:15:27 -05:00
David Leach
095db2ee27 boards: lpcxpresso55s36: Enable LPADC
Enable LPADC on lpcxpresso55s36 board
Support lpcxpresso55s36 on ADC driver sample

Signed-off-by: David Leach <david.leach@nxp.com>
2023-04-13 16:13:25 +02:00
Andries Kruithof
6892d3c0bc Sample: Bluetooth: fix broadcast audio source sink conf file
The platform nrf52_bsim was specified as an integration platform,
but was missing from the allow list.
This commit adds this platform to the allow list.

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-04-13 16:08:53 +02:00
Vinayak Kariappa Chettimada
5648d02b29 sample: Bluetooth: Fix broadcast audio source sink conf file
Fix broadcast audio source and sink samples' conf file to
use Broadcast ISO feature in Zephyr Bluetooth Controller.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-04-13 13:19:19 +02:00
Gerard Marull-Paretas
a5fd0d184a init: remove the need for a dummy device pointer in SYS_INIT functions
The init infrastructure, found in `init.h`, is currently used by:

- `SYS_INIT`: to call functions before `main`
- `DEVICE_*`: to initialize devices

They are all sorted according to an initialization level + a priority.
`SYS_INIT` calls are really orthogonal to devices, however, the required
function signature requires a `const struct device *dev` as a first
argument. The only reason for that is because the same init machinery is
used by devices, so we have something like:

```c
struct init_entry {
	int (*init)(const struct device *dev);
	/* only set by DEVICE_*, otherwise NULL */
	const struct device *dev;
}
```

As a result, we end up with such weird/ugly pattern:

```c
static int my_init(const struct device *dev)
{
	/* always NULL! add ARG_UNUSED to avoid compiler warning */
	ARG_UNUSED(dev);
	...
}
```

This is really a result of poor internals isolation. This patch proposes
a to make init entries more flexible so that they can accept sytem
initialization calls like this:

```c
static int my_init(void)
{
	...
}
```

This is achieved using a union:

```c
union init_function {
	/* for SYS_INIT, used when init_entry.dev == NULL */
	int (*sys)(void);
	/* for DEVICE*, used when init_entry.dev != NULL */
	int (*dev)(const struct device *dev);
};

struct init_entry {
	/* stores init function (either for SYS_INIT or DEVICE*)
	union init_function init_fn;
	/* stores device pointer for DEVICE*, NULL for SYS_INIT. Allows
	 * to know which union entry to call.
	 */
	const struct device *dev;
}
```

This solution **does not increase ROM usage**, and allows to offer clean
public APIs for both SYS_INIT and DEVICE*. Note that however, init
machinery keeps a coupling with devices.

**NOTE**: This is a breaking change! All `SYS_INIT` functions will need
to be converted to the new signature. See the script offered in the
following commit.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

init: convert SYS_INIT functions to the new signature

Conversion scripted using scripts/utils/migrate_sys_init.py.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

manifest: update projects for SYS_INIT changes

Update modules with updated SYS_INIT calls:

- hal_ti
- lvgl
- sof
- TraceRecorderSource

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

tests: devicetree: devices: adjust test

Adjust test according to the recently introduced SYS_INIT
infrastructure.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

tests: kernel: threads: adjust SYS_INIT call

Adjust to the new signature: int (*init_fn)(void);

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-12 14:28:07 +00:00
Kumar Gala
dca600bd19 samples/tests: bluetooth: Remove qemu_cortex_m3
Remove qemu_cortex_m3 from various bluetooth tests and samples since
they enable NVS which requires CONFIG_FLASH_PAGE_LAYOUT which is
not supported on qemu_cortex_m3 since there is no flash driver.

We get build failures with the arm-clang compiler because nvs.c
is referencing z_impl_flash_get_page_info_by_offs which does not
exist.

Switch to qemu_x86 as the integration_platforms if it was
qemu_cortex_m3 before.

Removed the bluetooth.mesh.mesh_shell.reduced_legacy as this was
added specifically for building on qemu_cortex_m3.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-12 09:01:34 +02:00
Scott Worley
e8f089bdcc samples: boards: Microchip MEC172x EVB QMSPI-LDMA sample
Sample code for demonstrating spi buffer usage for single,
dual, and quad SPI transfers.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2023-04-11 16:57:56 +02:00
Scott Worley
5c00a83b99 drivers: spi: Microchip XEC QMSPI-LDMA fix spi buffer usage
Zephyr SPI driver model for full-duplex operation assumes
data will be transmitted and received during each clock period.
The QMSPI driver for the XEC family also supported dual and
quad I/O use cases which are inherently half-duplex. To
support dual/quad the driver incorrectly processed spi buffers
as all transmit buffers first then all receive buffers. This
worked if only the SPI driver was used. It did not work with
the Zephyr flash SPI NOR driver which assumes SPI drivers
follow the SPI driver model. This commit implements a QMSPI
driver that follows the Zephyr SPI driver model resulting in
a slightly smaller driver. Dual/quad SPI transactions are
supported if the experimental SPI extended mode Zephyr
configuration flag is enabled. We also remove the QMSPI full duplex
driver added previously to support the flash SPI NOR driver.
Added board to spi loop-back test and spi_flash sample.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2023-04-11 16:57:56 +02:00
Gerard Marull-Paretas
0ebe14beb4 sys: util: migrate all files to DIV_ROUND_UP
ceiling_fraction is deprecated, use DIV_ROUND_UP.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-11 12:00:37 +02:00
Huifeng Zhang
dcd2778525 samples: zperf: enable it on the fvp_base_revc_2xaemv8a board
Add config file and devicetree overlay for the fvp_base_revc_2xaemv8a
board, so that this sample can run on this board.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-04-11 11:27:05 +02:00
Huifeng Zhang
bd8f527368 samples: zperf: enable it on the fvp_baser_aemv8r board
Add config file and devicetree overlay for the fvp_baser_aemv8r board,
so that this sample can run on this board.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-04-11 11:27:05 +02:00
Huifeng Zhang
5d90e7589c samples: dhcpv4_client: enable it on the fvp_base_revc_2xaemv8a board
Add config file and devicetree overlay for the fvp_base_revc_2xaemv8a
board, so that this sample can run on this board.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-04-11 11:27:05 +02:00
Huifeng Zhang
1ae558f5b4 samples: dhcpv4_client: enable it on the fvp_baser_aemv8r board
Add config file and devicetree overlay for the fvp_baser_aemv8r board,
so that this sample can run on this board.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-04-11 11:27:05 +02:00
Emil Gydesen
e00500af49 samples: Bluetooth: Add Scan Delegator support to Broadcast Audio Sink
Add support for the Scan Delegator for the Broadcast
Audio Sink sample. This include advertising connectable
as well as handling PAST.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-11 11:26:28 +02:00
Emil Gydesen
6bbda2cbfd Bluetooth: Audio: Add Scan Delegator dependency for Broadcast Sink
Per the BAP specification, if the Broadcast Sink role is
supported, then the Scan Delegator shall also be supported.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-11 11:26:28 +02:00
Fabio Baltieri
69c5a6cc17 samples: lvgl: enable the input pointer for native_posix
Enable the input pointer code for the LVGL sample in native posix. This
is supported by SDL which is used for the display anyway, so not reason
to keep it off by default.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-04-11 09:34:23 +02:00
Yuval Peress
d6062d36d0 rtio: Update sensor_batch_processing sample
Update the sample to use mempool feature

Signed-off-by: Yuval Peress <peress@google.com>
2023-04-10 18:34:43 -04:00
Al Semjonovs
9fa35bc9a0 adc: Add TI ADS7052 SPI driver
Add driver for TI ADS7052.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2023-04-07 16:23:17 -05:00
Dean Sellers
b0d785df18 samples: net: wifi: esp32: add auto dhcpv4 to esp32 boards
The wifi sample for esp32 boards would connect but not do
dhcp.

Signed-off-by: Dean Sellers <dsellers@evos.com.au>
2023-04-07 13:32:16 +02:00
Nick Ward
51597cbc82 samples: sensor: thermometer: update sample
Update thermometer sample with  mcp970x temperature sensor.

Removing test with frdm_k64f integration platform as it doesn't
provide an ambient temperature sensor.

Removing the bbc_microbit board as it only seems to provide the
die temperature of the nRF51 SoC and not an ambient temperature
sensor.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-04-07 13:30:59 +02:00
Manimaran A
535d64cd44 drivers: peci: microchip: Enabled low power mode
Updated the PECI driver to support low power mode.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-04-07 13:30:40 +02:00
Dominik Ermel
5712fcb9fb samples/fs/fat_fs: Enable nrf52840dk_nrf52840 for twister
nrf52840dk_nrf52840 configurations have been added as build_only
configurations.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-04-07 13:26:18 +02:00
Dominik Ermel
bfd65f290d samples/fs/fat_fs: Readme update
The sample now support's setting up FAT FS on devices without
SD card access and this new ability requires update in documentation.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-04-07 13:26:18 +02:00
Dominik Ermel
e89ffb5a6f samples/fs/fat_fs: Allow creating entries for demonstartion
The commits adds Kconfig option CONFIG_SAMPLE_FATFS_CREATE_SOME_ENTRIES
which causes the sample to attempt to create one file and one
directory, in case if listing does not show anything, just
to demnonstrate how FAT FS operations work on internal flash.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-04-07 13:26:18 +02:00
Dominik Ermel
f079225637 samples/fs/fat_fs: Add support for nrf52840dk_nrf52840
The commits adds support for nrf52840dk_nrf52840 with two additional
configurations:
 - with FAT FS on internal SoC flash
 - with FAT FS on QSPI connected MX25

In case of SoC configuration there is re-configuration of internal
partitions done, doe to need for at least of 64kiB for FAT FS.
The QSPI configuration only defines additional partition on
external device.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-04-07 13:26:18 +02:00
Rodrigo Cataldo
1feaa9db06 samples: drivers: virtualization: add ivshmem doorbell sample
Provide a sample for ivshmem-doorbell running under virtualization
(QEMU). The sample relies on existing tools (ivshmem-server,
ivshmem-client) that must be run at the host (unix).

The sample can be run on userspace or kernelspace, and on arm64 (qemu,
kvm) and x86_64 (qemu) platforms.

This execution of this code is quite complex, thus the README should be
made available in the official documentation. This is why the code is a
sample and not a test.

Signed-off-by: Rodrigo Cataldo <rodrigo.cataldo@huawei.com>
Co-authored-by: Henri Xavier <datacomos@huawei.com>
2023-04-07 13:26:01 +02:00
Caspar Friedrich
ba66f41e21 samples: w1: Update scanner example for ds2482-800 bus driver
The scanner example for 1-wire now supports the DS2482-800 multi channel
bus master.

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2023-04-07 13:11:54 +02:00
Francois Ramu
ad4cc3a577 samples: drivers: stm32h5 octospi driver testing
Add the config for testing the jesd jedec sfdp of the octoNor flash
on the stm32h573 disco kit.
The external octoflash is the macronix  MX25LM51245 or micron.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-07 08:33:51 +00:00
Benjamin Björnsson
0599e9c7fa samples: drivers: adc: Add Nucleo C031C6 overlay
Add overlay for Nucleo C031C6 board.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-07 08:18:03 +00:00
Anas Nashif
fcefc27823 tests: remove intel adsp cavs platforms from filters
Remove all filters related to dropped platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-06 18:51:56 +02:00
Vinayak Kariappa Chettimada
3f7fa919d9 samples: Bluetooth: hci_rpmsg: Fix RAM overflow building for DF feature
Fix RAM overflow building for direction finding feature on
nRF53 Series, by reducing thread stack sizes. And move
building DF plus CIS feature to hci_uart sample from
hci_rpmsg sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-04-06 12:57:20 +00:00
Rico Ganahl
f53d0e4d05 samples: drivers: display: introduce B-LCD40-DSI1
Add STMicroelectronics MIPI DSI display shield for testing.

Signed-off-by: Rico Ganahl <rico.ganahl@bytesatwork.ch>
2023-04-06 11:51:06 +02:00
Vinayak Kariappa Chettimada
f3c95831a2 samples: Bluetooth: hci_spi: Fix RAM overflow
Fix RAM overflow by using default values for
BT_BUF_ACL_RX_SIZE and BT_BUF_ACL_RX_COUNT. Default Rx size
of 27 is sufficient for nRF51 SoC, as it does not support
data length extensions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-04-06 09:12:08 +00:00
Simon Hein
72f2b01e5a samples: Update fs format sample README
Update the README.md to README.rst format and
rephrased parts of the description.

Signed-off-by: Simon Hein <Shein@baumer.com>
2023-04-05 19:32:52 +02:00
Maciej Perkowski
a13edec310 samples: sensors: Remove warp7_m4 from fxas21002 platform_allow list
The sample is overflowing flash on this platform

fixes: #56455

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-04-05 19:32:14 +02:00
Lucas Tamborrino
6a0b5346ef samples: sensor: qdec: add esp32s3 overlay
Add esp32s3 overlay to qdec sample to ilustrate
the use of PCNT in quadrature enconder mode.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-04-05 11:23:48 -05:00
Francois Ramu
770a7473bf samples: drivers: counter alarm running on the stm32h573i_dk
Run the samples/drivers/counter/alarm on the stm32h573i_dk.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-05 10:39:19 +00:00
Tomasz Moń
cbd8f8b49f samples: metairq_dispatch: Ensure large enough queues
Make queues used in metairq dispatch sample capable of storing all
generated messages. This prevents seemingly random hangs that tend to
happen with some random seeds.

Fixes: #54610

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-04-05 11:06:17 +02:00
Pieter De Gendt
6b532ff43e treewide: Update clock control API usage
Replace all (clock_control_subsys_t *) casts with (clock_control_subsys_t)

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-04-05 10:55:46 +02:00
Maciej Perkowski
835c6a679e sample: sensor: Change integration_platforms for fxas21002 sample
Builds on warp7_m4 were overflowing flash, hence the change to
the another platform from the allow_list, which is not causing
overflows.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-04-05 08:30:35 +02:00
Fabio Baltieri
86da50c986 samples: cmsis_rtos_v1: philosophers: increas CMSIS_THREAD_MAX_STACK_SIZE
This sample is failing regularly in CI and locally for
qemu_cortex_a53_smp, seems like the stack is not enough:

thread_analyzer: 0x4001f740: STACK: unused 1040 usage 1008 / 2048 (49 %)
thread_analyzer: 0x4001f3a0: STACK: unused 944 usage 1104 / 2048 (53 %)
thread_analyzer: 0x4001f000: STACK: unused 1040 usage 1008 / 2048 (49 %)
...

Increasing to 2048 seems to make it run reliably.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-04-04 16:23:37 +00:00
Kumar Gala
762b109179 shell: fix armclang compiler warnings with is*() functions
We get compile warnings of the form:

error: converting the result of
'<<' to a boolean; did you mean
'((__aeabi_ctype_table_ + 1)[(byte)] << 28) != 0'?
 [-Werror,-Wint-in-bool-context]
                if (!isprint(byte)) {
                     ^

Since isprint (and the other is* functions) return an int, change check
to an explicit test against the return value.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-04-04 13:47:14 +02:00
Victor Chavez
a18aa915ce logging: Added BLE Backend Service
Added a new logger backend to recieve data over a BLE
notification characteristic.
The characteristic is based on the UUID from the Nordic connect SDK
service NUS, which allows to have a UART shell over BLE.
The idea behind this, is that this logger can be used directly
with the NRF apps or any other BLE UART terminal app.

Signed-off-by: Victor Chavez <chavez-bermudez@fh-aachen.de>
2023-04-03 15:17:57 +02:00
Emil Obalski
baf758dd52 samples: ipc: Remove shared memory clear
Clearing the shared memory is no longer required
after bounding functionality was reworked and an attempt
to read the magic numer is no longer the case.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2023-04-03 11:29:08 +02:00
Francois Ramu
cef8c3fdd1 samples: drivers: adc for the stm32h5 boards
Add the new nucleo_h503rb board for testing the adc_api driver
on the ADC1 channel6 (pf12). Read the analog value of the ADC1
input on A5 of the arduino connector (CN16).

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-03 09:50:43 +02:00
Peter Fecher
a95862bcdc samples: sensor: Add proximity sensor sample
Adds generic sample for proximity sensors.

Signed-off-by: Peter Fecher <p.fecher@phytec.de>
2023-03-31 09:20:36 +02:00
Jordan Yates
41d83d7ea2 lora: compile drivers based on devicetree
Similar to the changes made in #48048, compile in the appropriate lora
modem driver when `CONFIG_LORA=y`. The `LORA_SX12XX` symbol has no
use now so remove. LoRa and LoRaWAN subsystems are still marked as
unstable so no additional deprecation cycle is needed.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-03-31 09:20:22 +02:00
Joakim Andersson
9ccd202a76 tfm: Use relative path to the runners.yaml hex file and move tfm_merged
Move tfm_merged.hex from <build>/tfm_merged.hex to
<build>/zephyr/tfm_merged.hex.
Use relative path to the runners.yaml hex file.

This makes it possible to move the build folder.
Example would be to copy out the runners.yaml and tfm_merged.hex file
and still be able to call west flash --skip-rebuild.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-03-31 09:20:04 +02:00
Lucas Tamborrino
f41be5254b samples: basic: blinky_pwm: add esp32s3 overlay
Add esp32s3 overlay to sample
Remove obsolete conf files for esp32xx boards

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-03-31 09:19:56 +02:00
Dominik Ermel
bfdaa9ad61 samples: fs: littlefs: Fix typo in overlay selection
Corrected DTS_OVERLAY_FILE to DTC_OVERLAY_FILE.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-03-31 09:19:33 +02:00
Kumar Gala
b4d4e30e9b bluetooth: fix armclang compiler warnings with is*() functions
We get compile warnings of the form:

error: converting the result of
'<<' to a boolean; did you mean
'((__aeabi_ctype_table_ + 1)[(byte)] << 28) != 0'?
 [-Werror,-Wint-in-bool-context]
                if (!isprint(byte)) {
                     ^

Since isprint (and the other is* functions) return an int, change check
to an explicit test against the return value.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-03-31 09:19:16 +02:00
Kenneth J. Miller
2e3b2e18de Revert "samples: boards: stm32: pm: standby_shutdown: use hwinfo_get_reset_cause()"
This reverts commit ceb21b733b.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-03-31 09:18:54 +02:00
Martin Jäger
a99c12d572 samples: drivers: dac: allow building for all boards with overlays
Add all boards where the required overlay is present in the boards
folder to platform_allow. At the same time sort the list alphabetically
to keep a better overview.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-03-30 17:34:03 -04:00
Jamie McCrae
d1b40013d4 samples: out_of_tree_board: Fix board name
Fixes a missed file when the board was renamed that prevented
this sample from working.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-30 09:45:37 +00:00
Andrei Emeltchenko
db2ebed78d tests: smbus: Cleanup CMakeLists files
Remove "-machine Q35" from QEMU_EXTRA_FLAGS since this is now the
default qemu_x86_64 configuration.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-30 09:45:02 +00:00
Marc Desvaux
ceb21b733b samples: boards: stm32: pm: standby_shutdown: use hwinfo_get_reset_cause()
use hwinfo_get_reset_cause() instead of LL_PWR_IsActiveFlag_SB()
remove LL_PWR_ClearFlag_WU() not  mandatory

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-03-30 09:50:55 +02:00
Anas Nashif
e32f9c727a samples: max44009: remove reference to quark se
Remove reference to Quark SE and the README file and put description in
sample.yaml.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-03-29 10:26:56 -05:00
Anas Nashif
629892eb7a samples: zperf: remove reference to quark se
Quark SE does not exist in zephyr anymore.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-03-29 10:26:56 -05:00
Anas Nashif
6093870caf samples: i2c fram: remove sample
Quark SE does not exist in zephyr anymore and this sample was there as
one of the first i2c users in Zephyr and is not providing any value any
more.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-03-29 10:26:56 -05:00
Francois Ramu
2928f30551 samples: drivers: watchdog testing on the stm32h573i_dk
Run the samples/drivers/watchdog on the stm32h573i_dk
for both IWDG and WWDG of the stm32h5 device

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-29 10:04:39 +02:00
Romain Mahoux
e5b70121e7 samples: minimal: define an empty project configuration
Cmake configuration forces projects to define a prj.conf

Signed-off-by: Romain Mahoux <romain@mahoux.fr>
2023-03-28 15:05:01 +02:00
Krzysztof Chruscinski
a5865949d9 samples: drivers: counter: alarm: Fix nordic DKs
After reworking counter driver to use device tree this sample
stopped to compile for nordic DKs. Providing overlays to fix
the compliation.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-03-27 22:15:15 +00:00
Kumar Amit Mehta
ccd88a4b61 documentation: samples: smp: Fix pathname for SMP sample examples
SMP sample applications are located in the 'arch' directory.
This patch fixes the pathname for SMP sample examples.

Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
2023-03-27 11:06:10 -04:00
Emil Gydesen
eb62e974dc Samples: Bluetooth: Fix unicast client ASCS discovery
The unicast client used the BT_DATA_UUID16_SOME and
BT_DATA_UUID16_ALL instead BT_DATA_SVC_DATA16 for
discovering ASCS servers.

BT_DATA_SVC_DATA16 is the right one to use, as that
is mandatory for a server to advertise, and the UUID
ones are only recommended. Furthermore, the service data
of the ASCS server can now also be retrieved.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-24 17:35:37 +00:00
Andrei Emeltchenko
fd078b6746 samples: smbus: Remove qemu_x86_64 overlay
Remove overlay added by mistake. SMBus EEPROM PR is not merged and the
dts would be updated for qemu_x86_64 board's dts.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-24 09:36:47 -04:00
Jay Vasanth
b2f3d35540 samples: drivers: espi: update MEC172x espi sample
MEC172x espi sample to use eSPI virtual wire hardware routing
through device tree

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2023-03-23 11:58:26 -04:00
Manimaran A
754920a74f drivers: adc: microchip: Added MEC15xx board overlay
Added MEC15xx board overlay in sample folder.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-03-23 11:43:30 -04:00
Daniel DeGrasse
6c0b68672d samples: drivers: adc: treat samples as signed when using diff mode
Treat sample data as signed when using differential mode for ADC
sampling, so that negative differential samples will be converted
correctly.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-23 08:58:44 +00:00
Daniel DeGrasse
4629b626c8 samples: drivers: adc: update board overlays for LPADC API change
Update board overlays for boards with LPADC IP present on their SOCs, to
use new LPADC API for channel numbering.

For the RT595 and LPCxpresso55S69 EVKs, additional channels are enabled
to demonstrate the resolution and differential channel features of
the LPADC.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-23 08:58:44 +00:00
Pieter De Gendt
497d4899df samples: drivers: adc: Add sam4s_xplained overlay
Add a board overlay for sam4s_xplained. Channel 5 (PB1) is enabled as
well as the internal temperature sensor.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-03-23 09:41:00 +01:00
Alvaro Garcia
2380710020 drivers: Added fuel gauge max17048
Added support for fuel gauge max17048

Signed-off-by: Alvaro Garcia <maxpowel@gmail.com>
2023-03-22 14:51:33 -04:00
Alberto Escolar Piedras
6decd2d55f samples echo_client/server: Add overlay for nrf52_bsim
To disable the flash by default so the openthread RAM
settings backend is used instead.
This allows using this samples with the overlay-ot.conf
directly in the simulated nrf52_bsim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-22 14:09:03 +01:00
Andrei Emeltchenko
cf423b3eaa samples: Add smbus shell sample application
Add smbus sample for testing SMBus commands.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Alejandro Hidalgo Muñoz de Rivera
e9f12f21d5 samples: Updated README for tracing application sample
Updated README.txt to .rst format file

Signed-off-by: Alejandro Hidalgo Muñoz de Rivera <ahmrivera@gmail.com>
2023-03-22 11:41:56 +01:00
Johan Hedberg
4bfebf0a9c samples: watchdog: Add support for Intel TCO watchdog
Add appropriate configuration parameters for using the Intel TCO
watchdog driver with the rpl_crb board.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-03-22 11:38:59 +01:00
Magdalena Kasenberg
57784df5f0 LE Audio: Refactor server ASE callbacks to return rsp object
From now app layer is able to return explicit response code and
reason that will appear in ASE Control Point notification.

Fixes issues of ASCS/SR/SPE/BI-(07/08/09)-C PTS test cases, where
PTS was receiving wrong response codes and reasons.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2023-03-22 11:38:37 +01:00
Frode van der Meeren
264ccd2e67 samples: Bluetooth: Kconfig for limited printout in some ISO samples
Add kconfig to let the ISO broadcast and ISO receive samples report
packets no more than once per set interval of packets.

Signed-off-by: Frode van der Meeren <frode.vandermeeren@nordicsemi.no>
2023-03-22 09:34:23 +01:00
Gerson Fernando Budke
6951160dd2 drivers: afec: sam: Enable sam4e SoCs
Add support to Atmel SAM SAM4E AFEC feature.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Alejandro Hidalgo Muñoz de Rivera
8851a83e18 samples: Added README for watchdog sample
Added README for watchdog sample in rst format

Signed-off-by: Alejandro Hidalgo Muñoz de Rivera <ahmrivera@gmail.com>
2023-03-21 19:44:56 +01:00
Fabio Baltieri
dee6f87b3c samples: input_dump: handle events with no device set
Input events with no associated device structure are valid. Handle them
in the sample by printing NULL instead of crashing trying to lookup the
device name.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-21 09:57:56 +01:00
Alejandro Hidalgo Muñoz de Rivera
53082e8ce5 samples: Updated README for thermometer sample
Updated README.txt to .rst format.

Signed-off-by: Alejandro Hidalgo Muñoz de Rivera <ahmrivera@gmail.com>
2023-03-21 09:36:17 +01:00
Michał Barnaś
052a057daf usbc: fix assignment of value for PDOs count in get_snk_cap callback
Instead of assigning the address of value to the temporary function
parameter, there should be a dereference of the pointer and assignment
of PDOs count to it.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2023-03-21 09:36:08 +01:00
Krzysztof Chruscinski
656b0e6426 drivers: counter: Adapt to use device tree
Modifying counter drivers (rtc and timer) to rely completely on
device tree and not on Kconfig of MDK flags.

Adapting dtsi for all SoCs and adapting test configuration.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-03-20 16:59:40 +01:00
Robert Lubos
45d9960bc6 samples: net: sockets: echo_client: Fix userspace crash
k_work_* APIs cannot be used from user threads, hence it has to be
replaced with some other solution to retain userspace functionality in
the sample.

This commit reworks the sample as follows:
  * Replace delayed work items with combination of k_timer and a
    dedicated thread to send UDP packets. k_poll_signal is used for
    communication between k_timer callback and UDP thread.
  * As kernel objects should not be placed in a memory modifiable from
    user threads, declare a separate structure for them, and link it
    with the client context structure with a pointer.
  * k_timer_init() is not a system call, therefore it has to be called
    from supervisor thread. Therefore, add an additional function to
    initialize UDP, and use it to initialize kernel objects used by the
    UDP module and grant access for the main thread before it becomes an
    user thread. UDP thread inherits permissions from the parent (main
    thread).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-03-20 16:56:46 +01:00
Pavel Vasilyev
dba8d0c45f samples: bluetooth: mesh_demo: Fix bbc_microbit overlay
Return original configuration for bbc_microbit before this PR
https://github.com/zephyrproject-rtos/zephyr/pull/55927

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-03-20 14:02:32 +00:00
Pavel Vasilyev
3567007099 samples: bluetooth: mesh: Fix bbc_microbit overlay
Fixes mesh sample overlay for bbc_microbit introduced after
https://github.com/zephyrproject-rtos/zephyr/pull/55927

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-03-20 14:02:32 +00:00
Ole Sæther
da04b42fa4 samples: bluetooth: BTHome sensor template fix whitespace
Whitespace fix.

Signed-off-by: Ole Sæther <ole.saether@nordicsemi.no>
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-03-20 15:01:33 +01:00
Erwan Gouriou
4939463dc2 samples: shields: x_nucleo_53l0a1: Add missing prj.conf
This sample was missing a proj.conf which is required for any zephyr
application.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-03-20 19:53:24 +09:00
Jamie McCrae
5bc019d713 samples: tracing: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Jamie McCrae
7bc1450efe samples: bluetooth: mesh: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Jamie McCrae
3e3cee7f11 samples: bluetooth: mesh_demo: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Jamie McCrae
2398ac1815 samples: drivers: espi: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Jamie McCrae
34863c9f4e samples: drivers: kscan: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Jamie McCrae
cd4453d565 samples: drivers: ps2: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Jamie McCrae
e3525fc763 samples: zbus: remote_mock: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Jamie McCrae
2e43a483de samples: zbus: uart_bridge: Replace prj_<board> files with overlays
Replaces the old prj_<board>.conf files with board overlays instead.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 10:18:32 +01:00
Ben Marsh
4e6c50646a samples: drivers: counter: alarm: Add support for stm32h735g_disco
Add the stm32h735g_disco board to the supported boards for the counter
alarm sample

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2023-03-20 09:53:59 +01:00
Andries Kruithof
4215854956 Bluetooth: controller: remove refs to LLCP_LEGACY after rebase
Some recent PRs included conditional compilation for
KCONFIG_BT_LL_SW_LLCP_LEGACY, which must be removed.

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-03-17 15:05:05 +01:00
Andries Kruithof
2ada005d7c Bluetooth: controller: removing legacy LLCP code
This commit removes the legacy LLCP code including the
Kconfig option
It also updates the babblesim tests, and removes the
tests for the legacy controller

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-03-17 15:05:05 +01:00
Marc Desvaux
b3f739476c samples: boards: stm32: Power_mgmt: sample for standby shutdownn mode
STM32L4x power management (ultra_low_power) of Standby mode
and shutdown mode

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-03-17 14:20:05 +01:00
Jamie McCrae
e534da007d samples/tests: Add empty prj.conf files
Adds empty prj.conf files as this file is required to configure
a build.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-17 11:49:27 +01:00
Scott Chao
91ea8fa911 samples: blinky_pwm: Add stm32f072b_disco support
This will enable the use of stm23f072b_disco on this sample.
- Set pwm3 as tim3_ch1_pc6 since red led is using PC6/ TIM3_CH1.

Signed-off-by: Scott Chao <scott_chao@wistron.com>
2023-03-17 11:48:52 +01:00
Kumar Gala
831bd2f841 armclang: fix compiler warnings with isprint()
We get compile warnings of the form:

drivers/console/uart_console.c:508:8: error: converting the result of
'<<' to a boolean; did you mean
'((__aeabi_ctype_table_ + 1)[(byte)] << 28) != 0'?
 [-Werror,-Wint-in-bool-context]
                if (!isprint(byte)) {
                     ^

Since isprint returns an int, change check to an explicit test against
the return value.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-03-17 09:30:01 +01:00
Nick Ward
c49a6a0b0c samples: sensor: bq274xx: add test for CONFIG_BQ274XX_PM=n
Adds a test for BQ274XX driver option CONFIG_BQ274XX_PM=n.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-03-16 21:40:18 -04:00
Felipe
0e6a886ce4 samples: subsys: ipc: add esp32 as supported board
to the rpmsg service sample.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2023-03-16 16:42:13 +01:00
Tomáš Beneš
14138d4a34 Bluetooth: Controller: Add coexistence implementation
To enable Bluetooth controller coexistence feature, there is
implementation of ticker task, which aborts any ongoing radio events
during assertion of the grant pin. This solves the co-existence issue
in the role of the subordinate transceiver.

Signed-off-by: Tomáš Beneš <tomas@dronetag.cz>
2023-03-16 14:37:55 +01:00
Kumar Gala
9a759025d9 samples: net: sockets: tcp: Add newlib filter to samples.yaml
Not all toolchains support newlib so tests that require newlib need
to have a filter to we don't try and build those tests on those
testcases.  Add the following to samples.yaml to handle the issue:

	filter: TOOLCHAIN_HAS_NEWLIB == 1

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-03-16 11:46:45 +01:00
Ole Sæther
f2d1757df7 samples: bluetooth: BTHome sensor template bugfix
The code for humidity was wrong.

Signed-off-by: Ole Sæther <ole.saether@nordicsemi.no>
2023-03-16 09:16:20 +01:00
Kumar Gala
0e93ffc8e3 samples: hash_map: Add newlib filter to samples.yaml
Not all toolchains support newlib so tests that require newlib need
to have a filter to we don't try and build those tests on those
testcases.  Add the following to samples.yaml to handle the issue:

	filter: TOOLCHAIN_HAS_NEWLIB == 1

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-03-16 09:15:23 +01:00
Jonathan Rico
d7ca01537f samples: Bluetooth: add more documentation for hci_uart
Try to explain how to use the hci_uart sample with another board running
the zephyr host.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-03-15 15:02:26 +01:00
Vinayak Kariappa Chettimada
2abc58b886 samples: Bluetooth: Remove duplicate board conf for iso_broadcast
Remove duplicated board specific conf file for iso_broadcast
and iso_receive samples. Instead, have an overlay conf file.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-03-15 08:49:42 -04:00
Fabio Baltieri
f057010eea samples: input_dump: add a board overlay for testing zephyr,gpio-keys
Add an initial board overlay in the input_dump directory for testing
zephyr,gpio-keys. This takes the exsiting "gpio-keys" node, changes the
compatible to the one used by the gpio keys input driver and set some
codes.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-14 17:15:09 -04:00
Lucas Tamborrino
81aaaa9f72 samples: drivers: counter: add esp32s3 overlay
Add esp32s3 overlay to counter sample

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-03-14 10:50:37 +01:00
Ole Saether
4c4fcbe8df samples: bluetooth: BTHome sensor template
A template for a sensor that uses the BTHome advertising format.

Signed-off-by: Ole Saether <ole.saether@nordicsemi.no>
2023-03-14 10:50:00 +01:00
Vibhor Meshram
4684006f1b Bluetooth: Audio: Remove "Input" from MICP naming
Removed "Input" from Microphone Input Control Profile.
Release notes kept unchanged.

Signed-off-by: Vibhor Meshram <vibhor69meshram@gmail.com>
2023-03-13 18:34:09 +00:00
Jonathan Rico
15c77acfb4 tests: Bluetooth: fix att_mtu warnings on gcc-12
The warnings are correct, we were copying 17 bytes from a 4-byte source.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-03-13 15:58:33 +01:00
Emil Gydesen
935e8708cd samples: Bluetooth: Add nrf5340_audio_dk board config to audio samples
Add the nrf5340_audio_dk board config to the unicast audio
samples that use LC3.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-13 14:02:33 +01:00
Siyuan Cheng
303eb76293 sample: driver: spi_flash: Add emsdp support
Add emsdp support in spi_flash driver sample
output log:
JEDEC QSPI-NOR SPI flash testing
==========================

Test 1: Flash erase
Flash erase succeeded!

Test 2: Flash write
Attempting to write 4 bytes
Data read matches data written. Good!

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-03-13 11:58:48 +01:00
Sylvio Alves
14ac1347e2 samples: wifi: esp32s2_saola: decrease heap size
Current stack size is making build fail due to ram overflow.
So, decresase total heap available to make room for the application.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-03-09 17:21:04 +01:00
Francois Ramu
01bba46736 samples: kernel: metairq_dispatch differ the assert msg
Differ the __ASSERT_NO_MSG of the k_msgq_get()
just after checking the nb of cycles.
It allows precise counting of cpu cycles where the assert
does not interfere.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-09 09:45:09 +00:00
Sebastian Arnd
3cd58c29bf net/lib: mqtt_sn: Fix MQTT-SN IPv6 Support and assertation in Example
1. `zsock_socket()` gets the right packet familiy.
2. `inet_pton()` returns 1 on success.

This should address #55193.

Signed-off-by: Sebastian Arnd <sebastianarnd@gmail.com>
2023-03-09 09:20:53 +01:00
Andrei Emeltchenko
8a229732df samples: sensor_shell: Fix return code for sensor_shell
Fix return code from boolean (probably typo) to int.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-08 13:16:19 +01:00
Emil Gydesen
099c13846e Bluetooth: Audio: Fix minor bt_audio -> bt_bap issues
Several places used the bt_audio prefix where it shouldn't.
Also moved the BAP documentation to its own file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
271ff1d1a3 Bluetooth: Audio: Add new bap_lc3_preset and move macros
Added a new header file bap_lc3_preset.h which contains
the definitions of the LC3 (pre)sets defined by the
BAP spec.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
3326863267 Bluetooth: Audio: Rename bt_audio_ep to bt_bap_ep
Rename the bt_audio_ep struct and API to bt_bap_ep
and move the API to bap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
4224b45838 Bluetooth: Audio: Rename bt_audio_unicast_group to bt_bap_...
Rename the bt_audio_unicast_group API to bt_bap_unicast_group
and move the API to bap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
77853f43f2 Bluetooth: Audio: Rename bt_audio_stream to bt_bap_stream
Rename the bt_audio_stream API to bt_bap_stream
and move the API to bap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
e0fc612c93 Bluetooth: Audio: Rename bt_audio_unicast_client to bt_bap_...
Rename the bt_audio_unicast_client API to bt_bap_unicast_client
and move the API to bap.h

Also adds the _bap_ infix to the bt_unicast_client functions.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
be42429f90 Bluetooth: Audio: Rename bt_audio_broadcast_source to bt_bap_...
Rename the bt_audio_broadcast_source API to bt_bap_broadcast_source
and move the API to bap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
06d00ff5f9 Bluetooth: Audio: Rename bt_audio_broadcast_sink to bt_bap_...
Rename the bt_audio_broadcast_sink API to bt_bap_broadcast_sink
and move the API to bap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
eeae1f096a Bluetooth: Audio: Rename bt_audio_unicast_server to bt_bap_...
Rename the bt_audio_audio_server API to bt_bap_unicast_server
and move API to bap.h.

This also adds the _bap_ infix for bt_unicast_server.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 16:21:44 +01:00
Emil Gydesen
59a9f8a3b0 Bluetooth: Audio: Add reason to BAP stream stopped callback
Forwards the reason parameter from the ISO disconnect to
the stream stopped callback.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 09:44:20 +01:00
Emil Gydesen
e75fc5e318 Bluetooth: Audio: Remove pac_cache from unicast_client
Removes the unused pac_pache from the unicast_client.

This moves the storing of the PAC records (in the form of
struct bt_codec) from the stack to the upper layers.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-07 09:44:10 +01:00
Alberto Escolar Piedras
d3812314df samples/bluetooth/central_multilink: Relax RSSI requirement
The sample was only willing to connect if the pair RSSI level
was over -35dBm. That is ok when testing physically keeping
devices at less than 1 meter from each other.
But in CI we test with a default attenuation of 60dB between
devices and the Tx power is 0dBm.
Which causes the tests based on this sample to fail.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-07 08:34:26 +01:00
Alberto Escolar Piedras
a8bd8e21f6 samples/bluetooth/mtu_update: Relax RSSI requirement
The sample was only willing to connect if the pair RSSI level
was over -40dBm. That is ok when testing physically keeping
devices at less than ~1 meter from each other.
But in CI we test with a default attenuation of 60dB between
devices and the Tx power is 0dBm.
Which causes the tests based on this sample to fail.

Fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-07 08:34:26 +01:00
Gaël PORTAY
419dda3ed7 samples: fix path to tensorflow lite micro examples
The samples under the tensorflow modules directory has been renamed
since commit 6fd1b02496. However, the path
in their README.rst was not updated.

Additionnaly, the modules top directory under the samples is missing for
the samples magic_wand and tflm_ethosu.

This fixes the path to the tensorflow lite micro samples in their
README.rst.

Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
2023-03-06 16:08:55 -06:00
Fabio Baltieri
e82ddb75fb samples: add input_dump sample
Add a first input sample in the subsys/input directory. This just prints
any input event on the console.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-06 11:47:32 -08:00
Alberto Escolar Piedras
eed1c32d51 Samples: zbus: benchmark: Exclude nrf52_bsim
For the POSIX arch, this test relays on the native_posix RTC.
But that does not exist in the nrf52_bsim.
And without something to measure actual execution time,
it does not make sense to benchmark in the POSIX arch.
So disable this test for this platform,
and add a clear build error to warn users.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-06 19:57:00 +02:00
Yuval Peress
8760829064 sample: add trigger support to sensor shell sample
Automatically add trigger callbacks to any sensor that supports the
data ready trigger. Use a window average in order to avoid too many
logs.

Signed-off-by: Yuval Peress <peress@google.com>
2023-03-06 10:44:52 -06:00
Hiroki Tada
01a44000e8 samples: die_temp_polling: Add esp32c3 overlay
- Add overlay for the esp32c3 board to die_temp_polling sample.
- Add aliases for the die_temp_polling sample to esp32c3 dtsi.

Testing Environment:
esp32c3-devkitC-02

Signed-off-by: Hiroki Tada <tada.hiroki@fujitsu.com>
2023-03-06 09:34:18 -06:00
Fabio Baltieri
bc612b8ebd boards: arm: add Arduino GIGA
Add support for the Arduino GIGA board, an STM32H747XI based development
board in Arduino form factor, featuring external flash, SDRAM, Bluetooth
and WiFi.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-03-06 12:33:57 +01:00
Marc Lasch
072a5da433 net: lwm2m: Register callback for firmware update cancel
Allow to register a callback function which is called when a firmware
update is canceled by the cancel command.

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
2023-03-06 12:33:12 +01:00
Jamie McCrae
7931424414 samples: dfu: Fix missing Kconfigs
Adds some missing Kconfigs which are now needed to enable img_mgmt.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-06 12:33:02 +01:00
Alberto Escolar Piedras
a2541d6c82 util: Replace all POSIX arch busy_waits with Z_SPIN_DELAY
A new Z_SPIN_DELAY() macro has been added which
can be used to reduce a bit the amount of noise
due to the POSIX arch need to break busy loops with
k_busy_wait().
Use it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-04 22:14:04 +01:00
Daniel DeGrasse
43d19c0b5f samples: drivers: display: add support for RT595 EVK
Add support for RT595 EVK to display sample using RM68200 based MIPI
panel. The board is configured with an increased heap size to account
for the panel's high resolution.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-04 09:19:26 +01:00
Aleksandr Khromykh
9c8c9054a1 samples: Bluetooth: Mesh: remove nrf51 support
nrf51 has been discontinued. There is no reason to support
ble mesh as well as new mesh features and fitting of samples
for nrf51 DK platforms. As alternative support of nrf52840
has been added if there wasn't before.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-03-03 14:08:24 +01:00
Jamie McCrae
802668b259 samples: mgmt: updatehub: Select required Kconfigs
These Kconfig options are changing from select to depends on,
therefore make sure the needed options are used in the sample
project.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-03 10:49:32 +01:00
Jamie McCrae
1724504efb samples: mgmt: hawkbit: Select required Kconfigs
These Kconfig options are changing from select to depends on,
therefore make sure the needed options are used in the sample
project.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-03 10:49:32 +01:00
Jamie McCrae
0241de3969 samples: canopennode: Select STREAM_FLASH for sysbuild build
For mcuboot support, this Kconfig option needs to be selected, this
is done by having a separate project configuration file when
building the version that supports mcuboot.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-03 10:49:32 +01:00
Jamie McCrae
13c8f1dc97 samples: mgmt: mcumgr: smp_svr: Select FLASH_MAP and STREAM_FLASH
Selects the FLASH_MAP Kconfig as this is changing from an automatic
selection to a depends on due to a dependency loop.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-03 10:49:32 +01:00
Jamie McCrae
0bad35de45 samples and tests: Use non-environmental zephyr base variable
This drops using the environmental part when referencing ZEPHYR_BASE
as the environment value does not have to be set and, in most cases,
is no longer set at all.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-03 10:49:10 +01:00
Robert Lubos
46e93f67a6 samples: net: sockets: echo_server: Fix userspace crash
k_work_* API cannot not be used from the user threads as the APIs are
not syscalls. Doing so leads to a crash when userspace is enabled.

As the current use of delayed work API from user threads is merely
scheduling of the initial work execution, it can be moved into the main
thread context. The time difference from the former and current approach
should be marginal, as the start_tcp/udp_proto() calls are not blocking
calls.

Another issue was usage of k_mem_domain_add_thread() on uninitialized
TCP threads. This lead to another crash, as assigning thread to a memory
domain also involves removing it from the previous domain, which lead to
NULL pointer dereference if thread was not initialized yet. As, by
default, newly spawned threads inherit memory domain assignment from
their parent, it's not really needed to assign the same domain
explicitly, hence, it can be safely removed.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-03-03 10:48:21 +01:00
Emil Gydesen
977329e08b Samples: Bluetooth: Unicast Audio Client support no sink/source ASE
Allow the Unicast Audio Client sample to work if there are no
sink or no source ASEs on the remove device (e.g. if the remote
device only has sink ASEs).

If the remote have neither, it will abort.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-03 10:47:51 +01:00
Alberto Escolar Piedras
4c37545c26 samples: bluetooth: PAST: Disable for nrf52_bsim
The Zephyr controller does not support PAST, and there
is no other controller we can build upstream with these samples.

Disable these 2 samples for the nrf52_bsim until PAST
is supported by the controller.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-03 09:19:00 +01:00
Tom Burdick
3998f9f898 rtio: Shareable lock-free iodevs
By using an mpsc queue for each iodev, the iodev itself is shareable across
contexts. Since its lock free, submits may occur even from an ISR context.

Rather than a fixed size queue, and with it the possibility of running
out of pre-allocated spots, each iodev now holds a wait-free mpsc
queue head.

This changes the parameter of iodev submit to be a struct containing 4
pointers for the rtio context, the submission queue entry, and the mpsc
node for the iodevs submission queue.

This solves the problem involving busy iodevs working with real
devices. For example a busy SPI bus driver could enqueue, without locking,
a request to start once the current request is done.

The queue entries are expected to be owned and allocated by the
executor rather than the iodev. This helps simplify potential
tuning knobs to one place, the RTIO context and its executor an
application directly uses.

As the test case shows iodevs can operate effectively lock free
with the mpsc queue and a single atomic denoting the current task.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-03-03 09:18:09 +01:00
Tomasz Moń
e776241fbb samples: usb: mass: Increase main stack size
Increase main stack size for next USB device stack config to prevent
stack overflow when FatFs is used. The new main stack size value matches
the value used in old stack mass storage sample config.

Fixes: #55210

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-03-02 15:05:58 +01:00
Jay Vasanth
e56721b8f0 dts: gpio: Add Microchip XEC GPIO macros for use in device tree
Microchip XEC devices specify GPIO pin using octal numbering and
organize pins in banks of 32. Chip documentation does not use
bank naming rather naming each pin by its octal number. This has
led to the developer having to calculate the bit position of a pin
in its 32-bit bank when a specifying the pin for GPIO usage. We
created a set of defines for all possible GPIO pins that specify
the DT GPIO bank name used in the chip level DTSI files and the
bit position in that bank.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2023-03-02 13:52:03 +01:00
Francois Ramu
5c83a4f13d samples: basic: hash_map increasing the stack size for cxx_unordered_map
When running the testcase libraries.hash_map.newlib.cxx_unordered_map.djb2
of this samples/basic/hash_map, it appears that some platforms
have a too low stack size.
This PR is increasing that value to pass the testcase.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-03-02 07:05:09 -05:00
Daniel DeGrasse
842c14ceda samples: fs: enable littlefs sample for LPC55S69
LPC55S69 flash requires all writes be in multiples of 512 byte blocks.
Configure littleFS sample for these requirements when building targeting
the LPCXpresso55s69 EVK.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-02 10:57:31 +01:00
Ladislav Podivin
5a488c3891 Samples: Bluetooth: Fix scanning restart for broadcast audio sink
If waiting on the first semaphore in the main loop times out, the main
loop starts from the beginning and attempts to start scanning for
broadcast sources. But since the first semaphore was not passed, the
scan_recv_cb callback was not called yet and thus the previously started
scanning was not stopped. As a result, an attempt to start the scanning
will fail with -EALREADY and the main thread will end. To solve this,
-EALREADY is now ignored when checking the return value of
bt_audio_broadcast_sink_scan_start.

Signed-off-by: Ladislav Podivin <ladislav.podivin@tietoevry.com>
2023-03-02 10:00:56 +01:00
Jamie McCrae
af78cbdc99 samples and tests: Add REQUIRED to Zephyr find_package call
Adds REQUIRED to samples and tests for finding the zephyr package
to align all samples and tests with the same call and parameters.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-02 09:58:27 +01:00
Chris Friedt
93c2e08711 samples: modules: thrift: improve Thrift documentation
* ensure Thrift documents are globbed in `modules/index.rst`
* add a "What is Thrift?" section to the Thrift sample

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-03-01 19:42:49 -05:00
Chris Friedt
63e5ff0223 samples: modules: thrift: add thrift-layers image
The "Thrift Layers" image gives a good visual representation
of Thrift in what would otherwise take many words.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-03-01 19:42:49 -05:00
Carles Cufi
166efee65e samples: mesh_demo: Add the bbc micro:bit in integration
Set the bbc_microbit board as part of the integration platforms, since
the sample is designed for the board and so CI should fail if the sample
no longer builds for it.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-03-01 16:39:29 -05:00
Carles Cufi
6679a0fcbf samples: mesh_demo: Reduce footprint for bbc micro:bit
The sample no longer fits in RAM, reduce the number of discardable
packets to make it fit.

Fixes #55328.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-03-01 16:39:29 -05:00
Ben Marsh
30e0fa82f8 boards: arm: stm32h735g_disco: Enable ADC support
Enable ADC support for the stm32h735g_disco board in devicetree

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2023-02-28 10:26:26 +01:00
Ben Marsh
6d55cc6c23 samples/drivers/adc: Support 16-bit resolution
Zephyr supports ADCs with 16-bit resolution, but the ADC sample
displayed readings for such incorrectly due to too-small datatype

This commit fixes the ADC sample for ADCs with 16-bit resolution

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2023-02-28 10:26:26 +01:00
Pieter De Gendt
b1d74e42cf samples: drivers: spi_flash_at45: Remove obsolete CONFIG_SPI_FLASH_AT45
The Kconfig symbol CONFIG_SPI_FLASH_AT45 is selected by default if a
compatible device is enabled.
Remove obsolete config entry.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-02-27 14:35:15 +01:00
Pieter De Gendt
9b706a099d samples: drivers: spi_flash: Remove obsolete CONFIG_SPI_NOR configs
The Kconfig symbol for CONFIG_SPI_NOR is selected by default if a
compatible device is enabled.
Remove obsolete board config files.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-02-27 14:35:15 +01:00
Francois Ramu
7496ca45bd samples: boards: stm32 backUp Ram
Change the samples/boards/stm32/backup_sram to run on the
nucleo_u575 or stm32u585 disco kit where the backup sram is enabled
Press the reset button to see that the content of the backUp SRAM
is not altered.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-27 11:35:07 +01:00
Jonathan Rico
f8e5e17246 drivers: led_strip: add WS2812 I2S-based driver
Add a driver implementation that uses the I2S peripheral.
Based off this blog post:
https://electronut.in/nrf52-i2s-ws2812/

Should help with #33505, #29877 and maybe #47780, as there is no garbage
data at the end of transmissions on nRF52832, and no gaps.

Signed-off-by: Jonathan Rico <jonathan@rico.live>
2023-02-24 10:12:47 -08:00
Tomasz Moń
509c033c1d usb: device_next: new USB Mass Storage implementation
Introduce new USB Mass Storage Bulk-Only Transport implementation
written from scratch. Main goal behind new implementation was to
separate USB and SCSI parts as clearly as possible.

Limited set of SCSI disk commands is implemented in separate source code
file that is internal to USB device stack. While it should be possible
to use the SCSI implementation by other components there is currently no
other user besides USB MSC and therefore SCSI header is kept private.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-02-24 15:19:20 +01:00
Keith Packard
18b79a0876 samples/philosophers: Fix expected output in test configuration
This demo prints out STARVING, HOLDING, EATING, DROPPED, THINKING. The
HOLDING state was missing and the EATING state was placed in the wrong
sequence.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-02-24 12:34:26 +01:00
Keith Packard
94f680d391 samples/philosophers: Build status string with snprintk
Picolibc doesn't have any output buffering for printk, so the various
pieces of the status line would get interleaved between threads. Build the
whole line in memory using snprintk and then print it in a single printk
call.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-02-24 12:34:26 +01:00
Sjors Hettinga
0243599766 samples: echo_server: Add a full network stack overflow
Some features like IP fragmenting are default disabled to keep the network
stack compact for small devices.
In bigger applications as well as for the Maxwell Pro tests it required
to have the full functionality enabled. This can also work as example for
new projects.

Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
2023-02-24 11:49:54 +01:00
TOKITA Hiroshi
cc8baccfed samples: display: cfb_custom_font: turn off display_blanking at boot
Turn off display_blanking to make it able to refresh on a device
even when blanking default off.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-02-24 09:26:30 +01:00
Andrei Emeltchenko
2e6248cb86 samples: usb: Remove unneeded old configuration
Remove OVERLAY_CONFIG and DTC_OVERLAY_FILE from sample configuration.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-02-23 17:51:31 +01:00
Andrei Emeltchenko
5b0b6e36f2 samples: usb: Allow test to build in CI
Remove dependency on usb_device for virtual USB device / hosts sample.
This allows sample to be built in CI.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-02-23 17:51:31 +01:00
Dominik Ermel
447e2c1859 samples/fs/littlefs: Separate SPI, QSPI and SoC nrf52840dk configs
Add support to run the sample on nrf52840dk_nrf52840 using
internal SoC flash, and external mx25 device over QSPI or SPI.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-02-23 09:03:58 +01:00
Dominik Ermel
d00dfa8a45 sample/drivers/jesd216: Reduce nrf52840dk SPI overlay
Reduce nrf52840dk_nrf52480_spi.overlay to use default board
definition of spi2.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-02-23 08:58:34 +01:00
Chris Friedt
480b74917d samples: lib: os: hash_map: add Hashmap sample code
This sample shows how to use `sys_hashmap`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-02-22 19:14:05 +01:00
Saku Rautio
dca5d62573 Revert "Samples: Philosophers: Revert stack size change"
This reverts commit 7c00ecbbbf.

Changes introduced in that commit break the Dining Philosophers demo
for the following in-tree platforms:
  - actinius_icarus
  - circuitdojo_feather_nrf9160
  - nrf5340_audio_dk_nrf5340_cpuapp
  - nrf5340dk_nrf5340_cpuapp

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/55040.

Signed-off-by: Saku Rautio <saku.rautio@nordicsemi.no>
2023-02-22 08:15:56 -05:00
Piotr Dymacz
14bc3c28f0 samples: hci_uart: nRF52840 Dongle: drop redundant overlay
Since the commit 897d2b8204 ("boards: arm: nrf52840dongle_nrf52840: Use
USB CDC as default UART") this board has the 'cdc_acm_uart' node defined
and selected (with 'chosen' node) as 'bt-c2h-uart' by default. Overlay
file is no longer required.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-02-22 11:58:05 +01:00
Anas Nashif
c6a83ff5a6 samples: socket: tcp: add tests section
Add tests section to verify building based on the documentation.

Fixes #54991

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-02-22 05:31:07 -05:00
Anas Nashif
57dcd3cc60 samples: move litex i2s sample under samples/boards
Move the board specific sample under samples/boards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-02-22 05:31:07 -05:00
Anas Nashif
5cd0d03e76 samples: i2s: litex: fix sample.yaml syntax
Add tests section and whitelist litex board.

Fixes #54989

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-02-22 05:31:07 -05:00
Jonas Remmert
098749bb45 samples: mesh_badge: fix BT mesh provisioning error
The BT Mesh Configuration Client API is used in an asynchronous manner
and the app key was not added before attempt binding it to mesh models.
This caused the binding functions to fail and resulted in a fail when
trying to to send mesh messages.

This commit registers a callback that is called when the app key is
assigned. After this callback is called, the binding functions are
called.

Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
2023-02-21 18:36:05 +02:00
Jamie McCrae
c4fa242a46 samples: mgmt: mcumgr: smp_svr: Add missing base64 selects
Adds missing selects for CONFIG_BASE64 for overlays which use
shell/UART transports that were not updated.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-02-20 15:58:27 +01:00
Jamie McCrae
1b4b979f87 mgmt: mcumgr: Change select to depends on in Kconfigs
Select in Kconfig causes many issues with dependency loops, this
resolves the issue by replacing most select with depends on for
MCUmgr, including updates to the sample smp_svr application and
tests.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-02-20 11:27:43 +01:00
Andriy Gelman
1e2111c9e5 samples: die_temp_polling: Add xmc45_relax_kit overlay
Adds overlay for the xmc45_relax_kit.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-02-20 11:14:15 +01:00
Daniel Leung
9776cb1a39 samples: zbus: runtime_obs_registration: fix running on QEMU
() This makes the stack for both consumer and producer threads
   larger to avoid stack corruption and overflow.

() Limit to 1 CPU to preserve ordering of output for twister.

() Remove the platform_exclude as they are passing now.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-02-20 10:53:25 +01:00
Saku Rautio (Ext)
7c00ecbbbf Samples: Philosophers: Revert stack size change
In commit 31e0d86484, the stack size
was unjustifiably changed from a base of *768*
(plus a configurable extra stack size) to *2048*.
This change broke our sample tests for one of our products, which has
less available memory for the threads' stacks.

The stack size is dropped to *1024* to align with the stack sizes
specified in the other samples, which were changed in commit
31e0d86484.

Signed-off-by: Saku Rautio (Ext) <saku.rautio@nordicsemi.no>
2023-02-20 10:49:38 +01:00
Francois Ramu
3cf2654141 samples: drivers: led pwm running on 2 pwm leds on nucleo_u575
Add the overlay file to run the samples/drivers/led_pwm
on the nucelo_u575zi_q board.
Two green leds are used on pc7 and pb7 corresponding to pwm
channels of timers3 and timers4.
The leds node has to be disabled to let the pin for the pwm nodes.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-20 09:47:18 +01:00
Francois Ramu
98e24fa6ce samples: drivers: led pwm running on 2 pwm leds on disco l475
Add the overlay file to run the samples/drivers/led_pwm
on the disco_l475_iot1 board. Two green leds are used on pa5 and pb14
corresponding on 2 pwm channels of timers2 and timers15.
The leds node has to be disabled to let the pin for the pwm nodes.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-20 09:47:18 +01:00
Francois Ramu
d41f69559a samples: drivers: led pwm running on pwm led of the nucleo boards
Configure the overlay file to run the samples/drivers/led_pwm
on the nucleo_l073rz and nucleo_f091rc board.
The green led is used on pa5 for pwm channels of timers2 channel
The leds node has to be disabled to let the pin for the pwm nodes.
The spi1 is disabled in that sample to avoid conflict on pa5 pin.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-02-20 09:47:18 +01:00
Emil Gydesen
e71460cdb8 Bluetooth: Audio: Only allow receiver to send start command
Only the receiver of the audio is allowed to send the
receiver start ready command.

Furthermore, this removes the automated transition to the
streaming state on the server, as the server now shall
call bt_audio_stream_start to put the stream into the
streaming state.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-02-20 09:45:18 +01:00
Juha Ylinen
fdffdedc41 net: lwm2m: Add event LWM2M_RD_CLIENT_EVENT_REG_UPDATE
New event LWM2M_RD_CLIENT_EVENT_REG_UPDATE to indicate
application that engine starts registration update.

Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
2023-02-19 20:44:02 -05:00
David Reiss
f61929455d pytest: Fix typo in comment in pytest suite
The option is "cmdopt"

Signed-off-by: David Reiss <dreiss@meta.com>
2023-02-19 20:41:34 -05:00
Sylvio Alves
f1b662ae17 samples: ipm_esp32: remove binary blob
Remove array structure from source code to follow
Zephyr's policy regarding its usage.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-02-16 21:30:35 +09:00
Sylvio Alves
f433e95262 samples: ipm_esp32: use net core source from build ouput
Current ipm_esp32 sample code requires esp32_net_firmware.c file
as source input, which is generated after ipm_esp32_net build.
esp32_net_firmware.c was manually added as binary blob, which needs to
be removed from the repository.

This change modifies ipm_esp32 CMakeLists.txt to include the build
output of ipm_esp32_net as input source of ipm_esp32 build, allowing the
binary blob to be removed.

Current approach shall be updated during next release.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-02-16 21:30:35 +09:00
Kevin Townsend
0798375b92 samples: tfm: Disable initial attestation test
Disables the initial attestation suite, which we are unable to run
at present due to a license issue with the underlying QCBOR library
which this service depends on in TF-M.

This commit can be reverted once an acceptable solution has been found
for the QCBOR license in TF-M.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2023-02-11 07:59:06 +09:00
Kevin Townsend
cd8d4ccad5 modules: tfm: Disable initial attestation service
Prevents Zephyr from enabling the initial attestation service in TF-M,
due to a dependency it has on an incompatibly-licensed library (QCBOR).

This update checks if either of the following config flags are
enabled at build time:

- `CONFIG_TFM_PARTITION_INITIAL_ATTESTATION`
- `CONFIG_TFM_PSA_TEST_INITIAL_ATTESTATION`

If either of these are set to true, a fatal error will be thrown at
build time, indicating the reason for the failure.

This change can be reverted once a longer term solution to the QCBOR
license issues has been resolved.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2023-02-11 07:59:06 +09:00
Vinayak Kariappa Chettimada
d278d70497 Bluetooth: Controller: hci_rpmsg: Lock IRQs and spinlock on assertions
Fix Controller assertion handler to lock IRQs and spinlock
on assertions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-02-10 15:09:02 +01:00
Jonathan Rico
5222691b7f Samples: Bluetooth: ignore -EALREADY when opening ipc instance
This instance might be shared by other users that may have opened it
earlier in the boot chain.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-02-09 15:05:19 +01:00
Carlo Caione
654fae9e63 sample: s2ram: Remove s2ram sample
The sample is not fully working (yet) and it will be soon replaced.
Remove it to not confuse people.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-02-09 22:08:28 +09:00
Chris Friedt
3ea28b2fa5 samples: modules: thrift: add samples for thrift module
Here we add a client and server samples for the basic
"hello" service.

These samples are designed to be run by either Zephyr or
the host machine, interchangeably.

Additionally, there is a python version of the client
to demonstrate Thrift's cross-language capabilities.

This code was merged from the following repository
at the commit specified below, with minor formatting
and coding-style modifications.

https://github.com/zephyrproject-rtos/gsoc-2022-thrift
e12e014d295918cc5ba0b4c507d1bf595a2f539a

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-02-09 20:30:21 +09:00
Manuel Arguelles
850b8fcbc2 samples: subsys: task_wdt: skip for s32z270dc2
s32z270dc2_r52 boards don't support system reset currently.
Fixes #54580

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2023-02-09 11:14:24 +01:00
Lars Knudsen
333d48b56d Bluetooth: has: Fix uninitialized bt_has_register_param
Zero initialize has_param in BSIM test.
Also, specify all bt_has_register_param members in hap_ha sample.

Signed-off-by: Lars Knudsen <larsgk@gmail.com>
2023-02-08 08:14:23 -08:00
Manuel Arguelles
b7a766e370 boards: s32z270dc2_r52: document supported features
Document supported features and do minor refactoring.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2023-02-08 08:07:56 -08:00
Chris Friedt
db08c515c8 samples: net: socketpair: rename to main.c for consistence
The source file for most single-file sample apps is usually
`main.c`. Rename this file to be consistent with other
samples.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-02-08 19:04:25 +09:00
Chris Friedt
189d8b8a5e samples: net: socketpair: clean up sample app
* use `read()` instead of `recv()`
* use `write()` instead of `send()`
* use `CONFIG_POSIX_API` and drop `<zephyr/posix/..>` prefix
* use `perror()`
* fix `Makefile.posix` to use `CC` instead of `CXX`
* fix race condition which caused an unhandled EOF
  and infinite loop, by adding a readback / echo
* Updated the docs to reflect the expected stdout
* Improve doc clarity

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-02-08 19:04:25 +09:00
Daniel DeGrasse
bcee4ed34e samples: drivers: adc: add support for side b channel to RT685 EVK
Add support for CH0B to RT685 EVK, to demonstrate LPADC side B channel
support.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-02-08 01:08:08 +09:00
Daniel DeGrasse
966b88eaa9 samples: drivers: adc: add support for side B channel on LPCXpresso55s69
Add support for CH0B on LPC55s69 EVK, to demonstrate side B support in
LPADC driver

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-02-08 01:08:08 +09:00
Emil Obalski
5fe8707ed5 samples: ipc: Fix incorrect license
Replace Nordic-5-Clause with Apache-2.0.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2023-02-06 22:36:05 +09:00
Théo Battrel
d598e26de4 Bluetooth: Remove point 6 of Samples Guidelines
Point 6 of Samples Guidelines stated that samples should be references and
not tutorials. The problem is that there is currently no tutorials in
Zephyr.

The proposal here, is to use samples has tutorials. The references could be
left to the tests.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-02-06 10:43:31 +01:00
Henrik Brix Andersen
921e69af40 samples: canbus: isotp: add option for running in loopback mode
Add Kconfig option for running the CAN ISO-TP sample in loopback mode. This
removes the need for a fixture when running the sample via twister.

Exclude the loopback tests for kvaser,pcican. See
836f582664 for more information.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-02-06 10:03:31 +01:00
Sam Hurst
ce65f86d0a samples: usb-c: sink: Enable Dead Battery functionality on Port1
Enable Dead Battery functionality on PD Port1

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2023-02-06 10:03:13 +01:00
Sam Hurst
de0a64fa0d samples: subsys: usb_c: sink: Change PD port to Port1
The stm32g081b_eval board does not implement Dead Battery
functionality on PD Port2. Change the sample configuration
so that PD Port1 is used, which has Dead Battery support.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2023-02-06 10:03:13 +01:00
Erwan Gouriou
b577ffbbf7 samples: tfm_ipc: Add b_u585i_iot02a_ns target
Add b_u585i_iot02a_ns target in tfm_ipc CI

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-02-01 17:16:13 +09:00
Stancu Florin
e55fd536c8 boards: cc13x2/cc26x2*: enable WDT + update docs & sample
Enables the watchdog timer within the DTS of supported boards,
add sample overlays showing how to use NMI WDT interrupts and
updated the board features inside the boards' doc / yaml files.

Signed-off-by: Stancu Florin <niflostancu@gmail.com>
2023-01-31 16:08:00 -05:00
David Reiss
362874bc09 samples: Fix typo: "CMSI" -> "CMSIS"
Reference: https://arm-software.github.io/CMSIS_5/RTOS/html/index.html

Signed-off-by: David Reiss <dreiss@meta.com>
2023-02-01 03:54:09 +09:00
Siyuan Cheng
86769f03df sample: driver: spi_flash: Add em_starterkit support
Add em_starterkit support in spi_flash driver sample
output log:
JEDEC QSPI-NOR SPI flash testing
==========================

Test 1: Flash erase
Flash erase succeeded!

Test 2: Flash write
Attempting to write 4 bytes
Data read matches data written. Good!

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-01-30 10:06:24 +00:00
Kevin Townsend
d3d80e8b33 samples: tfm_ipc: Remove mps3_an547_ns support
The AN547 no longer functions with this TF-M sample, and has been
broken since TF-M 1.6.0 without CI catching the issue, since this sample
wasn't modified to cause a CI run on the affected target.

Removing this board from the sample until the board support can be
reworked.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Joakim Andersson
8cfa0f40cb samples: tfm_secure_partition: Update sample for TF-M 1.7.0
Update TF-M secure partition sample for TF-M 1.7.0.
Removes the support for Library model in the sample.
Updates to using PSA framework 1.1.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Kevin Townsend
dd12dfb5ad samples: tfm_integration: Update tfm_ipc for 1.7.0
Update the sample to be compatible with API changes introduced in
TF-M 1.7.0, adding a new direct call to the PSA Crypto API to generate
random data, and cleaning up existing functions for compatibility
sake.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Kevin Townsend
c63fb21760 samples: tfm_integration: Remove psa_crypto
Removes the `psa_crypto` sample from the current release, due to
PSA API conflicts that can not be immediately resolved between Zephyr's
instance of MbedTLS in the NS environment, and the TF-M PSA APIs
included when building with TF-M support.

PSA API changes upstream in MbedTLS 3.2.1 (used by TF-M 1.7.0), and
MbedTLS 3.1 (used in TF-M 1.6.0) need to be be resolved in both
upstream projects before this sample can be reintroduced.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Kevin Townsend
a50aafd938 samples: tfm_integration: Remove psa_firmware
Removes the `psa_firmware` sample, which is based on an older version
(0.7) of the FWU service from TF-M 1.6.0. This sample needs to be
refactored to use FWU 1.0, included in TF-M 1.7.0 and future releases.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Joakim Andersson
2ba39d8bf1 samples: Add SFN model configurations
Add SFN model configurations to samples.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Joakim Andersson
2572a53a45 tfm: Remove library model support
In TF-M 1.7.0 release the Library model has been removed.
Remove the library model support from zephyr before updating TF-M
version.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Siddharth Chandrasekaran
08740ca7ef samples: mgmt/osdp: Select ENTROPY_GENERATOR from prj.conf
ENTROPY_GENERATOR is needed for OSDP Secure Channel capability. Now
that Secure Channel patches are merged, enabling it by default.

Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
2023-01-27 08:30:06 -06:00
Carl Stehle
714f80d225 Bluetooth: Controller: Integrate ISOAL for ISO Broadcast
- Include ISO stream count in ISO streams definitions in
  controller.
- Create ISOAL source on controller when ISO data path is
  setup.
- Send broadcast data buffers transferred from host over
  HCI to ISOAL as ISO SDU fragments.
- Allow bot conn and ISO data to use data_buf_overflow.
- Store ISO interval during BIG create.
- Remove ISO data path for each BIS during BIG terminate
  procedure.
- Set value (temporarily) for ISOAL target_event enabling
  it to Tx data.
- Check status of data fragment sent to ISOAL for memory
  allocation and other errors.
- Destroy ISOAL source when ISO stream released.
- Use ISO Advertising handle, not stream handle to destroy
  ISO data path.
- Remove extra ISOAL sink destroy call when removing ISO
  data path.
- Add FIXME comment as reminder to address LL_ASSERT on
  isoal_status error.

Signed-off-by: Carl Stehle <droid@appception.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-01-27 23:04:45 +09:00
Vinayak Kariappa Chettimada
7372870dd0 samples: Bluetooth: hci_rpmsg: Add DF, Broadcast and Connected ISO conf
Add direction finding, Broadcast ISO and Connected ISO conf
files for build coverage and user convenience to build
respective binaries for nRF53 Series network core.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-01-27 23:04:45 +09:00
Dominik Ermel
8febac3627 samples/drivers/soc_flash_nrf: Add missing README.rst
Missing documentation added.

Fixes #53753

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-01-27 19:22:40 +09:00
Brett Witherspoon
5ec1b4d1b2 samples: drivers: uart: Read until FIFO empty in echo_bot
The RX ready condition is unspecified with regard to being level or edge
triggered, so all available data should then be read once the RX ready
condition is detected. This change brings the sample into agreement with
the documentation and tests.

Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
2023-01-27 19:21:37 +09:00
Stancu Florin
ae22c697b3 boards: cc1352r1_launchxl: fix echo samples
Recent Zephyr changes (IEEE 802.15.4 config moved from KConfig
to DeviceTree) left the TI CC1352r1_launchxl board's net examples in
a non-working state, mainly due to the fact that CC13x2 has two
IEEE802154 interfaces available (2.4GHz and sub-GHz) and none were
enabled.

This commit enables the 2.4GHz radio inside the board's DTS and also
introduces a new devicetree overlay inside the echo* samples:
'boards/boards/cc1352-enable-subg.overlay', enabling the sub-GHz
interface.

Signed-off-by: Stancu Florin <niflostancu@gmail.com>
2023-01-27 17:44:38 +09:00
Keith Packard
bf384bf41a samples/modules/chre: Support picolibc %p for NULL pointers
glibc and newlib print "(nil)" for NULL pointers while picolibc just prints
"0". Allow either by replacing the exact "(nil)" match with ".*" instead

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-01-26 09:12:35 -08:00
Henrik Brix Andersen
b727446949 samples: canbus: isotp: add missing call to can_start()
Add missing call to can_start().

Fixes: #54078

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-26 09:10:45 -08:00
Seppo Takalo
03fd995fd5 samples: net: lwm2m_client: Use Ethernet in QEMU Cortex-M3
By default, qemu_coxtex_m3 target selected SLIP driver as
a network backend. This requires some unstandard tool (tunslip6),
which are error prone and might not necessary work.
Ethernet backend work equally well as in native_posix so
use the same for both.

Change the default emulation platform from X86 to Cortex-M3
because it supports Ethernet by default.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-01-27 00:58:45 +09:00