Commit graph

9378 commits

Author SHA1 Message Date
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
Johann Fischer
cad8ae7597 samples: hci_usb: enable new experimental USB device support
Enable Bluetooth HCI USB tranport layer from new experimental
USB device support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-01-27 00:57:22 +09:00
Jamie McCrae
4516e7161c mgmt: mcumgr: transport: smp_bt: Fix wrongly enabling Bluetooth
Bluetooth does not need to be enabled to register services,
therefore the newly introduced automatic bluetooth SMP transport
registration system can be simplified by returning enabling of
bluetooth back to the application.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-26 12:36:16 +00:00
Jamie McCrae
ec7044437e treewide: Disable automatic argparse argument shortening
Disables allowing the python argparse library from automatically
shortening command line arguments, this prevents issues whereby
a new command is added and code that wrongly uses the shortened
command of an existing argument which is the same as the new
command being added will silently change script behaviour.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-26 20:12:36 +09:00
Seppo Takalo
140e466472 samples: net: lwm2m_client: Allow configuration in Kconfig
Allow endpoint name, PSK and TLS tag and server address
to be configured in Kconfig.

When endpoint name is not defined, use CONFIG_BOARD.
Also use endpoint name as a PSK ID instead of hard coded
"Client_identity" which would collide if more than one instance
is ran against same server. Now we could define different identity
for each endpoint.

Also, as a mininal refactor, allow DNS names to be used in
server address, instead of assuming IP address.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-01-26 10:06:16 +00:00
Keith Packard
124f10fd9c samples: subsys: zbus: Avoid stack overflow with TLS
Enabling TLS increases stack usage by a small amount as that is where any
TLS variables are stored. When enabled, this sample ends up overflowing the
512-byte subscriber task stack and the IDLE_STACK_SIZE consumer stacks

Replace the fixed 512-byte subscriber stack allocation with
CONFIG_MAIN_STACK_SIZE so that it adopts a value controlled by the
configuration in case it needs to be adjusted further.

Increased CONFIG_IDLE_STACK_SIZE to 1024 to provide more space in each
consumer stack.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-01-26 10:04:33 +00:00
Keith Packard
0ee0e6562a sample/zbus: qemu_nios2 needs faster tick for zbus test with picolibc
Picolibc is enough faster than the minimal C library that the zbus
benchmark will likely complete in well under 10ms on qemu_nios2. As this
target cannot provide a clock at higher resolution than the system tick, we
need to increase that rate to get a non-zero runtime for this benchmark.

Add new nios2-specific config variables that change the
CONFIG_SYS_CLOCK_TICKS_PER_SEC value, leaving all other platforms using the
standard value. We cannot just increase it for every platform as
qemu_arc_hs6x fails with a 1kHz rate.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-01-26 10:04:33 +00:00
Brian Juel Folkmann
d0a7ab529d samples: spi_flash: Add option to test multiple sectors
Add tests for erase of multiple consequtive sectors.

Signed-off-by: Brian Juel Folkmann <bju@trackunit.com>
2023-01-26 09:39:59 +00:00
Henrik Brix Andersen
55d0ffa874 drivers: can: remove CAN_HAS_CANFD Kconfig helper
Remove the CAN_HAS_CANFD Kconfig helper symbol in order to allow enabling
CAN-FD support in the API regardless of driver support.

Change default to CAN-FD support being disabled and have samples and tests
that require CAN-FD support turn it on. This aligns the default
configuration across CAN controller drivers regardless of their
capabilities.

The rationale behind this is that we are starting to see MCUs with multiple
CAN controllers, some CAN-FD compatible, some not (e.g. NXP i.MX RT1060 and
FPGAs). Automatically enabling CAN-FD support based on the presence of a
CAN-FD capable CAN controller leads to different application default
settings based on the CAN controller(s) in use.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-25 15:00:39 +00:00
Guillaume Gautier
4635af398b dts: arm: st: Remove obsolete properties for all STM32 ADC from dts
In all STM32 dts, remove all reference to the following properties:
- has-temp-channel
- has-vref-channel
- has-vbat-channel

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-01-25 15:00:21 +00:00
Guillaume Gautier
009fcb9305 dts: arm: st: Add ADC temperature and Vref channels for all STM32
Now that we have a binding to define the channel number for temperature
and Vref measurement, update all dtsi to include the information.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-01-25 15:00:21 +00:00
Evgeniy Paltsev
d705f740ee samples/subsys/zbus/benchmark: fix counter synchronization issue
Current implementation has obvious synchronization issue with
global counter variable which is updated (RMW) in multiple threads
without any locking.

Replace regular variable by atomic type. As the maximum possible
value is much less than INT32_MAX it's OK to replace the original
uint64_t by (32-bit) atomic_t.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-01-25 11:24:07 +00:00
Marcin Jabrzyk
5787c69b9c samples: watchdog: RP2040 doesn't require custom max timeout
RP2040 accepts window max time in milliseconds then
the default Zephyr sample value is fine.

Signed-off-by: Marcin Jabrzyk <marcin.jabrzyk@gmail.com>
2023-01-24 19:01:34 -08:00
Fabio Baltieri
b787cc088d samples: bt: hids: add a non authenticated mode to the sample
The HIDs sample is currently setup with a passkey callback and requires
authenticated write and read access.

Add a sample option to disable the passkey callbacks, and automatically
set the GATT attributes as encryption required. This is a useful sample
setup as real world HID devices (mice, keyboards...) usually don't have
a passkey mechanism, and removing the callback to reproduce that setup
while not changing the GATT permission leads to automatic disconnections
for encryption failures that can be fairly hard to troubleshoot.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-24 19:33:03 +01:00
Fabio Baltieri
ca2bcf8d15 samples: bt: set a sample names and descriptions
Set a sample name and description for a bunch of tests where those are
left as "TBD" right now.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-24 19:33:03 +01:00
Jeppe Odgaard
74b94b4dff boards: add rt1050 qdec pinmux and overlay
Add a qdec pinctrl definition for rt1050.
Add an overlay in the qdec sample to support rt1050.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-01-24 10:21:39 -06:00
Jeppe Odgaard
35d60dbd0e samples: sensor: add qdec emulation support
Add emulation option to the qdec sample.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-01-24 10:21:39 -06:00
Henrik Brix Andersen
4585a4415c Revert "samples: net: lwm2m_client: Use Ethernet in QEMU Cortex-M3"
This reverts commit 8e3fc793d3.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-24 15:02:57 +00:00
Seppo Takalo
8e3fc793d3 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-24 14:35:14 +00:00
Manuel Arguelles
df1d148abc samples: boards: nxp_s32: add sample for NETC
The sample application shows how to configure NXP S32 Network Controller
(NETC) for different use-cases.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2023-01-24 14:37:20 +01:00
Kumar Gala
8f04408725 tests: Add newlib filter for some testcases that dont have it
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.  Some newer tests are missing:

	filter: TOOLCHAIN_HAS_NEWLIB == 1

so add that to testcases that needed.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-01-24 11:10:27 +00:00
Emil Gydesen
1af16d896c samples: Bluetooth: Broadcast audio source add packing field
Set the packing field when creating the broadcast source. This
is currently missing, and in uninitialized.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-24 09:44:09 +01:00
Quang Bui Trong
ad19019b29 samples: watchdog: board s32z270dc2_r52 only build and not running
Currently, the s32z270dc2_r52 board only supports running on RAM,
 so samples or tests watchdogs that perform SoC reset will not produce
 results. Set the build only for these samples and tests until the
 reset SoC function is supported.

Signed-off-by: Quang Bui Trong <quang.buitrong@nxp.com>
2023-01-23 11:46:43 -08:00
Francois Ramu
e9f77f1ecf samples: drivers: use stm32 dma driver binding macro to configure channel
Use the macro as defined by the
include/zephyr/dt-bindings/dma/stm32_dma.h to configure the
dma channel.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-01-23 09:15:21 -06:00
Gerson Fernando Budke
647c48c574 mgmt: updatehub: Add userspace syscalls
The current updatehub version forces user application to run in kernel
mode. This add necessary api syscalls to isolate userspace from kernel.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2023-01-23 10:24:07 +00:00
Gerson Fernando Budke
000257dad0 mgmt: updatehub: Move updatehub.h to header directory
This moves updatehub.h file from subsys to public header include
folder.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2023-01-23 10:24:07 +00:00
Martin Jäger
5dd50f9232 samples: subsys: lorawan: class_a: add clock sync option
Add an option to build the sample with application-layer clock sync
service running in the background.

This will also add a build-check for the clock sync service in CI.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-01-23 10:05:49 +00:00
Martin Jäger
5b4920c81b samples: subsys: lorawan: class_a: add documentation
Add a README for the LoRaWAN sample.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-01-23 10:05:49 +00:00
Andrzej Głąbek
8115fc2e9f samples: spi_bitbang: Use gpio_loopback pins for MOSI and MISO
Align pins that are required to be shorted for this sample on
nRF52840 DK with those used in e.g. uart driver tests.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-01-20 13:28:27 +01:00
Dominik Ermel
26d32bdd48 sampes/smp_svr: Bring back UART shell when using BT transport
Adding configuration options to bring old behaviour where
UART shell have been available when overlay-bt.conf has been
used for building sample.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-01-20 11:58:30 +01:00
Keith Packard
35e017a9ee subsys/cpp: Also run C++ tests with picolibc when possible
When the toolchain has picolibc support, run
samples/subsys/cpp/cpp_synchronization and tests/subsys/cpp/libcxx tests
using it.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-01-20 09:03:25 +01:00
Henrik Brix Andersen
03ac89d75b samples: canbus: isotp: add missing isotp tag
Add missing "isotp" tag to the CAN bus ISO-TP sample.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-19 16:49:10 -08:00
TOKITA Hiroshi
b70d399a34 samples: sensor: Add CPU temperature monitor sample
Add a polling sample for CPU temperature monitor.
This sample demonstrates how to data fetch and print to the console.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-01-19 15:32:41 -06:00
Ederson de Souza
7965fd2b4a samples/boards/intel_adsp: Make sample work with twister
sample.yaml was missing a tests section, making it unable to run with
twister. This patch adds the section.

While at that, fix an issue in the sample README.rst.

Fixes #53656.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2023-01-19 09:17:06 -08:00
Robert Lubos
340e7c9f79 samples: net: big_http_download: Fix POSIX compability
The sample documentation mentions that the sample can be built directly
on Linux, which was no longer the case. This commit fixes it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-01-19 11:17:38 +01:00
Robert Lubos
2a02f4f9a9 samples: net: big_http_download: Update URL for TLS download
The old link has expired, the file is no longer avaiable to download.

Update the download link, which now leads to a file in Ubuntu
repositories for the recent LTS release, hopefully making the link valid
for longer period.

As the server ceritficate is signed by a different root CA, update the
root CA as well.

Finally, cleanup how the URL is handled in the sample - for TLS variant
it'll always be provided with a Kconfig, hence no need to repeat it in
the sample.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-01-19 11:17:38 +01:00
Robert Lubos
1c911904d5 samples: net: big_http_download: Add minimal support for redirect
It's often the case with TLS file servers, that the download link does
not lead to downloaded file, but rather redirects to another server.
Therefore it makes sense to have a minimal support in the sample for
HTTP redirection, so that the file can still be downloaded.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-01-19 11:17:38 +01:00
Martin Jäger
aef8419e9e samples: basic: custom devicetree binding demo
This sample shows how to define a custom devicetree binding to use
GPIO pins for a specific purpose.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-01-19 10:16:34 +01:00
Jarno Lämsä
6dfe7e2458 samples: net: lwm2m_client: Replace deprecated calls
Replace calls to deprecated functions with new ones.

Signed-off-by: Jarno Lämsä <jarno.lamsa@nordicsemi.no>
2023-01-19 10:16:22 +01:00
Mariusz Skamra
18ab7ebf22 samples: unicast_audio_client: Fix enabling the streams
This fixes the application that was not waiting for QoS configuration of
all streams in the group. The QoS operation is done on group of streams,
while the status of each one of the streams is received separately.
Meaning that the application has to control which streams were already
configured before enabling them.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-01-18 09:56:52 +01:00
Mariusz Skamra
36058480e7 Bluetooth: audio: Improve stream coupling for CIS as the unicast client
Allow  the streams to be paired when creating unicast group. This will
allow to reuse the same ISO for the paired streams.

Fixes: #51796
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-01-18 09:56:52 +01:00
Daniel DeGrasse
47271ce8be treewide: update usage of zephyr_code_relocate
Update usage of zephyr_code_relocate to follow new API. The old method
of relocating a file was the following directive:

zephyr_code_relocate(file location)

The new API for zephyr_code_relocate uses the following directive:

zephyr_code_relocate(FILES file LOCATION location)

update in tree usage to follow this model. Also, update the NXP HAL SHA,
as NXP's HAL uses this macro as well.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-01-17 18:08:37 +01:00
Emil Gydesen
4db60883db samples: Bluetooth: Unicast audio server: Add missing supported contexts
Add missing calls to setting supported contexts.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-17 13:17:03 +01:00
Théo Battrel
4314480826 Bluetooth: Update Readme of large MTU sample
Update the Readme file of the large mtu sample because the orginal PR
(https://github.com/zephyrproject-rtos/zephyr/pull/53593) has been merged
before the last comment could be addressed.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-01-16 16:51:42 +01:00
Emil Gydesen
a1bb9c9d17 Samples: Bluetooth: hci_rpmsg add missing platform_allow
Add nrf5340_audio_dk_nrf5340_cpunet to the platform_allow
as having it only in integration_platforms causes issues
with the CI system.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-16 21:32:22 +09:00
Jamie McCrae
fa3c6fdc28 samples: mgmt: mcumgr: Select required symbols
Select required dependency symbolds for the various transports.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-16 10:04:45 +01:00
Théo Battrel
00a4a0720f Bluetooth: Update README of MTU update sample
Update the README to add more informations on MTUs. Also add a diagram of
the different MTU and Kconfig symbols in the Host.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-01-16 10:01:27 +01:00
Théo Battrel
7e23294bc5 Bluetooth: Add a sample to demonstrate MTU update
Add a new sample that demonstrate how to exchange MTU to allow larger
packet transmission.

The sample is split in two applications. One is the Central, it will
initiate the MTU exchange. The other one is the Peripheral and will try to
send a large notification. If the MTU exchange fail or the new size is not
big enough, the Peripheral will not be able to send the notification.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-01-16 10:01:27 +01:00
YuLong Yao
1dd0ffbe40 Revert "samples: jesd216: add support for gd32a503v_eval board"
This reverts commit 0f28a8d120.

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-16 09:42:28 +01:00
Andrzej Głąbek
507f4b31d1 samples: drivers: w1: Enable arduino_i2c and arduino_serial explicitly
This sample uses the arduino_i2c and arduino_serial DT nodes, so it
should enable them explicitly, not assume they will be enabled by
default for a given board.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-01-16 09:26:10 +01:00
Andrzej Głąbek
569136a04b samples: net: openthread: coprocessor: Enable uart1 explicitly
This application uses the uart1 DT node, so it should enable it,
not assume that it will be enabled by default for a given board.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-01-16 09:26:10 +01:00
Stephanos Ioannidis
cf211aa7af treewide: Update deprecated CONFIG_LIB_CPLUSPLUS usages
This commit updates all deprecated `CONFIG_LIB_CPLUSPLUS` usages to:

* check if the Zephyr minimal C++ library is enabled using
  `CONFIG_MINIMAL_LIBCPP` instead of relying on the
  `CONFIG_LIB_CPLUSPLUS`-based inference.

* select `CONFIG_REQUIRES_FULL_LIBCPP` when there exists a component-
  level C++ standard library dependency. This allows a component to
  declare C++ standard library dependency without designating a
  specific libray implementation.

* select the correct type of C++ standard library implementation to use
  through one of the `CONFIG_LIBCPP_IMPLEMENTATION` choices.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-01-13 17:42:55 -05:00
Stephanos Ioannidis
4a64bfe351 treewide: Use CONFIG_CPP instead of CONFIG_CPLUSPLUS
This commit updates all in-tree code to use `CONFIG_CPP` instead of
`CONFIG_CPLUSPLUS`, which is now deprecated.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-01-13 17:42:55 -05:00
Stephanos Ioannidis
8c94410022 samples: cpp: Relocate samples/subsys/cpp to samples/cpp
This commit moves the C++ samples under `samples/subsys/cpp` to
`samples/cpp` because the C++ language and standard library support is
not a "subsystem" (aka. API) in conventional sense and the samples
demonstrating them should belong directly under the top samples
directory as does POSIX support.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-01-13 17:42:55 -05:00
Kristoffer Rist Skøien
f0c12dbb82 boards: Added nRF5340 Audio DK (PCA10121)
Copied from nRF Connect SDK and edited
Co-authored-by: Grzegorz Ferenc

Signed-off-by: Kristoffer Rist Skøien <kristoffer.skoien@nordicsemi.no>
2023-01-13 16:14:35 +01:00
Henrik Brix Andersen
c0fb33ab8d samples: modules: canopennode: convert to sysbuild
Convert the CANopenNode sample to use sysbuild for generating MCUboot +
CANopenNode sample binaries instead of using manual instructions.

Rework the twister sample filtering to just list the known good boards.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-13 14:05:40 +01:00
Pascal Brogle
b6bc324a1d net: lwm2m: rename path size define
Rename max path constant to prevent string length vs data size confusion

Signed-off-by: Pascal Brogle <pascal.brogle@husqvarnagroup.com>
2023-01-13 12:02:07 +00:00
YuLong Yao
6a8a27ee78 samples: adc: add support for gd32a503v_eval board.
add support for gd32a503v_eval board.

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
YuLong Yao
0f28a8d120 samples: jesd216: add support for gd32a503v_eval board
add support for gd32a503v_eval board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
YuLong Yao
272aa129fa samples: spi_flash: add support for gd32a503v_eval board
add support for gd32a503v_eval board

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
YuLong Yao
ba1af141c1 samples: drivers: dac: add support for gd32a50x
add support for gd32a50x

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
Gerson Fernando Budke
eb39f1f12e mgmt: updatehub: Clean-up mcuboot & system dependencies
Currently MCUboot and system reset are invoked directly in the sample
applicatiion. This introduce 2 new methods to isolate system from
application.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2023-01-12 12:11:31 +01:00
Siddharth Chandrasekaran
73809472f8 mgmt/osdp: Add support for event delivery and notifications
The CP app sends PD a "command" and the PD responds to it. Some times,
the PD has something that it wants to tell the PD which it does so in
response to POLL command. Both CP and PD apps need a way to exchange
these info over the OSDP bus. To archive this we will introduce what are
called "events" that allow the PD app to enqueue and CP app to get
notified.

This is analogous to the incumbent "commands" abstraction where, the CP
app enqueues a command and the PD app gets notified of it.

Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
2023-01-12 12:04:11 +01:00
Sam Hurst
6984162e92 samples: subsys: usb_c: sink: Add USBC_CSM_SINK_ONLY Config to prj.conf
Add CONFIG_USBC_CSM_SINK_ONLY=y to Sink's sample prj.conf.
This selects the Sink only Connection state machine
for the Sink sample and it explicitly show the user
of the Sink sample how the connection state machines are
selected.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2023-01-11 18:32:43 +01:00
TOKITA Hiroshi
fed4e1857f boards: gd32f450i_eval: Enable DMA transfer for nor-flash
Enable DMA transfer via SPI bus for nor-flash.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-01-11 08:50:56 -08:00
Christopher Friedt
85b44f0ed7 samples: posix: gettimeofday: include time.h
Due to some previous time-related header issues, we included
`<sys/time.h>` without including `<time.h>`. The latter is
necessary for `time()` (specified by both ISO C and POSIX).

Fixes #53673

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-01-11 09:41:29 +01:00
Tom Burdick
36d8c1b7f7 samples: Remove platform filters for external_lib
Instead prefer to add the tag to ignored tags in the board yaml
where its clearer for both cavs25 and other cavs/ace boards what
to ignore even if duplicated.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-10 18:29:35 -05:00
Tom Burdick
c0435dbbb4 samples: Replace dmic tag with lower case
Replaces the capitalized DMIC tag with dmic as tags in Zephyr are by
convention lower case.

Was unexpectedly building this sample for intel boards while ignoring
dmic (lower case tag).

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-10 18:29:35 -05:00
Tom Burdick
6fed49b765 samples: Replace i2s tag with lower case
Replaces the capitalized I2S tag with i2s as tags in Zephyr are
by convention lower case.

Unexpectedly built the i2s echo sample when given the lower case tag in the
ignore.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-10 18:29:35 -05:00
Tom Burdick
89695ddaa3 samples: tag chre sample
Tags the chre sample so it may be ignored for platforms that don't want
to build or run this sample.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-01-10 18:29:35 -05:00
Alp Sayin
345b3bca02 samples: subsys: zbus: benchmark: remove all platform exclusions
The sample is now able to run on all previously excluded platforms.

Signed-off-by: Alp Sayin <alp.sayin@amd.com>
2023-01-10 14:42:40 +01:00
Alp Sayin
f5c39f998c samples: subsys: zbus: benchmark: use native posix host rtc for ARCH_POSIX
Because posix emulated execution is significantly faster than posix
emulated timer and benchmark finishes before even the first tick occurs.

Signed-off-by: Alp Sayin <alp.sayin@amd.com>
2023-01-10 14:42:40 +01:00
Alp Sayin
560c727127 samples: subsys: zbus: benchmark: use sys_clock_cycle instead of k_uptime
Needed because benchmark finishes faster than a tick, especially on
emulated platforms where tick rate is 100Hz. Output units are also updated
to print numbers with less digits.

Signed-off-by: Alp Sayin <alp.sayin@amd.com>
2023-01-10 14:42:40 +01:00
Alp Sayin
ec9c3df239 samples: subsys: zbus: benchmark: increase thread stack sizes
Stack sizes need to be dependent on something arch specific such as
idle stack size because they're smashing their stacks.

Signed-off-by: Alp Sayin <alp.sayin@amd.com>
2023-01-10 14:42:40 +01:00
Jamie McCrae
fc9442c033 samples: mgmt: mcumgr: Fix fs overlay
Fixes the filesystem overlay by enabling flash map, which is
needed for lfs.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-10 13:49:32 +01:00
Jamie McCrae
11c7371f99 samples: Explicitly disable boot USB device support init at boot
Disables having USB enabled for boards that configure USB CDC for
console, shell or logging at bootup in applications that enable USB
to prevent a conflict arising whereby USB is registered from
multiple points and later calls fail.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-10 12:21:10 +01:00
Johann Fischer
f09111a2a9 samples: cdc_acm: do not block for one second after DTR set
There is no need to block the thread for a second.
Let it sleep for 100 milliseconds, which should be enough
to set the host baud rate.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-01-10 10:30:46 +01:00
Pirun Lee
7015578ff4 sample: bluetooth: OTS sample add checksum
central_otc: read checksum after object data read.
peripheral_ots: add checksum calculate cb.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2023-01-10 09:59:36 +01:00
Gerson Fernando Budke
204758b5d9 samples: fs: littlefs: Add stm32l562_dk and b_u585i_iot02a
Add configs and overlays to run boards stm32l562_dk and b_u585i_iot02a.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2023-01-10 09:23:59 +01:00
Michal morsisko
c3619edf42 samples: bluetooth: Add sample demonstrating accept fliter list
Add new sample that shows how to use BLE filter accept list
during advertising.

Signed-off-by: Michal morsisko <morsisko@gmail.com>
2023-01-09 12:41:18 +01:00
Henrik Brix Andersen
11aa8454f0 Revert "random: Change testing random generator"
This reverts commit d6881de3b3.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-09 19:29:50 +09:00
Declan Snyder
d6881de3b3 random: Change testing random generator
The old random timer test was not random-looking
enough on some platforms.

Replace with new test which is psuedo-xoshiro.

The generator is still deterministic
and does not depend on entropy at all,
but should look more random for testing.

Change name of generator tree-wide also.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-01-09 10:16:55 +01:00
Jakub Zimnol
e065050f1b boards: xtensa: m5stickc_plus: initial support
adds initial support for M5StickC-Plus board

Signed-off-by: Jakub Zimnol <j.zimnol@avsystem.com>
2023-01-09 10:16:27 +01:00
Daniel DeGrasse
64ff9aa4d2 samples: drivers: adc: add support for RT595
Add support for RT595 evk to adc driver sample. RT595 uses external
reference voltage, which is set to 1.8V on this board.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-01-08 19:48:54 +01:00
Emil Gydesen
57218eee31 Bluetooth: Host: Add BT_CONN_INTERVAL_TO_US
The macro BT_CONN_INTERVAL_TO_MS was used a fair amount
of places, but it often was used with integers. This meant
that sometimes the resulting (integer) value would be
incorrect, as something like 7.5ms interval would not
be properly stored as a integer in millisecond units.

Adding BT_CONN_INTERVAL_TO_US allows users to still use
integers to store the result, but in a more accurate unit.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-08 19:47:03 +01:00
Emil Gydesen
8d86fa0125 Bluetooth: Audio: Add support for encrypted broadcast
Add support for adding a broadcast code to the broadcast
source.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-06 10:35:25 +00:00
Sam Hurst
3e98f20d66 samples: subsys: usb_c: sink: Add missing policy notifications
Add missing policy notifications to case statement

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2023-01-05 10:34:06 +01:00
Mahesh Mahadevan
1a27e2bd8e samples: mimxrt595: Add Deep power down sample
Add a sample to put the part into Deep power down mode by
setting the state to PM_STATE_SOFT_OFF.
Wakup the part using an RTC alarm.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2023-01-04 11:03:42 -06:00
Fabio Baltieri
792469aae9 yamllint: indentation: fix files in samples/
Fix the YAML files indentation for files in samples/.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 14:23:53 +01:00
Daniel DeGrasse
0eb0e2b025 samples: drivers: memc: add sample to test memory controllers
Add sample to test memory controllers that map external RAM into
SOC address space. This sample uses the "sram-ext" alias
node to determine the base address and size of the external RAM
device.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-01-04 10:35:25 +01:00
Fabio Baltieri
620bd5d817 samples, tests: fix key-duplicates in sample.yaml files
Fix few duplicate keys warnings in sample.yaml and testcase.yaml files,
this is going to enable some tests that were otherwise being
unintentionally ignored.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 10:34:18 +01:00
Andrei Emeltchenko
3f62b3803f samples: canopennode: Fix typo
Fixes typo in a canopennode sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-01-04 10:34:06 +01:00
Fabio Baltieri
7db1d17ee3 yamllint: fix all yamllint line-length errors
Fix all line-length errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(line-length)'

Using a limit is set to 100 columns, not touching the commandlines in
GitHub workflows (at least for now).

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Fabio Baltieri
7dd902d035 yamllint: fix all yamllint comments-indentation errors
Fix all comments-indentation errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(comments-indentation)'

This checks that the comment is aligned with the content.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Fabio Baltieri
a2e5bd1928 yamllint: fix all yamllint comments errors
Fix all hyphens errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(comments)'

Default config would be to require two spaces after the start of the
comment, proposing to keep it on 1, inline with the Linux binding
config, that is:

```
-  comments:
-    min-spaces-from-content: 1
```

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Fabio Baltieri
e0cc2b8dd0 yamllint: fix all yamllint hyphens errors
Fix all hyphens errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(hyphens)'

Default config is only one space after the hyphen.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Fabio Baltieri
bd4cdde4b0 yamllint: fix all yamllint colons, commas and empty-lines errors
Fix all colons and commas errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(brackets)'

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(commas)'

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(empty-lines)'

Default config is no space before, one space after, max 2 empty lines.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Fabio Baltieri
f39f04f232 yamllint: fix all yamllint brackets errors
Fix all brackets errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(brackets)'

Default config is to have no spaces inside brackets, changed few
documentation strings as well that refered to lists even though the
linter does not care about those.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Fabio Baltieri
5c32300861 yamllint: fix all yamllint truthy errors
Fix all thruthy errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(truthy)'

This only accepts true/false for boolean properties. Seems like python
takes all sort of formats:

https://github.com/yaml/pyyaml/blob/master/lib/yaml/constructor.py#L224-L235

But the current specs only mention "true" or "false"

https://yaml.org/spec/1.2.2/#10212-boolean

Which is the standard yamllint config.

Excluding codeconv and workflow files, as some are using yes/no instead
in the respective documentation.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Jamie McCrae
445117bb72 samples: mgmt: mcumgr: smp_svr: Removed un-needed UDP file
UDP configuration has now moved to the transport, thus this file is
no longer needed or used.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-03 10:19:57 +00:00
Krishna T
59842531d1 net: zperf: Make shell dependency optional
Now that we a proper API, shell is just optional, so, make the
dependency optional by refactoring the code.

Also, add a build test combination in twister.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2023-01-03 11:02:01 +01:00
Oliver Barta
c17b102c65 samples: basic: fade_led: add support for rpi_pico board
PWM device needs to be enabled and configured on rpi_pico board.

Signed-off-by: Oliver Barta <o.barta89@gmail.com>
2023-01-02 13:03:46 +01:00
Oliver Barta
5ad6a7989f boards: rpi_pico: avoid conflicting use of LED
led0 and pwm_led0 are both referring to the same LED. The usage is
mutualy exclusive, as only one pin muxing can be applied.

Disabling child nodes is currently neither supported by gpio-leds device
nor by pwm-leds device. We need to disable either of the devices
completely for correct operation.

Please note that even if disabling of child nodes would be supported, the
devices would be empty anyway, as both have only one singe LED defined at
the moment. Therefore we can completely disable one of the devices in any
case.

Fixes: b876ad9d6f ("boards: arm: rpi_pico: add pwm bindings to
  devictree")
Signed-off-by: Oliver Barta <o.barta89@gmail.com>
2023-01-02 13:03:46 +01:00
Oliver Barta
e24bfc53a6 samples: drivers: led_pwm: fix divider setting for rpi_pico
The fractional part of the divider value is a 4 bit value.

Fixes: 91f659d70a ("samples: led_pwm: add overlay for rpi_pico board")
Signed-off-by: Oliver Barta <o.barta89@gmail.com>
2023-01-02 13:03:46 +01:00
Oliver Barta
681d44b773 samples: drivers: led_pwm: enable immediate logging mode
The default deferred logging mode is not appropriate here. The LOG_INF
messages "Turned on", "Turned off", ... indicate the current state and
should be printed immediately to keep log output in sync with actual
LED state.

Signed-off-by: Oliver Barta <o.barta89@gmail.com>
2023-01-02 13:03:46 +01:00
Oliver Barta
c1852bebeb samples: basic: blinky_pwm: fix divider setting for rpi_pico
The fractional part of the divider value is a 4 bit value. Setting it to
255 leads to an overflow in pwm_rpi_get_clkdiv(). This has resulted in a
slight deviation from the reported timing, which is btw. printed in nsec.

Fixes: c5cb0d1a3b ("samples: blinky_pwm: Fix sample for rpi_pico")
Signed-off-by: Oliver Barta <o.barta89@gmail.com>
2023-01-02 13:03:46 +01:00
Trent Piepho
8c8d41c32f samples: drivers: uart: Detect missing FIFO mode in echo_bot
Print an error message if the UART doesn't support FIFO mode or FIFO
mode is not enabled.

Previously the sample would run with no errors, but wouldn't receive or
echo any data.

Signed-off-by: Trent Piepho <tpiepho@gmail.com>
2022-12-31 18:24:32 +01:00
Piotr Jasiński
48df1a2f2e samples: add debug monitor sample
Implemented a sample that shows configuration and basic usage of monitor
mode debugging feature.

Signed-off-by: Piotr Jasiński <piotr.jasinski@nordicsemi.no>
2022-12-28 12:00:46 +01:00
Jay Vasanth
4dc2d766c7 samples: mec15xxevb: pm: update test clk out config
CONFIG_SOC_MEC1501_TEST_CLK_OUT is removed from mec15xx SOC,
hence remove this configuration in mec15xxevb power management
sample and add board overlay with right configurations.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-12-28 10:43:03 +01:00
Jay Vasanth
0727421862 samples: drivers: clock_xec: Add MEC172x and MEC152x clock driver sample
MEC172x and MEC152x sample demonstrating clock control driver.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-12-28 10:43:03 +01:00
Bartosz Bilas
62eecf9142 samples: basic: button: use gpio_is_ready_dt
Switch to using the dedicated `gpio_is_ready_dt`
function instead of the raw `device_is_ready`.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2022-12-28 10:38:01 +01:00
Bartosz Bilas
135817c44d samples: basic: blinky: use gpio_is_ready_dt
Switch to using the dedicated `gpio_is_ready_dt`
function instead of the raw `device_is_ready`.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2022-12-28 10:38:01 +01:00
HaiLong Yang
d850bec2c8 samples: drivers: adc: add gd32l233r_eval board
adc sample support gd32l233r_eval board.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-12-28 10:37:52 +01:00
Francois Ramu
d75292feea samples: sensor: vbat of the stm32u5x channel 14 on ADC4
Enable the channel14 of the ADC4 of the stm32U5x
to measure the vbat voltage with internal on channel 14
of the ADC4 on the nucleo board or disco kit.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-12-27 15:33:06 +01:00
Gerard Marull-Paretas
9c27fabba3 samples: shields: npm6001_ek: remove dead assignment
The voltage gets assigned by regulator_get_voltage, code was likely a
copy&paste from set voltage command.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-12-27 13:12:55 +01:00
Gerard Marull-Paretas
ffdf85ed30 samples: shields: npm6001_ek: add support to query mode
Add a new command to query the regulator operating mode.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-12-27 13:12:55 +01:00
Marek Matej
4a64919c36 samples: driver: adc: Add ESP32 boards support files
Add example code to cover single-shot ADC for ESP32, S2, C3 chips.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2022-12-23 23:45:05 +00:00
Marek Matej
937ea00e7a drivers: adc: esp32: Add support for single-shot conversion
Allow single-shot adc conversion on all supported targets.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2022-12-23 23:45:05 +00:00
Dominik Ermel
db34adf9c3 mgmt/mcumgr: Standardise MCUmgr Kconfig names
Standardise Kconfig options for MCUmgr.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-22 12:36:34 +01:00
Hubert Miś
55fdd76a1e samples: ipc: icmsg_me: use nocopy functions
Update one of the threads in the icmsg_me sample to use ipc_service
nocopy functions in both host and remote applications.

Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
2022-12-22 11:07:44 +01:00
Kamil Gawor
d0e21fe6a6 ipc: Enable ICMSG multiendpoint role by default
This commit enables the initiator or the follower
role for the ICMSG multi-endpoint backend
depending on dts by default.
It is needed when BT_RPMSG transport for HCI is used.

Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
2022-12-22 11:07:44 +01:00
Daniel DeGrasse
71e95ae29d samples: drivers: adc: fixup ADC sample support for LPADC
Fixup ADC sample support for boards with LPADC present. This ADC only
supports an external reference voltage, which is a board-specific value.
Add reference voltage values for all supported boards.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-12-22 11:04:42 +01:00
Jamie McCrae
17e7ca70a9 samples: boards: nrf: mesh: onoff: Remove MCUmgr files
This application does not actually seem to use MCUmgr
functionality, therefore remove it.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-12-22 11:03:04 +01:00
Jamie McCrae
b4b6346cdc mgmt: mcumgr: Make Bluetooth and UDP transport init automatic
This moves the UDP and Bluetooth initialisation for MCUmgr to be
performed automatically with the new hander registration feature.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-12-22 11:03:04 +01:00
Jamie McCrae
d7557102c0 mgmt: mcumgr: Add iterable section to register MCUmgr handlers
This replaces the requirement for applications to manually
register MCUmgr handlers by having an iterable section which
then automatically registers the handlers at boot time.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-12-22 11:03:04 +01:00
Emil Gydesen
4e3205d238 Bluetooth: Audio: Add packing to unicast group create
Add the ISO packing field when creating a unicast group.

This refactors the structure of the unicast group create,
as it now takes both the packing as a group parameter, as well
as an array of stream-specific parameters.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-12-22 10:59:16 +01:00
Erwan Gouriou
66d4c64966 all: Fix "#if IS_ENABLED(CONFIG_FOO)" occurrences
Clean up occurrences of "#if IS_ENABLED(CONFIG_FOO)" an replace
with classical "#if defined(CONFIG_FOO)".

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-12-21 10:09:23 +01:00
Mateusz Sierszulski
85a90d7448 samples: drivers: counter: support alarm sample in counter_gecko_stimer
This commit adds sample support for the counter_gecko_stimer
driver.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2022-12-20 22:50:19 +01:00
Grixa Yrev
2a992c65c0 net: websocket: new receiving algorithm
websocket_recv_msg() is reworked with using fsm. Now the function
return 0 when payload is empty, -ENOTCONN if socket close. Receiving
empty ping and sending empty pong were added in tests.
Fixes #52327

Signed-off-by: Grixa Yrev <grixayrev@yandex.ru>
2022-12-20 17:05:12 +00:00
Lars Knudsen
081b83531b Bluetooth: has: Make HAS registration dynamic
This changes HAS registration to be dynamic and let's the
application set Hearing Aid Type and binaural features.

Often, devices are flashed with generic firmware with some
features stored post factory production, requiring
the settings to be moved from compile time to run-time.

This change will increase the RAM usage as the GATT
service is moved from ROM to RAM.

Signed-off-by: Lars Knudsen <larsgk@gmail.com>
Co-author: Soren Engquist <soren@engquist.dk>
2022-12-20 17:04:45 +00:00
Andriy Gelman
1bd34d89f9 samples: drivers: adc: Add xmc45_relax_kit overlay
Adds xmc45_relax_kit overlay to run the sample.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-12-20 14:17:23 +01:00
Steffen Jahnke
a4d67d3c85 sensor: amg88xx: fix sensor sample
Since logging with printk() was updated in commit  c5a40e3,
the amg88xx sample dropped around 60 of the messages after
sampling. Increasing log buffer size will fix this issue.

Signed-off-by: Steffen Jahnke <steffen.jahnke@eu.panasonic.com>
2022-12-19 18:18:48 +01:00
Johann Fischer
eb6207707a samples: usb: shell: extend new USB support sample by host support
Extend new USB support sample to include experimental host support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-12-16 13:21:12 +01:00
Emil Gydesen
f4ff8f2230 samples: Bluetooth: ISO broadcast receiver pa_interval check move
Move the check for the pa_interval to before we start
parsing the data for the name, as that is more optimized.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-12-16 11:05:24 +00:00
Gerard Marull-Paretas
460f2d04fa samples: shields: npm6001_ek: add utility to test regulators
Add a utility sub-shell to test all regulators embedded in the nPM6001
PMIC.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-12-16 11:26:47 +01:00
Armin Brauns
c1cc2c4a26 modules: lvgl: change mentions of "LittleVGL" to "LVGL"
The project was renamed to LVGL with release 7.0.0, from 2020-05-18.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2022-12-16 09:31:41 +01:00
Marek Matej
ac0cbe3c4e samples: esp32: temp: CPU die temperature sample
Add die temperature measure sample for ESP32 targets
esp32s2_saola, esp32c3_devkitm.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2022-12-15 18:21:39 +01:00
Reto Schneider
c646a5576a net: zperf: Fix SO_RCVTIMEO dependency
Since 6c30c9ac47 (samples: net: zperf:
Rewrite upload part to use sockets), zperf uses SO_RCVTIMEO in UDP mode,
hence must depend on/enable support for it.

Without SO_RCVTIMEO support, zperf fails like this:
> nb_packets=47   delay=188964    adjust=-13
> setsockopt error (109)
> setsockopt error (109)
> -
> Upload completed!
> LAST PACKET NOT RECEIVED!!!
> Statistics:             server  (client)
> Duration:               0 us    (10.19 s)
> Num packets:            0       (50)
> Num packets out order:  0
> Num packets lost:       0
> Jitter:                 0 us
> Rate:                   0 Kbps  (9 Kbps)

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-12-15 17:14:26 +01:00
Robert Lubos
f33072a725 samples: net: sockets: net_mgmt: Update flash requirement for twister
The net_mgmt sample enables a lot of features, resulting in pretty large
image sizes for various platforms (~200k). At the same time, the
sample.yaml for the sample did not specify minimum flash requirement for
the sample, causing flash overflows during build in certain cases.
This commit fixes this by setting a reasonable flash requirement for the
sample.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-12-15 14:32:30 +00:00
Tomasz Moń
21975231e2 usb: device: cdc_acm: Prevent recursive logging loop
Allow enabling CDC ACM logging only if CDC ACM is not used as logging
backend. This prevents endless recursive logging loop, especially
visible when minimal footprint logging is enabled.

Fixes: #52981

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-12-15 14:54:24 +01:00
Dinesh Kumar K
4eb1a34cac samples: sensor: Added sample for grow_r502a fingerprint sensor
Added sample application for grow_r502a fingerprint sensor

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2022-12-14 18:44:29 +01:00
Emil Gydesen
5102950adc sample: Bluetooth: Add PA interval check in iso broadcast benchmark
Verify that the peridic advertising interval is non-0 to
ensure that the remote device is actually advertising
with peridic advertising enabled.

This fixes an issue where per_interval_ms would be set to 0,
causing bt_le_per_adv_sync_create to fail to invalid values.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-12-14 15:00:13 +01:00
Marcin Niestroj
2d3365200c settings: file: drop CONFIG_SETTINGS_FILE_DIR
There is already CONFIG_SETTINGS_FILE_PATH, which is set to full file path,
while CONFIG_SETTINGS_FILE_DIR is required to be set to its parent
directory. This is redundant, as parent directory path can be easily found
out either during runtime or optionally during buildtime by CMake.

CONFIG_SETTINGS_FILE_DIR was actually introduced recently after Zephyr 3.2
release as a replacement of deprecated CONFIG_SETTINGS_FS_DIR. This means,
that there is no need to deprecate it for 3.3 release and dropping it
should be fine. Adjust 3.3 release notes accordingly, so that
CONFIG_SETTINGS_FILE_PATH will be used directly.

This patch stops using deprecated CONFIG_SETTINGS_FS_DIR. There is actually
no value in respecting it, as setting anything other than parent directory
of CONFIG_SETTINGS_FS_FILE makes no sense.

There is actually one use of CONFIG_SETTINGS_FILE_DIR in file backend
tests, to derive directory for files containing tested settings.
CONFIG_SETTINGS_FILE_PATH is not used there, so it makes little sense to
derive directory name from it. Instead, just use hardcoded "/settings"
subdirectory, as this was the default value of CONFIG_SETTINGS_FILE_DIR.

Deriving parent directory can be done either in runtime or in
buildtime (e.g. using some helper CMake function). Doing it in runtime
however allows to create directory recursively (which this patch actually
implements), e.g. for some more nested FS tree structure. Additionally it
will simplify migration of settings configuration from Kconfig to
device-tree (yet to be developed feature).

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-12-14 14:11:03 +01:00
Marek Matej
85b879594d samples: board: esp32: DAC sample code
Sample code demonstrate the DAC on ESP32 and ESP32-S2

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2022-12-13 16:29:38 +00:00
Erwan Gouriou
13acbf1b68 samples: blinky_pwm: Add nucleo_l476rg support
Enable use of nucleo_l476rg on this sample using a dedicated overlay.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-12-13 10:01:11 +00:00
Francois Ramu
444ddfe268 samples: Use immediate logging mode in nvs sample
Applying same fix as for watchdog relmated samples
in https://github.com/zephyrproject-rtos/zephyr/pull/52949/
Switching to the immediate logging mode, not by just disabling the
LOG_PRINTK option.Do not direct printk to logging subsystem in the sample.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-12-13 17:20:38 +09:00
Johann Fischer
a01fbd0731 sample: usb: shell: add keybord harness string
Add keybord harness string to sample.yaml file.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-12-12 15:00:20 +01:00
TOKITA Hiroshi
e965db984d samples: counter: alarm: add support for GD32 boards
Add support for boards that implements the GD32 SoCs.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-12-12 10:08:12 +01:00
Andrzej Głąbek
7d5c9fa7a9 samples: Use immediate logging mode in watchdog related samples
Starting with commit b9b43a0eb772a464bba13833d11e3a31fbf4e09e, printk()
messages are handled by the logging subsystem. This can cause trouble
in watchdog related samples if the deferred logging mode is used (and
currently it is by default), because those samples are ended by a reset
and some messages may not get a chance to be outputted.
Since the same problem concerns also the ordinary logging messages that
may be produced during execution of the samples, this commit fixes it
by switching to the immediate logging mode, not by just disabling the
LOG_PRINTK option.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-12-10 09:45:02 +01:00
Daniel DeGrasse
1ff8fb927f samples: ipc: openamp: Enable openamp sample for iMX.RT1160 EVK
Enable the openamp sample for RT1160EVK. CM4 core has a custom DTS
overlay to use LPUART2 for console information, and use a secondary GPT
timer for the system tick.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-12-05 19:54:37 +01:00
Daniel DeGrasse
10714466c3 samples: ipc: openamp: Enable openamp sample for iMX.RT1170 EVK
Enable the openamp sample for RT1170EVK. CM4 core has a custom DTS
overlay to use LPUART2 for console information, and use a secondary GPT
timer for the system tick.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-12-05 19:54:37 +01:00
Xinyang Tan
535f5a6c04 shell: support setting help string for each entry in a dictionary command
Add support for setting the help description for each entry in a dictionary
command. Currently the syntax string alone may not provide sufficient
description of its entry. This commit also helps keep the help messages
consistent with existing style.

Signed-off-by: Xinyang Tan <xinyang.tan@delve.com>
2022-12-05 18:40:46 +01:00
Gerard Marull-Paretas
e7c659fb29 samples: shields: npm6001_ek: fix build
Commit ff3aaa6ef3 moved some getopt
declarations to unistd.h. Update sample to include the header, so that
we can access optarg.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-12-05 18:21:31 +01:00
Franciszek Zdobylak
9b4aa2d553 samples: fs: Add sample using fs_mkfs function
Provide a demo which uses newly added fs_mkfs function.

Signed-off-by: Franciszek Zdobylak <fzdobylak@internships.antmicro.com>
2022-12-05 15:36:00 +01:00
Glauber Maroto Ferreira
2ad13a50a7 soc: esp32: add light sleep sample code
Add light sleep sample code.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-12-05 15:09:53 +01:00
Glauber Maroto Ferreira
f6705220ff esp32: samples: power management: add deep sleep sample
Add deep sleep sample code with support for the
following wake-up sources:

- Timer
- EXT0/EXT1: IO under RTC domain
- GPIO (ESP32-C3 only)

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-12-05 15:09:53 +01:00
Anas Nashif
37c4110104 samples: jesd216: fix integration platforms
Fix integration platforms to match what is allowed (platform_allow).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-12-05 14:55:00 +01:00
Andrzej Puzdrowski
0e8005e860 sample/drivers/jesd216: spi-nor config for nrf52840dk
Added configuration which allows to test the sample using SPI_NOR
driver instead of NRF_QSPI driver.
SPI_NOR driver is generic, so nice to add possibility to check
how it is working.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-12-05 12:11:29 +01:00
Chris Friedt
ff3aaa6ef3 posix: getopt: move declarations to unistd.h
Declarations for `getopt()` should be in `<unistd.h>`
according to the spec. The extended versions `getopt_long()`
and `getopt_long_only()` are declared in `<getopt.h>`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-12-04 14:51:52 +01:00
Madhurima Paruchuri
fa738b0f74 usb-c: Generate USB-C connector VIF policies XML file
Generates XML file containing VIF policies by reading the device tree
using EDT.pickle generated during build
This script writes a subset of general and sink-pdo VIF policies in
output file
This script gets invoked during build if enabled through kconfig
The generated XML containing USB-C VIF policies could be used by
USB PD/Type-C analysers/testers to understand USB-C properties and
perform tests accordingly

Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
2022-12-02 08:46:04 -06:00
Johann Fischer
dc26a617d7 samples: usb: console: enable optional new USB device support
Add code and configuration to enable new USB device support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-12-02 12:55:18 +01:00
Johann Fischer
13766dd417 samples: cdc_acm: enable optional new USB device support
Add code and configuration to enable new USB device support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-12-02 12:55:18 +01:00
Johann Fischer
f5ef4c4288 samples: usb: add shell sample for new USB support
The sample enables new experimental USB device support
and the shell function.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-12-02 12:55:18 +01:00
Jay Vasanth
06fde72092 samples: drivers: led: Add sample for Microchip XEC LED driver
Add a sample program demonstrating the LED driver for Microchip's
XEC microcontrollers. The sample can be built for MEC152x and
MEC172x.

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-12-02 11:31:50 +01:00
Chris Friedt
4d906d944b Revert "posix: getopt: move declarations to unistd.h"
This seems to have caused build failures in spite of CI being
green in PR 52653.

This reverts commit fc92eb1b37.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-12-02 14:09:37 +09:00
Chris Friedt
fc92eb1b37 posix: getopt: move declarations to unistd.h
Declarations for `getopt()` should be in `<unistd.h>`
according to the spec. The extended versions `getopt_long()`
and `getopt_long_only()` are declared in `<getopt.h>`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-12-01 15:52:47 -05:00
Armin Brauns
52dfd528b8 samples: syslog_net: use utility function for backend init
log_backend_init() does the exact same thing, but shorter.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2022-12-01 09:48:42 +01:00
Armin Brauns
b923f962aa samples: syslog_net: correctly late-initialize log backend
log_backend_activate() does not assign the backend id (backend->ctx->id),
which is required for runtime filtering.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2022-12-01 09:48:42 +01:00
Jamie McCrae
cb50f2fb16 samples: external_lib: Add building on windows support
Adds support for building the external_lib sample application on a
windows host operating system.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-30 16:35:40 +01:00
Gerard Marull-Paretas
e0c8de1e39 drivers: regulator: fixed: simplify implementation
Remove regulator-fixed-sync specialization, create a single driver that
is always synchronous. The asynchronous part is rarely/never used, so
let's keep things simple for now.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-30 15:49:30 +01:00
Manuel Arguelles
cc70daacdf samples: counter: support System Timer on s32z270dc2_r52
Enable counter alarm sample on s32z270dc2_r52 boards, using the first
System Timer Module instance.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-11-30 11:29:39 +01:00
Anas Nashif
ba7d730e9b tests/samples: use integration_plaforms in more tests/samples
integration_platforms help us control what get built/executed in CI and
for each PR submitted. They do not filter out platforms, instead they
just minimize the amount of builds/testing for a particular
tests/sample.
Tests still run on all supported platforms when not in integration mode.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-29 16:03:23 +01:00
Gerson Fernando Budke
5c773ae45e samples: drivers: counter: alarm: Add support to TFM
Add cmake rules to allow build boards with TFM enabled.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-11-29 13:40:27 +00:00
Krzysztof Chruscinski
b53a8e5fea samples: tfm_integration: psa_firmware: Improve logging handling
Remove redundant initialization and add logs flushing before
the reboot.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-11-29 10:46:26 +01:00
Francois Ramu
b839a0f9db samples: drivers: jesd216 jedec ID and SFDP from octo-flash
This adds the support jedec configuration to run
the jedec  sample application. So target boards can display
the content of the octo-NOR flash
of the stm32u585 and stm32l562 or stm32h735 disco boards.
The sfdp-bfp table is provided as example (overlay file),
to run this sample on the stm32l562e_dk platform.
It has to be defined in the deviceTree "in cases were runtime
retrieval of SFDP data is not desired."

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-29 09:32:22 +00:00
Emil Gydesen
ae11b5879b Bluetooth: Audio: Remove bt_vcp from vol rend API
Remove the struct bt_vcp pointer from the volume
renderer API, as there is only ever a single
Volume Renderer instance on a device.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-28 17:43:40 +01:00
Emil Gydesen
c82af2885e Bluetooth: Audio: Split vol_ctlr and vol_rend callback structure
Split the `bt_vcp_cb` struct into separate structure for
the volume controller and the volume renderer.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-28 17:43:40 +01:00
Emil Gydesen
7f69b866f0 Bluetooth: Audio: Specify bt_vcp_vol_rend API
The VCP server, known as the volume renderer, has a
more explicity bt_vcp_vol_rend API naming scheme now.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-28 17:43:40 +01:00
Emil Gydesen
ce2b8f9fe1 Bluetooth: Audio: Rename VCS to VCP
Renames almost all occurences of VCS to VCP, as we want to
use the profile as the namespace for volume control.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-28 17:43:40 +01:00
Emil Gydesen
aaac86dada Bluetooth: Audio: Rename vcs.h to vcp.h as well as the Kconfig file
Rename vcs.h to vcp.h to better detail what the
file contains, as it is more than just VCS. This also
renames the Kconfig file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-28 17:43:40 +01:00
Emil Gydesen
d8e7a0db42 samples: Bluetooth: Increase subgroup count for broadcast audio sink
Imcrease the supported number of subgroups to 2 as well as the number of
streams to 2, so that it matches the default configuration of the
broadcast audio source sample.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-28 14:38:25 +01:00
Andrei Emeltchenko
55843e7d77 samples: net: Add qemu_x86_64 to platform_allow
Allow to build for qemu_x86_64 platform.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-11-28 13:19:51 +01:00
Théo Battrel
e458f5aae6 Bluetooth: Use Zephyr standard log system instead of bluetooth/common/log
The `bluetooth/common/log.h` and `bluetooth/common/log.c` files have been
removed. Files that were using them have been updated to use
`zephyr/logging/log.h` instead.

Those replacement have been done consequently:
- `/BT_DBG/LOG_DBG/`
- `/BT_ERR/LOG_ERR/`
- `/BT_WARN/LOG_WRN/`
- `/BT_INFO/LOG_INF/`
- `/BT_HEXDUMP_DBG/LOG_HEXDUMP_DBG/`
- `/BT_DBG_OBJ_ID/LOG_DBG_OBJ_ID/`

Also, some files were relying on the `common/log.h` include to include
`zephyr/bluetooth/hci.h`, in those cases the include of `hci.h` has
been added.

For files that were including `common/log.h` but not using any logs,
the include has been removed and not replaced.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2022-11-25 17:08:36 +01:00
Fabio Baltieri
2f2eba7517 samples: chre: exclude qemu_leon3
This test used to only run on native_posix due to the test filter until
e478a4e850 was merged. Now it's running on all platforms but it's failing
on qemu_leon3 for some address alignment issue.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-11-24 16:37:49 +01:00
Fabio Baltieri
80e3d68691 samples: chre: use CONFIG_LOG_MODE_MINIMAL
The sample depends on the log output to check for a successful run. This
means that with a small enough log buffer we could lose messages and
fail the run, as it's happening right now on qemu_cortex_m0.

Switching to CONFIG_LOG_MODE_MINIMAL to avoid the problem in the first
place.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-11-24 16:37:49 +01:00
Emil Gydesen
292db21a18 Bluetooth: Audio: Use svc_inst instead of bt_csip for set_member
Use the service instance struct instead of the more generic
`bt_csip` for the CSIP set member API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-24 15:23:48 +01:00
Emil Gydesen
87f86cebe2 Bluetooth: Audio: Rename bt_csip to bt_csip_set_member
Renamed remaining structs and functions that are not
for the set coordinator to use the set member CSIP
role name.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-24 15:23:48 +01:00
Emil Gydesen
93b3944a51 Bluetooth: Audio: Rename CSIS to CSIP
Renamed the coordinated set implementation to use the
profile (CSIP) name instead of the service (CSIS) name, as
the former is more general.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-24 15:23:48 +01:00
Emil Gydesen
22002b8717 samples: Bluetooth: Increase timeout for broadcast audio source
Increase the time between resets from 30s to 120s.
This make it easier to properly use, while still get
the chance to test the stop functionality.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-24 15:23:36 +01:00
Emil Gydesen
40e3930ebd Bluetooth: Audio: Broadcast source subgroup and BIS codec support
Updates the broadcast source API to create subgroups and
to set BIS specific codec configuration

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-11-24 10:21:36 +01:00
Francois Ramu
819cb95438 boards: arm: stm32l562e_dk includes the sdfp table for its octoflash
Moving the SDFP table property from the sample to the device tree
of the stm32l562e_dk disco kit.
The MX52lm51245 Nor octoflash mounted on this boarddoes not
provide its own internal SFDP parameters.
With this patch, the SFDP table is given by the board DTS.
So that the stm32 ospi driver can initialized the  NOR octoflash
correctly with the parameter from that property instead of
relying on the nor octoflash.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-24 09:37:07 +01:00
Marcin Niestroj
daee6cb4a9 settings: file: change FS (or file system) wording to File
Currently there is inconsistency in repository file names, APIs, Kconfig
options and documentation around file / file-system backend for settings
storage, as both "file" and "FS (file system)" are used. As an example,
there is `CONFIG_SETTINGS_FS` Kconfig option, but the file that implements
this settings backend is called `settings_file.c`. Another example are
names of static functions that implement settings storage API:
`settings_file_load()`, `settings_file_save()` and
`settings_fs_storage_get()`.

This backend is actually storing all settings in a single file, so it makes
sense to use "File" as the name of backend, instead of a more general
"FS" (which would make sense if several files would be used to store
settings).

Fix inconsistency in used wording in the tree and unify it to "settings
file backend". This naming is more precise to how the implementation looks.
It will also make it easier to grep through the codebase and analyze
existing code.

Deprecate settings_mount_fs_backend() function and all Kconfig options
starting with `CONFIG_SETTINGS_FS`.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-11-24 09:36:31 +01:00
Andrzej Głąbek
1ef35090d0 samples: modules: chre: Flush log messages after initialization
On targets where POST_KERNEL initialization routines, executed after
the logging thread has started, take significant amount of time,
log messages produced during CHRE initialization may collide with
printk messages output by the sample. Prevent this by flushing all
log messages right after the initialization is performed.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-11-23 17:22:16 +00:00
Anas Nashif
cffe98d9de crc: Make the build of crc function dependent on a Kconfig
Add CONFIG_CRC for building CRC related routines.
CRC routines are now being built for each application, whether used or
not and are add in the build system unconditionally.

Keep CONFIG_CRC enabled by default for now and until all users have
converted to use the new option.

Partial fix for #50654

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-23 13:30:00 +01:00
Francois Ramu
d24f3b9baa samples: drivers: jesd216 jedec ID and SFDP from octo-flash
This adds the support jedec configuration to run
the jedec  sample application. So target boards can display
the content of the octo-NOR flash
of the stm32u585 and stm32l562 or stm32h735 disco boards.
The sfdp-bfp table is provided as example (overlay file),
to run this sample on the stm32l562e_dk platform.
It has to be defined in the deviceTree "in cases were runtime
retrieval of SFDP data is not desired."

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-22 14:26:57 +00:00
Francois Ramu
055c1c637e samples: drivers: stm32u5x octospi enables DMA
Adds the dma transfer for the octoSPI on NOR octo Flash
of the b_u585i_iot02a disco kit.
The channel for the GPDMA is 0-15 (0-7 for DMA1, 8-15 for DMA2)
The channel 12 to 15 are used for GPDMA transfers
to/from external memories.
The request is 41 for the OCTOSPI2.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-22 12:00:00 +00:00
Johann Fischer
1c4011ff6e usb: remove usb_pid.Kconfig file
Remove Kconfig file samples/subsys/usb/usb_pid.Kconfig added in
the commit e5cbe6a9e7 ("usb: cdc: Add unique PIDs for each sample")
with the motivation to have a separate ID for each sample supposedly
to be recognizable by the host.

The new USB support does not use the options, VID/PID is set
directly in the application. As a note, it is not necessary to have
unique PID for each sample, especially for the well known USB classes.

Replace the individual Kconfig options in the documentation
by a table with the references to the samples and PIDs.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-11-22 11:09:21 +01:00
Gerard Marull-Paretas
767dd47f98 samples: shields: npm6001_ek: initial version
Add a sample that demonstrates usage of the nPM6001 PMIC (all of its
functionalities).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-22 11:05:19 +01:00
Jeppe Odgaard
7d27309816 samples: Basic system heap Demo
A demo to showcase some of the sys_heap functions

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2022-11-22 13:17:59 +09:00
Mirai Shinjo
d595148c98 samples: sensor: doc: fix a code block formatting issue
This commit fixes a code block formatting issue in the stm32_vbat_sensor
sample documentation.

Signed-off-by: Mirai Shinjo <miraishinjo@icloud.com>
2022-11-22 12:54:44 +09:00
Chris Friedt
7a0fd7ad14 samples: drivers: flash_shell: disambiguate flash shell app
Both `drivers/flash/flash_shell.c` and
`samples/drivers/flash_shell/src/main.c` provide a flash shell
utility called `flash`.

Rename the latter to disambiguate.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-19 14:24:38 -05:00
Anas Nashif
b512c8e4fa samples: fix duplicate identifier
Test identifier was duplicated.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-18 09:19:47 -05:00
Dominik Ermel
31d4a2e7bd samples/nrf/onoff_level_light: Convert to new MCUmgr header paths
Header paths changed.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-17 15:31:17 +01:00
Dominik Ermel
0556275faf samples/mcumgr/smp_svr: Apply rework in MCUMgr subsystem
Code changes required by rework in MCUMgr souce code structure.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-17 15:31:17 +01:00
Dominik Ermel
7c2924f4bc mgmt/mcumgr: Move transport headers to transport subdir
The MCUmgr transport headers have been moved to
zephyr/mgmt/mcumgr/transport/

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-17 15:31:17 +01:00
Benjamin Perseghetti
bc72ad318f boards: rddrone_fmuk66 fix pwm pinmux and servos
Fixes the channel 2 PWM pinmux adds servos and PWM LEDs.
Required to operate servo motors and status lighting.
Tested on RDDRONE board.

Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
Co-authored-by: Sumit Batra <sumit.batra@nxp.com>
Co-authored-by: Landon Haugh <landon.haugh1@gmail.com>
2022-11-16 10:18:46 -06:00
Henrik Brix Andersen
f0199dc3e7 samples: drivers: eeprom: remove EEPROM shell overlay
Remove the EEPROM shell overlay from the EEPROM driver sample as this was
only introduced as a build test for the EEPROM shell. This is now done in
tests/drivers/eeprom/shell.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-11-15 09:43:42 -06:00
Kristofer Jonsson
e35e981564 samples: Add a TFLU Ethos-U sample program
Add a sample program that demonstates how to run inferences on
Arm Ethos-U.

Signed-off-by: Kristofer Jonsson <kristofer.jonsson@arm.com>
Signed-off-by: Fredrik Knutsson <fredrik.knutsson@arm.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-15 14:47:43 +01:00
Daniel DeGrasse
1aa01c18bb samples: drivers: ipm: update to use sysbuild
Update ipm_mcux sample to use sysbuild for multicore images

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-15 14:46:02 +01:00
Daniel DeGrasse
e033677787 samples: openamp: update openamp sample to use sysbuild
Update IPC openamp sample to use sysbuild for multi core images.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-15 14:46:02 +01:00
Daniel DeGrasse
71d8b0ab68 samples: openamp: add separate overlay files for remote cores
with sysbuild, DTS overlays for boards cannot automatically be passed to
the remote core. This means DTS overlays must be present for remote cores
as well.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-15 14:46:02 +01:00
Daniel DeGrasse
407fe95af3 samples: openamp: add lpc54114 configuration settings
Add lpc54114 configuration settings to enable booting second core with
sysbuild, and LMA address adjustment

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-15 14:46:02 +01:00
Daniel DeGrasse
a969b93ec7 samples: openamp: add additional required KConfigs for LPC55s69
LPC55s69 requires the second core to output a hex build to ensure the
image is flashed to the correct location, and uses the
CONFIG_SECOND_CORE_MCUX symbol in each core's build to indicate the build
targets a dual core config

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-11-15 14:46:02 +01:00
Jędrzej Ciupis
741972cf56 samples: net: wpan(usb|serial): exclude thingy53_nrf5340_cpuapp_ns
This commit excludes thingy53_nrf5340_cpuapp_ns platform from building
wpanusb and wpan_serial samples. The platform doesn't support TF-M yet
and therefore the build is bound to fail.

Due to limitations of the filter functionality, a more generic approach
where _ns platforms without TF-M support would be excluded from the
build, for example:

filter: dt_chosen_enabled("zephyr,ieee802154") and
	CONFIG_NRF_SOC_SECURE_SUPPORTED

doesn't properly filter out the needed platforms. As a result,
platform_exclude syntax is used to specifically exclude the platform.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2022-11-15 12:13:46 +00:00
Chris Friedt
dae6d2f84b samples: drivers: fpga: fpga_controller: fix links in README.rst
Markdown links were incorrectly used in this ReST document.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-15 05:59:09 -05:00
Rodrigo Peixoto
27ec69eca1 samples: zbus: Add benchmark sample
The sample measures the time to transfer 256KB from the
producer to the consumers.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2022-11-14 17:25:29 -05:00
Rodrigo Peixoto
078d561bf6 samples: zbus: Add runtime observer registration sample
The sample illustrates a way of using the runtime observer registration
feature. With this sample the developer can understand how to use static
and runtime observer registration.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2022-11-14 17:25:29 -05:00
Rodrigo Peixoto
86513fb7af samples: zbus: Add the remote mock sample
The sample illustrates a way of exchange message with a host mock
running in a Python script. It can be used to improve the testability
and controllability of the tests.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2022-11-14 17:25:29 -05:00
Rodrigo Peixoto
0528a43345 samples: zbus: Add the UART bridge sample
The sample illustrates a way of send all the channel event to the host
by using the UART, a user_data portion, and the claim/finish APIs.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2022-11-14 17:25:29 -05:00
Rodrigo Peixoto
bc6963fd5b samples: zbus: Add dynamic channels sample
The sample illustrates a way of using dynamically allocated messages in
static channels.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2022-11-14 17:25:29 -05:00
Rodrigo Peixoto
5ed4781c54 samples: zbus: Add work queue sample
The work_queue sample illustrates three reaction styles available for
using zbus. The first is a listener that reacts by callback; use it should
for urgent reaction. The second is a listener that responds by callback;
instead of executing the code, it pushes a job to a work queue that will
be executed shortly but not immediately. The last one is the subscriber
that reacts using a queue; use it for an asynchronous reaction where the
developer would like to control the flow.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2022-11-14 17:25:29 -05:00
Rodrigo Peixoto
68b5b05165 samples: zbus: Add the hello world sample to zbus
The hello world sample illustrates a simple way of using zbus. There is
a listener and a subscriber interacting each other by using a read-only
and a regular channel. The APIs are called by using the function
and macro variation.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2022-11-14 17:25:29 -05:00
Anas Nashif
67e8d03280 tests/samples: fix some missing tags
Many driver samples or tests only had 'drivers' as the tag, without a
tag indicating what driver that is exactly, so add some missing tags.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-14 07:08:04 -05:00
Yonatan Schachter
b49b11555c samples: flash_shell: Fix flash range printing
When running a flash read command on the flash shell, the hexdump
prints came out incorrect. There was a space missing between the
ninth element and its preceding "|", and a redundant newline.
This commit fixes this issue.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-11-14 12:38:03 +01:00
Yonatan Schachter
c5cb0d1a3b samples: blinky_pwm: Fix sample for rpi_pico
The RP2040 needs a DTS overlay for the PWM to work with the
blinky_pwm examples. This commit adds the required overlay.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-11-14 12:37:47 +01:00
Benjamin Lindqvist
85c6de4335 lorawan: enable run-time config of region/freq
This commit adds support for compiling in support for several different
regions/frequencies and dynamically choosing which to use in run-time.
This commit introduces no API breakages - if a prj.conf contains only a
single region Kconfig, the new function lorawan_set_region() does not
need to be called.

Signed-off-by: Benjamin Lindqvist <benjamin@eub.se>
2022-11-14 11:16:16 +00:00
Francois Ramu
838cd28195 samples: drivers: watchdog stm32 wwdg decrease apb clock
The most of the wwdg peripherals requires a reduced apb clock
to pass the sample.drivers.watchdog.stm32_wwdg testcase.
This apb1 prescaler is added to the overlay file
for that particular clock.
Specific overlay for the stm32h7 family because of the APB1
bus clock named d2ppre1.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-11 08:40:23 +00:00
Gerson Fernando Budke
92ca06577f samples: usb: mass: Add support to TFM NS boards
This add TFM cmake definitions to build mass storage sample for non
secure firmware boards versions. The stm32l562e_dk_ns board was used
to demonstrate. It uses SDMMC/SD with TFM profile large. Tests were
conducted using a 2GB transflash card with FAT-32 partition.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-11-10 11:26:11 +00:00
Gerson Fernando Budke
151e145b44 boards: arm: stm32l562e_dk: Enable usb tags for tests
This enables usb and usb_device tag for tests. It explicitly disable
samples/subsys/usb/dfu for non-secure version of this board due to
building errors, which can be explored in future.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-11-10 11:26:11 +00:00
Gaël PORTAY
a8ae2217e2 samples: modbus: print returned error code
This prints the returned error code, just like the other calls do.

Signed-off-by: Gaël PORTAY <gael.portay@gmail.com>
2022-11-09 10:46:02 -06:00
René Beckmann
a507186d12 samples: net: mqtt-sn: Add MQTT-SN publisher sample
This sample demonstrates the usage of the MQTT-SN library over UDP.
It connects to a gateway, publishes to the topic "/uptime" and also
subscribes to "/number".

Signed-off-by: René Beckmann <rene.beckmann@grandcentrix.net>
2022-11-09 10:43:00 +01:00
Hubert Miś
b2c5d7cb60 sample: add icmsg multi endpoint sample
Add a sample presenting ipc_service working with icmsg multi endpoint
backend. The sample creates multiple instances of icmsg, one of them
consisting of two endpoints.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2022-11-09 10:41:43 +01:00
Seppo Takalo
83d79b5996 net: lwm2m: We should not use read callbacks to generate new data
When read callbacks are used, it bypasses LwM2M engine data
handling and therefore LwM2M observation cannot work properly.

Read callbacks should be used only on special cases.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2022-11-09 09:16:22 +00:00
Peeyush Kumar
38907d1c65 samples: boards: stm32: Rename README.md to README.rst
Updated the README file extension from .md to the expected extension .rst

Signed-off-by: Peeyush Kumar <peeyush.ei@gmail.com>
2022-11-08 13:47:09 -06:00
Kevin Townsend
1cb49a389b samples: ipc: rpmsg: Fix AN521 buffer location
Updates the location of the shared memory buffer to account for
memory map chains with `mps2_an521_remote`.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-11-08 10:57:35 -05:00
Kevin Townsend
e3b21b88b0 samples: ipc: openamp: Fix AN521 buffer location
Updates the location of the shared memory buffer to account for
memory map chains with `mps2_an521_remote`.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-11-08 10:57:35 -05:00
Pavel Vasilyev
8a77f6e79e samples: bluetooh: mesh_demo: Fix compilation for bbc_microbit
Reduce number of relay buffers to compile mesh_demo for bbc_microbit
platform.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-11-08 10:47:46 +01:00
Maciej Perkowski
15afd31862 tests: usb: Make tests for usb mass sample more robust
It was found that the existing regex check was not enough to validate
correctness of execution of mass samples. Tests would pass even when
a filesystem failed to be mounted. An additional line to check is added
to validate the setup of a filesystem.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2022-11-08 10:45:08 +01:00
Jose Alberto Meza
2a8f7188c6 samples: drivers: peci: Add mec172xxebv overlay
Define DT alias for PECI

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2022-11-08 09:42:27 +00:00
Jamie McCrae
f33eab8fb6 samples: mgmt: mcumgr: Remove un-necessary modules from build
This removes some modules and functionality from the sample to
reduce the output application size to assist in fitting it to MCUs
with less flash storage space.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-11-08 09:41:24 +00:00
Francois Ramu
15cc076126 samples: subsys: littlefs on nucleo_h743zi
This commit fixes the overlay file for running the
samples/subsys/fs/littlefs on the nucleo_h743zi platform.
The storage_partition is moved to the qspi_nor flash
instead of the internal flash.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-05 19:57:40 +01:00
Sean Madigan
34718446e1 Samples: Bluetooth: Increase sync timeout for sync samples
Currently, the sync timeout means the device will timeout
straight after it syncs. This means we cannot send a sync
transfer as we are no longer synced.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2022-11-05 19:57:31 +01:00
Stephanos Ioannidis
d7f69fccc3 samples: chre: Correct main() function prototype
C++ standard requires C++ main() to have the return type of 'int'.

This commit updates the CHRE sample to define main() as
`int main(void)` and enable  `CONFIG_CPP_MAIN`, which instructs the
Zephyr kernel to call the C++ main().

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-11-05 16:41:45 +09:00
Stephanos Ioannidis
cb43c90058 samples: cpp_synchronization: Allow running on POSIX arch boards
This commit updates the cpp_synchronization to run on the "POSIX
architecture" boards such as `native_posix`, since the POSIX arch now
properly supports the main() defined in a C++ source file.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-11-05 16:41:45 +09:00
Stephanos Ioannidis
17ea196b02 samples: cpp_synchronization: Enable CONFIG_CPP_MAIN
This commit updates the cpp_synchronization sample to enable
`CONFIG_CPP_MAIN` since it defines its main() in a C++ source file.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-11-05 16:41:45 +09:00
Stancu Florin
b9f462e890 boards: cc13x2/cc26x2*: add ADC sample + update docs
Add ADC driver sample overlays + update features in doc + metadata for TI
CC13x2/CC26x2 based boards (cc1352r_sensortag, cc1352r1_launchxl,
cc26x2r1_launchxl).

Signed-off-by: Stancu Florin <niflostancu@gmail.com>
2022-11-04 17:31:59 -04:00
Kamil Serwus
278120acb6 board: samc21: add support for SAMC21N Xplained Pro Board
Add basic support board with SAMC21N soc including SPI, UART, I2C,
ADC, Flash, Leds.

Signed-off-by: Kamil Serwus <kserwus@gmail.com>
2022-11-04 16:03:01 +01:00
Anas Nashif
aead5b523b sample: tracing: add a configuration for percepio
Add a sample configuration for percepio.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-04 10:00:48 +01:00
Ederson de Souza
7ffc6c31b5 samples/boards: Add intel_adsp/code_relocation sample
A simple sample with some (explained) tricks to get code relocation for
Intel ADSP CAVS platforms.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-11-03 10:25:07 +01:00
Joakim Andersson
777ec7b48c samples: tfm_secure_partition: Add library configuration to sample.yaml
Add library model configuration to tfm_secure_partition model.
IPC model is now the default, so add back the library configuration
for the sample as an additional configuration to the default.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-11-02 16:10:18 -05:00
Francois Ramu
2749cfed8e samples: compression: lz4 requires more than 64kB of RAM
Set the min_ram limit to 64kB so that with new ztest lib
can run the sample on board with enough ram.
Smaller ram platforms are not used anymore.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-11-02 16:06:06 -05:00
Markus Swarowsky
c859f3069b samples: psa_crypto: Add twister regex for attestation token
So far running twister tests didn't fail even though the sample failed
to receive the initial attestation token data.
Therefore this adds the regex lines that the samples prints if the
IAT data were received.

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2022-11-02 15:41:41 +09:00
Maureen Helm
0ddc2a9b65 drivers: sensor: Remove brackets from sensor info shell command output
Brackets were originally used in the sensor info shell command output to
make it obvious when a field is a null string, however they incorrectly
suggest that a field is an array. Remove the brackets and conditionally
print "(null)" instead.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-11-02 15:40:24 +09:00
Maureen Helm
387a108b5f samples: sensor: Fix sensor shell application build command
Fixes the sensor shell sample application build command to use the
correct source directory.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-11-02 15:40:24 +09:00
Henrik Brix Andersen
836f582664 drivers: can: skip all CAN loopback mode tests for kvaser,pcican
Skip all CAN controller tests utilizing CAN loopback mode for the
kvaser,pcican CAN controller card as emulated in QEMU.

QEMU emulation of the SJA1000 CAN controller backend does not yet support
the SJA1000 Self Reception Request command which is required for proper
loopback operation.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-11-01 15:22:31 -04:00
Henrik Brix Andersen
4af4fc0314 samples: modules: canopennode: exclude qemu_x86 from storage build
Exclude the qemu_x86 and qemu_x86_64 boards from the build-only CANopenNode
storage test.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-11-01 15:22:31 -04:00
Henrik Brix Andersen
05d02e2dac samples: drivers: can: counter: use printf() instead of printk()
Use printf() instead of printk() for printing sample output. According to
the documentation Zephyr printk() and friends are for printing kernel debug
messages.

With printf() instead of printk() the CAN counter sample passes twister
test execution on native_posix and native_posix_64.

Fixes: #50570

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-11-01 09:02:41 +00:00
Ingar Kulbrandstad
7367980bea Bluetooth: Mesh: Extended advertiser as default
Setting the extended advertiser as default advertiser
to improve both preformence and reliability.

Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
2022-11-01 08:52:56 +00:00
Kumar Gala
117039ca2b IPM: remove defconfig/proj setting of IPM drivers
Now that IPM drivers are enabled based on devicetree we can
remove any cases of them getting enabled by Kconfig, *defconfig*,
and *.conf files.

We need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-31 16:45:56 -05:00
Gaël PORTAY
1578a991bd samples: blinky_pwm: fix missing project renaming
The commit bfb1040612 has renamed the
sample blink_led to blinky_pwm, however, the project still have the
former name: blink_led.

This renames the project to its new name: blinky_pwm.

Signed-off-by: Gaël PORTAY <gael.portay@gmail.com>
2022-10-31 09:22:59 -05:00
Maureen Helm
32aa66d57e samples: sensor: Enable sensor info shell command
Enables the new sensor info shell command in the sensor shell sample
application and documents its usage.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-10-31 11:21:37 +01:00
Maureen Helm
eef0e1a180 samples: sensor: Update sensor shell documentation
Updates the sensor shell sample documentation to reflect the currently
supported sensor shell commands. The list and list_channels commands
were removed in commit 95b4d37230 but the
documentation wasn't updated at the time.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-10-31 11:21:37 +01:00
Keith Packard
d61d941ec8 samples/bluetooth: Fix mis-use of bt_data 'data' field
The data field is a *pointer* to the buffer, not the actual buffer itself.
Instead of smashing past the end of the struct, write through that pointer.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-10-29 11:32:06 +03:00
Johann Fischer
b26fca430c drivers: flashdisk: remove all DISK_FLASH* Kconfig options
Remove all obsolete DISK_FLASH* Kconfig options.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-10-28 12:45:58 +02:00
Tomasz Moń
51c46e98c7 samples: usb: mass: add disk description to overlays
Add flash disk description to overlays. Specify custom flashdisk
partition for fat fs api test to match the Kconfig values, because
native posix storage partition is too small for FatFS filesystem.

Co-authored-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-10-28 12:45:58 +02:00
Kumar Gala
7fff3de993 samples: synchronization: Convert CONFIG_MP_NUM_CPUS handling
Move runtime checks to use arch_num_cpus() and build checks
to use CONFIG_MP_MAX_NUM_CPUS.  This is to allow runtime
determination of the number of CPUs in the future.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-27 13:59:57 -04:00
Kumar Gala
6aa67666c4 samples: smp: pktqueue: Convert CONFIG_MP_NUM_CPUS handling
Move runtime checks to use arch_num_cpus() and build checks
to use CONFIG_MP_MAX_NUM_CPUS.  This is to allow runtime
determination of the number of CPUs in the future.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-27 13:59:57 -04:00
Kumar Gala
9092b83d03 samples: smp: pi: Convert CONFIG_MP_NUM_CPUS handling
Move runtime checks to use arch_num_cpus() and build checks
to use CONFIG_MP_MAX_NUM_CPUS.  This is to allow runtime
determination of the number of CPUs in the future.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-27 13:59:57 -04:00
Nikolay Agishev
5b6f2f4fb6 twister: Add fiters to SYS-T related tests
New filter "TOOLCHAIN_HAS_NEWLIB == 1" was applied
because of following chain of dependencies:
LOG_MIPI_SYST_ENABLE=y --> CONFIG_MIPI_SYST_LIB --> \
--> REQUIRES_FULL_LIBC --> NEWLIB_LIBC.

Not all compillers announced in Zephyr support NewLib.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2022-10-27 11:03:30 +02:00
Thomas Stranger
338f1b9488 samples: subsys: canbus: isotp: fix sample path in Readme.rst
The path in the readme did not match the sample's real path.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-10-27 11:02:57 +02:00
Joakim Andersson
96698450c4 sample: tfm_regression_test: Only have audit partition in Library config
Only enable the TF-M Audit Partition in the TF-M regression tests when
Library model is used.
This is not supported in IPC model and produces a Kconfig warning.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-10-27 10:37:18 +02:00
Joakim Andersson
8bc9a3c042 sample: tfm_regression_test: Set library model explicitly
Set the TF-M library mode explicitly instead disabling IPC model and
relying on this selecting Libray model in the choice.
This is a follow-up on the TFM_IPC being put into a choice selection
when SFN model was added.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-10-27 10:37:18 +02:00
Dominik Ermel
a5f2b6bb43 samples/boards/nrf: Fix onoff_level_lighting_vnd_ap sample
Remove inclusion of moved and non needed header.
Other unneeded headers have been also removed.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-10-27 02:21:39 +09:00
Mariusz Skamra
2627063ab2 Bluetooth: audio: pacs: Replace capabilities API with pacs
This changes the API to use proper naming convention, as the code has
been moved out of capabilities.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-10-26 08:49:00 +02:00
Henrik Brix Andersen
30c7d31fde samples: drivers: can: babbling: set CAN-FD mode if requested
Set the CAN controller to CAN-FD mode before attempting to send FD format
frames.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-10-25 16:32:10 +02:00
Henrik Brix Andersen
f8a88cdb27 drivers: can: use flags fields for can_frame and can_filter structs
The can_frame and can_filter structs support a number of different flags
(standard/extended CAN ID type, Remote Transmission Request, CAN-FD format,
Bit Rate Switch, ...). Each of these flags is represented as a discrete bit
in the given structure.

This design pattern requires every user of these structs to initialize all
of these flags to either 0 or 1, which does not scale well for future flag
additions.

Some of these flags have associated enumerations to be used for assignment,
some do not. CAN drivers and protocols tend to rely on the logical value of
the flag instead of using the enumeration, leading to a very fragile
API. The enumerations are used inconsistently between the can_frame and
can_filter structures, which further complicates the API.

Instead, convert these flags to bitfields with separate flag definitions
for the can_frame and can_filter structures. This API allows for future
extensions without having to revisit existing users of the two
structures. Furthermore, this allows driver to easily check for unsupported
flags in the respective API calls.

As this change leads to the "id_mask" field of the can_filter to be the
only mask present in that structure, rename it to "mask" for simplicity.

Fixes: #50776

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-10-25 16:32:10 +02:00
Henrik Brix Andersen
a9c7c58345 canbus: isotp: avoid reusing CAN controller driver API definitions
Avoid reusing the CAN_EXTENDED_IDENTIFIER and CAN_STANDARD_IDENTIFIER
definitions from the CAN controller driver API for ISO-TP structure members
as this is a fragile design.

The ISO-TP layer must be responsible for its own definitions where
needed. Replace the "id_type" ISO-TP struct member with a well-known
abbreviated "ide" bit (Identifier Extension Bit) struct member.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-10-25 16:32:10 +02:00
Jamie McCrae
ff624a186c samples: mgmt: mcumgr: smp_svr: Fix stack overflow with bt
Fixes an issue with a possible stack overflow when using the
Bluetooth transport for large mcumgr transfer, the issue was caused
by moving to a dedicated workqueue but not moving the enlarged
system workqueue overlay to the new smp workqueue.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-10-25 16:25:13 +02:00
Emil Gydesen
31bf99cbd2 Bluetooth: ISO: Change ISO seq_num to 16-bit
The sequence number is by the core spec defined as 16-bit.
We had implemented a workaround for the wrapping of the
sequence number, which required the type to be larger
than 16-bit (32-bit).

However, since the definition of the sequence number,
and the use of, is poorly defined by the core spec, we
are reverting this workaround and reducing the sequence
number to 16-bit again. This way it is more in line
with the core spec, as well as more intuitive given the
other uses for the sequence number.

This change moves the responsibility of using the
right value to the upper layers, as the stack can
and will no longer provide any guarantees.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-10-24 10:38:49 +02:00
Sam Hurst
c2e9462637 samples: boards: Remove board specific USB-C Sink sample
This CL removes the board specific USB-C Sink sample in
favor of the generic USB-C Sink sample.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2022-10-22 18:38:35 -04:00
Sam Hurst
e2f5fcd91a samples: usb-c: sink: Add USB-C Subsystem Sink Sample
Implementing USB-C Sink functionality can be difficult.
This sample application serves as an example of how
to create an application with Power Delivery Sink
functionality.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2022-10-22 18:38:35 -04:00
Krishna T
52ddc6e32d samples: net: zperf: Add loopback overlay
This is useful to profile networking stack using loopback interface, a
TX only option is also added but disabled by default.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2022-10-21 13:15:05 +02:00
Michal Sieron
702caf1c7e samples: boards: Add Qomu board sample
First pads are being configured for use by the FPGA.
Then CPU loads usbserial bitstream.
Finally it reenables clocks, sets up USB PID and waits for device to
enumerate.

Also disable software resets in used clocks.

Signed-off-by: Michal Sieron <msieron@antmicro.com>
2022-10-20 15:41:09 +02:00
Kumar Gala
ad5966a432 samples: move to using CONFIG_MP_MAX_NUM_CPUS=1
For samples that set CONFIG_MP_NUM_CPUS=1, switch to using
CONFIG_MP_MAX_NUM_CPUS=1 instead as we work to phase out
CONFIG_MP_NUM_CPUS.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-20 22:04:10 +09:00
Felipe Neves
5760fcc8ab soc: xtensa: esp32_net:
Fixes boot sequence for esp32_net, also reflect the changes in the
esp32 ipm driver.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-10-19 16:03:00 +02:00
Stephanos Ioannidis
9dd570f8a2 tests: Remove explicit newlib nano override
This commit removes explicit `CONFIG_NEWLIB_LIBC_NANO=n` overrides
because the newlib nano variant is no longer enabled by default when
it is available.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-10-19 16:02:51 +02:00
Andrei Emeltchenko
87217eff6b samples: edac: Add sample documentation
Add EDAC sample documentation.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-10-18 16:59:34 +02:00
Torsten Rasmussen
36ea41fad3 samples: introduce 'with_mcuboot' sample to show sysbuild feature
This sample is intended to show users how they can create a sample which
has dedicated configuration files for extra images included in a build.

MCUboot is used as example on how its default can be adjusted and
MCUboot itself automatically be included in the build when using
sysbuild.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-10-18 14:13:27 +02:00
Veijo Pesonen
2fbb9e64be samples: lwm2m: allow longer endpoint names
Server might return the endpoint name in a registration reply. Default
max allowed endpoint name is only 12 characters.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-10-17 20:06:32 +02:00
Gerard Marull-Paretas
178bdc4afc include: add missing zephyr/irq.h include
Change automated searching for files using "IRQ_CONNECT()" API not
including <zephyr/irq.h>.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-17 22:57:39 +09:00
Emil Obalski
2230857a44 samples: ipc: icmsg: Add usage of endpoint deregister
Expand the sample to show deregister functionality
for IPC service with icmsg backend.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2022-10-17 14:49:42 +02:00
Emil Obalski
e25ca9f757 samples: ipc: icsmg: Clean up the sample
Make the sample exchange the data between cores
for predefined time. Clean up logging messages
and do not print transfer speed on each side.

This sample is now used to demonstrate functionalities
of ipc service with icmsg backend.

Signed-off-by: Emil Obalski <Emil.Obalski@nordicsemi.no>
2022-10-17 14:49:42 +02:00
Krzysztof Chruscinski
7e71bb7089 samples: subsys: logging: Add multidomain logging sample
Add sample which demonstrates multidomain logging.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-10-17 10:16:53 +02:00
Krzysztof Chruscinski
e322447109 logging: Initial multidomain support
Adding multidomain support by introducing log_link module which
acts as a receiver of log messages created by another domain.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-10-17 10:16:53 +02:00
Sean Madigan
5b1dd71f3e Bluetooth: kconfig: Add config options for PAST
Add config options specific for periodic advertising sync transfer.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2022-10-17 10:14:10 +02:00
Kumar Gala
c778eb2a56 smp: Move arrays to use CONFIG_MP_MAX_NUM_CPUS
Move to use CONFIG_MP_MAX_NUM_CPUS for array size declarations instead
of CONFIG_MP_NUM_CPUS.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-17 14:40:12 +09:00
Daniel DeGrasse
2169183ae1 samples: fat_fs: update overlays for nrf52840 and esp_wrover_kit
Update nrf52840 and esp_wrover overlays to use new sdmmc bindings.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-10-14 09:56:10 +02:00
Emil Gydesen
7ab1cafbc2 Bluetooth: Audio: Add Broadcast source application AD
This refactors how the BAP broadcast source handles the
extended and periodic advertising.

First it removes the start and stop of the extended
advertising, and instead expects the application
(or upper layers) to do this.

Second it exposes API functions to get the
necessary advertising data from BAP (service data and
the BASE), which the upper layers will then also
be responsible for setting and updating.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-10-14 09:51:39 +02:00
Florian Grandel
b309822e8e samples: net: wpanusb: document endianness
The WPAN-USB sample did not document endianness of some user space
variables. As the IEEE 802.15.4 stack uses attributes in several
different encodings, the endianness should be documented.

Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
2022-10-12 18:40:59 +02:00
Christopher Friedt
dbe2c0d59e include: net: http: rename http_x.h http/x.h
Some minor housekeeping prior to adding an http server
implementation. There are already a number of http headers
and that number will likely increase with subsequent work.
Moving them into a common directory cleans up the
`include/net` directory a bit.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2022-10-12 09:02:21 -04:00
Gerard Marull-Paretas
3976ccd5f7 include: add missing sys/printk.h include
Some files were using the printk API without including sys/printk.h

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Gerard Marull-Paretas
6a0f554ffa include: add missing kernel.h include
Some files make use of Kernel APIs without including kernel.h, fix this
problem.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-11 18:05:17 +02:00
Seppo Takalo
f3ef443a97 samples: net: lwm2m_client: Split sensor modules out from main
Each module deserves their own file so we don't clutter the
main application.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2022-10-11 11:12:07 +02:00
Vinayak Kariappa Chettimada
2d6f6a7729 samples: Bluetooth: hci_rpmsg with 2 BIS configuration
Update the config file to support 2 Broadcast Streams in
hci_rpmsg samples for running iso_broadcast and iso_receive
samples on nRF5340 DK.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-10-10 13:55:06 +02:00
Vinayak Kariappa Chettimada
52a91fd02e samples: Bluetooth: Add configuration file for all controller features
Add project configuration overlay file to build the current
full feature set Bluetooth Low Energy Controller.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-10-07 14:34:14 +02:00
James Johnson
0eaff5a11d drivers: sensor: add ams AS621x Temperature Sensor driver support
Added support for the AMS AS621x series of temperature sensors as a
variant of the TI TMP108 temperature sensor.

Signed-off-by: Jared Baumann <jared.baumann8@t-mobile.com>
Signed-off-by: James Johnson <james.johnson672@t-mobile.com>
2022-10-07 10:01:47 +02:00
Mariusz Skamra
28ce0a96b1 Bluetooth: audio: capabilities: Remove redundant direction parameter
The direction is used to identify the list to append the registered
capabilities. There is no need to keep it in the bt_audio_capabilities,
it can be provided as a function parameter instead.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-10-06 22:41:27 +00:00
Franciszek Zdobylak
64feccf23d drivers: flash: shell: Add flash shell tools
This commit adds two new commands to flash shell tools: flash load and
flash page_info.

Signed-off-by: Franciszek Zdobylak <fzdobylak@internships.antmicro.com>
2022-10-06 22:35:57 +00:00
Chris Friedt
2114104223 samples: net: socketpair: use CONFIG_ARCH_POSIX shorthand
The `CONFIG_ARCH_POSIX` Kconfig option covers all POSIX
boards, so no need to specify them individually.

Signed-off-by: Chris Friedt <cfriedt@fb.com>
2022-10-06 15:32:49 -04:00
Benjamin Björnsson
2ba91ce850 samples: flash_shell: Add board to platform_exclude list
Exclude Arduino Portenta H7 because the flash driver isn't
supported yet on the M4 core.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-10-06 13:52:40 -05:00
Vinayak Kariappa Chettimada
aa50f7db74 samples: Bluetooth: Add boards to platform allowed to catch regressions
Add boards to CI platform_allowed list to catch regressions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-10-05 16:20:06 +00:00
Vinayak Kariappa Chettimada
b56c6eb697 samples: Bluetooth: Fix peripheral_ht compile error
Fix peripheral_ht compile error introduced in
commit a202341958 ("devices: constify device pointers
initialized at compile time").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-10-05 16:20:06 +00:00
Tom Burdick
f9d16072e8 rtio: Add macro to define iodev submission queue
The iodev submission queue existed but wasn't easily constructed as
there was no macro to define it.

Adds a simple macro wrapper around RTIO_SPSC_DEFINE for creating
the RTIO IO Device Submission Queue enabling each IO device to
have its own pending queue of requests.

The sample has been updated to use the iodev submission queue rather
than a k_msgq.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-10-05 12:42:16 +02:00
Erwan Gouriou
426c51af76 samples: shields: x_nucleo_53l0a1: Fix nodelabels
Following change of nodelabels names in shields, fix their usage in this
sample.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-10-05 16:15:44 +09:00
Joakim Andersson
41e040a3f8 samples: direction_finding_connectionless_tx: Use identity address
Use Identiy address in direction_finding_connectionless_tx sample.
Without this option the advertiser is advertising using an NRPA since
it is a non-connectable advertiser.
The function bt_le_ext_adv_oob_get_local cannot be used to get the NRPA
address of the non-connectable advertiser when privacy is disabled.

Check the return address of bt_le_ext_adv_oob_get_local.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-10-04 14:07:29 +00:00
TOKITA Hiroshi
c28fd3079e samples: driver: watchdog: Add GD32 SoCs support
Add support for boards that implement GD32 SoC.

Overlay file for longan_nano_lite enables FWDGT.

Add WDT_FEED_INTERVAL to make adjustable
the execution cycle of wdt_feed().

And also, make waiting for the WDT_FEED_INTERVAL period
for the watchdog window opens at the start of the test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-10-03 18:07:16 +02:00
Erwan Gouriou
397a992d5f samples: shields: lmp90100_evb: Fix nodelabel
Shield's nodelabels should now be in the form <device>_<shield_name>.
This occurrence was left out in the initial change.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-10-03 14:15:08 +02:00
Juha Heiskanen
8279489aee net: lwm2m: RD Client update registration timeout
Renamed LWM2M_RD_CLIENT_EVENT_REG_UPDATE_FAILURE to
LWM2M_RD_CLIENT_EVENT_REG_TIMEOUT.

Changed reported event type for registration timeout to
LWM2M_RD_CLIENT_EVENT_REG_TIMEOUT from
LWM2M_RD_CLIENT_EVENT_REGISTRATION_FAILURE.
LWM2M_RD_CLIENT_EVENT_REGISTRATION_FAILURE should be only
reported case when server reject by response registration.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-10-03 10:20:13 +02:00
Mariusz Skamra
9ecbee2587 Bluetooth: audio: capabilities: Remove callbacks
This removes the callbacks from capabilities. The callbacks are used for
unicast server role only, while the capabilities are used for the
broadcast sink role as well. Thus the callbacks can be removed as there
is another bt_audio_unicast_server_cb API that is specific for unicast
server role.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-10-03 10:17:21 +02:00
Martin Jäger
9cec058e8e boards: posix: native_posix: enable can_loopback0 by default
The .yaml file states that CAN is supported, but the basic sample
application samples/drivers/can/counter cannot be compiled without
additional configuration.

The loopback driver does not require any additional steps like the
linux SocketCAN driver, so it is safe to enable it by default and
get rid of the many overlay files in the tests.

ISO-TP tests and the counter sample are excluded via .yaml from
twister tests because of timing issues.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-10-03 10:17:12 +02:00
Mariusz Skamra
124d66e885 Bluetooth: audio: tbs_client: Make GTBS client only build option
Refactor Kconfig to add a way to enable GTBS only client.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-10-03 10:15:03 +02:00
Jim Mussared
e1c134a582 samples/bluetooth/hci_uart: Add support for USB CDC UART.
This PR adds support using the USB CDC UART in the hci_uart sample,
including sample configuration for the nRF 52840 dongle.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-03 10:14:35 +02:00
Michal morsisko
3b26d50012 samples: bluetooth: Add sample demonstrating direct advertising
This sample shows how to run BLE direct advertising towards central
with enabled privacy.

Signed-off-by: Michal morsisko <morsisko@gmail.com>
2022-10-03 10:13:40 +02:00
Pieter De Gendt
fd81163f58 samples: subsys: display: lvgl: Add native_posix overlay for SDL input
Enable SDL keyboard events using the zephyr,gpio-emul-sdl driver and
alias key to sw0.
Pressing 'r' on the keyboard resets the counter.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-10-03 10:12:03 +02:00
Pieter De Gendt
aa4082a093 samples: subsys: display: lvgl: Add button to reset counter
Connect the sw0 alias to reset the counter.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-10-03 10:12:03 +02:00
Ryan Erickson
eadb45612d samples: mcumgr: smp_svr: Add support for MG100 board
Add support to build the sample for the MG100 board.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-10-03 10:11:28 +02:00
Ryan Erickson
3996c0327b samples: net: mqtt_publisher: Add support for MG100 board
Add support to build the sample for the MG100 board.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-10-03 10:11:28 +02:00
Ryan Erickson
b612c49424 samples: net: lwm2m_client: Add support for MG100 board
Add support to build sample for MG100 board.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-10-03 10:11:28 +02:00
Valerio Setti
2bcc6f9194 samples: sensor: adding a sample application for the STM32 qdec driver
Sample application for the STM32 quadrature encoder driver

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2022-10-03 10:10:31 +02:00
Peter Marheine
5eb75b81f7 arm: rename default RAM region from 'SRAM' to 'RAM'
It's useful for RAMABLE_REGION to have a uniform name when
CODE_DATA_RELOCATION is supported, because otherwise the build system
needs to be aware of how the region name differs between architectures.
Since architectures tend to prefer one of 'SRAM' or 'RAM' for that
region, prefer to use 'RAM' as the more general term.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2022-10-03 10:09:53 +02:00
Grant Ramsay
5a1845e9f8 samples: boards/esp32: Add ESP32 Ethernet sample
A sample project for ESP32 Ethernet testing.
Possibly this should be consolidated into existing networking samples

Signed-off-by: Grant Ramsay <grant.ramsay@hotmail.com>
2022-10-01 14:51:28 -04:00
Grant Ramsay
7bc8211aa4 boards: xtensa: Add esp32_ethernet_kit board
Adds support for the esp32_ethernet_kit board.
esp32_ethernet_kit board is useful for testing ESP32 Ethernet

Signed-off-by: Grant Ramsay <grant.ramsay@hotmail.com>
2022-10-01 14:51:28 -04:00
Anas Nashif
ebade6f48c samples: remove SOF sample
Sample is now maintained in the SOF repository, no need for duplication.
The SoF project maintains the board configurations and SOF related
configs better than we do.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-01 06:22:21 -04:00
Jose Alberto Meza
dafdef83b4 samples: drivers: espi: Re-enable eSPI SAF for MEC152x board
Add missing device tree entry for SAF HW block.
Re-enable driver for MEC152x board.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2022-09-29 14:59:32 +00:00
Stephanos Ioannidis
165cf8ddb5 samples: display: cfb_custom_font: Fix stale sample reference
The `cfb_custom_font` sample has been relocated from `samples/display`
to `samples/subsys/display`.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
4a35002adb samples: shields: x_nucleo_iks01a2: Fix outdated pinmux file reference
This commit removes the outdated reference to the board pinmux file and
updates the documentation point to point to the relevant Arduino
connector-related devicetree files.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
a0d335042a samples: ft800: Update outdated links
Apparently the URLs for these old products have been moved to under
"old2020" without any redirects ...

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
016fc8c22f samples: grove_display: Update outdated link
The "Grove Base Shield" seems to be no longer listed in the Seeed
website, so its link is replaced with that of the "Base Shield V2",
which is the successor of the "Grove Base Shield."

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
579de846b2 samples: led_lpd8806: Remove outdated link
The "RGB LED strips: an overview" link no longer works and there is no
direct replacement, so there is no point in listing this document in
the references anymore.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
50cced58d2 samples: counter: maxim_ds3231: Fix outdated link
This commit fixes the outdated link to the "Chronodot" product page.

It seems "macetech" no longer lists the older versions of this product
with DS3231, so the link has been replaced with the one from Adafruit.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
e04e9f3958 samples: sensor: th02: Fix outdated link to TH02 datasheet
This commit replaces the outdated link to the TH02 sensor datasheet
with the link to the Si7005 datasheet (the original part name of TH02
is Si7005).

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
ad39da73bb samples: bluetooth: unicast_audio_server: Fix incorrect link
The sample is named `unicast_audio_server`, not `audio_unicast_server`.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
3d80f937fb samples: sensor: ds18b20: Fix incorrect link
This commit fixes the incorrect link to the DS18B20 sensor product
page.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
25062a51c0 samples: sensor: bme280: Fix incorrect link
This commit fixes the incorrect link to the BME250 sensor product page.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
fab0f2afda samples: tfm_integration: Fix TF-M documentation link
Update the link for the TrustedFirmware-M documentation to point to the
official user guide.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
909abaf367 samples: openthread: coprocessor: Fix outdated link
This commit replaces the outdated link to the Tridonic net4more Border
Router product page, which now reports 404, with a link to its
datasheet (it seems like this product is no longer available).

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
6950aa94f7 samples: st_ble_demo: Fix incorrect app link
This commit fixes the incorrect app link and removes other unreferenced
links.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Stephanos Ioannidis
45a8ace1f3 doc: Use inline literals
Use inline literals where applicable -- especially for the words that
contain `@`; otherwise, Sphinx will think it is an email address.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-09-29 12:20:14 +02:00
Jordan Yates
58b65082c2 samples: lora: remove platform_allow
The twister docs specify that `platform_allow` should only be used
if applications can only possibly run on the specified platforms. This
is not the case for these applications, which should be able to run on
any board with LoRa support.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-09-29 08:59:03 +00:00
Jordan Yates
3cf42040ae samples: lorawan: verify region compilation
Issue #49960 showed that individual regions can fail to compile when
enabled. As requested in #50626, validate that each region compiles in
CI.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-09-29 08:59:03 +00:00
Emil Gydesen
3d7af0f272 samples: Bluetooth: unicast audio server stop sending on stopped
When the stopped callback is called, then the CIS is disconnected.
This should stop the sending of data from the server.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-09-27 09:16:21 +00:00
Dominik Ermel
882fe8f951 samples/smp_svr: Remove double inclusion of fs_mgmt.h
Cleanup.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-26 08:08:06 +00:00
Fabio Baltieri
b1715156dd samples: usb: dfu: exclude lpcxpresso55s69_cpu0
Exclude lpcxpresso55s69_cpu0 from the USB DFU tests, this triggers a
build assert due to unsupported flash write block size (512 bytes,
mcuboot supports 8 to 32).

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-23 11:31:52 +00:00
Jay Vasanth
3bab0081dd samples: espi: add pinctrl in mec1501 board overlay
update mec1501modular board overlay to include pinctrl
properties for spi

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
2022-09-21 18:05:32 +00:00
Vinayak Kariappa Chettimada
6843eef4cf samples: Bluetooth: Fix broadcast and receive to wait for all channels
Fix the iso_broadcast and iso_receive sample to wait on
semaphore for all channel establishment and all channel
terminate callbacks to be invoked.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:11:40 +02:00
Vinayak Kariappa Chettimada
3559abed4d samples: Bluetooth: iso_broadcast increase Tx buffers
Increase the ISO Tx Buffers to avoid throttling of ISO data
transmission when using 2 Broadcast ISO streams.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-19 18:11:40 +02:00
Pirun Lee
5b8b5b86db sample: ots: comply to coding guidelines MISRA C:2012 Rule 14.4
The controlling expression of an if statement
and the controlling expression of an iteration-statement shall have
essentially Boolean type.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2022-09-19 10:57:10 +02:00
Pirun Lee
f6df36b148 Bluetooth: ots: fix sample data operation error
Peripheral: Fix wrong objects index
Central: Fix client not working after re-connect.
         Check object properties before read/write.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2022-09-19 10:57:10 +02:00
Thomas Stranger
c1592fd4c7 samples: drivers: can: babbling: start can node
The device must be started before sending any frames.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-16 08:26:47 +00:00
Fabio Baltieri
067e82de4a samples: bt: hids: implement a sample report
The peripheral_hids sample currently implements the HID descriptor and
characteristics, but no notify report. Add some code for implementing a
simple one button click report for boards that have sw0 defined, so that
the sample actually does something beside connecting and enumerating the
device.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-15 16:27:35 +00:00
Fabio Baltieri
7eeed4ab73 samples: bt: hids: set report id in the report_map
The default report_map for peripheral_hids mouse sample descriptor is
missing a report id field. This seems to be confusing Android hosts into
somehow parsing reports incorrectly.

Adding a report id seems to fix the problem and still works correctly on
bluez hosts.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-15 16:27:35 +00:00
Francois Ramu
44b9cde054 samples: boards: stm32 serial wakeup form LPUART on nucleo_wl55jc
This overlay shows the LPUART at 9600 with wakeUp capability
to exit the nucleo_wl55jc target plaform from the low Power
stop mode, EXTI_Line 28 is the corresponding wakeUp source.
The LPUART is sourced by the LSE (32768Hz) and max baudrate
is 9600. Set the console to 9600.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-15 15:02:47 +00:00
Ryan Erickson
e7b6e0286a samples: net: wpanusb: exclude pinnacle_100_dvk
This sample does not support the pinnacle_100_dvk

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Ryan Erickson
37b35fb6e5 samples: net: wpan_serial: exclude pinnacle_100_dvk
This sample does not support the pinnacle_100_dvk

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Ryan Erickson
894b530f46 samples: mcumgr: smp_svr: Remove pinnacle_100_dvk overlay
The pinnacle_100_dvk enables appropriate drivers by
default if mcuboot is enabled.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Ryan Erickson
468cee3cd4 samples: net: mqtt_publisher: Remove pinnacle_100_dvk overlay
The pinnacle_100_dvk enables appropriate drivers by
default if networking is enabled.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Ryan Erickson
de1e50247a samples: net: lwm2m_client: Remove pinnacle_100_dvk overlay
The pinnacle_100_dvk enables appropriate drivers by
default if networking is enabled.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-09-15 11:58:23 +01:00
Aastha Grover
28bf1aaf25 docs: add definition and minimum criteria for samples
Adding guidelines for writing samples which includes definition
and minimum criteria to qualify as a sample.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-09-14 17:27:05 -04:00
Henrik Brix Andersen
180cdc105e drivers: can: add start and stop CAN controller API functions
Up until now, the Zephyr CAN controller drivers set a default bitrate (or
timing) specified via devicetree and start the CAN controller in their
respective driver initialization functions.

This is fine for CAN nodes using only one fixed bitrate, but if the bitrate
is set by the user (e.g. via a DIP-switch or other HMI which is very
common), the CAN driver will still initialise with the default
bitrate/timing at boot and use this until the application has determined
the requested bitrate/timing and set it using
can_set_bitrate()/can_set_timing().

During this period, the CAN node will potentially destroy valid CAN frames
on the CAN bus (which is using the soon-to-be-set-by-the-application
bitrate) by sending error frames. This causes interruptions to the ongoing
CAN bus traffic when a Zephyr-based CAN node connected to the bus is
(re-)booted.

Instead, require all configuration (setting bitrate, timing, or mode) to
take place when the CAN controller is stopped. This maps nicely to entering
"reset mode" (called "configuration mode" or "freeze mode" for some CAN
controller implementations) when stopping and exiting this mode when
starting the CAN controller.

Fixes: #45304

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-13 16:06:50 +00:00
Anders Storrø
97ed0061cb Bluetooth: Mesh: Remove experimental tag from CDB
The CDB module is a mandatory part of provisioning features in BTM, and
can not be regarded as experimental anymore.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2022-09-12 14:14:27 +00:00
Daniel Leung
47bf9ee51c samples: sensors: add a new one for lsm6dso as I2C on I3C bus
This adds some skeleton files to enable using LSM6DSO on I3C bus
while still acting like a I2C device. The new files here are
simply to provide a way to have overlay for each board that
would not conflict with the pure I2C one. Also this is set to
build only because it require external hardware that is not
necessary on the board being tested.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Daniel Leung
34e353c0a8 samples: sensors: adds a new one for lps22hh on I3C bus
This adds some skeleton files to enable using LPS22HH on I3C bus.
This still uses the C source file for I2C. The new files here
are simply to provide a way to have overlay for each board that
would not conflict with the I2C one. Also this is set to build
only because it may require external hardware that is not
necessary on the board being tested.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-09-09 17:42:33 -04:00
Rajkumar Kanagaraj
b32f81642c sample: psa_firmware: Fix the review comments
As suggested updated the docs `west build` command with
zephyr-app-commands.

Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
2022-09-09 16:31:20 -04:00
Rajkumar Kanagaraj
6b67c1a6ff samples: psa_firmware: fix documentation
Updated the document with the correct west build command,
and done some restructuring as well.

Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
2022-09-09 16:31:20 -04:00
Mulin Chao
839031271f driver: espi: npcx: add the controller attached flash sharing API
Add the flash channel support by implementing the controller attached
flash sharing APIs, including flash_read, flash_write, and flash_erase.
For flash_read, the max data payload the module can support is 64 bytes
in one transaction.
For flash_write, the max data payload the module can support is 16
bytes in one transaction.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2022-09-09 16:30:51 -04:00
Gerson Fernando Budke
b5f65f201d boards: arm: stm32l562e_dk_ns: Add flash partitions
The current stm32l562_dk_ns has no flash partitions defined. This add
flash partitions following partition sizes that are compatible with
the TF-M platform defined at flash_layout.h and removes the redundant
overlays board files.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-09-09 16:40:20 +00:00
Thomas Stranger
2ef81686b6 samples/drivers/w1: scanner: add ds2485 overlay
Adds an overlay for the ds2485 and adds a test configuration
for it.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-09 14:11:30 +00:00
Francois Ramu
3402dfb3da samples: drivers: stm32h7 octospi enables DMA
Adds the dma transfer for the octoSPI on NOR octo Flash
of the stm32h7b3i and stm32h735g disco kits.
The channel for the MDMA is 0-15.
The MDMA request is 0x16 for the OCTOSPI1 fifo threshold

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-08 10:07:21 +00:00
Francois Ramu
446b09361a samples: drivers: stm32l562 octospi enables DMA
Adds the dma transfer for the octoSPI on NOR octo Flash
of the stm32l562e_dk disco kit.
The channel for the DMAMUX is 0-15 (0-7 for DMA1, 8-15 for DMA2)
The DMAMUX request is 41 for the OCTOSPI.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-09-08 10:07:21 +00:00
HaiLong Yang
ebc4a37a21 samples: flash_shell: add support for gd32 boards
After add zephyr,flash-controller property, most gd32 boards support
flash_shell sample.

gd32vf103c_starter and gd32vf103v_eval only have 32KB SRAM, so we
should reduce CONFIG_HEAP_MEM_POOL_SIZE to 8KB.

gd32f350r_eval only have 16KB driver, exclude from flash_shell sample.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-09-08 10:13:05 +02:00
Marek Materzok
33b851f71e boards: frdm_k64f: add SD/MMC support
The FRDM-K64F board has a SD/MMC slot. This patch modifies the DTS
files so that this feature works out of the box. This includes
configuring the SPI peripheral connected to the slot on the board.
This change follows the SD/MMC support for other boards, e.g.
Olimexino-STM32. It was tested on a FRDM-K64F board with the
fat_fs sample.

Signed-off-by: Marek Materzok <tilk@tilk.eu>
2022-09-07 16:37:36 -05:00
Pierre Marzin
10d6685f57 samples: blinky_pwm: add rcar_h3ulcb_cr7 board overlay's
Use dts overlay to declare the pwm-led only when needed.
This is only used for demo purpose of PWM0 on RCAR gen3
boards (H3ULCB only at the moment).

Signed-off-by: Pierre Marzin <pierre.marzin@iot.bzh>
2022-09-07 15:50:49 +02:00
Gerard Marull-Paretas
37c956ffb9 samples: pm: demonstrate usage of the policy latency APIs
Even though we have unit tests that cover the PM policy latency APIs, it
may not be obvious on how to use it in practice. This patch adds a new
sample where both the application and a device driver impose latency
requirements. The sample illustrates how latency requirements are
aggregated and are taken into account when choosing the CPU power state.
The test has been designed to run on native_posix, since it only serves
for demonstration purposes.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-09-07 10:28:55 +02:00
Vinayak Kariappa Chettimada
0c88407a28 samples: Bluetooth: Increase adv data Len for broadcast audio source
Increase the Controller supported Advertising Data Length
Maximum so that Advertising Data set by Broadcast Audio
Source sample is accepted by the controller.

Also, tune down the supported ISO Tx PDU size to suffice the
Broadcast Audio Source usecase.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-06 17:44:38 +02:00
TOKITA Hiroshi
519af86d38 samples: drivers: adc: Add rpi_pico support
Add support for rpi_pico board to adc driver sample.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-09-06 17:11:19 +02:00
Henrik Brix Andersen
424f696ce9 samples: drivers: can: add babbling node sample
In a Controller Area Network a babbling node is a node continuously (and
usually erroneously) transmitting CAN frames with identical - often high -
priority. This constant babbling blocks CAN bus access for any CAN frame
with lower priority as these frames will loose the bus arbitration.

Being able to simulate a babbling CAN node is useful when examining the
behavior of other nodes on the same CAN bus when they constantly loose bus
arbitration.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-09-06 09:56:57 +02:00
Henrik Brix Andersen
795280e2a2 samples: drivers: can: rename the CAN counter sample
Rename the CAN controller "counter" sample to make room for more CAN
related samples.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-09-06 09:56:57 +02:00
Dominik Ermel
60e0c698f6 tests/settings: Switch from FLASH_AREA_ to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
353a8f9682 samples/subsys/settings: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
00c16f6db2 samples: subsys: nvs: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
cf62fa28f8 fs: littlefs: sample: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
df5d7a4cb4 samples: reel_board: mesh_badge: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
35b82cb6da samples: esp32: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
80e34e2a24 samples: usb: mass: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
d69bc24702 samples/soc_flash_nrf: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Dominik Ermel
c696f93014 samples/mgmt/mcumgr/smp_svr: Switch to FIXED_PARTITION_ macros
The commit switches code from using FLASH_AREA_* macros to
FIXED_PARTITION_* macros.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Krishna T
25d0f87b3c net: dhcp: Add support for restarting DHCP
If a L2 link has been established, then the DHCP is taking too long as
it has to go through its capped exponential backoff timers to trigger
discover (The DHCP starts immediately during init, this is itself wrong,
it should start on a link UP notification) that delays the DHCP for
few seconds to a minute.

And if we do stop and start DHCP then also it goes through the initial
delays (though configurable), which is also not ideal.

Add support for restarting DHCP without any delay, i.e., release and
send discover immediately.

This is also useful in case L2 switches to a different subnet, in this
case Zephyr doesn't restart DHCP automatically, this API can be used by
L2 apps/drivers to restart DHCP to get new subnet IP.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2022-09-06 09:56:22 +02:00
Vinayak Kariappa Chettimada
92f289597e samples: Bluetooth: iso_receive: Updated to synchronize upto 2 streams
Updated the iso_receive sample to configure and synchronize
upto 2 BISes in the created BIG sync.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-05 17:37:47 +02:00
Vinayak Kariappa Chettimada
db84c7d679 samples: Bluetooth: iso_broadcast: Updated to broadcast 2 streams
Updated the iso_broadcast to configure and broadcast 2 BISes
in the created BIG.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-09-05 17:37:47 +02:00
Sylvio Alves
d524015f82 samples: boards: remove esp32 wifi sample code
`samples/net/wifi` replaces custom esp32 wifi sample
code. Then it can be removed from main repository.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-09-05 15:32:34 +00:00
Sylvio Alves
7d9edc8bf0 wifi: esp32: add support to wifi api mgmt
Moved all MBEDTLS dependencies from prj.conf
to Kconfig as WiFi depends on it.

Update esp32 wifi driver to enable `samples/net/wifi`
to work. Commands as such as `wifi connect` and `wifi scan` are now
available.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-09-05 15:32:34 +00:00
Gerard Marull-Paretas
79e6b0e0f6 includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.

The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.

NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-05 16:31:47 +02:00
Gerard Marull-Paretas
a6fb18541d samples: net: lldp: remove duplicate include
<zephyr/zephyr.h> was included twice.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-05 16:31:47 +02:00
Michal Narajowski
5c27067dcd Bluetooth: Mesh: Align Config Client API with Health Client API
This PR adds a `*_cli_*` infix to the Config Client API to match
the changes in Health Client. The old API is marked as deprecated.

Signed-off-by: Michal Narajowski <michal.narajowski@codecoup.pl>
2022-09-05 13:56:25 +03:00
Martin Jäger
e5b049249e samples: net: sockets: can: unconditionally include can.h
This header is also needed for struct can_filter, so it should not
only be included if one wants to set the device into loopback mode.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-09-05 08:57:16 +00:00
Fabio Baltieri
1ecd016e6a sample: smp_svr: fix test name mcumg -> mcumgr
The test names are missing an "r" from "mcumgr" for some reason. Add it
back.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-05 10:18:10 +02:00
Erwan Gouriou
14ae669a8d samples: sensors: lsm6dso: Fix regex filter following unit fix
https://github.com/zephyrproject-rtos/zephyr/pull/49068 fixed units
displayed by  the sample from dps to rad/s but did not update the
sample twister regex filter.
Fix the filter as well to allow testing in CI.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-02 11:24:08 +00:00
Erwan Gouriou
6654a06fad samples: stm32 serial wakeup: Don't run on stm32l562e_dk in CI
On STM32 PM serial wakeup sample, a power efficient configuration using
lpuart is provided for stm32l562e_dk target.
Though, since default configuration of the board is using ST-Link virtual
port com on uart1, which can't be changed in CI and hence can't be tested,
then remove this target from sample yaml configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-02 11:23:09 +00:00
Parthiban Nallathambi
75479f5338 modbus: add user data for adu callback
add user data for adu callback, which helps in passing
socket and relevant application parameters.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2022-09-02 10:51:57 +02:00
Erwan Gouriou
5106b9cc2a samples: hts221: Fix testing support by twister
-In order to allow non regression of trigger mode in CI, add
a dedicated configuration for this mode
-Fix regex
-Use a filter on compat rather than using a fixture

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-09-01 13:15:14 -05:00
Mahesh Mahadevan
e1818f16fa samples: usb: Exclude frdm_kl25z from USB DFU test
Flash is disabled on frdm_kl25z

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-09-01 12:36:01 -05:00
Kumar Gala
00931ddf77 samples: i2s: echo: Remove DT_COMPAT_<compat> defines
We auto-generate DT_COMPAT_<compat> defines so we dont need to
explicitly define them anymore.

NOTE: we need to source Kconfig.zephyr first to pull in the autogen
Kconfig.dts files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-09-01 14:58:25 +00:00
Kumar Gala
e501c5c1bd wifi: remove defconfig/proj setting of Wifi drivers
Now that Wifi drivers are enabled based on devicetree we can
remove any cases of them getting enabled by *.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-31 21:57:06 +00:00
Florian Grandel
705a8b6ea1 net: ieee802154: introduce consistent MTU definition
Zephyr IEEE 802.15.4 drivers and L2 stack use the same constant names
for different MTU definitions. The intent of this change is to introduce
a consistent MTU definition which can be used everywhere in zephyr to
avoid confusion, bugs and name conflict.

Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
2022-08-31 21:52:37 +00:00
Yannick Thesen
8700bfd789 drivers: sensor: Added sample for the Würth Elektronik WSEN-HIDS sensor.
Added sample for the WSEN-HIDS humidity and temperature sensor.

Signed-off-by: Yannick Thesen <Yannick.Thesen@we-online.de>
2022-08-31 21:47:58 +00:00
Henrik Brix Andersen
720eeab30f samples: drivers: can: increase the maximum number of shell arguments
Remove the custom Kconfig value for CONFIG_SHELL_ARGC_MAX as it is too low
to account for the new arguments to the "can send" shell command.

The default for CONFIG_SHELL_ARGC_MAX was increased to 20 in
32ebeb0a5c which is sufficient for sending
non-CAN-FD format frames using the new "can send" shell command.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-31 10:45:35 +02:00
Pirun Lee
c3f2da178b samples: bluetooth: adding central_otc sample
Added a Bluetooth Central sample that demonstrates how to use
GATT Object Transfer Profile.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2022-08-31 10:39:33 +02:00
Gerard Marull-Paretas
50cfb3a567 samples: drivers: led_pwm: use DT_FOREACH_CHILD_SEP_VARGS
use DT_FOREACH_CHILD_SEP_VARGS to avoid an auxiliary macro.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-30 16:19:57 +02:00
Kumar Gala
492a741d9f crypto: remove proj setting of crypto drivers
Now that crypto drivers are enabled based on devicetree we can
remove any cases of them getting enabled by proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-30 10:43:12 +00:00
Katarzyna Giadla
52fe06495d samples: Rename 'samples' to 'sample'
Samples testcases should start with 'sample'. Some testcases
start with 'samples'.
This commit rename these testcases.

Signed-off-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
2022-08-29 07:30:42 -04:00
Katarzyna Giadla
a84531f4fd samples: Add name "sample" in the some samples modules
Some test cases in the module `samples` have not a name of this module.
This change adds the name `sample` to these test cases.

Signed-off-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
2022-08-29 07:30:10 -04:00
Flavio Ceolin
86b87ae42d samples: sof: Uses CONFIG_SCHED_CPU_MASK_PIN_ONLY
SoF pins threads to specific cores and don't need them to be executed in
multiple cores. This options allows Zephyr to do cache optimizations
during context switches.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-08-29 11:39:02 +02:00
Andy Ross
7f5e1904cc samples: Add fuzz sample
This is a simple example of fuzz test integration with Zephyr apps
that displays LLVM libfuzzer's most important feature: it's ability to
detect and explore deep and complicated call trees by exploiting
coverage information gleaned from instrumented binaries.

See README.rst and the inline comments for details

Signed-off-by: Andy Ross <andyross@google.com>
2022-08-26 11:57:46 +02:00
Aastha Grover
8a730b818b samples: kernel: Add README for simple condition variable sample.
Add README for simple conditional variable kernel sample.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-08-25 13:24:14 -05:00
Kumar Gala
3f8ba07b90 usb_device: remove Kconfig.defconfig* setting of usb device drivers
Now that usb device drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-25 08:05:54 -05:00
TLIG Dhaou
366a32bccf Samples: sensor: stm32_temp_sensor: Edit the yaml file of the sample
-Edit the yaml file of the sample in order to execute tests.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-08-24 11:35:45 +02:00
Francois Ramu
6bd5ef3137 samples: boards: stm32 serial_wakeup does not check device ready
Since the change in the PR  #49167
samples: boards: stm32: serial_wakeup: fix device usage issues
the sample should not check the "Device ready" anymore

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-23 14:44:44 +00:00
Francois Ramu
db39cd1169 samples: boards: pm on stm32 boards with serial wakeup
This commit retrains the power management testcase
tests/samples/boards/stm32/power_mgmt/serial_wakeup
to bun on stm32 boards only.
Limiting first to nucleo_wg55 and stm32l562dk targets,
more to be added.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-23 14:44:44 +00:00
Vinayak Kariappa Chettimada
e80ff5ff7a samples: Bluetooth: Refactor observer for bsim test reuse
Refactor the observer sample so that it can be reused as
bsim test to verify Extended advertisement chaining.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-23 16:21:00 +02:00
Vinayak Kariappa Chettimada
a5e62b09c4 samples: Bluetooth: Refactor broadcaster multiple for bsim test reuse
Refactor the broadcaster multiple sample so that it can be
reused as bsim test to verify Extended advertisement
chaining.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-23 16:21:00 +02:00
Vinayak Kariappa Chettimada
40115f5d62 samples: Bluetooth: Add Extended Scanning support to Observer sample
Added implementation to Observer sample so that when
Extended Advertising feature is enabled, it can receive
Extended Advertising Reports, and hence receive long AD
data from peer Extended Advertising Broadcaster Multiple
sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-23 16:21:00 +02:00
Vinayak Kariappa Chettimada
4fd7eb2193 samples: Bluetooth: Multiple Broadcaster
Added Extended Advertising multiple advertising set
broadcaster sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-08-23 16:21:00 +02:00
Carles Cufi
4c26b8518e modules: liblc3: Rename the module for consistency
The old project, liblc3codec, is not used anymore. Rename the Zephyr
module name, folders, and Kconfig options based on the new name, liblc3.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-22 20:40:59 +02:00
Gerard Marull-Paretas
a202341958 devices: constify device pointers initialized at compile time
Many device pointers are initialized at compile and never changed. This
means that the device pointer can be constified (immutable).

Automated using:

```
perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct
device *const $1= DEVICE/g' **/*.c
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-22 17:08:26 +02:00
Gerard Marull-Paretas
aa0a7dfa92 samples: task_wdt: improve device usage
When no hardware device is available, set WDT_NODE to DT_INVALID_NODE.
Also switch to a single initializer using DEVICE_DT_GET_OR_NULL so that
we can constify the pointer.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-22 17:08:26 +02:00
Francois Ramu
e195c3cad3 samples: drivers: adc running on the stm32U575 nucleo board
This change creates an overlay file so that the adc sample
is running on the nucleo_u575zi_q board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-22 10:23:53 +00:00
Piotr Pryga
34438da58e samples: Bluetooth: df: Add use of 16 bits wide IQ sampels
Change implementation of cte_recv_cb to print information about IQ
samples type. The changed code is ready for use of 8 bits and 16 bits
signed integer IQ samples. User has sample level option to enable
printing IQ samples.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-08-19 16:26:10 +02:00
Kumar Gala
de894f8aab dts: Replace DT_LABEL(node) with DT_PROP(node, label)
Toward deprecated DT_LABEL() macro, replace the handful of cases
that use DT_LABEL(node) with DT_PROP(node, label).

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-19 06:49:50 -05:00
Carlo Caione
e05c4b0a92 s2ram: Deal with system off failure
Some platforms have the possibility to cancel the powering off until the
very latest moment (for example if an IRQ is received). Deal with this
kind of failures.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-08-19 12:10:25 +02:00
Adam Zelik
65663516e1 samples: boards: nrf: ieee802154: Remove RTC user channel count setting
Setting CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT here is unnecessary
as the value needed is equal to the default.

Signed-off-by: Adam Zelik <adam.zelik@nordicsemi.no>
2022-08-19 12:08:59 +02:00
Mariusz Skamra
6219c12035 Bluetooth: csis: Expose bt_csis_generate_rsi function
The function will be used to update the RSI value. The returned value
can be later used in advertisement data for set identification. This
removes the need of specific bt_csis_advertise function so that the user
can call the API to generate new RSI once needed (e.g. on RPA change).
This allows the user to manage the advertisement data to fit it's needs.

< HCI Command: LE Set Extended Advertising Enable (0x08|0x0039) plen 6
        Extended advertising: Disabled (0x00)
        Number of sets: 1 (0x01)
        Entry 0
          Handle: 0x00
          Duration: 0 ms (0x00)
          Max ext adv events: 0
> HCI Event: Command Complete (0x0e) plen 4
      LE Set Extended Advertising Enable (0x08|0x0039) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Extended Advertising Data (0x08|0x0037) plen 33
        Handle: 0x00
        Operation: Complete extended advertising data (0x03)
        Fragment preference: Minimize fragmentation (0x01)
        Data length: 0x1d
        Flags: 0x06
          LE General Discoverable Mode
          BR/EDR Not Supported
        Unknown EIR field 0x2e: 16e61d64dc45
        Name (complete): audio test shell
> HCI Event: Command Complete (0x0e) plen 4
      LE Set Extended Advertising Data (0x08|0x0037) ncmd 1
	Status: Success (0x00)
< HCI Command: LE Set Advertising Set Random Address (0x08|0x0035) plen 7
        Advertising handle: 0x00
        Advertising random address: 4E:21:29:F8:94:93 (Resolvable)
> HCI Event: Command Complete (0x0e) plen 4
      LE Set Advertising Set Random Address (0x08|0x0035) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Extended Advertising Enable (0x08|0x0039) plen 6
        Extended advertising: Enabled (0x01)
        Number of sets: 1 (0x01)
        Entry 0
          Handle: 0x00
          Duration: 0 ms (0x00)
          Max ext adv events: 0
> HCI Event: Command Complete (0x0e) plen 4
      LE Set Extended Advertising Enable (0x08|0x0039) ncmd 1
        Status: Success (0x00)

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-08-19 12:07:31 +02:00
Gerard Marull-Paretas
e0125d04af devices: constify statically initialized device pointers
It is frequent to find variable definitions like this:

```c
static const struct device *dev = DEVICE_DT_GET(...)
```

That is, module level variables that are statically initialized with a
device reference. Such value is, in most cases, never changed meaning
the variable can also be declared as const (immutable). This patch
constifies all such cases.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
dee062bf0b samples: usb: audio: initialize devices at compile time
Initialize devices at compile time, allowing to constify device pointer.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
b84da98b6e samples: net: wpan_serial: initialize devices at compile time
Initialize devices at compile time so that device pointers can be
constified.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
a74ee417bd samples: net: gsm_modem: initialize devices at compile time
Initialize devices at compile time so that device pointers can be
constified.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
87d3bb857a samples: ipc: initialize devices at compile time
Initialize devices at compile time so that device pointers can be
constified.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
af61ed61f5 samples: drivers: ps2: fix test issues
- Test effectively requires a microchip,xec-ps2, but it was "optional"
  even though the test continued setting up a callback that makes use of
  the device.
- Improve test filtering so that it requires a valid compatible to be
  enabled (allows to delete redundant ps2 tag)
- Initialize device at compile time (allowing to constify its pointer)

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
14968b4f0f samples: drivers: peci: improve test
- Require peci-0 alias (test without it is pointless)
- Initialize peci device at compile time
- Filter depending on alias
- Remove redundant peci tag

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
86b5517f99 samples: drivers: espi: initialize devices at compile time
Initialize devices at compile time so that device pointers can be
constified.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
e4e85d3fa2 samples: boards: stm32: usbc: initialize devices at compile time
Initialize ADC device at compile time, allowing to constify the device
pointer.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
a11848fc32 samples: boards: stm32: serial_wakeup: fix device usage issues
Device ready check was wrong (< 0 ?!), so fix it. Also drop static
qualifier for the device variable (not needed) and initialize at
definition time.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
7fc33f9d47 samples: boards: reel_board: mesh_badge: initialize epd at compile time
Initialize epd device at compile time, so we can constify epd device
pointer.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Gerard Marull-Paretas
f1442c8bcc samples: boards: 96b_argonkey: sensor: init device at compile time
Initialize device at compile time so that device pointer can be
constified.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Henrik Brix Andersen
590cd5cb72 drivers: can: rename can_state enumerations
Rename the can_state enumerations to contain the word STATE to make their
meaning more clear:
- CAN_ERROR_ACTIVE  => CAN_STATE_ERROR_ACTIVE
- CAN_ERROR_WARNING => CAN_STATE_ERROR_WARNING
- CAN_ERROR_PASSIVE => CAN_STATE_ERROR_PASSIVE
- CAN_BUS_OFF       => CAN_STATE_BUS_OFF

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 21:41:11 +00:00
Hu Zhenyu
424668f5a7 tests: mec15xxevb_assy6853: Enlarge the IDLE_STACK_SIZE from 256 to 512
The test case "samples/boards/mec15xxevb_assy6853/power_management" could
always pass until commit 5f60164 was merged in. This patch changes the sem
take timeout value from 50ms to forever of the log thread, it will make the
idle thread run longer and takes more stack memory. Analyzed the coredump
of the failed test case, it can be found that the test case stucks at
z_idle_stacks. The test case used default CONFIG_IDLE_STACK_SIZE = 256 in
kernel/Kconfig, now we increase the value to 512 in prj.conf for this test
only. With this change, the test case can pass with the commit of 5f60164.
Fixes #47987

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-08-18 21:38:56 +00:00
Daniel Leung
ee40548788 samples: condvar: extra stack space for custom threads
When coverage is enabled, some boards require more stack space
for the custom threads created in main(). Since this "samples"
already has CONFIG_TEST enabled, we can pad the stack size
with CONFIG_TEST_EXTRA_STACK_SIZE.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-08-18 17:23:18 +02:00
Emil Gydesen
a301afca93 samples: Bluetooth: Restrict Audio TX length to SDU for unicast audio
Restrict the unicast audio samples to not send more data than
the configured SDU.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-08-18 12:33:44 +02:00
Måns Nilsson
1acd4bf422 samples: add support for optimized CMSIS-NN kernels
Updates tflite-micro sample hello_world to use CMSIS-NN optimized
kernels. This is also documented in the corresponding README file.

Signed-off-by: Måns Nilsson <mans.nilsson@arm.com>
2022-08-18 12:26:51 +02:00
Henrik Brix Andersen
27eb12ed48 net: socketcan: decouple SocketCAN and CAN controller headers
Decouple the zephyr/net/socketcan.h and zephyr/drivers/can.h header files
by moving the SocketCAN utilities to their own header.

This is preparation for including the SocketCAN types defined in
socketcan.h in a native posix (Linux) SocketCAN driver context without name
clashes.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 10:19:29 +02:00
Henrik Brix Andersen
d1d48e8304 net: socketcan: rename SocketCAN header from socket_can.h to socketcan.h
Rename the SocketCAN header from socket_can.h to socketcan.h to better
match the naming of the functionality.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 10:19:29 +02:00
Henrik Brix Andersen
b40a8cb9fd net: socket: can: rename utility functions
Rename the SocketCAN utility functions to reflect the new naming of the CAN
controller API and SocketCAN API data types.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 10:19:29 +02:00
Henrik Brix Andersen
13c75417ba drivers: can: remove z prefix from public CAN API types
Remove the "z" prefix from the public CAN controller API types as this
makes them appear as internal APIs.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 10:19:29 +02:00
Henrik Brix Andersen
d159947443 net: socket: can: prepend SocketCAN data types with socketcan
Rename the SocketCAN data types to "socketcan_*" in preparation of renaming
the low-level CAN controller API data types.

This breaks the naming compatibility with the similar SocketCAN data types
from the Linux kernel, but Zephyr and Linux SocketCAN are not 100%
compatible anyways (only the structure fields are compatible, extended
functionality such filtering, error reporting etc. are not).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 10:19:29 +02:00
Maureen Helm
4dfc43e296 samples: sensor: Fix displayed gyro units in lsm6dso sample
The sensor driver API specifies gyroscope units in radians/second, not
degrees/second. Fix the lsm6dso sample application printk string to
display the correct units.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-08-17 17:06:23 +02:00
Katarzyna Giadla
eae01f0fc5 samples: tests: Rename duplicated testcases
Names of some testcases are duplicated in another files.
This change rename duplicated testcases.

Signed-off-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
2022-08-17 12:11:00 +02:00
Marcin Niestroj
af37c09440 modules: mbedtls: convert mbedTLS log levels to Zephyr log levels
So far LOG_DBG() was used inside debug hook for mbedTLS library. This meant
that it was hard to distinct log messages by simply looking at the log
level number, even though Zephyr logging subsystem supports colorful logs
depending on log level.

Choose an appropriate Zephyr LOG_*() macro based on log level coming from
mbedTLS library. Remove log level number from formatted log messages, as it
is now redundant.

One controversial thing about this change is that mbedTLS' "2 State change"
log level is mapped to Zephyr's "warning" log level. Those are not really
warnings in real life, but rather informational messages. However, using
"warning" log level for those allows to clearly distinguish between "2
State change" and "3 Informational" debug messages from mbedTLS.
Additionally, mbedTLS debug message implementation does not seem to be safe
to use in production, so keeping in mind MBEDTLS_DEBUG will be enabled just
during debugging phase, printing "2 State change" logs as warnings should
not be a big deal.

Set default MBEDTLS_DEBUG_LEVEL value depending on selected Zephyr logging
module level, so that only single option needs to be configured in
application project.

Remove prompt for MBEDTLS_DEBUG_LEVEL, so that interactively (e.g. via
menuconfig) adjusting MBEDTLS_LOG_LEVEL will always result in automatically
updating MBEDTLS_DEBUG_LEVEL option. This is to prevent so called "stuck
symbol syndrome".

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-08-17 12:03:52 +02:00
Tim Cooijmans
ea80d9e1d7 samples: drivers: lora: Add public_network and iq_inverted config
Explicitly set the newly add public_network and iq_inverted settings
in lora_modem_config in the lora send and receive samples.

Signed-off-by: Tim Cooijmans <timcooijmans@gmail.com>
2022-08-16 18:06:18 +02:00
Felipe Neves
d94dc98fd6 soc: xtensa: esp32_net: fixes include paths
that were changed with zephyr prefix  after rebasing.
Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Felipe Neves
d808fa2c6d samples: drivers: ipm_esp32: add return
when ipm driver initialization fails.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Felipe Neves
a5379b71f8 drivers: ipm: ipm_esp32: remove hardcoded nodelabels
by making shared memory property  of IPM binding.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Felipe Neves
0e17b8307a samples: drivers: ipm: added esp32 sample
code to demonstrate the utilization of assymetric
dual core infrastructure based on soft-IPM implementation.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Manuel Arguelles
7f26c1c25c tests: samples: revert timeout change for FVP BaseR
Partially revert commit 0028e9733295316d152eba07bf56677d83f4b1b5.
Timeout for tests/posix/common must be still increased for slow
platforms (previously was 120 sec).

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-08-16 15:51:38 +02:00
Kumar Gala
1ddcb3ab02 ethernet: remove defconfig/proj setting of ethernet drivers
Now that ethernet drivers are enabled based on devicetree we can
remove any cases of them getting enabled by proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-15 14:32:45 +02:00
Thomas Stranger
daa477f75b samples/tests: w1: remove overlays after moving to 'select bus'
Because 1-wire drivers no longer use depends on serial/i2c, but select
the Kconfig for the bus they depend on, several overlays can be removed.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-08-14 09:08:19 -05:00
Kumar Gala
632069b3de video: remove defconfig/proj setting of video drivers
Now that video drivers are enabled based on devicetree we can
remove any cases of them getting enabled by proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-14 09:05:36 -05:00
Kumar Gala
d8e6aed92f audio: remove defconfig/proj setting of audio drivers
Now that audio drivers are enabled based on devicetree we can
remove any cases of them getting enabled by proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-14 09:05:09 -05:00
Kumar Gala
8eead50071 manifest: Update lvgl
Update lvgl for devicetree updates to use zephyr,keyboard-scan.

Remove Kconfig symbol (LV_Z_POINTER_KSCAN_DEV_NAME) that don't exist
anymore since these values are coming from devicetree.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 17:54:03 -05:00
Kumar Gala
5ac8fca9cb kscan: Introduce zephyr,keyboard-scan chosen prop
Introduce zephyr,keyboard-scan chosen node property to point to the
node that implements the default KSCAN device.  This is similar to
the zephyr,display property.

We switch over the samples to utilize the new property instead of
kscan0 alias.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 17:54:03 -05:00
Kumar Gala
5281b58d29 samples: espi: disable SAF testing
espi saf node is not enabled in mec15xxevb_assy6853.dts so the sample
will fail to build.  For now disable CONFIG_ESPI_SAF to get the sample
to build.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 17:59:05 +02:00
Kumar Gala
9e8fb08c0f eeprom: remove defconfig/proj setting of eeprom drivers
Now that eeprom drivers are enabled based on devicetree we can
remove any cases of them getting enabled by proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 11:34:16 +02:00
Erwan Gouriou
f5378424f7 samples: boards: stm32: Add a serial wakeup sample
Add a sample to demonstrate use of (LP)U(S)ART with wakeup capability
This sample is provided with 2 configurations
- nucleo_wb55rg: Basic configuration that could be exercised in CI
- stm32l562e_dk: "Full feature" configuration that require some set up
configuration (be able to display console from lpuart) and allows to
achieve lowest power consumption.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-08-12 08:51:38 +01:00
Johann Fischer
9a1b990006 modbus: remove label property from devicetree overlays
Remove label property from devicetree overlays.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-08-11 09:39:24 -07:00
Johann Fischer
46a0e5347d modbus: remove the use of DT_INST_LABEL and DT_PROP(inst, label)
Although it is possible to simply use the interface number,
it has proven convenient to use the names for the interfaces
in the samples.

Migrate to DEVICE_DT_NAME().

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-08-11 09:39:24 -07:00
Francois Ramu
8ec02948c5 samples: drivers: watchdog application running on stm32 boards
Adding configuration to run the watchdog sample application
on the stm32 boards through 2 common overlay files:
one for running on the IWDG one for WWDG, if compatible.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-08-11 17:47:05 +02:00
Kumar Gala
0e1a7e0241 drivers: led: Remove unnecessary Kconfig settings
Having the LED device enabled in devicetree will now get the driver
enabled by default when CONFIG_LED=y is set.  So we can remove
setting driver enabling Kconfig values in various .conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-11 17:46:43 +02:00
Kumar Gala
6de4cc5293 samples: i2s: echo: exclude litex_vexriscv
The litex platform has its own sample and echo sample does not
build on litex_vexriscv so exclude it.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-11 12:20:33 +02:00
Hang Fan
7bc54c168f samples: bluetooth: set available contexts for unicast audio server
set available contexts for unicast audio server

Signed-off-by: Hang Fan <fanhang@xiaomi.com>
2022-08-10 16:10:48 +02:00
Krzysztof Frydryk
8dd57467cc drivers: dai: Enable Zephyr runtime power mgmt in Intel SSP driver
Enable Zephyr device runtime power management mechanisms in Intel SSP
driver. This allows Zephyr to track usage reference for power
domain gating.

Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
2022-08-10 11:58:45 +02:00
Gerard Marull-Paretas
e2e9155dd5 boards: remove unused tag from supported list
All IEEE 802.15.4 tests/samples use DT-based filter now, so the
ieee802154 tag can be deleted.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Gerard Marull-Paretas
b74a22924e net: lib: config: remove NET_CONFIG_IEEE802154_DEV_NAME
Remove NET_CONFIG_IEEE802154_DEV_NAME in favor of DT based choice using
zephyr,ieee802154.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Gerard Marull-Paretas
b27f89342f samples: net: sockets: echo_(client|server): remove IEEE802154_DEV_NAME
Remove usage of CONFIG_NET_CONFIG_IEEE802154_DEV_NAME as it now works
with DT based choice.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Gerard Marull-Paretas
5b224055ba samples: net: openthread: coprocessor: remove Kconfig IEEE802154 choice
Remove Kconfig choice for IEEE802154. In this case, there's no in-tree
board, so there's no overlay or board to be updated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Gerard Marull-Paretas
ec05fa81ff samples: net: wpan(usb|serial): filter based on zephyr,ieee802154
Rely on zephyr,ieee802154 choice being enabled for the samples.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Gerard Marull-Paretas
f0dab27dd8 samples: net: wpan_serial: use zephyr,ieee802154
Use the choisen zephyr,ieee802154 from DT as
CONFIG_NET_CONFIG_IEEE802154_DEV_NAME is being phased out.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Gerard Marull-Paretas
96c33ad2cb samples: net: wpanusb: use zephyr,ieee802154
Use the choisen zephyr,ieee802154 from DT as
CONFIG_NET_CONFIG_IEEE802154_DEV_NAME is being phased out.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Robert Lubos
2091b34820 net: zperf: Extract zperf into library
Make a library out of the zperf shell sample. This makes to enable the
module in any application, not only the dedicated sample.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-10 11:15:21 +02:00
Joakim Andersson
c51505f661 modules: tfm: Exclude non-secure TF-M application from build
Exclude the non-secure TF-M application from being built by TF-M.
This also stops the building of the tfm_ns_api library that we were
linking against.
This library is defined by the tf-m regression tests.
Add the installed interface source files exported by the TF-M build
system compile them in the zephyr build system.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-08-09 13:59:02 +02:00
Daniel DeGrasse
b896826cab samples: gptp: increase number of ethernet RX buffers for RT1050/1060
RT1050 and RT1060 were selecting an invalid number of RX/TX buffers
(below the allowed default). Raise this value for the gptp sample.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-09 12:29:18 +02:00
Daniel DeGrasse
21d9ffaf66 samples: zperf: enable hardware acceleration for RT1050/RT1060
enable hardware acceleration of ethernet checksum calculation for
RT1050 and RT1060

Performance change (as tested with iperf on RT1050)
TCP RX: 50.6Mbps->52.4Mbps
TCP TX: 49.5Mbps->50.2Mbps

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-09 12:29:18 +02:00
Daniel DeGrasse
929db1ba65 samples: zperf: use systick timer for RT1050
Use systick timer for RT1050 to provide better performance than low
frequency GPT timer

Performance change (as tested with iperf on RT1050)
TCP RX: 49.1Mbps->50.8Mbps
TCP TX: 40.8Mbps->46.2Mbps

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-08-09 12:29:18 +02:00
Kumar Gala
63769bd1c1 drivers: display: Remove unnecessary Kconfig settings
Have the display enabled in devicetree will now get the driver
enabled by default when CONFIG_DISPLAY=y is set.  So we can remove
setting driver enabling Kconfig values in various .conf and
defconfig files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-09 12:27:44 +02:00
Maureen Helm
17437f9dc5 samples: sensor: Remove adxl372 accelerometer sample
The accel_polling sample application supports the adxl372 driver, so we
can remove this redundant driver-specific sample.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-08-09 12:27:07 +02:00
Maureen Helm
5306db05af samples: sensor: Remove adxl362 accelerometer sample
The accel_polling sample application supports the adxl362 driver, so we
can remove this redundant driver-specific sample.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-08-09 12:27:07 +02:00
Glauber Maroto Ferreira
7a58522b54 esp32: counter: samples: fix build config
Remove unnecessary build config and rename
Kconfig build variable.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-08-08 13:00:38 -05:00
Georgios Vasilakis
eeb970ebba samples: tfm_integration: tfm_regression_test Default to isol level 2
This defaults the TF-M regression tests to isolation level 2.
It is set in order to showcase a more secure configuration
by default. The default behavior of the sample is changed in
the prj.conf file. The yaml file which includes the test cases
enables testing for the three configurations: the library mode,
the IPC mode isolation level 1 and the IPC mode isolation level 2.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
2022-08-08 14:17:53 +02:00
Pirun Lee
5d1e59b984 bluetooth: ots: fix stack overflow
Default size of BT_RX_STACK_SIZE 1024 is not enough for this sample.
Increase it to prevent stack overflow.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
2022-08-08 14:16:26 +02:00
Kumar Gala
6986cb5b7d samples: nrf53_sync_rtc: drop IPM support
Nordic platform utilizes mailbox so remove the IPM support
from this sample.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-08 10:52:10 +02:00
Kumar Gala
daf7609cb7 boards: arm: nrf5340: Drop RPMSG service configuration
The preferred ipc service on NRF platforms is ipc_service.  Remove
configuration for rpmsg_service and just utilize ipc_service.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-08 10:41:55 +02:00
Reto Schneider
1c1801ee7f drivers: eeprom: Fix format strings
Building for native_posix_64 exposes faulty format strings.

Changes in this commit also ensure that the shell code gets built in CI,
thus this kind of problem can not be introduced again later on.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-08-07 14:29:36 +01:00
Kumar Gala
aaaed30071 samples: openamp_performance: remove sample
Remove sample as its only supported on one platform, should really
utilize the ipc subsystem, and so forth.

For now its better to drop it and when we have something better we
can add that.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-05 15:16:47 +02:00
Gerard Marull-Paretas
61361e870b kconfig: remove redundant IEEE 802.15.4 defaults or selections
All IEEE 802.15.4 drivers are now automatically enabled if they are
'okay' in DT and all of its dependencies are 'y', including
CONFIG_IEEE802154. This means individual driver enablement is not
necessary anymore in Kconfig.defconfig files or samples/tests. Boards
need to still make sure any dependencies are enabled, e.g. SPI bus in
some cases.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-05 12:56:47 +02:00
Gerard Marull-Paretas
cb448591ed samples: modules: tflite-micro: magic_wand: add missing CONFIG_I2C=y
The magic_want sample requires I2C bus to be enabled (used sensor is
connected to the bus).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-05 12:55:51 +02:00
Gerard Marull-Paretas
c26d7259f8 samples: drivers: lcd_cyclonev_socdk: add missing CONFIG_I2C=y
The sample relies on using I2C API, so it must enable CONFIG_I2C.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-05 12:55:51 +02:00
TOKITA Hiroshi
4c326ea5da samples: sensor: accel_polling: Correct integration platform name
bl5340_dvk is a non-exists target.
I fix it to bl5340_dvk_cpuapp to fix the CI error.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-08-05 00:00:09 +09:00
TOKITA Hiroshi
9179350c40 samples: sensor: Add 3-Axis accelerometer polling sample
Add a polling sample for 3-Axis accelerometers.
This sample demonstrates how to data fetch and print to the console.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-08-04 09:06:57 -05:00
Kumar Gala
e6357ae160 samples: openamp: Convert to use DEVICE_DT_GET
Update sample to use DEVICE_DT_GET to remove usage of
device_get_binding.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-04 08:38:54 -05:00
Troels Nilsson
745cc6d099 samples: bluetooth: Update central_multilink to support ext. adv.
Small update to have the central_multilink sample work correctly
with extended advertising (when enabled)

Signed-off-by: Troels Nilsson <trnn@demant.com>
2022-08-04 13:45:17 +02:00
Juha Heiskanen
43c8bfb3e5 samples: net: lwm2m_client: Updated RD client event handler
Added missed LWM2M_RD_CLIENT_EVENT_ENGINE_SUSPENDED event handler

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-08-04 13:42:55 +02:00
Gerard Marull-Paretas
e6a345f967 drivers: ieee802154: uart_pipe: make driver DT-based
Use Devicetree to describe the UART UPIPE IEEE 802.15.4 driver. This
allows to remove usage of IEEE802154_UPIPE_DRV_NAME in preparation for
the removal of NET_CONFIG_IEEE802154_DEV_NAME.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-04 13:25:35 +02:00
Aastha Grover
5d23d4f4a6 samples: kernel: metairq: Update ReadMe
Update ReadMe for metairq sample application.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-08-03 14:00:22 -05:00
Gerard Marull-Paretas
44250fe3d3 soc: arch: synopsys: move timer0/1 IRQ information to DT
timer0/1 IRQ information was hardcoded in soc.h, however, Devicetree is
nowadays a better place to describe hardware. Note that I have followed
existing upstream Linux code to do these changes.

Ref.
- https://elixir.bootlin.com/linux/latest/source/arch/arc/boot/dts/
  hsdk.dts
- https://elixir.bootlin.com/linux/latest/source/Documentation/
  devicetree/bindings/timer/snps,arc-timer.txt

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-03 07:46:14 -04:00
Anas Nashif
31e0d86484 samples: do not use CONFIG_TEST_EXTRA_STACK_SIZE
samples should not use CONFIG_TEST_EXTRA_STACK_SIZE, instead, they
should set the recommended stack size directly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-08-03 11:22:20 +02:00
Veijo Pesonen
ebaf501de9 samples: net: lwm2m: overlay for interop testing
For further details about interoperability testing please see

   * https://lwm2m.openmobilealliance.org/ - Test V1.1 12-Sep-2019

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-08-03 11:20:50 +02:00
Robert Lubos
7a626bfd2c samples: net: sockets: packet: Wait for the interface to come up
Make sure that the network interface is up before running the sample.
Otherwise, the sample could stop rightaway due to send failure.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-03 11:11:55 +02:00
Robert Lubos
189964ae1b samples: net: sockets: packet: Make sure all sockets are closed on exit
First off, fix the FD check when closing a socket - currently not all
sockets were closed on exit (0 is also a valid file descriptor).

Second issue is the use of k_thread_abort() on tx/rx threads. The
receving thread was blocked in recv(), and aborting its thread prevented
it from ending gracefully (i. e. the socket mutex allocated in recv()
was not released as the function did not exit properly). This resulted
on a consecutive `close()` call lock. Fix this by setting a timeout on a
receiving socket, and instead of aborting threads allowing them to exit
gracefully.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-03 11:11:55 +02:00
Fabio Baltieri
def230187b test: fix more legacy #include paths
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-02 16:41:41 +01:00
Dominik Ermel
63c2347207 samples/nvs: Switch flash_area_offset to use STORAGE_NODE_LABEL
The sample has been defining STORAGE_NODE_LABEL to be used
to point to storage partition, but flash_area_offset has still
been using "storage" directly.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-08-02 15:18:19 +02:00
Piotr Pryga
a0a8a12642 Bluetooth: hci: Use extended VS fatal error in hci and hci_rpmsg sample
Provide common helper functions to create extended extended Zephyr
Fatal Error functionality in HCI common code.

Use the implementation in hci_rpmsg sample.

The sample didn't provide an information about Controllers assert
or system fatal error to an application code while run with nRF5340
SoC. The goal for hci_rpmsg sample change is to enhance user experience
for conformance testing of the Bluetooth Controller while executed with
nRF5340.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-08-02 13:53:32 +02:00
Emil Gydesen
404d0c7a6e samples: Bluetooth: Unicast audio server set location
The unicast audio server sample did not set a location value,
and would report an invalid value of 0 when read.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-08-01 18:11:26 +01:00
Mariusz Skamra
acb9da2ba0 Bluetooth: samples: Add HAP Hearing Aid sample application
This adds sample application that can be used as reference
implementation and for HAP qualification purposes.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-08-01 18:10:34 +01:00
Hake Huang
cedc99b8ed samples: application_development: remove the code_relocation sample
covert this sample to a test cases

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-08-01 18:09:28 +01:00
Benjamin Björnsson
e172b1dbda debug: gdbstub: Move to DTS for uart device
Move from using Kconfig GDBSTUB_SERIAL_BACKEND_NAME to a devicetree
chosen property ("zephyr,gdbstub-uart"). This is similar to a number
of other functions like "zephyr,shell-uart" or "zephyr,bt-uart".

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-08-01 09:09:45 -07:00
Kumar Gala
346ac6b896 samples: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from samples.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-01 17:59:32 +02:00
Caspar Friedrich
f2a7b88ef5 samples: Add 1-Wire scanner example
This adds a simple example to show basic 1-Wire bus operations

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2022-08-01 10:33:10 +02:00
Dominik Ermel
21f1c54089 samples/soc_flash_nrf: Fix flash device reference
Sample has been referencing flash area by its label, but flash device
by chosen `zephyr,flash-controller`, while flash area does not have
to be positioned on a device selected by the chosen directive.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-07-30 08:26:21 -05:00
Pieter De Gendt
7256a19056 samples: modules: nanopb: Limit the integration platforms
Reduce the number of build tests by explicitly setting the
integrations platforms.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-07-29 13:35:48 -04:00
Kumar Gala
2014c59d20 clock_control: remove defconfig/proj setting of clock control drivers
Now that clock control drivers are enabled based on devicetree we
can remove any cases of them getting enabled by *defconfig and
proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-29 14:12:12 +02:00
Kumar Gala
930f56baef samples: tracing: Add filter for uart tests
Add a filter to make sure devicetree chosen node has
property 'zephyr,tracing-uart' set in it.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-29 05:57:54 -04:00
Kumar Gala
3c9932ddf8 samples: tracing: make example in readme work
Add mps2_an521.overlay so that the example in the README.txt will
actually build.  Update README.txt to document needing to have
'zephyr,tracing-uart' property set under chosen node in devicetree.

Fixes #48416

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-29 05:57:54 -04:00
Aastha Grover
66786ed612 samples: Add missing sample.yaml
Adding the yaml files to sub-applications to avoid bitrot and
specifying the main applications with remote harness instead of
build_only.

Fixes #47613

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-07-28 20:51:14 +02:00
Kumar Gala
add2b28a3b samples: 96b_argonkey: Have README match actual code
Update README.rst code snippet to match what the actual code
was doing.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-28 08:50:27 -05:00
Emil Gydesen
d4b132a059 Bluetooth: Audio: Unicast client read available contexts
Read the available contexts during discovery and subscribe
for notifications.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-28 08:29:29 +02:00
Francois Ramu
8aa3960874 samples: drivers flash add a test case for stm32h7 octospi
This add a removes the SPI config
for the stm32H735 and stm32H7b3 disco boards
when testing the octoSPI.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-07-27 18:46:25 +02:00
Kumar Gala
fb9c241530 spi: remove defconfig/proj setting of SPI drivers
Now that SPI drivers are enabled based on devicetree we can remove
any cases of them getting enabled by *defconfig and proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-27 09:49:00 +02:00
Håvard Reierstad
a68e52d848 samples: bluetooth: mesh_provisioner: push button to provision
In order to keep a flashed sample from provisioning forever, the sample
requires the user to press a button to provision a detected device.

The feature is only enabled if the board has a push button connected
via GPIO.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2022-07-27 09:46:39 +02:00
Dominik Ermel
3d64a0df6a samples: reel_board: mesh_badge: Select flash controller by area
Flash controller has been specified by `zephyr,flash-controller`
chosen DTS, which does not have to be the same controller as
a flash area exists on.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-07-26 14:10:16 -05:00
Alexandre Bourdiol
2495a06f1a samples: subsys: nvs: disco_l475_iot1: keep quadspi node
Due to introduction of alias spi-flash0
sha1: 64fbbd9a44
it is necessary to keep quadspi node
Instead of removing quadspi node, remove storage_partition node

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-26 14:34:17 +00:00
Kumar Gala
46850a12d3 samples: lwm2m_client: Fix building on native_posix
Sample code uses GPIO api's but wasn't enabling CONFIG_GPIO.  So
on native_posix this would cause the sample to not build.  Add
CONFIG_GPIO=y to prj.conf to fix this.

Fixes #48306

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-26 14:33:18 +00:00
Anas Nashif
ae8c4a934e samples: move sof under samples/modules
This is not a sample of an audio subsystem in zephyr, it is a sample
that completely depends on sof and its audio support.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-25 14:41:37 -04:00
Kumar Gala
5d36157c7c sensors: Remove unnecessary Kconfig setting of sensors
Sensor Kconfig sybmols should be enabled if CONFIG_SENSOR=y
and the devicetree node for the sensor is enabled.  We can
remove explicitly enabling specific sensor drivers in .conf
files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-25 15:18:56 +02:00
Carlo Caione
780ee52bde samples: Add missing READMEs
Add some missing README.rst

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-25 15:17:48 +02:00
Carlo Caione
ecdf224766 samples: Specify the remote harness
Instead of 'build_only'.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-25 15:17:48 +02:00
Carlo Caione
badafa59c5 samples: Add missing sample.yaml
Some samples are missing the sample.yaml file.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-25 15:17:48 +02:00
Kumar Gala
ef964ca4e1 samples: th02: simplify sample and use DEVICE_DT_GET_ONE
Update sample to use DEVICE_DT_GET_ONE to remove usage of
device_get_binding.  Additionally simplfy the sample to
just access a single TH02 device.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-25 09:39:51 +02:00
Benjamin Björnsson
e81c0b07e2 samples: subsys: mgmt: updatehub: Update sample to use DEVICE_DT_GET_ONE
Update sample to use DEVICE_DT_GET_ONE in order to remove DT_INST
usage.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-24 14:33:15 -05:00
Benjamin Björnsson
6ede1da434 samples: drivers: led_pwm: Update driver to remove DEVICE_DT_GET
Update driver to use DEVICE_DT_GET and remove usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-23 11:39:11 -05:00
Kumar Gala
6b5ae7799a samples: fpga: Convert to test to use use DEVICE_DT_GET
Update sample to use DEVICE_DT_GET to remove usage of
device_get_binding.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-23 09:28:40 -05:00
Kumar Gala
f2bcc794cd mgmt: osdp: Move to DTS for uart device
Move from using Kconfig OSDP_UART_DEV_NAME to a devicetree
chosen property ("zephyr,osdp-uart").  This is similar to a number
of other functions like "zephyr,shell-uart" or "zephyr,bt-uart".

Changed the integration platform for the osdp samples to
stm32_min_dev_black as it already has zephyr,osdp-uart set.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-23 09:25:23 -05:00
Benjamin Björnsson
84649d2d83 samples: drivers: spi_flash: Update sample to use alias
Simplify driver by using DT_ALIAS instead of DT_LABEL.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-22 19:15:13 +00:00
Carlo Caione
d7f24b1743 sample: s2ram: Use harness remote
The sample requires a manual user interaction. Make CI skipping that by
requiring a remote harness (the user).

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-22 14:04:08 +00:00
Benjamin Björnsson
45cecadb35 samples: net: gsm_modem: Update sample to remove use of DT_INST
Simplify sample by removing usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 17:26:44 -05:00
Francois Ramu
31b9a6acc6 samples: usb: audio application uses static dev declaration
This change the applications to get device from the
compatible of the zephyr_udc0 node.
It is defined by the DTC_OVERLAY_FILE="app.overlay"

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-07-21 13:24:24 -05:00
Kumar Gala
894e8814af drivers: serial: rv32m1_lpuart: Remove unused Kconfig symbols
The driver has be DT_INST based for a while so the Kconfig
symbols CONFIG_UART_RV32M1_LPUART_<n> aren't used.  So lets
remove them.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-21 16:40:28 +00:00
Benjamin Björnsson
c8ba22f561 samples: sensor_batch_processing: Update sample to remove DT_INST
Update sample to use DT_COMPAT_GET_ANY_STATUS_OKAY in order to remove
DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 14:01:55 +00:00
Kumar Gala
6cfaa9c381 samples: crypto: Convert to use Update sample to use DEVICE_DT_GET_ONE
Update sample to use DEVICE_DT_GET_ONE to remove usage of
device_get_binding if the device is devicetree based.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-21 14:00:38 +00:00
Benjamin Björnsson
5ad251b8d2 samples: sensor: tmp116: Update sample to remove use of DT_INST
Simplify sample by removing usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 08:28:29 -05:00
Benjamin Björnsson
706949cf71 samples: drivers: espi: Convert to use DT_NODELABEL
Convert to use DT_NODELABEL to remove usage of DT_INST in sample.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 06:06:02 -05:00
Benjamin Björnsson
2bed3950c3 samples: drivers: ht16k33: Update sample to remove use of DT_INST
Simplify sample by removing usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 05:31:57 -05:00
Fabio Baltieri
dd24c61a4a samples: fix shell_module Kconfig menu name
Shell sample has the wrong mainmenu name, rename it one that makes
sense.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-07-20 09:41:32 -05:00
Kumar Gala
60d3d49405 samples: boards: arc_secure_services: Remove empty prj.conf
We get the following error message from twister:

ERROR   - samples/boards/arc_secure_services/prj.conf:
          can't find: cannot mmap an empty file

Fix by removing the empty file.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-20 09:29:11 -05:00
Thomas Stranger
0cb7a1edcd samples/drivers/dac: add overlay file for nucleo_u575zi_q
Add overlayfile for the dac sample to use dac1_out1 on pa4.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-20 11:08:42 +02:00
Kumar Gala
dcfcd05ed3 tracing: Move to DTS for uart device
Move from using Kconfig TRACING_BACKEND_UART_NAME to a devicetree
chosen property ("zephyr,tracing-uart").  This is similar to a number
of other functions like "zephyr,shell-uart" or "zephyr,bt-uart".

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 16:00:47 -07:00
Benjamin Björnsson
93f71d6a8a samples: boards: nrf: battery: Remove uneccesary if-def
Remove if-def since io-channels is a required property of
the voltage-devider compatible so the else case won't happen.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 22:54:50 +00:00
Kumar Gala
c77035c61e samples: module: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from samples.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 10:00:36 -07:00
Kumar Gala
6f5e75ba31 samples: usb: dfu: Fix building of sample on a few platforms
Fix building this sample on bl5340_dvk_cpuapp_ns and
pinnacle_100_dvk.  On these boards the NORDIC_QSPI_NOR
driver needs to be enabled for the sample to build.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 15:29:41 +00:00
Benjamin Björnsson
1f630f838a samples: drivers: watchdog: Update sample to use alias
Simplify sample by using DT_ALIAS to make the sample more generic.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 09:28:43 -05:00
Benjamin Björnsson
f047816f0f samples: drivers: watchdog: Add alias to overlays
Add alias to overlays for boards that switch the watchdog to be
used while running this sample.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 09:28:43 -05:00
Benjamin Björnsson
ab4a926c27 boards: Add alias to boards with watchdog enabled
Add alias to boards with watchdog enabled to facilitate the
move of samples/drivers/watchdog to use DT_ALIAS.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 09:28:43 -05:00
Benjamin Björnsson
55d47d341a samples: drivers: watchdog: Remove uneccesary overlays
These watchdogs are already enabled in device tree.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 09:28:43 -05:00
Kumar Gala
88021ecd47 samples: sensors: Remove label property from devicetree overlays
Label properties are not required

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 08:23:35 -05:00
Kumar Gala
a97765706a samples: boards: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from samples.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 12:32:14 +00:00
Emil Gydesen
df75bfd8f6 Bluetooth: Audio: Add PACS location read for unicast client
The unicast client will now read the PACS location value
during the discovery procedure, as well as subscribing to
it.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-19 12:27:00 +00:00
Henrik Brix Andersen
7da63e1551 samples: net: sockets: can: add console harness configuration
Add a console harness for validating the output from the SocketCAN sample.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-19 10:31:10 +02:00
Henrik Brix Andersen
dd96b86835 net: samples: sockets: can: add support for native_posix
Add support for running the SocketCAN sample on
native_posix/native_posix_64 using the CAN loopback interface.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-19 10:31:10 +02:00
Kumar Gala
a8c400d1a5 samples: net: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from samples.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 10:30:39 +02:00
Kumar Gala
28143b1cdc samples: subsys: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from samples.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 10:30:20 +02:00
Carlo Caione
ec0b3148cc test: syscall_perf: Do not re-define csr_read
No need to re-define csr_read().

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-18 12:22:00 -04:00
Tomislav Milkovic
0fe2c1fe90 everywhere: Fix legacy include paths
Any project with Kconfig option CONFIG_LEGACY_INCLUDE_PATH set to n
couldn't be built because some files were missing zephyr/ prefix in
includes
Re-run the migrate_includes.py script to fix all legacy include paths

Signed-off-by: Tomislav Milkovic <milkovic@byte-lab.com>
2022-07-18 16:16:47 +00:00
Aastha Grover
35f42797b8 samples: drivers: fpga: merge both samples and add sample.yaml
Merge the fpga_controller and fpga_controller shell
sample applications and add sample.yaml to enable testing in
twister.

Fixes #47613

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-07-18 10:28:08 -05:00
Benjamin Björnsson
b92144ca3b samples: sensor: stm32_temp_vbat: Update sample to use DEVICE_DT_GET_ONE
Update sample to use DEVICE_DT_GET_ONE to remove usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-18 14:32:09 +00:00
Benjamin Björnsson
8af2f0460d samples: sensor: stm32_temp_sensor: Update to use DEVICE_DT_GET_ONE
Update sample to use DEVICE_DT_GET_ONE to remove usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-18 14:31:54 +00:00
Reto Schneider
6a6b3a1217 samples: net: zperf: Fix format specificer missmatch
NULL (void *) is not of type char *.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-07-18 13:18:56 +00:00
Kumar Gala
cbc848f328 dts: bindings: device labels are now optional
All in tree device drivers use some form of DEVICE_DT_GET
so we no longer need to require label properties.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-18 10:39:14 +00:00
Attie Grande
adeb181a72 boards: arm: atsamr34: Add SAMR34 Xplained board
Implement support for SAMR34 Xplained Pro dev board.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-07-18 10:35:46 +00:00
Attie Grande
876dc19d27 boards: arm: atsaml21: Add SAML21 Xplained board
Implement support for SAML21 Xplained Pro dev board.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-07-18 10:35:46 +00:00
Kumar Gala
eecaf6dce4 samples: boards: nrfx_prs: use DT_LABEL macro
Change code to use DT_LABEL macro so its more obvious what is going on.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-17 16:43:31 -05:00
Jimmy Ou
d98cad84c6 samples: drivers: display: add support for max7219
Add max7219_8x8 into sample.yaml for testing.

Signed-off-by: Jimmy Ou <yanagiis@gmail.com>
2022-07-15 10:10:48 +02:00
Ola Tangen Kulseng
1563d4a0c3 net: lwm2m: Default ssid
Created the variable CONFIG_LWM2M_SERVER_DEFAULT_SSID to be
the default ssid when not using bootstrap. Needed for access control.

Signed-off-by: Ola Tangen Kulseng <ola.kulseng@nordicsemi.no>
2022-07-15 10:10:16 +02:00
Johann Fischer
d402911801 shields: add shield support for AMG88xx sensor
Add shield support for Panasonic AMG88xx sensor and
remove app.overlay from amg88xx sample.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-07-15 10:07:30 +02:00
Kumar Gala
774f8b5b73 samples: sensor: qdec: Remove sample
The sensor shell can handle / does everything this sample does so just
remove the sample in favor of sensor shell.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-15 10:00:30 +02:00
Kumar Gala
6b33c03892 samples: lps22hh: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding.  This
is more generic than the hardcoded string that was being used.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-14 14:08:44 -07:00
Kumar Gala
3a223bc45b samples: sensor: hts221: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding.  This
is more generic than the hardcoded string that was being used.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-14 14:08:44 -07:00
Johann Fischer
3c971307dc arch/kernel/soc/samples: use unsigned int for irq_lock()
irq_lock() returns an unsigned integer key.
Generated by spatch using semantic patch
scripts/coccinelle/irq_lock.cocci

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-07-14 14:37:13 -05:00
Alexandre Bourdiol
ff9e6f2661 sample: subsys: nvs: support stm32l562e_dk board
Add stm32l562e_dk support to sample nvs

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-14 10:43:53 +02:00
Alexandre Bourdiol
f73873b9e2 sample: subsys: nvs: support nucleo_wb55rg board
Add nucleo_wb55rj support to sample nvs

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-14 10:43:53 +02:00
Alexandre Bourdiol
88140089f0 sample: subsys: nvs: support nucleo_l152re board
Add nucleo_l152re support to sample nvs

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-14 10:43:53 +02:00
Alexandre Bourdiol
75f8685bd1 sample: subsys: nvs: support nucleo_g071rb board
Add nucleo_g071rb support to sample nvs

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-14 10:43:53 +02:00
Alexandre Bourdiol
e0f7ed09fe sample: subsys: nvs: support nucleo_f429zi board
Add nucleo_f429zi support to sample nvs

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-14 10:43:53 +02:00
Alexandre Bourdiol
e9014130f8 sample: subsys: nvs: support nucleo_f103rb board
Add nucleo_f103rb support to sample nvs

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-14 10:43:53 +02:00
Alexandre Bourdiol
503514f0b9 sample: subsys: nvs: disco_l475_iot1: use MCU flash instead of QSPI
This allow storage partition to be erased on automatic bench,
(mass erase) and thus test is now passed.
By the way it allows to test MCU flash driver,
whereas other drivers tests operates on QSPI.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-14 10:43:53 +02:00
Attie Grande
d713aa8e2f samples: drivers: adc: fixup sam0 samples
The sam0 ADC driver has ADC_CONFIGURABLE_INPUTS enabled, which means
that the device tree ADC nodes must include the zephyr,input-positive
property.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-07-14 10:31:19 +02:00
Glauber Maroto Ferreira
c4ed27f0ec esp32: samples: counter: conf removal & overlay inclusion
Removes deprecated conf files from the counter/alarm
sample and adds overlays to enable timer nodes in use.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-07-13 15:53:04 +02:00
Johann Fischer
a1bfd8336e samples: rtu_server: add support for CDC ACM UART
Allow to use RTU server sample on any board that has supported
USB device controller. Although it is only a point to point
connection and does not represent a bus, it can, apart from
testing the server implementation, also be used practically
for example to control relays or to read ADC values via
USB connection without implementing custom USB class or driver.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-07-13 11:36:59 +02:00
Henrik Brix Andersen
d22a9909a1 drivers: net: canbus: move CAN bus network driver to drivers/net
Move the CAN bus network driver from drivers/can to drivers/net as it
implements a network driver, not a CAN controller driver.

Use a separate Kconfig for enabling the CAN bus network driver instead of
piggybacking on the SocketCAN Kconfig. This allows for other
(e.g. out-of-tree) SocketCAN transports.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-13 10:34:51 +02:00
Francois Ramu
b5f3df0303 samples: canopenmode exclude nvs_sector_size above 64K
This commits is restricting the execution of the
samples/modules/canopennode to board configuration where
the nvs_sector_size is less than 0x10000.
When the CONFIG_CANOPENNODE_STORAGE is selected, the
settings_subsys_init do not accept
nvs_sector_size > UINT16_MAX.
Then all the stm32h723/h743/h745/h750 cannot run the
sample.modules.canopennode testcase

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-07-13 10:14:03 +02:00
Emil Gydesen
c699ae5850 Bluetooth: Audio: Expose broadcast sink adv data to application
In the broadcast sink `scan_recv` which is called when we
scan for broadcast source, we now also provide the entire
AD struct to the application.

The reason for this is that the advertising data may
contain other information that is useful for the application
like the broadcaster device name or any other
vendor/application specific data.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-12 14:17:02 +02:00
Emil Gydesen
bd64be452c samples: Bluetooth: Update unicast audio client to disconnect
Update the sample to reset data and restart scanning for new
unicast audio servers if the connected one disconnected.

This does not handle if a disconnect happens in the middle of
setting up the audio streams.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-12 14:12:08 +02:00
Emil Gydesen
9b15426455 Bluetooth: Audio: Refactor ISO allocation endpoints
Modify how the ISO channels are allocated for the audio streams,
as well as how the CIG is allocated for the unicast group.

This fixes an issue where the unicast group could not be
fully allocated before _after_ the bt_audio_streams had been
configured by bt_audio_stream_config, thus making it impossible
to create a unicast group before the connections have been established.

This leaves us with 3 basic data types:
1) Streams allocated by the application
2) Endpoints that represent ASEs
3) Audio_iso which is used to couple streams and ISO channels.

The Unicast Group for the unicast client will now have the same
lifetime as the ISO CIG for the central.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-12 14:12:08 +02:00
Kumar Gala
4fab930c6d samples: video: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-12 10:20:00 +02:00
Gerard Marull-Paretas
e0c647c147 samples: drivers: flash_shell: remove duplicate include
<stdlib.h> was included twice, keep the first occurence only.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-11 17:56:55 +02:00
Gerard Marull-Paretas
d424d66aff samples: drivers: flash_shell: remove unused soc.h
The sample included soc.h for no reason, remove it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-11 17:56:55 +02:00
Carlo Caione
2f5fef960e sample: s2ram: Introduce S2RAM sample
Introduce a template / sample for S2RAM running on rf5340dk.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-11 15:26:26 +02:00
Jonathan Rico
1f226e0c4b samples: boards: fix bbc_microbit pong build
The GATT caching feature isn't needed, and was making the memory
consumption blow up because of the recent addition of `long_wq` for
deferred work.

Fixes #47428 .

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-07-11 14:38:10 +02:00
Manuel Arguelles
f2ae4b67b2 tests: samples: bump timeout for FVP BaseR board
Timeout must be increased for fvp_baser_aemv8r_aarch32 board. Enabling
MPU on this board makes simulation slower.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-07-11 11:17:02 +02:00
Kumar Gala
ca22924f2f samples: drivers: espi: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-11 10:51:30 +02:00
Kumar Gala
d1b685a84b samples: drivers: espi: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-11 10:51:30 +02:00
Aastha Grover
6f5c26d71e samples: kernel: condvar: add README
Add readme for the sample for conditional variables in kernel.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-07-08 21:06:33 -04:00
Emil Gydesen
4b953eabf8 Bluetooth: Audio: Moved ASCS metadata verification to higher layer
Instead of rejecting metadata at the BAP layer, we now
expect the higher layer to provide the verification.

The reason for this is that the higher layer may be better
equiped at determining which metadata it supports.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-08 20:08:45 +00:00
Kumar Gala
4faf362030 soc: apollo_lake: gpio: Drop use of DT_LABEL
Change APL_GPIO_DEV_* defines to be DT_NODELABELs instead of
"label" strings.  This lets us change users of these defines to
use DEVICE_DT_GET.

We update samples/board/up_squared/gpio_counter to use DEVICE_DT_GET
as part of this change.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 20:01:47 +00:00
Gerard Marull-Paretas
6026022ccf samples: boards: bbc_microbit: line_follower: use i2c-dt-spec
Create a sample level compatible for the motor controller and make use
of i2c-dt-spec facilities.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-08 14:08:47 +02:00
Gerard Marull-Paretas
6a23d983a7 samples: boards: bbc_microbit: line_follower: refactor motor code
Simplify motor control logic to improve application
readability/structure.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-08 14:08:47 +02:00
Gerard Marull-Paretas
dd54e82b84 samples: boards: bbc_microbit: line_follower: fix variable types
For left/right gpio values:

- GPIO API returns `int` (signed).
- Drop array as only first index was used.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-08 14:08:47 +02:00
Gerard Marull-Paretas
c1f0c9afe8 samples: boards: bbc_microbit: line_follower: use gpio-dt-spec
Specify left/right GPIOs in DT (zephyr,user node). Make use of
gpio-dt-spec and cleanup the code.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-08 14:08:47 +02:00
Gerard Marull-Paretas
ee9ab9756c samples: boards: bbc_microbit: pong: use pwm-dt-spec
Specify PWM parameters in Devicetree. Code has been updated to operate
in native PWM units (nsec) everywhere.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-08 14:08:47 +02:00
Gerard Marull-Paretas
ab959061ff samples: boards: bbc_microbit: sound: use pwm-dt-spec
Specify PWM parameters in Devicetree. Period in DT is used as the
initial period. Code has been updated to operate in native PWM units
(nsec) everywhere.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-08 14:08:47 +02:00
Yuriy Vynnychek
99479ecbda drivers: adc: introduce new Telink B91 ADC driver
ADC driver basic support for Telink B91 SoC.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2022-07-08 11:07:18 +02:00
Kumar Gala
a4ae3afd1f samples: ps2: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 11:03:23 +02:00
Kumar Gala
209a4c3c18 samples: updatehub: Remove use of DT_BUS_LABEL
The use of DT_BUS_LABEL in a logging call can easily be replaced
with uart_dev->name.  This moves us slowly forward to removing
use of devicetree `label` property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 10:52:47 +02:00
Kumar Gala
b77aeb0c21 samples: counter: maxim_ds3231: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 10:52:34 +02:00
Kumar Gala
43c4066e0e samples: spi_bitbang: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 10:52:21 +02:00
Emil Gydesen
d595b64252 sample: Bluetooth: Add BT_SETTINGS for connected ISO samples
Add BT_SETTINGS support for the samples as well as
enabling security.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-08 10:49:12 +02:00
Kumar Gala
4415a3bd3c samples: drivers: spi_flash: Exclude hifive_unmatched
hifive_unmatched has a jedec,spi-nor flash node, however we have no
SPI driver for the controller so exclude the platform from this sample.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 09:36:43 +02:00
Kumar Gala
3cfc8d5875 samples: spi_flash: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 09:36:43 +02:00
Kumar Gala
c4cdba3833 samples: lwm2m_client: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 08:27:52 -05:00
Kumar Gala
9ceeb3a0ae samples: lwm2m_client: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 08:27:52 -05:00
Joep Buruma
91f659d70a samples: led_pwm: add overlay for rpi_pico board
Add an overlay for rpi_pico board to the led_pwm sample.
This board only supports fairly high pwm frequencies so
the blinking of the LED is not supported. Turning it on/off
and fading is.

Signed-off-by: Joep Buruma <burumaj50@gmail.com>
2022-07-07 15:17:26 +02:00
Kumar Gala
798c2ef0ee samples: boards: nrf: nrfx_prs: Remove DT_LABEL usage
As we work to phase out `label` property usage, remove DT_LABEL
from BUILD_ASSERT macro.  Just use SPIM_NODE and UARTE_NODE in
the assert message.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 08:12:11 -05:00
Kumar Gala
7c39210324 samples: boards: nrf: system_off: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 08:12:11 -05:00
Kumar Gala
4cb17cca08 samples: boards: nrf: clock_skew: Convert to use DEVICE_DT_GET{_ONE}
Move to use DEVICE_DT_GET{_ONE} instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 08:12:11 -05:00
Kumar Gala
0efbba947a samples: boards: nrf: battery: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 08:12:11 -05:00
Kumar Gala
465cc93bf0 samples: drivers: i2s: echo: Remove DT_LABEL usage
As we phase out usage of 'label' devicetree property, remove uses
of DT_LABEL.  Replace DT_LABEL with swN_spec.port->name.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:27:36 +00:00
Kumar Gala
0e00cccb7a samples: reel_board: mesh_badge: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access for SW0.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:27:16 +00:00
Maciej Perkowski
d224d7fcd5 sample: usb: Change integration_platforms to platform_allow
The sample proviades required overlays only for 3 platforms.
Therefore, flash scenarios can only work on those 3 platforms.
To reflect this, platform_allow has to be used instead of
integration_platforms, so boards without overlays are not picked up
into a scope.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2022-07-07 10:11:44 +02:00
Kumar Gala
6a177e0a31 samples: usb: hid-cdc: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:11:29 +02:00
Kumar Gala
5e5a2cc3ca samples: sensor: fxos8700-hid: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:11:16 +02:00
Kumar Gala
1424912d56 samples: sensor: fxos8700-hid: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:11:16 +02:00
Kumar Gala
b17bc71889 samples: led_sx1509b_intensity: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:09:48 +02:00
Kumar Gala
52b4cab493 samples: sensor: bme680: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:47 +02:00
Kumar Gala
bd25909ced samples: sensor: grove_light: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:47 +02:00
Kumar Gala
471eb98032 samples: sensor: grove_temperature: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:47 +02:00
Kumar Gala
b8b9bcc8f7 samples: sensor: icm42605: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:47 +02:00
Kumar Gala
bdaa339881 samples: sensor: max17262: Remove dead code
MAX17262 and MAX17262_LABEL defines aren't used anymore so remove them

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:47 +02:00
Kumar Gala
e12a44f536 samples: sensor: max6675: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:47 +02:00
Kumar Gala
e0854d9e31 samples: sensor: vl53l0x: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:47 +02:00
Kumar Gala
7e286bfc5e samples: basic: threads: Remove dts label prop usage
Replace access to dts 'label' property (which we are phasing out)
with simple int as the serve the purpose for error report.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:47 +02:00
Kumar Gala
95ee61529a samples: cc13x2_cc26x2: system_off: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:32 +02:00
Kumar Gala
c2f3f32ec8 samples: cc13x2_cc26x2: system_off: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:32 +02:00
Kumar Gala
0f25daa8fe samples: bbc_microbit: line_follower_robot: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

The I2C & GPIO devices are not represnted in devicetree and thus we
aren't converting this sample over to i2c_dt_spec or gpio_dt_spec.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:12 +02:00
Kumar Gala
13bff2b253 samples: bbc_microbit: pong: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:12 +02:00
Kumar Gala
85094fb9f8 samples: bbc_microbit: pong: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:12 +02:00
Kumar Gala
400069b106 samples: bbc_microbit: sound: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:12 +02:00
Kumar Gala
7b6b7cf37c samples: bbc_microbit: sound: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:02:12 +02:00
Kumar Gala
b3bbaa5400 samples: edac: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:01:45 +02:00
Kumar Gala
d9c5022d3b samples: tflite-micro: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:01:20 +02:00
Kumar Gala
64819c3ac2 samples: spi_flash_at45: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:01:15 +02:00
Pieter De Gendt
e381170282 uart_pipe: Remove obsolete UART_PIPE_ON_DEV_NAME Kconfig
The UART pipe device is selected with devicetree chosen zephyr,uart-pipe

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-07-07 09:59:49 +02:00
Andrey Borisovich
aa253d9ab1 soc: intel_adsp: reading HP SRAM banks count for ACE1X from Devicetree
Replaced hardcoded for intel_adsp_ace15_mtpm board
HP_MEMORY_BANKS value used in SOF code with generic approach -
using PLATFORM_HPSRAM_EBB_COUNT read from Devicetree.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-07-06 15:11:07 -04:00
Flavio Ceolin
e4a3e2d8b6 intel_adsp: Unify cavs and ace timers
These two timers were sharing pretty much the same code. Actually
mtl timer was a "superset" of cavs timer. Just merge them into a
single one called intel audio dsp timer (intel_adsp_timer).

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-07-06 15:11:07 -04:00
Arsen Eloglian
293c55a3ee dts: align CONFIG's with ace hardware
Align CONFIG_HEAP_MEM_POOL_SIZE & CONFIG_DAI with ace hardware.

Signed-off-by: Arsen Eloglian <ArsenX.Eloglian@intel.com>
2022-07-06 15:11:07 -04:00
Anas Nashif
e3c9eb2495 intel_adsp: add the board definition for the Meteorlake
Board definition for the meteorlake platform.
Enable intel_adsp_ace15_mtpm in the sof sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Co-authored-by: Michal Wasko <michal.wasko@intel.com>
Co-authored-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
2022-07-06 15:11:07 -04:00
Kumar Gala
19636b5087 sapmles: watchdog: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 12:42:29 -05:00
Kumar Gala
046cb83996 samples: esp32: flash_encryption: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 12:42:11 -05:00
Kumar Gala
057f1555c3 samples: lorawan: class_a: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 12:41:54 -05:00
Kumar Gala
ceeaef5100 samples: gsm_modem: Remove use of DT_BUS_LABEL
The use of DT_BUS_LABEL in a logging call can easily be replaced
with uart_dev->name.  This moves us slowly forward to removing
use of devicetree `label` property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 12:41:35 -05:00
Kumar Gala
c96f8f9c29 samples: lsm6dso: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Also, Removed 'lsm6dso' from board & sample yaml's and move to just
filtering based on devicetree compat.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 12:26:42 -05:00
Kumar Gala
544140dfe4 samples: boards: h7_dual_core: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:22:43 -05:00
Anas Nashif
8fe4ca699c samples: add mising braces to single line if statements
Following zephyr's style guideline, all if statements, including single
line statements shall have braces.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-06 11:00:45 -04:00
Kumar Gala
36a507d271 samples: 96b_argonkey: sensors: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 09:54:50 -05:00
Kumar Gala
a4514f2771 samples: 96b_argonkey: sensors: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 09:54:50 -05:00
Kumar Gala
55a7c6dc20 samples: sensortile_box: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 09:53:48 -05:00
Kumar Gala
322b23a2c9 samples: sensortile_box: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 09:53:48 -05:00
Kumar Gala
e9c83b3e9b samples: reel_board: mesh_badge: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:13:02 +00:00
Kumar Gala
4aaa9cea01 samples: reel_board: mesh_badge: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:13:02 +00:00
Kumar Gala
7761b5c4e2 samples: bluetooth: iso_receive: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:22:04 +02:00
Alexandre Bourdiol
2b54f0fcf4 samples: drivers: led_ws2812: add fixture to sample.yaml
This sample should be executed only when connecting external
hardware (Led strip). Thus it is necessary to add fixture to avoid
execution when no hardware is connected.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-06 11:19:13 +02:00
Maciej Perkowski
a83cec9f8b samples: drivers: flash: Add missing fixture requirement
This sample can only be tested if the DUT has external memory
connected. This commit aligns the yaml description, so the test
is not picked up on setups without required fixture.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2022-07-06 11:12:04 +02:00
Kumar Gala
1ee23437ee samples: nrf: mesh: onoff-app: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:11:31 +02:00
Kumar Gala
18ede6e681 samples: alarm: Convert sample to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as we
work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:11:00 +02:00
Emil Gydesen
504feb77c4 Bluetooth: Audio: Updated samples and shell to use seq_num
Update the samples and the shell to use the sequence number
and timestamp when sending.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-06 11:03:27 +02:00
Jamie McCrae
db469784ae samples: drivers: watchdog: Add support for Raspberry Pi Pico
This adds support for running the watchdog driver sample on a Raspberry
Pi Pico board.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2022-07-06 10:52:29 +02:00
Kumar Gala
b2ad545887 samples: x_nucleo_iks02a1: microphone: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00
Kumar Gala
d10fc848f0 samples: x_nucleo_iks02a1: sensorhub: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00
Kumar Gala
e263876065 samples: x_nucleo_iks02a1: standard: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00
Kumar Gala
775907aaee samples: x_nucleo_iks01a2: sensorhub: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00
Kumar Gala
76f2d82bf8 samples: x_nucleo_iks01a2: standard: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00
Kumar Gala
9d038c93da samples: x_nucleo_iks01a3: standard: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00
Kumar Gala
c4b98aa3c8 samples: x_nucleo_iks01a3: sensorhub: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00
Kumar Gala
aa7e23c949 samples: x_nucleo_iks01a1: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00
Fredrik Danebjer
2283aad798 Bluetooth: Audio: Removed Streaming Context from LC3 PAC Record
This fix removes the Streaming_Audio_Context LTV from the LC3 Codec
helper macro, and subsequently a faulty exposure of this LTV in the
PAC records used.

Signed-off-by: Fredrik Danebjer <fredrik@danebjer.com>
2022-07-06 10:46:22 +02:00
Thomas Stranger
831506b82b samples: sensor: ds18b20: add sample for this temperature driver
This commit adds a sample for the maxim ds18b20 1-wire temperatue
sensor in a single-drop bus configuration.
Includes overlay files for nucleo_g0b1re und nrf52840dk_nrf52840 with
the required open drain configuration.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-07-05 23:06:45 +02:00
Benjamin Björnsson
95717e7b4d samples: sensor: adxl362: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-05 08:51:13 -05:00
Kumar Gala
53f25d0231 samples: nrf: onoff_level_lighting_vnd_app: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-05 12:29:09 +02:00
Emil Gydesen
f46842a788 Samples: Bluetooth: Fix missing codec reference for broadcast audio sink
The broadcast audio sink sample had a bad codec reference after
multiple commits were merged.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-05 06:15:59 -04:00
Johann Fischer
6a102eeffd samples: usb: add integration platforms to flash tests in USB MSC sample
Add integration platforms to mass_flash_fatfs and mass_flash_littlefs
tests as these options are tuned for specific platforms.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-07-04 16:57:48 +02:00
Johann Fischer
fbe7a1067d samples: usb: fix flash test subsections in USB MSC sample
Test sections, mass_flash_fatfs and mass_flash_littlefs,
and corresponding Kconfig options are mixed up.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-07-04 16:57:48 +02:00
Kumar Gala
ff2032a3ae samples: wifi: enable reel_board to test winc1500
We don't have anything that build tests the win1500 driver, so
enable reel_board to provide coverage on the driver.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-04 16:50:20 +02:00
Erik Robstad
06586e960d samples: Bluetooth: broadcast_audio_sink sample bugfix
Fixed handling of k_sem_take() return codes.
Also some minor cleanup in broadcast_audio samples.

Signed-off-by: Erik Robstad <erik.robstad@nordicsemi.no>
2022-07-04 16:22:28 +02:00
Emil Gydesen
4c471914b9 Bluetooth: Audio: Remove codec from bt_audio_broadcast_sink_sync
The codec (or rather codec configuration) is now taken from the
previously received BASE. This also means that the BASE (with
the codec configurations) is now also stored statically.

When the application attempts to synk to the broadcaster
the stack will lookup the codec configuration based on the
bis index, as a BASE may have multiple subgroups
with multiple codec configurations.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-04 16:08:52 +02:00
TOKITA Hiroshi
3b4e6c76f6 samples: fat_fs: Add arduino_mkrzero to supported board list
Update README.rst for adding arduino_mkrzero to
supported board list in README.rst.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-07-04 16:00:56 +02:00
Emil Gydesen
bb6c0866d8 Bluetooth: Audio: Add PACS for broadcast sink
Add support for using PACS and/or capabilities for
the broadcast sink role. PACS and capabilities were
originally only supported for the unicast server
role, so the PACS callbacks were moved their own
struct, as if a device supports both the unicast
server role and the broadcast sink role, it will
only have a single PACS instance.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-04 15:59:09 +02:00
Reto Schneider
7a6c5710ff cmake: Update cmake_minimum_required to 3.20.0
As Zephyr currently requires CMake version 3.20.0, update all
occurrences of cmake_minimum_required.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-07-04 10:18:45 +02:00
Kumar Gala
0f2ec0222c samples: 96b_argonkey: microphone: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-04 09:50:47 +02:00
Kumar Gala
82f6a3e134 samples: 96b_argonkey: microphone: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-04 09:50:47 +02:00
Kumar Gala
015a667667 samples: sx9500: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as we
work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-04 09:49:01 +02:00
HaiLong Yang
de052b2993 samples: drivers: adc: add gd32 boards support
This add gd32 boards support for the adc sample.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2022-07-04 09:48:32 +02:00
Jordan Yates
75680f7ae0 treewide: update flash_area name retrieval
Update usage of `flash_area->fa_dev_name` to `flash_area->fa_dev->name`.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-07-02 16:04:16 +02:00
Maureen Helm
5dd9c21b98 samples: sensor: Remove hmc5883l magnetometer sample
The magn_polling sample application now supports the hmc5883l driver, so
we can remove this driver-specific sample.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-07-02 06:03:33 -04:00
Maureen Helm
331de27f5a samples: sensor: Remove bmm150 magnetometer sample
The magn_polling sample application now supports the bmm150 driver, so
we can remove this driver-specific sample.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-07-02 06:03:33 -04:00
Maureen Helm
0e917af9e3 samples: sensor: Extend magn_polling to support additional drivers
Extends the magn_polling sample application to support additional
magnetometer drivers. This is a first step towards reducing the number
of driver-specific sensor sample applications.

Integration platforms were selected to exercise different magnetometer
drivers.

Tested on hardware with the following configurations:
- fxos8700 driver with the on-board sensor on the frdm_k64f board
- lis2mdl driver with a x_nucleo_iks01a3 shield attached to a frdm_k64f
  board

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-07-02 06:03:33 -04:00
Maureen Helm
e0208be634 samples: sensor: Remove GPIO references from magn_polling
The magn_polling sample application doesn't use GPIO.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-07-02 06:03:33 -04:00
Glauber Maroto Ferreira
5686368eec boards: riscv: esp32c3_devkitm: dts: use pin grouping
Updates device tree pin states definitions and node
descriptions to group pins sharing common properties.

Accordingly, updates in-tree overlays as well.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-07-01 16:22:18 +00:00
Glauber Maroto Ferreira
f82d3d444d boards: xtensa: esp32s2_saola: dts: use pin grouping
Updates device tree pin states definitions and node
descriptions to group pins sharing common properties.

Accordingly, updates in-tree overlays as well.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-07-01 16:22:18 +00:00
Glauber Maroto Ferreira
dfad263fc2 boards: xtensa: esp_wrover_kit: dts: use pin grouping
- update device tree pin states definitions and node
descriptions to group pins sharing common properties.
- update fat_fs sample code overlay.
- remove unused ledc pin states

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-07-01 16:22:18 +00:00
Glauber Maroto Ferreira
f79029a074 boards: xtensa: esp32: dts: use pin grouping
- update device tree pin states definitions and node
descriptions to group pins sharing common properties.
- update ESP32's in-tree overlays.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-07-01 16:22:18 +00:00
Ryan Erickson
fb34a9749f logging: add log_source_id_get
Add API to get the logging module source ID from the
module name;

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-07-01 16:30:30 +02:00
Maciej Perkowski
824ccc00df tests: samples: tfm: Increase timeout for tfm samples tests
Scenarios sample.tfm.psa_test_crypto and
sample.tfm.psa_test_crypto require longer timeout to fully finish.
This commit increase them accordingly.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2022-07-01 11:37:47 +02:00
Hu Zhenyu
0d323960a3 dts: adc0 content in mec172xevb_assy6906.overlay
To make the test case of samples/drivers/adc work on mec172xevb_assy6906

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-07-01 11:35:54 +02:00
Francois Ramu
816449c138 samples: sensor: new sample to demonstrate the Vbat monitoring
This new application is monitoring the Vbat in Volts
from the internal ADC.
Running on the nucleo_g071rb and nucle_wb55rg boards.
Vref is a property of the ADC.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-07-01 11:34:17 +02:00
Kumar Gala
e0ce8436a5 samples: boards: nrfx_prs: Fix use of deprecated spi_cs_control fields
The gpio_dev, gpio_pin, etc fields of struct spi_cs_control are
deprecated.  Move to using the gpio field.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-30 18:57:12 -05:00
Andrzej Głąbek
c7e4d23c5d samples: boards: nrfx: Align code with the recent nrfx_gpiote API
Replace calls to nrfx_gpiote functions deprecated in nrfx 2.6.0
with recommended equivalents.
On the occasion, switch to using available `nrfx_gppi_*` functions
instead of separate paths for DPPI and PPI channels.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-30 18:14:02 +02:00
Kumar Gala
8abcaf5365 samples: spi_bitbang: Fix use of deprecated spi_cs_control fields
The gpio_dev, gpio_pin, etc fields of struct spi_cs_control are
deprecated.  Move to using the gpio field.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-30 07:14:56 -05:00
Andrei Emeltchenko
2a61e30384 samples: echo_server: Remove unused error code
Remove setting unused error code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-30 10:34:40 +02:00
Andrei Emeltchenko
82b9282e60 samples: socketpair: Remove unused error code
Remove unused variable.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-30 10:34:40 +02:00
Andrei Emeltchenko
3cd5bd600f samples: dumb_http_server_mt: Remove unneeded statement
ret is not used so assignment is not needed.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-06-30 10:34:40 +02:00
Lucas Tamborrino
7519ce35a5 samples: basic: blinky_pwm: add support for espressif boards
Add overlay for espressif boards that does not have a built-in LED.

Add instructions on README file about the required LED connection.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2022-06-29 14:48:25 +00:00
Lucas Tamborrino
02675bbc80 dts: esp32: full ledc configuration in binding
This commit moves the hardware configuration for ledc
peripheral to the device-tree instead of Kconfig.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2022-06-29 14:48:25 +00:00
Francois Ramu
9a29f182c3 samples: drivers: spi_flash rename definitions
This commits prefixes all the definitions
with 'SPI_' to be used by the sample application.
This will avoid compilation conflict especially
on FLASH_SECTOR_SIZE.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-06-29 10:25:16 +02:00
Emil Gydesen
c5fc32756a Bluetooth: Audio: Remove hardcoded location and context for LC3 macros
The BT_CODEC_LC3_CONFIG_* macros had a hardcoded location
and context, which makes them a lot less usable.

Updates the macro, and the macros that used them.
This also removes the BT_CODEC_LC3_CONFIG and instead
just uses the BT_CODEC_LC3_CONFIG_N macro, which has
then been renamed to BT_CODEC_LC3_CONFIG.

As an addition, the macros and their input has
also been better documented.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-29 10:24:49 +02:00
Anas Nashif
872f7a9dc4 samples: display: do not build if lvgl is not available
This sample depends on lvgl, so do not try and build it if lvgl is not
part of the workspace and if it was excluded in a local manifest.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-06-28 18:09:26 -04:00
Maureen Helm
fd204f31d4 samples: rtio: Add sensor batch processing sample application
Adds a new sample application that demonstrates using the RTIO subsystem
to read periodic sensor data directly into buffers allocated by the
application, asynchronously process batches of data with an algorithm,
and recycle buffers back for reading additional sensor data.

The sensor iodev in this application is an timer-driven device that
executes one read request per timer period. It doesn't actually send any
transactions to a real I2C/SPI bus or read any real data into the
application-provided buffers. This timer-driven behavior mimics how a
real sensor periodically triggers a GPIO interrupt when new data is
ready.

The sensor iodev currently uses an internal message queue to store
pending requests from the time they are submitted until the next timer
expiration. At least one pending request needs to be stored by the iodev
to ensure that it has a buffer available to read data into. However,
any more than that should probably be handled by the application, since
it's the application that determines how often it can submit new
requests and therefore how deep the queue needs to be.

The sensor iodev is implemented to support multiple instances with
devicetree, but additional work remains to enable and use more than one
in the application.

Tested on native_posix and frdm_k64f.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-06-28 13:53:13 -04:00
Jeppe Odgaard
f49cbc98f9 samples: drivers: led_ws2812: use compatible based filter
Replace 'platform_allow' with 'filter' based on ws2812 compatible
being enabled. This will allow, for example, to run the sample on
mimxrt1050_evk and mimxrt1050_evk_qspi boards.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2022-06-28 16:50:26 +02:00
Jeppe Odgaard
33f942a887 samples: drivers: led_ws2812: add mimxrt1050 boards
Allow mimxrt1050_evk and mimxrt1050_evk_qspi boards to use ws2812.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2022-06-28 16:50:26 +02:00
Gerard Marull-Paretas
69fc9a3d0a boards: esp_wrover_kit: enable SPI if CONFIG_DISPLAY=y
If we enable DISPLAY=y, ILI9341 will be selected automatically if all of
its dependencies are met as well (SPI), let's add this to the board
defconfig.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-28 15:53:10 +02:00
Gerard Marull-Paretas
aeb7475920 samples: display: lvgl: add min_flash/min_ram
LVGL eats a considerable amount of flash, so tests may fail on platforms
that meet all requirements but that have a low amount of flash, e.g.
nucleo_g071rb. Set min_flash for all cases to 250K (result of some quick
experimentation). Also update minimum ram to exclude platforms that
cannot run Zephyr + LVGL (e.g. those with just 16K).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-28 15:53:10 +02:00
Gerard Marull-Paretas
062e2998b4 samples: display: lvgl: filter by zephyr,display chosen
Sample can be built on any board that defines a zephyr,display and has
it enabled.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-28 15:53:10 +02:00
Gerard Marull-Paretas
df7c156996 samples: display: lvgl: adjust harness field
'display' harness doesn't exist, so replace it with 'none' to make
things more clear. It is required so that test is not run e.g. on CI,
test would timeout because the GUI is left ON forever.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-28 15:53:10 +02:00
Gerard Marull-Paretas
d87a37fd76 samples: display: lvgl: remove extra samples
Simplify sample.yaml by just adding a single test case. In future
commits, test case will be refined to be based on DT filters so that it
is made more generic.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-28 15:53:10 +02:00
Steffen Jahnke
612b9247e4 boards: Exclude boards from shield samples
Some of the Panasonic's evaluation boards have limited amount of pins.
So not all arduino pins can be occupied and not all shields are
compatible.

Signed-off-by: Steffen Jahnke <steffen.jahnke@eu.panasonic.com>
2022-06-28 15:51:55 +02:00
Kumar Gala
14d0bd677e samples: vcnl4040: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as we
work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-28 08:22:24 -05:00
Kumar Gala
fca571955b samples: ti_hdc: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as we
work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-28 11:07:50 +02:00
Torstein Grindvik
fe9893ec86 samples: tfm: Enumerate more test variants
Some TFM samples run different test suites/cases based on
which configurations are set.
Enumerate more of these.

For samples/tfm_integration/tfm_psa_test,
add the following new build configurations:
	* Add CONFIG_TFM_PSA_TEST_STORAGE
	* Add CONFIG_TFM_PSA_TEST_CRYPTO
	* Add CONFIG_TMF_PSA_TEST_INITIAL_ATTESTATION

For samples/tfm_integration/tfm_regression_test,
add this to all build configurations:
	* Add CONFIG_TFM_PARTITION_PROTECTED_STORAGE
	* Add CONFIG_TFM_PARTITION_INTERNAL_TRUSTED_STORAGE
	* Add CONFIG_TFM_PARTITION_CRYPTO
	* Add CONFIG_TFM_PARTITION_INITIAL_ATTESTATION
	* Add CONFIG_TFM_PARTITION_PLATFORM
	* Add CONFIG_TFM_PARTITION_AUDIT_LOG

And build the above for CONFIG_TFM_IPC as well.

Signed-off-by: Torstein Grindvik <torstein.grindvik@nordicsemi.no>
2022-06-27 15:41:57 -05:00
Benjamin Björnsson
5be2c81222 samples: sensor: sm351lt: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:59:53 -05:00
Benjamin Björnsson
f61607c57c samples: sensor: sht3xd: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:43:51 -05:00
Benjamin Björnsson
bc92171af9 samples: sensor: mpr: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:34:13 -05:00
Benjamin Björnsson
4ce7e2dfb1 samples: sensor: mpu6050: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:31:14 -05:00
Benjamin Björnsson
7322375a07 samples: sensor: max44009: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:23:48 -05:00
Benjamin Björnsson
76785bb12c samples: sensor: max17262: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:18:27 -05:00
Benjamin Björnsson
99c91656bc samples: sensor: isl29035: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 10:10:44 -05:00
Kumar Gala
72cd1c40a6 samples: wsen_itds: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as we
work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-27 09:47:06 -05:00
Benjamin Björnsson
97275659ac samples: sensor: lsm303dlhc_magn: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 09:40:16 -05:00
Benjamin Björnsson
fc518e1eb0 samples: sensor: lps22hb: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-27 09:34:37 -05:00
Benjamin Björnsson
9d1668b365 samples: sensor: lsm6dsl: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-24 20:29:54 +02:00
Andrzej Głąbek
800b086908 samples: code_relocation_nocopy: Update documentation
Extra steps for programming the external memory on nRF5340 DK are
no longer needed. Now west is capable of handling this itself.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-24 20:29:00 +02:00
Andrzej Głąbek
788fe5b4bf samples: code_relocation_nocopy: Fix initialization of external memory
Despite the comment it contains, the initialization procedure for
the external memory chip on nRF5340 DK does not enable the High
Performance Mode in the chip, so communication using a frequency
higher than 8 MHz fails and the sample crashes (it works only right
after programming the chip with nrfjprog, which enables the High
Performance Mode, but the chip returns to the Low Power mode after
the board is power-cycled).
This commit fixes the initialization procedure and performs some
additional clean-up.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-24 20:29:00 +02:00
Andrzej Głąbek
e329353f21 samples: code_relocation_nocopy: Disable gap filling
... to prevent producing a huge (over 700 MB) hex file for nRF5340 DK.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-24 20:29:00 +02:00
Christopher Friedt
9d433c89a2 lib: posix: semaphore: use consistent timebase in sem_timedwait
In the Zephyr implementation, `sem_timedwait()` uses a
potentially wildly different timebase for comparison via
`k_uptime_get()` (uptime in ms).

The standard specifies `CLOCK_REALTIME`. However, the real-time
clock can be modified to an arbitrary value via clock_settime()
and there is no guarantee that it will always reflect uptime.

This change ensures that `sem_timedwait()` uses a more
consistent timebase for comparison.

Fixes #46807

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2022-06-24 20:12:05 +02:00
Benjamin Björnsson
22fd253fea samples: sensor: ccs811: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:52:26 -05:00
Benjamin Björnsson
3710af9a1b drivers: sensor: bmi270: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:46:01 -05:00
Benjamin Björnsson
4ba3e136f1 samples: sensor: bmc150magn: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:40:03 -05:00
Benjamin Björnsson
44b96f9b68 drivers: sensor: dht: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:34:28 -05:00
Benjamin Björnsson
a8586e8409 drivers: sensor: dps310: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:32:19 -05:00
Benjamin Björnsson
f69bf5412f samples: sensor: hmc5883l: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-23 16:24:43 -05:00
Krzysztof Chruscinski
9833ca61c9 logging: Removing v2 suffix from logging names
Renaming objects which had 2 in the name to indicate that
it is v2 specific. Once logging v1 has been removed such
suffixes are redundant.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-23 15:46:37 -04:00
Maximilian Deubel
1c1c72ea08 ADXL362: Add separate activity/inactivity triggers
This patch modifies the ADXL362 driver to use the new
SENSOR_TRIG_MOTION trigger for activity detection
and SENSOR_TRIG_STATIONARY for inactivity detection.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2022-06-23 10:28:34 -05:00
Krzysztof Chruscinski
041f0e5379 all: logging: Remove log_strdup function
Logging v1 has been removed and log_strdup wrapper function is no
longer needed. Removing the function and its use in the tree.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-23 13:42:23 +02:00
Robert Lubos
fb802fb6c0 samples: net: zperf: Comply with Coccinelle requirements
Cocinelle complains about "shell" being used as a parameter name:

"Violation to rule 5.7 (Tag name should be unique) tag: shell"

Therefore rename the parameter throughout the sample to "sh".

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-06-23 11:10:34 +02:00
Robert Lubos
fd2fab1a49 samples: net: zperf: Rewrite download part to use sockets
Rewrite the TCP/UDP download part of the zperf sample to use socket API.
For UDP, performance impact is negligible (< 1 Mbps), for TCP it's
noticable, but still throughputs can be considered satisfactory (up to
~75 Mbps).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-06-23 11:10:34 +02:00
Robert Lubos
6c30c9ac47 samples: net: zperf: Rewrite upload part to use sockets
Rewrite TCP/UDP upload part of the zperf sample to use socket API
instead of net_context. This has a negligible impact on the upload
throughputs (< 1 Mbps).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-06-23 11:10:34 +02:00
Marcin Niestroj
46b0f64868 samples: crypto: remove default mbedTLS options
Whenever MBEDTLS_BUILTIN is selected then
CONFIG_MBEDTLS_CFG_FILE="config-tls-generic.h" is set as a default value.

Remove explicit configuration from prj_mtls_shim.conf.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-06-23 09:10:03 +02:00
Emil Gydesen
e211bd8931 Bluetooth: Audio: Fix ASCS stream->conn cleanup
The stream->conn was never unref'ed on disconnect with
unbonded devices.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-23 09:09:45 +02:00
Emil Gydesen
17ca15067a Bluetooth: Audio: Fix issue with sending on bidirectional streams
This commit fixes some issues with setting up and
using bidirectional audio streams.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-23 09:09:45 +02:00
Emil Gydesen
a757fc8c46 samples: Bluetooth: Update unicast audio samples to use bidirectional
Modified the samples such that the client will attempt to
setup 2 sink streams and 1 source stream, basically
representing a headset use case.

This also excercises both setting up a unidirectional
and a bidirectional ISO channel using the 3 audio streams.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-23 09:09:45 +02:00
Emil Gydesen
f404d583ba samples: Bluetooth: Unicast audio client stream send fix
The sample used `net_buf_ref` to send the same data multiple
times on multiple streams, but the send procedure, which
ends up calling bt_conn_send_cb, does not work
with multiple refs. We thus replace the refs with net_buf_clones.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-23 09:09:45 +02:00
Martí Bolívar
f49d11d310 civetweb: remove obsolete code
This code has gone unmaintained and bugs continue to be reported
against it. We do not have the resources as a project to maintain this
in "odd fixes" mode, and nobody has stepped up to maintain it [1], so
sadly this must be removed for now.

If anyone would like to see civetweb supported in upstream Zephyr
again, they are welcome to add it back, as long as they promise to
maintain it going forward.

Many thanks to everyone who has contributed to civetweb support in
Zephyr while it was here. So long and thanks for all the fish.

Fixes: #45807
Fixes: #43910
Fixes: #34226
Fixes: #46743

[1] https://lists.zephyrproject.org/g/devel/message/8466

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-22 08:26:13 -07:00
Kai Vehmanen
855adb1514 samples/subsys/audio/sof: fix sys-ticks-per-sec to 15000
The value of CONFIG_SYS_CLOCK_TICKS_PER_SEC has side-effects that
are not expected with tickless kernel mode. In bug #46378, application
code is shown to run slower with higher sys clock tick value. In SOF
bug #5921, audio quality issues were root-caused to k_timer inaccuracy
with 50000 sys clock tick.

Set the the value to 15000 for all SOF applications. All existing
test cases pass with this value.

BugLink: https://github.com/zephyrproject-rtos/zephyr/issues/46378
BugLink: https://github.com/thesofproject/sof/issues/5921
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-06-22 12:28:48 +02:00
Sylvio Alves
3335e612f1 samples: subsys: esp32s2: add configuration file
This sample won't work without custom configuration.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-06-22 12:27:32 +02:00
Benjamin Björnsson
1a246ba5c0 samples: sensor: fxos8700: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-22 12:27:17 +02:00
Emil Gydesen
93eccad72f samples: Bluetooth: Fix timeout for iso_broadcast
The timeout was accidentally changed from 60 seconds
to 0.6 seconds.

This commit also fixes the number of prints, since we are now
sending at 10ms intervals.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-22 12:23:52 +02:00
Vinayak Kariappa Chettimada
8e5e0bd45e samples: Bluetooth: peripheral and central GATT write command use
Samples peripheral_gatt_write and central_gatt_write to
demonstration use of GATT Write Command.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-06-22 12:22:29 +02:00
Aastha Grover
17d64e0bf9 samples: arch: mpu_test: Update Readme.
Update the readme for mpu_test sample to contain
correct sample outputs for mpu read, write and run operations.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-06-21 20:29:15 -04:00
Benjamin Björnsson
d5e37638b2 drivers: sensor: ens210: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-20 08:46:01 -05:00
Kumar Gala
a7dc80f12e samples: ams_iAQcore: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-20 08:25:32 -05:00
Stephanos Ioannidis
ac04889ee0 samples: kernel: condition_variables: Remove unneeded tstack extern
This commit removes the `tstack` symbol extern that is not used
anywhere in this sample.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-06-20 10:25:52 +02:00
Benjamin Björnsson
d7578804dd drivers: sensor: bmm150: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-17 11:09:19 -05:00
Rubin Gerritsen
c8de8e93cd Bluetooth: samples: Remove nrf52840 from iso benchmark platfrom_allow
The controller does not support connected ISO yet, so it does not make
sense to build it form devices that build both host and controller.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2022-06-17 10:49:51 -05:00
Benjamin Björnsson
bc55f57349 drivers: sensor: bq274xx: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-06-17 08:52:44 -05:00
Kumar Gala
384bcc812b samples: apds9960: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-16 10:51:42 -05:00
Kumar Gala
25d8b781fb samples: adt7420: Convert sample to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as we work
on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-16 10:35:48 -05:00
Krzysztof Chruscinski
c5f2cdef09 logging: Remove logging v1 from the logging
Remove v1 implementation from log_core and all references in the tree.
Remove modules used by v1: log_list and log_msg.
Remove Kconfig v1 specific options.
Remove Kconfig flags used for distinction between v1 and v2.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-16 10:51:15 -04:00
Krzysztof Chruscinski
85f202744d samples: logging: syst: Remove support for logging v1
Remove references to logging v1.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-15 10:55:26 -04:00
Krzysztof Chruscinski
6ec4aba841 samples: logging: logger: Remove logging v1 support
Remove v1 case from the logger sample.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-15 10:54:49 -04:00
Gerard Marull-Paretas
6f9f45d034 samples: remove redundant <zephyr/zephyr.h> includes
Files including <zephyr/kernel.h> do not have to include
<zephyr/zephyr.h>, a shim to <zephyr/kernel.h>.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-15 09:13:11 +02:00
Kumar Gala
8cb69f2c6b samples: amg88xx: Convert sample to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as we
work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-14 09:21:21 -05:00
Veijo Pesonen
e90e1fc539 net: lwm2m: adds disabled SenML JSON to the...
...v1.1 overlay

Shows the dependencies which makes it easier to enable the content
format when necessary

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-06-14 09:31:23 +02:00
Anas Nashif
93685a8e53 samples: remove intel_s1000_crb samples
Remove all samples specific to the intel_s1000_crb board.
The board is no longer supported.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-06-13 16:19:51 -04:00
Keith Packard
de7a944f40 samples/logging: Make logging sample 'main' return int
POSIX main is supposed to return int, and there's no reason not to have
this example do that.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-14 01:50:36 +09:00
Chay Guo
0d64506130 boards: Add I2C and sensor driver support on MIMXRT595-EVK
Enable I2C access to FXOS7000 sensor on the mixrt595_evk board
Tested using samples/sensor/fxos8700 for mimxrt595_evk_cm33.

Signed-off-by: Chay Guo <changyi.guo@nxp.com>
2022-06-13 12:10:57 +02:00
Kumar Gala
bb03af637c drivers: gpio: remove unused HAS_DTS_GPIO Kconfig symbol
All the gpio drivers are based on devicetree and thus we always set
HAS_DTS_GPIO, thus we don't need this Kconfig option anymore.  Remove
uses as its safe to assume DTS is supported for GPIO.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-10 09:47:31 +02:00
Anas Nashif
157869338f samples: hci_spi: remove dependency on hw
This test only runs on one platform, so make sure we do not exclude the
only platform using some other hardware related filters.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-06-09 12:15:28 -04:00
Daniel Leung
cf5a6e816d samples: syst: exclude XCC from C++ tests
The logging subsys has evolved to a point where XCC/GCC cannot
compile anymore as it only supports C++98. So exclude C++
samples from build. And just use XCC/Clang instead for C++.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-06-09 11:34:41 +02:00
Keith Packard
be606f0932 samples/net/virtual: Increase sprintk buffers to hold parameter types
This sample app uses a stack buffer to hold the interface name which is
generated at runtime using sprintk. The buffer is only sized for the
expected range of values, not the full possible range of the datatype
(int).

To mitigate this, increase the size of the buffer to hold the full range of
an int value.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-09 11:33:09 +02:00
Chay Guo
191f93c325 boards: Add analog comparator support on MIMXRT1170 EVK
Updated mcux_acmp sample to support discrete mode config.
Add ACMP support on MIMXRT1170 EVK.

Signed-off-by: Chay Guo <changyi.guo@nxp.com>
2022-06-09 11:30:49 +02:00
Seppo Takalo
e0296ca0b9 net: lwm2m: Allow initializing opaque and string data to zero length
By default, any string or opaque data that LwM2M engine initializes
sets data lenght to same value as given buffer length for that
resource.

However, on run time, engine keeps track how much data is written
to each resource, so when reading from any resource, should only
return data that has been written there. But uninitialized resources
return the content of the whole buffer.

Fixed the problem by introducing macros INIT_OBJ_RES_LEN(),
INIT_OBJ_RES_MULTI_DATA_LEN() and INIT_OBJ_RES_DATA_LEN() that
allows you to give the amount of data existing in buffer when
the resource is initialized. This sets the data_len and max_data_len
variables correctly.

Also introduced new functions lwm2m_engine_get_res_buf() and
lwm2m_engine_set_res_buf() that distinct between data size and
buffer size. Deprecated the previous functions
lwm2m_engine_get_res_data() and lwm2m_engine_set_res_data()

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2022-06-09 11:30:37 +02:00
Daniel Leung
fbf0fddbe2 samples: logging/syst: exclude XCC from logging v2 tests
XCC does not support _Generic as it is being used by the runtime
tagged argument feature. So exclude them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-06-08 09:31:42 -04:00
Mariusz Skamra
868b180d64 Bluetooth: Make use of BT_CODEC_LC3_CHAN_COUNT_SUPPORT macro
Use the BT_CODEC_LC3_CHAN_COUNT_SUPPORT macro to define the supported
channel counts.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-06-08 12:45:34 +02:00
Emil Gydesen
c513fd87e1 Bluetooth: ISO: Rename sn to seq_num
Rename the `sn` field(s) to `seq_num` to be more readable
and clear what the value covers.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-07 18:53:44 +02:00
Emil Gydesen
65b5db6e3a Bluetooth: ISO: Rename ISO_INTERVAL_MIN/MAX
Rename the BT_ISO_INTERVAL_MIN/MAX to
BT_ISO_SDU_INTERVAL_MIN/MAX to avoid confusing this
the the ISO interval which is different from the SDU
interval.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-07 18:53:44 +02:00
Emil Gydesen
6786bbdb32 Bluetooth: ISO: Add sn and ts to bt_iso_chan_send
Add two new parameters to bt_iso_chan_send:
sn: The packet sequence number which shall be incremeted
per SDU interval.
ts: An optional timestamp value used to synchronize SDUs.

The sequence number in the API uses a 32-bit value even though
the sequence number for the HCI command is 16-bit. This is to
properly handle wrapping of sequence numbers, which is much
easier to do with additional bits allocated.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-07 18:53:44 +02:00
Carlo Caione
86bb739b7b reserved_memory: Remove it and cleanup
The reserved memory mechanism (sections and regions definition) has been
entirely replaced, greatly extended and made it better by the work done
on the zephyr,memory-region compatible.

Since there is are no actual users, we can remove it.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-06-07 09:41:57 -07:00
Gerard Marull-Paretas
29e321d89a samples: drivers: adc: adjust README
- Inform about the requirement to configure ADC channels in Devicetree
- Fix sample output example

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-08 01:17:31 +09:00
Gerard Marull-Paretas
0753dc2a12 samples: drivers: adc: minor fixes and cleanups
- Improve include list, so that file is self-contained
- Don't use an array type for the samples buffer, as its length is 1
- Improve some error messages
- Use PRId16/32 for printing fixed-width signed integers

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-08 01:17:31 +09:00
Gerard Marull-Paretas
765818283c samples: drivers: adc: rely on Devicetree channel configuration
Simplify sample by relying exclusively on channel data from Devicetree.
This change makes sample simpler and more portable at the same time.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-08 01:17:31 +09:00
Gerard Marull-Paretas
adbc83fbf6 samples: drivers: adc: configure ADC channel/s in Devicetree
It is now possible to configure ADC channels in Devicetree. This makes
code more portable, since there is no need to hardcode hardware specific
bits in the C sources.

This patch adds channel/s configuration for all support sample overlays.
Hardcoded values have been used:

- Resolution: 12-bit
- Gain: 1
- Reference: internal
- Acquisition time: default

Some nRF channels have been adjusted to include resolution as well.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-08 01:17:31 +09:00
Gerard Marull-Paretas
b31ecf72df samples: drivers: adc: remove redundant controller labels
The controller name can be obtained from its device name field instead.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-08 01:17:31 +09:00
Daniel Leung
de4f21c75b samples: logging/syst: catalog msg now support 64-bit arch
This adds to the usual qemu_x86_64 and qemu_cortex_a53 to
the entries for Sys-T catalog message in sample.yaml.
As the Sys-T backend has been updated to support 64-bit
for catalog messages.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-06-08 00:15:55 +09:00
Daniel Leung
fee58e8bf7 samples: logging/syst: convert to use integration_platforms
Convert the remaining platform_allow into
integration_platforms so to be consistent.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-06-08 00:15:55 +09:00
Gerard Marull-Paretas
f875d027a0 samples: bluetooth: peripheral_hr: remove pinmux
Remove pinmux dependency, as it is going to be deprecated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-06 15:39:50 -07:00
Gerard Marull-Paretas
5bef7e71dd samples: basic: minimal: remove pinmux
Remove pinmux dependency, as it is going to be deprecated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-06 15:39:50 -07:00
Dominik Ermel
2453e4de00 samples/mgmt/mcumgr: Remove info on BT tiny configuration
The BT tiny configuration has been removed some time ago,
but documentation has been still referencing it.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-06-05 14:47:50 +02:00
Carlo Caione
01305942f6 ipc: static_vrings: Support DT-defined buffer size
Recently OpenAMP introduced the possibility to set the sizes for TX and
RX buffers per created instance. Expose this also to Zephyr users by
using a DT property "zephyr,buffer-size".

For the sake of simplicity use the same DT property to set the buffer
size for both TX and RX buffers.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-06-05 14:46:18 +02:00
Yuriy Vynnychek
3960bf598c Bluetooth: samples: peripheral_sc_only support for tlsr9518adk80d
Provided sample support for Telink tlsr9518adk80d board.
Set CONFIG_BT_TINYCRYPT_ECC=n (supported by BLE controller).

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2022-06-05 14:45:10 +02:00
Joakim Andersson
63a65bead0 samples: tfm_integration: Set TF-M profile type to none.
Set the TF-M profile type to none for TF-M integration samples.
If the default profile has been set to something else these samples may
fail.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-06-05 14:42:20 +02:00
Kamil Piszczek
53b70dc012 samples: mcumgr: smp_svr: increase dfu throughput over Bluetooth
Adjusted Bluetooth parameters that have an impact on MTU and DLE
negotiation during a connection.

Enabled the Packet Reassembly feature from mcumgr libraries in the SMP
Server sample with the Bluetooth transport configuration. This change
should increase the overall throughput of the DFU process over
Bluetooth.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2022-06-05 14:29:42 +02:00
Jose Alberto Meza
72f9797fee samples: drivers: adc: Enable test for mec172xevb_assy6906
Add overlay for mec172xevb_assy6906 board to enable 4 channels.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2022-06-05 14:29:05 +02:00
Nickolas Lapp
b425627629 RT10xx Power Management: Enable RT1060 Soft Off Mode and Fixup PM API
This PR adds a soft off mode to the RT10xx Power Management API.
Additionally, it corrects the PM API function in rt10xx_power.c to
use the correct function prototype to be properly overridden.

Signed-off-by: Nickolas Lapp <nickolaslapp@gmail.com>
2022-06-05 14:16:43 +02:00
Emil Gydesen
f05e608f9a samples: Bluetooth: Add tx support for unicast audio server
Add support to send mock data on any source endpoint/streams
configured by the client.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:13:33 +02:00
Emil Gydesen
0334853e42 samples: Bluetooth: unicast_audio_server multi-cis support
Add support for multiple CIS.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:13:33 +02:00
Emil Gydesen
21903ab65f samples: Bluetooth: Update unicast audio client to multi-cis
Add support for setting up, configuring, and using
multiple CIS in the sample.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:13:33 +02:00
Emil Gydesen
57e1056bef Bluetooth: ISO: Guard sec_level with CONFIG_BT_SMP
The ISO security implementation works by verifying
against the acl (bt_conn) sec_level field. The
bt_conn sec_level field is only available
if CONFIG_BT_SMP is enabled, so this commit
adds guards for all ISO security checks as well.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-06-05 14:12:50 +02:00
Andrzej Głąbek
a78e7c5c90 samples/drivers/adc: Fix output specification
This is a follow-up to commit f5ffd05e6b.

Since twister removes leading spaces from received lines before
further processing, the regular expression for checking the output
produced by the sample cannot contain such space. Also negative
values read from ADC channels need to be allowed.
For consistency, remove the leading space also in the actual string
printed by the sample.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-02 16:04:04 +02:00
Gerson Fernando Budke
2ef3fe7bca samples: net: cloud: tagio: Drop pinmux dependency
This dependency it is not required since majoprity of platforms are
working with new pinctrl API. This drops the pinmux dependency.

Fixes #46091

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-05-30 10:31:41 +02:00
Stephanos Ioannidis
c875893e00 samples: clock_control_litex: Fix stale devicetree node reference
This commit fixes the stale reference to the devicetree
`clock0@82005000` node, which was changed in the commit
7b601b7f50.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-29 16:52:31 -04:00
Keith Packard
d1dc3e823a samples/soc_flash_nrf: Fix printf usage with off_t values
off_t is often unsigned long, which means printf needs to use %lx. Insert
a cast in case the value is unsigned int.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-05-27 15:34:34 -07:00
Fabio Baltieri
e24314f10f include: add more missing zephyr/ prefixes
Adds few missing zephyr/ prefixes to leftover #include statements that
either got added recently or were using double quote format.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-05-27 15:20:27 -07:00
Kevin Townsend
5d72b5b1a4 samples: tfm: Add fixed PID to custom partition
As per 'Adding Secure Partition' in the TF-M documentation,
every secure partition must have a unique 32-bit partition ID.

If no value is provided, one will be auto-allocated by the
TF-M build system, but this can lead to unpredictable behaviour
in some cases. One example is key derivation where the partition
ID is used as part of the key derivation inputs. Different builds
can results in different PID values being assigned, resulting
in inconsistent key derivation output.

To avoid these problems, this commit sets a fixed PID as a
best pratice.

A value of 1000 has been set to place it within the
'PSA and user Partitions' range (256 - 2999) described in the
documentation.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-05-27 15:18:01 -07:00
Dominik Ermel
1d6b275c2a samples/mgmt/mcumgr: Fix CDC ACM sample build information
The commit adds missing info on required usb.overlay.

Fixes: #45834

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-05-25 13:51:32 -07:00
Fabio Baltieri
67a0f95aed dts: fix a bunch of odd partition values dts entries
Fix various board fixed-partition definitions where the devicetree cell
has been defined oddly, such as 9 nibbles (which makes no sense since
the cells are 32 bit) or 7 nibbles where all the others are 8.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-05-25 14:21:04 +02:00
Maciej Perkowski
4830cbd802 samples: spi: bitbang: Fix missing pass conditions
The sample did not have defined pass condition and was failing
due to a timeout. Add harness: consol and an explicit regex matching
the sample's output so it can pass on a hw. In addition, a requirement
for a gpio_loopback fixture was added to the sample.yaml.

fixes: #45229

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2022-05-24 08:57:12 -07:00
Emil Gydesen
12eda22dfe samples: Bluetooth: Fix bad info->flags check in unicast_server
The check did not properly check the info->flags as a bitfield,
and thus never decoded the data.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-05-24 08:50:07 -07:00
Francois Ramu
7054fda0c8 samples: drivers: led ws2812 running on the nucleo h743
Define the configuration through an overlay file
to run the sample on the nucleo_h743zi target board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-05-24 08:48:33 -07:00
Lukasz Majewski
c5faa3df14 arm: Enable NOCACHE_MEMORY on nucleo_h743zi when littlefs sample is run
It has been validated that the nucleo_h743zi board works correctly,
with '__nocache' buffers and data caches enabled, so this patch enables
support for the former.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-05-24 08:47:20 -07:00
Kevin Townsend
06cd8abde1 samples: tfm_integration: Add missing MPS3 support
Adds mps3_an547_ns to certain TF-M samples to improve
testing in CI by including the Arm Cortex-M55 platform.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-05-23 15:28:36 +02:00
Kevin Townsend
8a252422c8 samples: tfm_integration: Remove LPC55s69 tests
Removes lpcxpresso55s69_ns from certain sample.yaml files due
to changes required for TF-M 1.6.0 not being added to the
upstream project before the 1.6.0 release.

The NXP SDK available for download from NXP contains the required
updates, but these will need to be committed to TF-M, then made
available in the Zephyr fork, at which point the yaml files here can
have the LPC added back.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-05-23 15:28:36 +02:00
Emil Gydesen
78962268c2 samples: Bluetooth: Broadcast audio scan and adv data size increase
Increases the scan and adv data sizes to better support
the extended advertising data and periodic advertising
data (BASE).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-05-19 13:21:19 +02:00
Emil Gydesen
a263308cf2 samples: Bluetooth: Audio sample board files cleanup
Clean up some of the board specific configuration files.
Removed all CONFIG_BT_CTLR* configs from the nRF5340
appcore conf files as that does not compile the controller.

Ensured that the ISO buffer in the controller for
nRF52840 can contain SDUs from all BAP LC3 minimum
requirements, as the controller does not yet
support segmentation of SDUs.

Also fixed a few bad configurations (broadcast sink not
enabling the sync support etc.).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-05-19 13:21:19 +02:00
Christoph Heller
12532ee13d samples: littlefs: Add support for nucleo_h7a3zi_q board
Add specific configuration and DTS overlay files for NUCLEO-H7A3ZI-Q
board to the littlefs example project. The second half of the SOC flash
is used as flash partition for littlefs.

Signed-off-by: Christoph Heller <chris@metanetics.de>
2022-05-18 10:54:36 +02:00
Filip Kokosinski
a0aa8c76d6 samples/philosophers: use stack_data_t type
This commit changes the pointer type used in the philosophers demo to
`stack_data_t *` when stacks are used for synchronization purposes.
The previously used `void *` was causing AMO address-misaligned
exception on the HiFive Unleashed platform.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2022-05-18 10:53:50 +02:00
Francois Ramu
fd5189e6f9 samples: drivers: pwm led running on stm32 boards
On the stm32l073rz nucleo and stm32f091rc nucleo
boards, the DTS pwm-leds node is disabled, because
the output pin might conflict with SPI1.
It is necessary to enable the node in the overlay
to compile and run the sample.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-05-17 18:20:55 +02:00
Vinayak Kariappa Chettimada
f755550ec0 samples: Bluetooth: Remove explicit Ext and Periodic Adv Kconfig enable
Remove the explicit enable of Extended and Periodic
Advertising support in Controller, the feature is no
longer experimental in the Controller and is now enabled
by default when application uses them by enabling as
Host feature.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-05-16 18:25:14 +02:00
Felipe Neves
b3611b4cd0 samples: net: wifi: add mikroe wifi bt click
as supported wifi interface for this sample.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-05-15 21:34:32 +02:00
Emil Gydesen
f34c9132d6 Bluetooth: Sample: Add iso get info use to iso connected benchmark
Add a call to bt_iso_chan_get_info for each CIS in the sample
to ensure that we don't attempt to send any data on a CIS
that is RX only.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-05-15 21:32:19 +02:00
Anas Nashif
8faca29fea tests/samples: fix usage of integration_platforms
integration platforms can't be filtered out, adapt tests so that those
platforms are always available for testing.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-05-14 14:49:59 -04:00
Anas Nashif
bfe16bdc17 samples: logging: fix filtering in yaml file
integration platforms should not be in common section if we have
scenarios with different set of integration platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-05-13 17:25:56 -07:00
Keith Packard
05946ed9b2 lib/libc/minimal: Move sqrt/sqrtf from samples
The lmp90100_evb sample included an implementation of double sqrt, and the
on_off_level_lighting_vnd_app sample included an implementation of float
sqrtf. Move that code into minimal libc instead of requiring applications
to hand-roll their own version.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-05-14 08:49:36 +09:00
Andrzej Głąbek
07b4362bac samples/drivers/adc: Add support for nRF52840 DK and nRF51 DK boards
The overlay for the nRF52840 DK board uses ADC controller child nodes
for specifying channel configurations and it shows how to configure
a channel in differential input mode, so it can serve as an example
of how to use these new possibilities. The overlay for the nRF51 DK
board shows how to use a specific ADC resolution (the default 12 bit
setting is not supported by nRF51 SoCs).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-05-13 12:46:06 -07:00
Andrzej Głąbek
f5ffd05e6b samples/drivers/adc: Rework to use channel configurations from DT
Allow specifying configuration of channels through child nodes of ADC
controllers. This way analog inputs can be specified for channels in
SoCs that require this and it is also possible, for example, to use
different gain or reference selections for particular channels.

This commit also removes a few former limitations of the sample: now
it is possible to use more than 2 channels and each channel can use
a different ADC controller. Also the ADC resolution to be used can be
specified through devicetree.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-05-13 12:46:06 -07:00
Emil Gydesen
3f247b212b Bluetooth: ISO: Add Kconfig for ISO central/peripheral
Add two new Kconfigs: BT_ISO_CENTRAL and BT_ISO_PERIPHERAL
that is used to do central or peripheral only builds,
similar to the BT_CENTRAL or BT_PERIPHERAL Kconfigs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-05-13 12:44:47 -07:00
Francois Ramu
ffa1532be2 samples: drivers flash add a test case for stm32 octospi
This add a new sample application to test and validate
the stm32 octospi driver on the NOR octo-flash present on
stm32 disco kits
There should be a special case to erase the complete flash.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-05-12 14:56:25 -05:00
Mahesh Mahadevan
5f5337b9f3 samples: display: Increase Heap size for RT1170 EVK
Increase the heap size for RT1170 EVK to allocate the
display buffers for a 720x1280 display

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-05-12 09:26:50 -05:00
Jimmy Brisson
806ee8601c tests: psa: Allow more time between watchdog resets in qemu
mps2_an521 and mps3_an547 need yet more time with TFM 1.6 to pass their
tests. This change was recomended by RajKumar Kanagaraj. Thanks!

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2022-05-12 10:33:52 +02:00
Tomislav Milkovic
9a4f148f02 samples: subsys: display: lvgl: add config for stm32f746g_disco
Enable pointer device and set its name in LVGL Kconfig

Signed-off-by: Tomislav Milkovic <tomislav.milkovic95@gmail.com>
2022-05-12 09:21:46 +02:00
Robert Lubos
7acb31894f samples: net: openthread: Increase main stack size in OT samples
Since the recent OpenThread update, OT needs more stack to initialize,
therefore bump the stack size in samples using OpenThread.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-05-11 11:02:57 +02:00
Gerard Marull-Paretas
23225c68c6 samples: basic: servo_motor: delete nrf52840dk wrong overlay
The overlay was accidentally pushed as part of another commit while
doing some pinctrl/pwm tests.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-11 10:49:05 +02:00
Piotr Dymacz
e02acca690 samples: cc13x2_cc26x2: system_off: fix force state usage
This is the same fix as the one introduced in 49520eea57 ("samples: nrf:
system_off: Fix force state usage") for nRF boards. Quoting original
commit:

  The sample cannot spin in an infinity loop because the idle thread
  will not run and consequently the forced state will not be used.

Without this fix, the system doesn't enter SOFT_OFF state:

  *** Booting Zephyr OS build zephyr-v3.0.0-3495-ga456c5274614  ***

  cc1352r1_launchxl system off demo
  Busy-wait 5 s
  Sleep 2000 us (IDLE)
  Sleep 3 s (STANDBY)
  Entering system off (SHUTDOWN); press BUTTON1 to restart
  ERROR: System off failed

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-05-11 10:48:45 +02:00
Henrik Brix Andersen
3f97d11afd drivers: can: convert enum can_mode to a bit field
Convert the can_mode enum to a bit field to prepare for future extensions
(CAN-FD mode, transmitter delay compensation, one-shot mode, 3-samples
mode, ...).

Rename the existing modes:
- CAN_NORMAL_MODE   -> CAN_MODE_NORMAL
- CAN_SILENT_MODE   -> CAN_MODE_LISTENONLY
- CAN_LOOPBACK_MODE -> CAN_MODE_LOOPBACK

These mode names align with the Linux naming for CAN control modes.

The old CAN_SILENT_LOOPBACK_MODE can be set with the bitmask
(CAN_MODE_LISTENONLY | CAN_MODE_LOOPBACK).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-05-11 10:47:54 +02:00
Sylvio Alves
54aa7a9a56 samples: tests: exclude esp32 platform
Remove ESP32 and ESP32S2 from not working samples
and tests. Reason for not working is not enough memory
space in RAM to execute it. This can be worked out as next steps.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-05-11 10:47:27 +02:00
Esteban Valverde
3158b1bc26 samples: drivers: adding sample to use Cyclone V SoC FPGA DK LCD display
LCD display is connected to the I2C bus SoC bus in the development kit,
this sample guides the user on how to use the LCD display with I2C commands

Signed-off-by: Esteban Valverde <esteban.valverde.vega@intel.com>
2022-05-10 13:29:47 -04:00
Emil Gydesen
83c7baf34a Bluetooth: Audio: Add recv_info to audio recv callback
The audio stream receive callback now contains a
recv_info struct, which contain crucial information
such as timestamps and packet validity.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-05-10 18:56:28 +02:00
Emil Gydesen
6191a76f55 Bluetooth: Audio: Add _DIR_ infix to BT_AUDIO_SINK/SOURCE
The values represent an enum, and it makes sense for the
enum values to follow the enum type name, so an
_DIR_ infix was added to the values.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-05-10 18:56:00 +02:00
Emil Gydesen
19d7420f07 Bluetooth: Audio: Standadize the use of enum bt_audio_dir
Many functions and struct fields had the directory/type
value, but named in different ways and stored in different ways.

This change updates all uses of it to use the same name
and type.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-05-10 18:56:00 +02:00
Emil Gydesen
6b41e9991d Bluetooth: Audio: Rename enum bt_audio_pac_type
The enum bt_audio_pac_type does not fully
represent the what the value is used for.

The typical use of it is not for just published
audio capabilities (PAC), but rather describes the
type, or direction, of audio endpoints.

For the unicast client, the type/direction is
relative to the unicast server.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-05-10 18:56:00 +02:00
TLIG Dhaou
4de1d01956 boards: stm32: use size helpers to describe size of storage partition
The goal of this commit is to update existing STM32 boards descriptions
to use these size "DT_SIZE" macros to enhance readability. To realize this
i used a python script, which will detect the STM32 Boards
/zephyr/board/arm, and then will update in the dts files the partition
description using "DT_SIZE_K" and "DT_SIZE_M" macros.
Check manually and modify in .overlay files in samples and tests.

Signed-off-by: TLIG Dhaou <dhaou.tlig-ext@st.com>
2022-05-10 09:22:43 -05:00
Maureen Helm
de514bb7d0 dts: arc: synopsys: Move SoC devicetree includes under a vendor dir
Cleans up SoC devicetree include file locations to follow the convention
of dts/<arch>/<vendor>/

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-05-09 17:54:48 -04:00
Gerard Marull-Paretas
1d45511888 samples: fade_led: update include paths
Use the <zephyr/...> prefix.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-09 12:45:29 -04:00
Gerard Marull-Paretas
d342e4c4c1 linker: update files with <zephyr/...> include prefix
Linker files were not migrated with the new <zephyr/...> prefix.  Note
that the conversion has been scripted, refer to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-09 12:45:29 -04:00
Erwan Gouriou
d6a4b6b9e4 samples: Migrate overlay includes to <zephyr/...>
Leftover of work done on #45420 and #45417.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-05-09 10:34:42 -04:00
Daniel DeGrasse
49b06dbf9e boards: lpcxpresso55s28/lpcxpresso55s69: add pinmux for lpadc
Add pinmux settings for lpadc to LPCXpresso55s69 and LPCXpresso55s28
boards. Enable ADC driver sample for LPCXpresso55s69, to aid in testing
pinmux settings.

Fixes #45401

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-09 08:56:11 -05:00
Emil Gydesen
d72126d2d9 samples: Bluetooth: Update broadcast audio samples to new API
The broadcast audio source API changed the array type
when creating a source or sink.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-05-09 09:28:14 +02:00
Emil Gydesen
6e60451e09 Bluetooth: Audio: Change array of unicast streams to array of pointers
In bt_audio_unicast_group_create, bt_audio_unicast_group_add_streams
and bt_audio_unicast_group_remove_streams to use an array
of pointers, instead of an array of streams.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-05-09 09:28:14 +02:00
Kamil Piszczek
d87552a128 drivers: bluetooth: hci: rpmsg: use chosen to abstract ipc instance
Added chosen syntax in Device Tree to abstract the IPC device that is
used with the IPC service module in the Bluetooth HCI RPMsg driver.
Ported affected boards to declare this alias.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2022-05-06 14:15:27 +02:00
Kamil Piszczek
d550320af6 dts: arm: nordic: nrf5340: clean up ipc in dts
Cleaned up the IPC configuration for nRF5340 SoC in Device Tree. This
change fixes the (simple_bus_reg) warning about the missing or empty
reg/ranges property.

This is a follow-up to commit cf6a58d.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2022-05-06 14:15:27 +02:00
Vinayak Kariappa Chettimada
6f84446659 samples: Bluetooth: iso_receive: Print ISO information
Update the sample to print the ISO information like flags,
sequence number and timestamp received in the ISO receive
callback.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-05-06 11:32:11 +02:00
Gerard Marull-Paretas
c7b5b3c419 samples: migrate includes to contain <zephyr/...> prefix
In order to bring consistency in-tree, migrate all samples to the use
the new prefix <zephyr/...>. Note that the conversion has been scripted:

```python
from pathlib import Path
import re

EXTENSIONS = ("c", "h", "cpp", "rst")

for p in Path(".").glob("samples/**/*"):
    if not p.is_file() or p.suffix and p.suffix[1:] not in EXTENSIONS:
        continue

    content = ""
    with open(p) as f:
        for line in f:
            m = re.match(r"^(.*)#include <(.*)>(.*)$", line)
            if (m and
                not m.group(2).startswith("zephyr/") and
                (Path(".") / "include" / "zephyr" / m.group(2)).exists()):
                content += (
                    m.group(1) +
                    "#include <zephyr/" + m.group(2) +">" +
                    m.group(3) + "\n"
                )
            else:
                content += line

    with open(p, "w") as f:
        f.write(content)
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 11:29:59 +02:00
Mariusz Skamra
d43272efdf samples: unicast_audio_server: Remove unused buf pool
The statically defined buffer pool is unused and can be removed.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-05-04 18:57:15 -04:00
Bernardo Perez Priego
7c641e957e samples: sensor: Add sample to demonstrate NPCX ADC Comparator driver
Add sample code that demonstrate the usage for Nuvoton ADC Comparator
driver, this driver is available for NPCX microcontroller family,
this sample is supported on npcx9m6f_evb board.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
2022-05-03 08:51:53 -05:00
Sylvio Alves
7fe5ab315a samples: boards: esp32: add flash encryption sample
Sample code to demonstrate and document ESP32
flash encryption feature.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-05-02 10:30:24 -05:00
Carlo Caione
55dc21ffb9 openamp: Bump to v2022.04.0
Bump OpenAMP to v2022.04.0 and fix Zephyr terminology linked to OpenAMP.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-05-02 08:44:17 -05:00
Maciej Perkowski
bf3cd116e9 samples: tmf: psa: Increase timeout for psa_protected_storage_test
The test takes longer and requires its timeout to be increased
as in this commit.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2022-04-29 16:22:32 +02:00
Veijo Pesonen
aa42e3e238 net: lwm2m: enable SenML CBOR
With LwM2M v1.1 SenML CBOR is preferred over SenML JSON.

TLV is on by default only with v1.0.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-04-29 16:10:43 +02:00
Krzysztof Chruscinski
3b990c9ddd samples: shell: shell_module: Add section subcommands
Extend sample to show how to use alternative approach of adding
subcommands using new APIs: SHELL_SUBCMD_SET_CREATE, SHELL_SUBCMD_ADD
and SHELL_SUBCMD_COND_ADD.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-04-29 14:54:08 +02:00
Vinayak Kariappa Chettimada
2da7a8d786 samples: Bluetooth: hci_rpmsg: Fix Broadcast and Sync Receiver prj conf
Fix Broadcast ISO and Synchronized Receiver project
configurations related to IPC use.

Relates to commit cf6a58d3f6 ("bluetooth: hci: rpmsg:
use ipc service library").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-04-29 08:57:02 +02:00
Carlo Caione
69b28bfd07 pm: policy: Consider substates for state lock functions
Extend the current pm_policy_state_lock_*() functions to support
substates.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-04-28 16:32:23 +02:00
Rajkumar Kanagaraj
725ce535f2 sample: tfm: Improve the error handling at tfm_secure_partition NS-side
- Previously non-secure request at the 6th run expected to return status
  "-135 (PSA_ERROR_INVALID_ARGUMENT)" which is the expected status so
  updating "if" condition on the non-secure side handles this expected
  type error status from the secure side.
- update sample YAML harness config regex of Digest message as this gets
  compared at the run of twister.
- Update the readme console logs.

Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
2022-04-28 14:18:24 +02:00
Gerard Marull-Paretas
ae91933c4a drivers: pwm: always use nanoseconds for set
In order to be consistent with what is possible in Devicetree, always
take a period in nanoseconds. Other scales or units may be specified by
using, e.g., the PWM_MSEC() macros (all of them converting down to
nanoseconds). This change then deletes the "_nsec" and "_usec" versions
of the pwm_set call.

Note that this change limits the period to UINT32_MAX nanoseconds,
~4.3s. PWM is, in generali, used with periods below the second so it
should not be a problem.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-28 11:29:38 +02:00
Gerard Marull-Paretas
9e964d0a61 samples: basic: servo_motor: use pwm_dt_spec
The sample did not use PWM in a proper way: it relied on a PWM device
handle, but channel or flags were hardcoded in the code. This patch
changes the sample to use a local binding ("pwm-servo") where the `pwms`
property is defined. This allows to make use of pwm_dt_spec facilities,
reducing the overall sample complexity and making it more portable
without editing the source code. The custom binding also requires to
provide the minimum/maximum pulse width so that different servos can be
easily plugged in without the need to edit sources.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-28 11:29:38 +02:00
Gerard Marull-Paretas
cd2d867fa6 samples: basic: rgb_led: use pwm_dt_spec
Simplify the sample by using pwm_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-28 11:29:38 +02:00
Gerard Marull-Paretas
f60bb8741b samples: basic: fade_led: use pwm_dt_spec
Simplify sample by using pwm_dt_spec.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-28 11:29:38 +02:00
Gerard Marull-Paretas
627f9e9ec8 samples: basic: blinky_pwm: use pwm_dt_spec
Simplify the sample by using pwm_dt_spec facilities.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-28 11:29:38 +02:00
Gerard Marull-Paretas
10ee44c94b drivers/samples/tests: remove usage of deprecated PWM APIs
Use the new API calls that remove pin naming.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-28 11:29:38 +02:00
Keith Packard
6f9f8c1e32 samples, tests: Add z_libc_partition to all test domains
When a memory domain is initialized, the z_libc_partition must be
included so that critical libc-related data can be accessed.

On ARM processors without TPIDRURO when THREAD_LOCAL_STORAGE is enabled,
this includes the TLS base pointer, which is used for several
thread-local variables in the kernel.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-04-28 11:09:01 +09:00
Keith Packard
19c8956946 tests: Disable HW stack protection for some mpu tests
When active, z_libc_partition consumes an MPU region which leaves too
few for some MPU tests. Free up one by disabling HW stack protection.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-04-28 11:09:01 +09:00
Aleksandar Markovic
9760c83267 samples: cdc_acm_composite: Use proper type for variable 'read'
Function uart_fifo_read() returns 'int' (it may return negative values
in error cases). Its return value is stored in the variable 'read' that
is, however, of type 'size_t'.

Change the type of the variable 'read' from 'size_t' to 'int' to
accomodate proper handling of uart_fifo_read() invocation.

Coverity-CID: 248408

Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
2022-04-26 12:05:26 -04:00
Veijo Pesonen
7c6cd4c9e6 net: lwm2m: adds LwM2M v1.1 overlay
Makes possible to enable LwM2M protocol v1.1 features. Uses SenML JSON
as default content format.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-04-22 09:44:36 +02:00
Andrzej Głąbek
00f878f6f3 samples: bluetooth: mesh_demo: Align with changes in pwm_nrf5_sw driver
- add an overlay file for the bbc_microbit board with specification
  of GPIO that should be used as the PWM output to buzzer
- update a PWM related macro in the microbit specific code to refer
  to PWM channel instead of pin

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-22 09:43:26 +02:00
Andrzej Głąbek
92b3cc78e7 samples: servo_motor: Align with recent changes in pwm_nrf5_sw driver
- add `channel-gpios` property with GPIO assignment for the used PWM
  channel to the `sw_pwm` node
- replace ambiguous "pin 21" in the sample's README with "pin P19"
  that uses notation from the official micro:bit documentation and
  is consistent with this pin number within the edge_connector node

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-22 09:43:26 +02:00
Andrzej Głąbek
34630a81dd samples: bbc_microbit: Align with recent changes in pwm_nrf5_sw driver
- add `channel-gpios` property with GPIO assignments for PWM channels
  to `sw_pwm` nodes
- update PWM related macros to refer to channels instead of pins
- remove no longer needed inclusion of boards/arm/bbc_microbit/board.h

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-22 09:43:26 +02:00
Aleksandar Markovic
7af3b8cbb3 doc: Fix links to Zephyr include directory on Github
At some recent point, directory <zephyr-root>/include was moved to
<zephyr-root>/include/zephyr. However, links from documentation to
Zephyr source on Github were not updated. Update them now.

Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
2022-04-21 18:35:16 -04:00
Daniel Leung
c5244ffa2b samples: logging/syst: build for C++ too
This extends the samples to build for C++ using the same code.
This shows MIPI Sys-T can work C++ too.

The change to main.c regarding to the struct log_msg_ids is
simply that the compiler errored out complaining the members
must be initialized the same order as the declaration.

Also C++ dislikes a string literal being assigned to char*,
so assign them to const char* instead.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-04-21 11:38:42 -04:00
Peter Mitsis
195072dcd1 samples: syst: Update sample.yaml
Updates the sample.yaml file to exclude problem architectures
from this sample project. SYS-T does not support 64-bit or
big endian architectures. The posix arch is excluded as it
is generating numerous anomolous runtime messages because it
does have the means to determine when data resides in the
rodata section.

It also converts the list of allowed platforms to lists of
platforms to use for integration testing. This helps to increase
general testing coverage.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2022-04-20 10:25:16 -04:00
Aastha Grover
7141c8763f sample: syst: Add intel_adsp_cavs support
Adding configurations for enabling this sample project on cavs
platforms. This patch also contains a fix to mipi_syst library
which resolves the memory alignment issue across different
architectures.

Fixes #43344

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2022-04-20 10:25:16 -04:00
Glauber Maroto Ferreira
a58193a333 esp32: samples: overlays: use pin states
Updates samples' overlays to use pin states.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-04-20 13:27:47 +02:00
Anas Nashif
e2a3e72a02 samples: synchronization: use k_thread_cpu_pin
Use shortcut API to pin thread to a CPU.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-19 13:05:09 -04:00
Anas Nashif
2d97bdd85d samples: add module requirement into samples
Do not build those samples if the needed modules are not available in
the workspace.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-19 09:38:55 -04:00
Aleksandar Markovic
8a32b05905 doc: Fix spelling errors in .rst files
Fix spelling errors in assorted .rst files. The errors were found
using a tool called 'codespell'.

Signed-off-by: Aleksandar Markovic <aleksandar.markovic.sa@gmail.com>
2022-04-19 11:48:26 +02:00
Kai Vehmanen
33ede77bed samples/subsys/audio/sof: enable CONFIG_LOG_PRINTK
Route printk()'s through logging subsystem. This is required
to get clean OS panics in log output. If this is not defined, e.g.
the stack backtrace is mixed with the Zephyr OS panic information.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-04-19 11:47:26 +02:00
Yuval Peress
aaf0c6e827 modules: chre
Add initial build rules for CHRE. This change includes a Kconfig and
CMakeLists.txt to begin compiling code from the CHRE module.
Additional files are included to bridge the APIs from CHRE's to
Zephyr's. These can be found in modules/chre/include and
modules/chre/src.

Additionally, add a sample to make sure that the module builds. It can
be built via:

```
$ west build -b native_posix -p=always samples/application_development/chre
```

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-18 13:21:52 -05:00
Krzysztof Chruscinski
b9a25568aa samples: logging: dictionary: Add frontend support
Extended sample to support UART dictionary frontend.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-04-13 13:45:36 -07:00
Jamie McCrae
51e3cecb31 doc: mcumgr: Fix reference formatting
Documentation build for 2.7 was failing due to using only a single
character instead of double for showing a module name.

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2022-04-13 13:40:16 -07:00
Nicolas Pitre
5393103084 hello_world_user: don't always assume userspace
Print whether or not the code is actually in usermode.
Fail the execution with an assertion if not the case.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-04-13 13:29:52 -07:00
Lauren Murphy
2faa6f5c0b samples: misc fixes to docs
Changes console blocks in hello_world and magic_wand tflite-micro
samples to Kconfig blocks to match content. Fixes typos in
some networking samples so that code blocks display instead
of being hidden. Fixes path to litex-vexriscv-tflite.resc.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2022-04-12 08:33:32 -04:00
Szymon Czapracki
af2e781f5a Bluetooth: Immediate Alert Service
This commits adds IAS for zephyr bluetooth.

Signed-off-by: Szymon Czapracki <szymon.czapracki@codecoup.pl>
2022-04-12 09:59:34 +02:00
Veijo Pesonen
3071173e87 samples: lwm2m: enables LwM2M shell commands
Makes LwM2M SEND operation possible.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-04-12 09:57:20 +02:00
Yuval Peress
a98f5d719e samples: Normalize .cc extensions to .cpp
Rename all .cc files to .cpp (note that no .hh files were found).
Addresses #44196

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-11 16:09:21 -05:00
Jimmy Brisson
dd8260cdcb samples: psa-firmware: Correct readme instructions
Prior instructions were incomplete, included extra, unneeded ways to
build the app.

This should simplify the instructions.

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2022-04-08 15:52:01 -07:00
Jimmy Brisson
0dcd6bd58a modules-tfm: Configure image versions with KConfig
Previously, you were required to set the image versions through the
CMake variables TFM_IMAGE_VERSION_{S,NS}. For better integration with
the rest of the zephyr build system, these are now KConfig variables
with the same name.

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2022-04-08 15:52:01 -07:00
Jimmy Brisson
b6d4788297 samples: psa-firmware: Display active Secure firmware version
This displays the secure firmware version before the nonsecure firmware
version at the beginning of boot.

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2022-04-08 15:52:01 -07:00
Jimmy Brisson
57cefda9ae samples: psa-firmware: Document purpose of split-header.py
This should provide context to this small python script

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2022-04-08 15:52:01 -07:00
Jimmy Brisson
6ec7e7b6e0 samples: psa-firmware: Push firmware over psa_fwu_write
Previously, the example was a scheleton. This patch
pushes firmware images with psa_fwu_write, and completes
the firmware update example.

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2022-04-08 15:52:01 -07:00
Kevin Townsend
eacae5e4e9 samples: tfm: PSA firmware update sample
This commit adds a sample application demonstrating how to use
the PSA Firmware Update API from TF-M. It also enables the
`FIRMWARE_UPDATE` partition to be included at build time.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2022-04-08 15:52:01 -07:00
Yuval Peress
53ef68d459 include: Prefix includes to use a scope
Move include paths and add new target_include_directories to support
backwards compatibility:
* /include -> /include/zephyr
  example: <irq.h> -> <zephyr/irq.h>

Issue #41543

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-08 19:03:32 +02:00
Alexander Wachter
b0089162e9 samples: net: socket: can: Remove LOG immediate config
Do not log immediate in the sample, because it causes stack overflows.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2022-04-08 09:31:51 +02:00
Alexander Wachter
55255a5ad4 samples: net: sockets: socketCAN: add loopback mode
Add loopback mode config to the sample so that the code
can be tested without an actual CAN network, but wit a
single board.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2022-04-08 09:31:51 +02:00
Abe Kohandel
f1e75dea50 bluetooth: ots: notify application prior to object name change
This change augments the application object name change notification to
occur prior to the actual name change done by the OTS layer.

Notifying prior to the actual name change makes it possible to inform the
application of the current name of the object as well as the new name.

Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
2022-04-08 09:31:31 +02:00
Anas Nashif
6d15643705 tests: fix filtering on integration platforms
Fixed filtering on integration platforms.

Fixes #39738

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-08 09:31:01 +02:00
Anas Nashif
2e65ee17f6 tests: eeprom: fix integration_platforms
Fix usage of integration_platforms. Do not set it when the board is
excluded using some other filters.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-04-08 09:31:01 +02:00
Titouan Christophe
1d89cc5ad8 boards: shields: x_nucleo_53l0a1: new shield
Add support for the X-NUCLEO-53L0A1 expansion board and an
accompanying sample application

Signed-off-by: Titouan Christophe <moiandme@gmail.com>
2022-04-07 14:30:01 -05:00
Gerard Marull-Paretas
e70e2fe4df samples: basic: blinky_pwm: delete overlay with LEDs not on board
Samples should run on a board if they have the peripheral connected, in
this case, if any LED on the board is connected to a PWM output. A
shield could be used to demonstrate a sample on a board that doesn't
have the required peripheral. In this case, it was also unclear where
that "external LED" had to be connected, unless one checks where channel
1 for PWM1 is routed to. All board LEDs are connected to pins that
cannot be driven by PWM.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-07 09:35:16 +02:00
Gerard Marull-Paretas
bca7e65465 boards: arm: nucleo_l073rz: define PWM LEDs
The board had PWM LEDs defined in the blinky_pwm sample, mainly because
it conflicts with SPI1 pinmux. A better approach is to still define the
PWM LEDs in the board but keep the PWM controller disabled by default.
Then, samples just need to enable the PWM controller (and disable SPI if
used simultaneously).

Also updated period to 20ms (reasonable value for a PWM-driven LED).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-07 09:35:16 +02:00
Gerard Marull-Paretas
855cb90b6a boards: arm: nucleo_l4r5zi: define PWM LEDs
The board had PWM LEDs defined in the blinky_pwm sample, mainly because
it conflicts with SPI1 pinmux. A better approach is to still define the
PWM LEDs in the board but keep the PWM controller disabled by default.
Then, samples just need to enable the PWM controller (and disable SPI if
used simultaneously).

Also updated period to 20ms (reasonable value for a PWM-driven LED).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-07 09:35:16 +02:00
Gerard Marull-Paretas
a65cec3042 boards: arm: nucleo_f091rc: define PWM LEDs
The board had PWM LEDs defined in the blinky_pwm sample, mainly because
it conflicts with SPI1 pinmux. A better approach is to still define the
PWM LEDs in the board but keep the PWM controller disabled by default.
Then, samples just need to enable the PWM controller (and disable SPI if
used simultaneously).

Also updated period to 20ms (reasonable value for a PWM-driven LED).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-07 09:35:16 +02:00
Gerard Marull-Paretas
5c61e4444b samples: fade_led/blinky_pwm: add pwm-leds compat check to filter
While the pwm-led0 alias may exist, it could happen that the node with
pwm-leds compatible is disabled, making the sample fail compilation.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-07 09:35:16 +02:00
Henrik Brix Andersen
40982395b9 samples: drivers: can: remove mcp2515 build-only configuration
Remove the MCP2515 build-only configuration from the CAN driver sample
application.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-06 11:23:06 +02:00
Casper Bonde
52843f7f9d Bluetooth: BAP: use codec configuration parameters for LC3 processing
Replace hardcoded LC3 codec config with the selected configuration
used in the GATT profiles.
The selected codec configuration on the client will be used on both
sides for LC3 encode/decode.
This required completing the LC3 macroes for building codec
cababilities and codec configuration as they were not setting the
max_frames_per_sdu and frames_per_sdu values.
So as a side effect this change adds the capability to pack multiple
audio frames into a single SDU - tested with 2 frames every 20ms.

Signed-off-by: Casper Bonde <casper_bonde@bose.com>
2022-04-06 11:00:20 +02:00
Emil Gydesen
ffedee6e39 Bluetooth: ISO: Change ISO recv flags to bitfield
Change the receive flags in the struct bt_iso_recv_info
to a bitfield instead of a single value. This will allow
us to extend the flags with more options.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-04-06 11:00:10 +02:00
Joakim Andersson
b34a944136 samples: psa_crypto: Fix error handling and logging
Fix err and sys_token_sz not initialized when used.
Fix logging of uint32_t variables as signed.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-04-05 11:18:49 +02:00
Joakim Andersson
94505c6604 samples: psa_crypto: Fix size of hash field in sign hash call
Fix argument to psa_sign_hash call. Sending in the size of the hash
buffer instead of the size of the hash.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-04-05 11:18:49 +02:00
Gerard Marull-Paretas
c925b5991a include: remove unnecessary autoconf.h includes
The autoconf.h header is not required because the definitions present in
the file are exposed using the compiler `-imacros` flag.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-05 11:18:20 +02:00
Jamie McCrae
9ecc7ddff8 doc: Add link to J-Link virtual MSD disable for SMP
Virtual MSD J-Link support on some development boards has caused an
issue with SMP due to limiting the maximum size of UART data via the CDC
endpoint, add a link to the SMP documentation and smp_svr sample
application on how to disable MSD functionality and resolve the issue.

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2022-04-04 13:03:33 +02:00
Vinayak Kariappa Chettimada
7b9ef30b53 tests: Bluetooth: bsim: Increase to 250 simultaneous connections.
Increase to 250 simultaneous connections in the BabbleSim
test. Update connection interval to accommodate 250
non-overlapping connections and a scan window. And make the
use of is_disconnecting flag consistent between central and
peripheral sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-04-04 10:24:34 +02:00
Emil Gydesen
9dd7efa4f1 samples: Bluetooth: Add broadcast audio sink sample
Add sample for the Basic Audio Profile (BAP) broadcast
audio sink role, that can scan for a receive audio
data over ISO from BAP broadcast sources.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-04-02 15:39:48 +02:00
Emil Gydesen
a84d2b2e1a samples: Bluetooth: Add broadcast audio source sample
Add a sample using the Basic Audio Profile (BAP)
broadcast source role, that advertises mock audio
data over ISO.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-04-02 15:39:48 +02:00
Andrzej Głąbek
bc26629ba8 dts: nrf: Rename "nordic,nrf-watchdog" compatible to "nordic,nrf-wdt"
For consistency with the scheme used for other nRF peripherals,
use the peripheral name that nRF Product Specifications use.
In this case, it is WDT, not WATCHDOG.

Also remove the requirement for the label property in the binding.
It is no longer needed.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Andrzej Głąbek
79cc5a96bd dts: nrf5340: Use dual compatible property for mbox nodes
This is a follow-up to commit cf6a58d3f6.

Restore the "nordic,nrf-ipc" compatible property in mbox nodes for both
nRF5340 cores and use it together with the new "nordic,mbox-nrf-ipc"
one. This way either the MBOX or the IPM driver can be used for these
nodes without further modifications. This eliminates the need to use
overlays in quite a few cases, so remove all those no longer needed
ones (which are also a bit confusing now as they refer to no longer
existing ipc@2a000 and ipc@41012000 nodes).

Restore also the ipc node label removed in the commit mentioned above,
as the label is used in validation of base addresses of nRF DT nodes.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Carlo Caione
35e058bcad sample: static_vrings: Use NOCOPY capability.
At least for one of the instances, use the NOCOPY feature of the
backend.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-04-01 09:05:06 -05:00
Daniel Leung
5e9f1722a9 samples: logging/syst: add README
Add a README.rst on how to build the MIPI Sys-T logging sample
and how to parse the output.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-04-01 13:29:45 +02:00
Daniel Leung
97dd0ec684 samples: logging/syst: build for catalog messages
This adds to sample.yaml to build for MIPI Sys-T catalog message
support.

Note that the current implementation of emitting Sys-T
catalog messages does not support 64-bit and architectures
having additional alignment requirements. So only allow qemu_x86
and mps2_an385 at the moment.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-04-01 13:29:45 +02:00
Daniel Leung
a3b31149cb samples: syst: allow some 64-bit boards
This adds qemu_x86_64 and qemu_cortex_a53 to make sure 64-bit
support for Sys-T is not broken in the future.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-04-01 13:29:45 +02:00
Daniel Leung
f7047c4026 samples: logging/syst: update sample for combined strings
Compilers often combine strings to conserve space, if one string is
a perfect substring of another one towards the end. So add another
string in the test to make sure sys-t with catalog messages is still
working correctly under this scenario.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-04-01 13:29:45 +02:00
Daniel Leung
2e859368bd tests: logging/dictionary: update test for combined strings
Compilers often combine strings to conserve space, if one string is
a perfect substring of another one towards the end. So add another
string in the test to make sure dictionary logging is still working
correctly under this scenario.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-04-01 13:29:45 +02:00
Johann Fischer
6be45c2a18 usb: move USB device stack code to own directory
Until now the whole USB device stack code is located
in the top subsys/usb directory. Move it to own directory
in preparation for upcoming extension and rework of USB support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-03-31 18:30:14 +02:00
Martijn Stommels
0b1f97031a usb: dfu: update sample README
Some information in the USB DFU sample was out of date.

Also added some example lines for the Permanent download and automatic
reboot features.

Signed-off-by: Martijn Stommels <martijn@martijnpc.nl>
2022-03-31 15:33:16 +02:00
Martijn Stommels
49cb6537be usb: dfu: add permanent download and automatic reboot
This commit adds the USB_DFU_PERMANENT_DOWNLOAD and USB_DFU_REBOOT and
symbols.When the permanent download symbol is enabled, slot 1 will be
marked as confirmed. With the reboot symbol enabled, the devices
automatically reboots after the download is completed.

The functionality is split into two symbols to allow the automatic
reboot without confirming the image. This enables image confirmation via
another channel. For example via the shell’s Mcuboot commands.

This functionality allows downloading an image to the device without the
user having to interact with the device. It is useful in cases where
ease of use is more important then safety. For example  when using USB
download for daily development. This is especially applicable for
devices with a closed case.

The changes were tested on an nrf52840dk. The following line can be used
to build the USB DFU example with the symbols enabled.

west build -b nrf52840dk_nrf52840 zephyr/samples/subsys/usb/dfu \
-d build-dfu -- -DCONFIG_BOOTLOADER_MCUBOOT=y \
-DOVERLAY_CONFIG=overlay-reboot-permanent.conf \
-DCONFIG_MCUBOOT_SIGNATURE_KEY_FILE\
=\"bootloader/mcuboot/root-rsa-2048.pem\"

Fixes #41921

Signed-off-by: Martijn Stommels <martijn@martijnpc.nl>
2022-03-31 15:33:16 +02:00
Gerard Marull-Paretas
efd2872e43 samples: drivers: soc_flash_nrf: use DEVICE_DT_GET
Flash device can be obtained at compile time using DEVICE_DT_GET.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-31 13:55:10 +02:00
Gerard Marull-Paretas
f8c0e3907e samples: drivers: flash_shell: use DEVICE_DT_GET_OR_NULL
The optional flash device can be obtained at compile time using
DEVICE_DT_GET_OR_NULL. Init code has been adjusted so that flash_dev is
forced to NULL when device is not ready (user can later specify the
device manually).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-31 13:55:10 +02:00
Gerard Marull-Paretas
d3f8d75e70 samples: boards: reel_board: mesh_badge: use DEVICE_DT_GET
Obtain flash device at compile time using DEVICE_DT_GET.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-31 13:55:10 +02:00
Gerard Marull-Paretas
abe3c1d3c5 samples: arch: mpu: mpu_test: use DEVICE_DT_GET
Use DEVICE_DT_GET to obtain the flash device at compile time. Add
readiness check at main.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-31 13:55:10 +02:00
Francois Ramu
8043fb922a samples: blinky pwm running on the nucleo_l4r5zi
Adding an overlay to configure the nucleo_l4r5zi for testing the pwm
blinky application on red led (PB14 on nucleo board)
Each has a specific pwm output from different timers/channels

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-31 10:28:47 +02:00
Katarzyna Giadla
681e3a16c7 tests: Change duplicated names of the test cases
Some names of the test cases are duplicated within the project.
This commit contains the proposed names of the test scenarios.

Signed-off-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
2022-03-30 17:42:01 -04:00
Casper Bonde
237e3c8127 Bluetooth: BAP: Add LC3 lib to BAP sample applications
LC3 codec integration into BAP Unicast client and server
sample applications.
Will be enabled by default for a native_posix and nrf5430
cpuapp builds.
The client will continuously transmit a LC3 encoded 400Hz
sine wave and the client will receive and decode the data.
Implementation verified using UART based HCI controller
with ISO interface (userchan.c modified to open the UART
directly as bluez do not have support for ISO data) as well
as on-target execution on the nrf5340.

Signed-off-by: Casper Bonde <casper_bonde@bose.com>
Co-authored-by: Emil Gydesen <Thalley@users.noreply.github.com>
2022-03-30 14:18:01 +02:00
Tomislav Milkovic
694ad59dcf samples: subsys: display: lvgl: add config for stm32h7b3i_dk
Add configuration for stm32h7b3i_dk board which enables
integration of touch controller (KSCAN) present on the board
into LVGL

Signed-off-by: Tomislav Milkovic <tomislav.milkovic95@gmail.com>
2022-03-29 18:30:02 -07:00
Emil Obalski
764f9fc6f9 ipc_service: samples: Remove redundant config options from samples
This change remove options that no longer needs to be set in
configuration file.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2022-03-29 12:30:50 -07:00
HaiLong Yang
823b468890 samples: spi_flash: add gd32f450i_eval and gd32vf103v_eval boards
This add gd32f450i_eval and gd32vf103v_eval boards to spi_flash sample.

Signed-off-by: HaiLong Yang <cameledyang@pm.me>
2022-03-29 10:21:15 -05:00
Carlo Caione
92d8329d5b ipc_service: static_vrings: Move to one WQ per instance
Instead of having one single WQ per backend, move to one WQ per
instance instead and add a new "zephyr,priority" property in the DT to
set the WQ priority of the instance. Fix the sample as well.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-03-28 12:46:15 +02:00
Henrik Brix Andersen
2f43226b3d modules: canopennode: CANopenNode does not support CAN-FD
The CANopenNode stack does not support CAN-FD. Depend on it being
disabled and explicitly disable it in the CANopenNode sample.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-25 15:35:10 -07:00
Emil Gydesen
9c2cf4ded5 Bluetooth: Host: Add auth_info_cb struct
Add a new callback structure for Bluetooth authentication

This struct is meant to replace the information-only
callbacks in bt_conn_auth_cb. The reason for this is that
due to the nature of bt_conn_auth_cb, it can only be registered
once. To allow mulitple users gain information about pairing
and bond deletions, this new struct is needed.

Samples, tests, etc. are updated to use the new struct.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-25 15:17:18 -07:00
Emil Gydesen
9e862411b3 Bluetooth: ISO: Add STATE infix for ISO state enum
Change from BT_ISO_<state> to BT_ISO_STATE_<state>
to make the value more descriptive.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-25 15:36:02 +01:00
Mariusz Skamra
6eafc64855 Bluetooth: audio: Enable auto ATT MTU Exchange for BASS and unicast client
This enables automatic MTU exchange for services that require MTU size
bigger than default ATT MTU to operate.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-03-25 10:41:19 +01:00
Gerson Fernando Budke
c1ad9c39e4 drivers: pinctrl: Drop obsolete atmel sam/sam0 entries
Drop all old and obsolete atmel sam/sam0 pinctrl entries.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
9b40960926 drivers: serial: Update sam0 drivers to use pinctrl
This update Atmel sam0 serial drivers to use pinctrl driver and API. It
updates all boards with new pinctrl groups format.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
0f472f6d1b drivers: sensors: Update sam qdec driver to use pinctrl
This update Atmel sam qdec sensor driver to use pinctrl driver and API.
It update board and sample with new pinctrl groups format.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Gerson Fernando Budke
bd485ea960 drivers: adc: Update sam afec driver to use pinctrl
This update Atmel sam afec driver to use pinctrl driver and API. It
updates all boards with new pinctrl groups format. In addition, it
add overlay files to allow run samples/drivers/adc example.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-03-24 15:45:37 -07:00
Constantin Krischke
8ee675946c modbus: stop bits can now be set individually in client mode
Added the stop_bits_client parameter to the modbus_serial_param struct.
Being able to configure the number of stop bits for the client
independently from the parity setting, allows to support connecting to
modbus server that do not follow the MODBUS over Serial Line Specification
and Implementation Guide.

Signed-off-by: Constantin Krischke <constantin.krischke@lemonbeat.com>
Signed-off-by: Jan Geldmacher <jan.geldmacher@lemonbeat.com>
2022-03-24 08:23:17 -04:00
Jamie McCrae
2681c6dfb8 samples: subsys: mgmt: smp_svr: Fix dupicate fs mgmt registration
This fixes an issue with the filesystem mcumgr being registered twice
in the sample application which resolves an issue with an endless loop
if a mcumgr handler is used which is not registered.

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2022-03-24 11:56:48 +01:00
Gerhard Jörges
4fd24a4341 libc: minimal: Add strtoll() and strtoull()
- strtoll() and strtoull() are copies of strtol() and strtoul() with
  types changed to long long instead of long.
- added tests
- added documentation
- removed stubs from civetweb sample

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2022-03-24 11:03:06 +01:00
Matthias Fend
b83b72beec samples: ipc: openamp_rsc_table: do not enable CONFIG_IPM_MCUX
This is a device-specific option and should therefore not be activated in
a generic project. Since the only boards that use this Kconfig symbol
(lpcxpresso54xx, lpcxpresso55sxx) don't build anyway, this option could
be removed. The device/board specific configuration should be placed in
the boards folder along with an appropriate device tree describing the
IPC nodes.

Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
2022-03-24 10:41:39 +01:00
Lauren Murphy
5e8b7b5b37 samples: tflite-micro: fix hello_world README
Corrects number of loops mentioned in README of sample
to match NUM_LOOPS in main.c. NUM_LOOPS was lowered in
PR #41123 to reduce the noise the sample produced in CI,
but the PR missed changing the README.

Cleans up one line.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2022-03-23 16:51:22 -04:00
Jonathan Rico
10025bdc86 samples: Bluetooth: hci_rpmsg: Fix event buffer handling
This fixes an issue where we dropped the send buffer when
ipc_service_send() timed out waiting for a shared memory buffer.

We now wait in the IPC RX endpoint, but this shouldn't be a problem for
other IPC users, as PR #43806 introduces separate workqueues
per instance, with configurable priorities.

This also includes small changes regarding the IPC service return value.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-03-23 12:54:26 +01:00
Emil Obalski
66a8d5baef ipc_service: samples: Add sample that uses icmsg backend
Add sample to demonstrate newly introduced backend (icmsg).

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2022-03-22 12:36:39 +01:00
Daniel DeGrasse
f1b3f00114 boards: remove pinmux usage for acmp peripheral
Remove pinmux usage for acmp peripheral on kinetis boards, as mcux_acmp
driver supports pinctrl

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Daniel DeGrasse
d0c535924f boards: remove unused adc pinmux from kinetis boards
adc16 driver supports pinctrl, so remove unused pinmux from kinetis
boards

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-22 12:36:04 +01:00
Benjamin Björnsson
ab6f5cf077 boards: arm: Add support for Arduino Nicla Sense ME
This commit adds support for the Arduino Nicla Sense ME board.
The board functionality has been tested using the samples:
- hello_world
- philosophers
- peripheral_dis
- spi_flash

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-03-21 18:37:05 +01:00
Harshil Bhatt
0e3e344391 samples: subsys: console: Fix typo in README file
Fixed typo in samples/subsys/console readme

Signed-off-by: Harshil Bhatt <harshilbhatt2001@gmail.com>
2022-03-21 17:55:08 +01:00
Gerard Marull-Paretas
452133cf47 samples: out_of_tree_board: port nRF board to pinctrl
nRF boards are expected to use pinctrl now, so port this sample as well.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-21 15:09:28 +01:00
Gerard Marull-Paretas
504e6cb10b samples: boards: nrf: dynamic_pinctrl: remove existing configs
The nrf52840dk_nrf52840 board has been ported to pinctrl, so there's no
need to keep duplicated definitions in the sample anymore.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-21 15:09:28 +01:00
Gerard Marull-Paretas
117a352b5a samples: code_relocation_nocopy: use pinctrl for nRF noard
The sample relied on `-pin` properties from QSPI node, move to pinctrl.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-21 15:09:28 +01:00
Gerard Marull-Paretas
1ff2b365ad samples: sensor: icm42065: use pinctrl for nrf board overlay
nRF boards now require usage of pinctrl, migrate them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-21 15:09:28 +01:00
Gerard Marull-Paretas
9a265b03b4 samples: sensor: ccs811: use pinctrl for nrf board overlay
nRF boards now require usage of pinctrl, migrate them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-21 15:09:28 +01:00
Gerard Marull-Paretas
c7b808b810 samples: sensor: adxl362: use pinctrl for nrf board overlay
nRF boards now require usage of pinctrl, migrate them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-21 15:09:28 +01:00
Gerard Marull-Paretas
1ad24c5ac7 samples: net: wifi: use pinctrl for nrf board overlay
nRF boards now require usage of pinctrl, migrate them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-21 15:09:28 +01:00
Gerard Marull-Paretas
4adc0b512d samples: drivers: spi_flash_at45: use pinctrl for nrf board overlay
nRF boards now require usage of pinctrl, migrate them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-21 15:09:28 +01:00
Gerard Marull-Paretas
b4368d8e37 samples: drivers: i2s: echo: use pinctrl for nrf board overlay
nRF boards now require usage of pinctrl, migrate them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-21 15:09:28 +01:00
Gerard Marull-Paretas
a3dfcdaec1 samples: drivers: audio: dmic: use pinctrl for nrf board overlay
nRF boards now require usage of pinctrl, migrate them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-21 15:09:28 +01:00
Gerard Marull-Paretas
27c5d39a47 samples: boards: nrf: nrfx_prs: migrate to pinctrl
nRF boards now require usage of pinctrl, migrate the sample and
overlays.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-21 15:09:28 +01:00
Gerard Marull-Paretas
e3dd5c784d samples: bluetooth: hci_spi: use pinctrl for nrf board overlay
nRF boards now require usage of pinctrl, migrate them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-21 15:09:28 +01:00
Henrik Brix Andersen
67ba9900f0 drivers: can: add struct device argument to callback functions
Include a pointer to the CAN controller device for the CAN
transmit, receive, and state change callback functions.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-19 14:31:22 -04:00
Nazar Kazakov
f483b1bc4c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-18 13:24:08 -04:00
Andrzej Głąbek
a5234f3647 soc_nrf_common: Extend and rename the NRF_DT_ENSURE_PINS_ASSIGNED macro
Extend the macro with checks for DT properties related to pin
assignments that are defined but would be ignored, depending on
whether PINCTRL is enabled or not, what presumably indicates
a resulting configuration different from what the user expects.

Add also a possibility to indicate that the pinctrl-1 property
should not be checked because the caller does not support the
sleep state.

Rename the macro so that its name better reflects its function.
Update accordingly all drivers that use it.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-03-18 16:26:21 +01:00
Anas Nashif
1e4027aa7c samples: prefix should be sample, not samples
convention is to start sample identifiers with sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-03-18 10:50:57 -04:00
Kamil Gawor
3e9dfdd850 bluetooth: samples: hci_uart: Add Direction Finding doc
Add the Direction Finding documentation section into
the sample README.rst file.

Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
2022-03-18 12:00:03 +01:00
Kamil Gawor
5ed949cfc1 bluetooth: samples: hci_uart: Add nrf5340 antenna description
Adds antenna description for the nrf5340dk_nrf5340_cpunet
target. It allows to performthe Direct Test Mode with the
CTE feature on this target.

Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
2022-03-18 12:00:03 +01:00
Kamil Gawor
2f4843f60b bluetooth: samples: hci_uart: Add support for nrf52833dk
Adds support for the nrf52833dk_nrf52833 which supports
the Direction Finding feature. It allows also to perform
the Direct Test Mode with the CTE feature.

Signed-off-by: Kamil Gawor <Kamil.Gawor@nordicsemi.no>
2022-03-18 12:00:03 +01:00
Piotr Pryga
21a64561a5 samples: Bluetooth: df: fix wrong GPIO assignment for ant switching
There were wrong GPIOs assigned for antenna switches.
Used pins were assigned to other peripehrals so that
there were no outpus printed.

The samples should use GPIOs that are not assigned to any
peripheral.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-03-18 10:21:19 +01:00
Gerard Marull-Paretas
6c261f2e5a samples: hello_world: remove redundant header
<zephyr.h> ends up pulling <sys/printk.h> via <kernel_includes.h>, so
simplify the sample.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-17 17:40:11 -04:00
Guennadi Liakhovetski
63a109e17f sof: disable the System Agent
The SOF System Agent is redundant under Zephyr, we're using different
performance monitors there.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-03-16 18:33:58 -04:00
Gerard Marull-Paretas
5a71eeb35c pm: policy: move constraints to policy API
The pm_constraint_* APIs were effectively used by the policy manager
only. This patch renames the API to the policy namespace and makes its
naming more explicit:

- pm_constraint_set -> pm_policy_state_lock_get()
- pm_constraint_release -> pm_policy_state_lock_put()
- pm_constraint_get -> pm_policy_state_lock_is_active()

The reason for these changes is that constraints can be of many types:
allow/disallow states, impose latency requirements, etc. The new naming
also makes explicit that the API calls will influence the PM policy
behavior.

All drivers and documentation have been updated accordingly.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-16 15:26:47 +01:00
Mariusz Skamra
145948efa0 Bluetooth: audio: Remove BT_CODEC_META_CONTEXT_* defines
There are no more context defines specific to metadata, the ones
coming from Assigned Numbers shall be used.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-03-16 10:25:31 +01:00
Piotr Pryga
f7f6a5544b samples: Bluetooth: df: Add missing harness to DF sample.yaml
Some build configurations in direction finding samples
sample.yaml didn't have harness=bluetooth. That enables
these configurationsto be be executed on hardware by
CI. Those runs end causing CI failures.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-03-15 12:15:26 -04:00
Lukasz Majewski
d7cd42699b fs: littlefs: sample: Generate fname[12] strings after mount
The littlefs_mount() function sets the mount point for block devices,
so fname[12] shall be generated after calling it.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-03-15 10:01:54 +01:00
Lukasz Majewski
2c8a7e7757 fs: littlefs: Extend sample program to test block devices
Up till now, the littlefs sample program was only supporting the flash
medium. However, it would be also welcome to be able to test reading and
writing data from littlefs stored on block devices - like SD card.

In this case we do use the block API, to read and write data to it.
To achieve this goal - the CONFIG_APP_LITTLEFS_STORAGE_BLK_SDMMC define
has been introduced.

One can change the disk mount point by defining board specific
CONFIG_SDMMC_VOLUME_NAME.

The test for nucleo board equipped with SD card shall be built with:
west build -p always -b nucleo_h743zi ./zephyr/samples/subsys/fs/littlefs \
 -DCONF_FILE=prj_blk.conf

Moreover, the README.rst has been extended to describe running this
test on block devices.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-03-15 10:01:54 +01:00
Lukasz Majewski
7710f5ef61 fs: littlefs: sample: Move littlefs_flash_erase() to flash mount
The littlefs_flash_erase() function shall be called from flash specific
littlefs_mount function. This allows removal of the stub function
when block device support is added.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-03-15 10:01:54 +01:00
Lukasz Majewski
447ebe34d9 fs: littlefs: Introduce CONFIG_APP_LITTLEFS_STORAGE_FLASH define
This KConfig define (by default defined) is necessary to extend the
littlefs test functionality to support other test scenarios - for
example running it on device with block device (i.e. SD card) backend.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-03-15 10:01:54 +01:00
Lukasz Majewski
663a4bbcb8 fs: littlefs: sample: Add test with binary pattern file modification
This commit extends the littlefs test to use binary pattern file.

This file has the 0x55 and 0xAA patterns (to avoid fast wear leveling)
written alternately with special "marks" bytes on each eight position.
Those values are incremented each time the board boots. One can adjust
the size of this file with the TEST_FILE_SIZE define.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-03-15 10:01:54 +01:00
Lukasz Majewski
dd25b6405c fs: littlefs: sample: Move flash initialization code to its own function
The code for potential erasing the flash area has been moved to the
separate function.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-03-15 10:01:54 +01:00
Lukasz Majewski
982a739bb1 fs: littlefs: sample: Move value increment test to separate function
The code responsible for incrementing the in-file value has been moved
to the separate function for better readability and reusage.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-03-15 10:01:54 +01:00
Lukasz Majewski
f6204e607c fs: littlefs: sample: Move listing directory code to its own function
The code for presenting content of the directory, has been moved to the
separate function to be easily reusable.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-03-15 10:01:54 +01:00
Lukasz Majewski
ab314c3378 fs: littlefs: sample: Replace calls to printk with LOG_PRINTK
Replace calls to printk with LOG_PRINTK to use the logging Zephyr
infrastructure. After this change it would be possible to set the
logging mode (to e.g. reduce the verbosity of output and final size
of the binary).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-03-15 10:01:54 +01:00
Yong Cong Sin
e401b0a9f3 samples: net: gsm: should be able to start/stop freely
The gsm modem should be able to be started or stopped freely,
independent from the networking state.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2022-03-14 22:04:11 -04:00
Yong Cong Sin
edcf929b37 samples: net: gsm: starting should be based on GSM_PPP_AUTOSTART
The `starting` flag causes the sample to work only if
GSM_PPP_AUTOSTART is enabled, its initial value should be
dependent on GSM_PPP_AUTOSTART.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2022-03-14 22:04:11 -04:00
Thomas Ebert Hansen
7f4471c84e Bluetooth: controller: Rename local proc ctx config
Rename
BT_CTLR_LLCP_PROC_CTX_BUF_NUM
to
BT_CTLR_LLCP_LOCAL_PROC_CTX_BUF_NUM
to match naming scheme of
BT_CTLR_LLCP_REMOTE_PROC_CTX_BUF_NUM

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2022-03-14 11:38:09 +01:00
Andrzej Głąbek
88b83471a4 samples/boards/nrf/system_off: Fix configuration of the wake up button
Use NRF_DT_GPIOS_TO_PSEL() in calls to nRF GPIO HAL functions as they
need a psel value, a pin number combined with the corresponding GPIO
port number, not only the pin number as provided by DT_GPIO_PIN().
This way buttons connected to pins in the P1 port can also be handled
properly.
Replace also DT_NODELABEL(button0) with DT_ALIAS(sw0) for consistency
with other samples that use the standard button.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-03-14 11:28:15 +01:00
Piotr Pryga
fc6b100bc8 samples: Bluetooth: df: Forward GPIO pins from app to network core
To give control over GPIO pins for Direction Finding Extension of
Radio peripheral when build for nRF53 network core, the application
core has to assign those pins to network core.

There is a mechanism that uses a device tree overlay to get
information about GPIO pins to be assigned to network core.

The commit adds overlays with appropriate configuration
to assign GPIO pins in all DF related samples.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-03-11 11:35:46 -08:00
Robert Lubos
bb5909f7d1 net: tcp: Update receive window in other direct net_context users
As the receive window is now decreased at the TCP module level, other
direct net_context users are also responsible for acknowledging the
received data with net_context_update_recv_wnd() - otherwise, the
communication will stall.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-03-11 09:21:51 +01:00
Emil Gydesen
0d719ba893 Bluetooth: Audio: Add endpoint type to capabilities config cb
The capabilities callback did not provide information about
the type of the endpoint being configured, making it
impossible for the application to determine if it is a
sink or source endpoint.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-10 14:07:17 -05:00
Emil Gydesen
b880637231 Bluetooth: Audio: Remove bidirectional audio streams
Audio streams as defined by the BAP spec does not
support bidirectional audio streams. This commit
updates the API and implementation to match that.

The use a bidirectional CIS with 2 audio stream will
be added in a future commit.

This removes the _IN_ and _OUT_ and _INOUT_ QOS
values, as well as the direction of the codec QOS
struct.

To keep direction for internal use, the direction
has been added to the endpoint struct.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-10 14:07:17 -05:00
Emil Gydesen
e485305b7c Bluetooth: Audio: Fix ordering of array size after array parameter
Make it consistent for audio.h and capabilities.h that the
array size parameter appear after the array parameter.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-10 13:50:20 -05:00
Emil Gydesen
a01cc054c9 Bluetooth: Audio: Use size_t for audio.h array len arguments
Use size_t instead of uint8_t to describe array lengths.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-10 13:50:20 -05:00
Daniel Leung
a6e35c6ab0 samples: logging/dictionary: set UART backend to do dictionary
This enables CONFIG_LOG_BACKEND_UART_OUTPUT_DICTIONARY so that
the UART backend is in dictionary logging mode.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-03-10 13:48:08 -05:00
Henrik Brix Andersen
d4023b3c1b drivers: gpio: move non-standard dts flags to be soc specific
Reserve the upper 8 bits of gpio_dt_flags_t for SoC specific flags and
move the non-standard, hardware-specific GPIO devicetree flags (IO
voltage level, drive strength, debounce filter) from the generic
dt-bindings/gpio/gpio.h header to SoC specific dt-bindings headers.

Some of the SoC specific dt-bindings flags take up more bits than
necessary in order to retain backwards compatibility with the deprecated
GPIO flags. The width of these fields can be reduced/optimized once the
deprecated flags are removed.

Remove hardcoded use of GPIO_INT_DEBOUNCE in GPIO client drivers. This
flag can now be set in the devicetree for boards/SoCs with debounce
filter support. The SoC specific debounce flags have had the _INT part
of their name removed since these flag must be passed to
gpio_pin_configure(), not gpio_pin_interrupt_configure().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-10 13:46:34 -05:00
Francois Ramu
57c8c0cce5 samples: drivers: DAC testcase running on more stm32 boards
It includes the samples/drivers/dac application for
existing nucleo and disco target boards.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-10 13:30:06 -05:00
Erwan Gouriou
f36a6abf9c samples/boards/stm32: stm32_ble: Add bt_disable/bt_enable sequence
Demonstrate bt_disable/bt_enable.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-10 13:28:41 -05:00
Erwan Gouriou
925c84a75b samples/boards/stm32: stm32_ble: Use bt_disable to reset the BLE stack
Application is now supposed to explicitly shut down the ble stack
before shutdown.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-03-10 13:28:41 -05:00
Francois Ramu
2620c53771 samples: pwm for stm32l073 and stm32f091 nucleo boards
The overlay are defined to run the samples application with PWM
feature on the nucleo_l073rz,nucleo_f091rc, nucleo_g474re

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-03-10 13:25:54 -05:00
Kai Vehmanen
ec7451b485 soc/intel_adsp: add support for Intel Jasper Lake
Add a variant of Intel cAVS2.0 used in Jasper Lake based
products.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-03-10 09:26:41 -06:00
Enjia Mai
8300ffd302 samples: fix the metairq_dispatch sample sporadically failed on ehl_crb
The metairq sample sometimes failed due to stuck because it has a
potential race when recording the latencies. The previous solution
checks whether the stats.mirq greater than MAX_EVENT. But stats.mirq
might also have a race here. So we change to check the msg sequence,
its correctness ensured by the kernel's message queue.

And also remove the spinlock in previous fix because tests only use
1 CPU, no need to add this. It also improves the fix for #40889,
to prevent test failed sporadically on acrn_ehl_crb and ehl_crb.

Fix #42874.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-03-09 14:09:12 -05:00
Henrik Brix Andersen
e9c9caa80d net: remove unmaintained 6LoCAN implementation
Remove the unmaintained, experimental 6LoCAN (IPv6 over CAN bus)
implementation.

Fixes: #42559

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-09 18:07:31 +01:00
Gerard Marull-Paretas
95fb0ded6b kconfig: remove Enable from boolean prompts
According to Kconfig guidelines, boolean prompts must not start with
"Enable...". The following command has been used to automate the changes
in this patch:

sed -i "s/bool \"[Ee]nables\? \(\w\)/bool \"\U\1/g" **/Kconfig*

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-09 15:35:54 +01:00
Emil Gydesen
452b897aec samples: Bluetooth: Add missing bt_conn_ref for a few samples
Some samples were missing a call to bt_conn_ref when assigning
default_conn.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-03-09 15:04:57 +02:00
Andrzej Głąbek
70fb3124db drivers: serial: nrfx: Ensure that instances have some pins assigned
Add build assertions that will ensure that every peripheral for
which a driver instance is created has some pins assigned to it.
Neither pinctrl-0 nor *-pin properties can be currently marked as
required in devicetree, so these assertions will help users avoid
invalid configurations where it could be hard to figure out why
the UART is not working.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-03-09 12:05:22 +01:00
Ryan Erickson
6c03b3ad41 sample: smp_svr: add Pinnacle 100 DVK to test allow list
Add Pinnacle 100 DVK to sample.yaml where appropriate.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-03-08 09:29:31 -06:00
Ryan Erickson
0062693a00 samples: smp_svr: add Pinnacle 100 DVK board config
Pinnacle 100 DVK uses QSPI to store slot1 partition.
Add board config overlay to ensure QSPI is enabled
so slot1 can be read/written.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-03-08 12:06:45 +01:00
Sam Hurst
986093c8cc samples: boards: Add sample application based on the STM32 USB TCPC Driver
This sample application uses the STM32 USB TCPC Driver to create a USBC
Sink Application for the STM32G081b_eval board.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2022-03-08 11:08:43 +01:00
Henrik Brix Andersen
4828fa0649 samples: drivers: eeprom: fix spelling
Fix spelling in the EEPROM driver sample application.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-08 10:23:53 +01:00
Mikkel Jakobsen
5a4d2c5979 samples: sensor: icm42605: remove deprecated *_OWN_THREAD
the icm42605 defaults to a global thread for trigger processing,
the CONFIG_ICM42605_TRIGGER_OWN_THREAD is deprecated.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
2022-03-07 16:23:36 -06:00
Arnaud Pouliquen
0130d4be7e sample: ipc : add rpmsg tty channel support in openamp rsc table sample
Add the support of a rpmsg tty channel that responds to the generic
Linux rpmsg_tty driver.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2022-03-07 10:49:54 +01:00
Arnaud Pouliquen
8558b2785c sample: ipc: restructure the openamp_rsc_table sample
Restructure to separate the management of the rpmsg stack
add the rpmsg client into 2 threads.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2022-03-07 10:49:54 +01:00
Yuval Peress
ea3f3dac50 samples: nanopb: Add .options file to the sample
Add an options file to the sample to help developers that aren't
familiar with nanopb

Signed-off-by: Yuval Peress <peress@google.com>
2022-03-07 10:48:06 +01:00
Daniel DeGrasse
954dcbd754 boards: twr_ke18f: Add pinctrl groups for twr_ke18f
Add pinctrl groups for twr_ke18f

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-03 13:00:20 -06:00
Kamil Piszczek
3e5812cc5f modules: hal_nordic: Port nrf_802154 to ipc_service
The nrf_802154 Spinel serialization was ported to multi-instance
ipc_service.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2022-03-02 17:03:01 +01:00
Kamil Piszczek
cf6a58d3f6 bluetooth: hci: rpmsg: use ipc service library
The Bluetooth HCI driver based on the RPMsg transport now uses the IPC
service module. The compatible Bluetooth sample - HCI RPMsg - has also
been migrated to the new IPC solution.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2022-03-02 17:03:01 +01:00
Gerard Marull-Paretas
260deccb6e doc: use :kconfig:option: domain role
Kconfig options now belong to the Kconfig domain, therefore, the
:kconfig:option: role needs to be used.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-02 09:28:37 +01:00
Flavio Ceolin
df3d1f83f7 drivers: crypto: Rename cipher file
This file defines the crypto driver API, cipher is supposed to be just
one type of capability (other can be hash) of these drivers, just
change the file name to be consistent with it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-03-01 16:32:43 -05:00
Flavio Ceolin
637fd58efb drivers: crypto: Change HW capabilities query namespace
This is not cipher specific, just replace it crypto to make it clear.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-03-01 16:32:43 -05:00
YuLong Yao
86f460cd30 boards: gd323103_eval: add dac support.
add dac support.

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2022-03-01 18:06:14 +01:00
YuLong Yao
adfc82206b board: gd32e103v_eval: add at24 eeprom.
add support for at24 eeprom.

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2022-03-01 18:06:14 +01:00
Vinayak Kariappa Chettimada
8a8d26b98d samples: Bluetooth: Add Synchronized Receiver board specific conf files
Add Synchronized Receiver board specific conf files.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-03-01 14:54:35 +01:00
Vinayak Kariappa Chettimada
13c41c0bc1 samples: Bluetooth: Add ISO Broadcaster board specific conf files
Add ISO Broadcaster board specific conf files.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2022-03-01 14:54:35 +01:00
Gerard Marull-Paretas
13e953c452 samples: subsys: nvs: use nvs_mount
Replace deprecated nvs_init() with nvs_mount().

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-01 12:46:34 +01:00
Andrzej Puzdrowski
d0e31883c8 samples/../mcumgr/smp_svr: differentiate integration platform
Differentiate integration)platforms list per each sample test.
Removed sample.mcumg.smp_svr.bt_tiny as it can not fit in
nr51422 flash anymore, even with configuration tweeks.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-03-01 11:53:07 +01:00
Flavio Ceolin
49520eea57 samples: nrf: system_off: Fix force state usage
The sample cannot spin in an infinity loop because the idle thread will
not run and consequently the forced state will not be used.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-03-01 11:10:46 +01:00
Henrik Brix Andersen
8386e1f2d3 samples: subsys: testsuite: pytest: add test of custom cmd line args
Add test case for passing custom command line arguments to a pytest
harness via twister.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-02-28 12:18:48 -05:00
Kamil Piszczek
a850993352 samples: mgmt: mcumgr: use conn params control config for BT transport
By default, the Connection Parameters control feature is enabled for the
SMP Server sample with the Bluetooth transport.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2022-02-28 11:10:03 +01:00
Emil Gydesen
628b54a959 Bluetooth: Audio: Remove ISO disconnected and connected cbs
The callbacks were implemented to notify the application
about the state of the ISO. However, since then, callbacks
such as `started` and `stopped` have been implemented,
and as such the `connected` and `disconnected` callbacks
no longer server any purpose.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-02-28 11:04:37 +01:00
Kai Vehmanen
1bcf79f729 soc/intel_adsp: add intel_adsp_cavs25_tgph board
Add a new board to support Intel Tiger Lake H PCH variant of cAVS2.5.

Move common Kconfig options for cavs25 to soc level. No need to
replicate these for every board.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-02-25 14:28:45 -06:00
Kai Vehmanen
50ec4231d8 samples/subsys/audio/sof: fix rimage signing schema for cavs2.5
The correct signing schema for cAVS2.5 is "tgl".

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-02-25 14:28:45 -06:00
Mariusz Skamra
8da5fefce2 samples: unicast_audio_server: Fix codec specific capabilities
This fixes format of codec specific capabilities in PAC record.

Fixes: #43058
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-02-25 10:05:33 -08:00
Simon Frank
ba7af2f780 include: sensor: sensor_value from double overflow
sensor_value_from_double had a early overflow when converting the
fractional part (val2).  This occured when input was more then
2147.493647 (inp >= INT32_MAX/1000000.0 + 0.01).

return value -ERANGE as this is what errno is set to by `strtod` and
similar posix functions.

fixes issue #39176

Signed-off-by: Simon Frank <simon.frank@lohmega.com>
2022-02-24 13:45:29 -08:00
Fabio Baltieri
bbb6b17403 samples: can: build with mcp2515 driver
Add a test config using the mcp2515 sheild to samples/drivers/can so we
catch build issues.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2022-02-24 09:09:02 -08:00
Fabio Baltieri
ed3471aa5c samples: display: build for st7735r, gd7965 and ls0xx
Add a couple of extra shield configurations to catch regressions with
the st7735r, gd7965 and ls0xx drivers.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2022-02-24 09:09:02 -08:00
Henrik Brix Andersen
cc394e073d samples: can: filter out tests if zephyr,canbus not enabled
- Filter out the remaining CAN tests if no zephyr,canbus chosen node is
  enabled in the devicetree.
- Rename the tests to shorten the name a bit.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-02-24 07:12:54 -06:00
Henrik Brix Andersen
878ea22eac samples: modules: canopennode: filter tests based on dts
- Filter out the CANopenNode tests if no zephyr,canbus chosen node is
  enabled in the devicetree.
- Enable the program download build-only test on all boards with the
  necessary fixed partions.
- Explicitly exclude boards without the needed flash support from the
  program download build-only test as these do not even pass Kconfig and
  thus fail to complete the twister filter stage.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-02-24 07:12:54 -06:00
Henrik Brix Andersen
8372de867d samples: modules: canopennode: enable CONFIG_GPIO
The CANopenNode sample uses GPIO. Ensure it is enabled.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-02-24 07:12:54 -06:00
Bartosz Golaszewski
0f09360456 lvgl: change the prefix of Zephyr-specific LVGL config options
We're now using the Kconfig copied from the upstream lvgl repository. It
uses the LV_ prefix for all options while we're using LVGL_ for
Zephyr-specific ones. Make the latter consistent with upstream but also
make sure they're distinct from lvgl's by using LV_Z_ as the prefix.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 11:51:33 +01:00
Bartosz Golaszewski
6c190292c0 lvgl: move the lvgl glue out of the zephyr tree
Start using the upstream Kconfig from LVGL and move the glue code out
of the zephyr tree and put it under lvgl/zephyr/ in modules.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 11:51:33 +01:00
Bartosz Golaszewski
1244a89a21 lvgl: bump version to v8.1.0
This updates the lvgl in-tree glue code to work with version v8.1.0 and
bumps the west manifest accordingly.

The following are the most significant changes:
- The logging callback has changes in lvgl and no longer provides the
  caller with an integer log level code. We now need to parse the log
  string's prefix to determine the level.
- Several Kconfig options (mostly for default values of various settings)
  have been removed because these values are no longer configurable in
  lvgl.
- The library no longer performs a deep copy of the display and input
  device driver structs, so these must no longer be allocated on the
  stack in the init func.

Other than that it's mostly about renaming of various structures and
functions and adjusting the calls if function's signatures have changed.

This patch allows all in-tree users to work correctly but it's likely
it doesn't support all new widgets and layouts added in lvgl v8. These
however can be added gradually once this is upstream.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 11:51:33 +01:00
Bartosz Golaszewski
595131c2d0 lvgl: kill LVGL_MEM_POOL_HEAP_KERNEL and LVGL_MEM_POOL_KERNEL
Current lvgl code allows to use the kernel heap for dynamic memory
allocation. The k_heap API doesn't however provide k_realloc() which
will be needed in order to update lvgl to v8. Nico suggested there's
no good reason for lvgl to use k_heap and it should stick to either
the libc's allocator or depend on its own private sys_heap.

The alternative would be to extend the k_heap API to provide k_realloc()
but this may be tricky for several reasons and for now there would
be a single user anyway.

This removes the choice of using k_heap for lvgl and renames the user
pool to SYS_HEAP in Kconfig and makes it the default option.

The prj.conf for the lvgl sample is modifed to specify the number of
memory pool blocks instead of the total size as the default block
size is 2048 and it results in the same size of memory.

Suggested-by: Nicolas Pitre <npitre@baylibre.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 11:51:33 +01:00
Bartosz Golaszewski
b653cc8bad samples: lvgl: add missing Kconfig options
The sample graphical Hello World program uses the image widget as well as
the Montserrat font size 14. While currently those are being selected by
default, it won't be the case once we update to lvgl v8. Select relevant
Kconfig option in prj.conf.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 11:51:33 +01:00
Aastha Grover
c0d7e10beb logging: Add support to backends to switch log format at runtime.
Adding mechanism to all the backends to switch the logging formats
at runtime while leveraging the function pointer table based upon
the Kconfigs which also cleans up the logging backend design.
Also demonstrate the working API with the changes
to syst sample. Clean up Kconfig for backends and add a standard
template to generate the Kconfigs for logging formats to be used
by all backends.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-02-23 14:12:22 -06:00
Flavio Ceolin
6142fcb8ba pm: Rename pm_power_state_force
Aligning with the rest of PM API, replace pm_power_state_force with
pm_state_force.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-02-23 07:33:46 -05:00
Gerard Marull-Paretas
5d7bd90529 samples: sensor: th02: add Grove LCD compatible to the filter
The sample required the Grove LCD, so add it to the filter.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-22 11:58:33 -08:00
Gerard Marull-Paretas
9bbdc24864 samples: sensor: th02: fix grove lcd usage
The sample enabled the Grove LCD by default in prj.conf, and in the
README it is clearly stated that the sample is intended to work using
the LCD module. This patch remove the unnecessary ifdeffery and obtains
a reference to the display at compile time.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-22 11:58:33 -08:00
Gerard Marull-Paretas
b5b7579e72 samples: drivers: misc: grove_display: filter by DT compat enabled
Filter sample by checking if the Grove LCD compatible is enabled or not.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-22 11:58:33 -08:00
Gerard Marull-Paretas
5be50262ea samples: drivers: misc: grove_display: use DEVICE_DT_GET
Obtain a reference to the Grove LCD device at compile time.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-22 11:58:33 -08:00
Gerard Marull-Paretas
0bb486aa29 drivers: misc: grove_lcd: port to Devicetree
The driver was never migrated to Devicetree, this patch converts the
driver to a proper Devicetree based device.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-22 11:58:33 -08:00
Gerard Marull-Paretas
9a00b99884 drivers: display: grove_lcd_rgb: move to misc
The driver does not implement a display API, it has a custom API. Having
it under display is confusing, since display API consumers may expect
they can use it. These sort of custom drivers fit better under
drivers/misc.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-22 11:58:33 -08:00
Henrik Brix Andersen
c4f229f98f samples: drivers: can: enable CAN statistics
Enable CAN controller device statistics support.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-02-22 11:54:27 -08:00
Robert Lubos
b3188fdd1c samples: net: sockets: big_http_download: Increase TCP recv window size
Increase TCP receive window size in the sample to improve the download
speed.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-02-22 10:09:45 -08:00
Carles Cufi
e83a13aabf kconfig: Rename the TEST_EXTRA stack size option to align with the rest
All stack sizes should end with STACK_SIZE.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-02-22 08:23:05 -05:00
Moritz Fischer
aa283e5439 samples: modules: canopennode: Add stm32f072b_disco support
Add support for the stm32f072rb discovery board.

Signed-off-by: Moritz Fischer <moritzf@google.com>
2022-02-22 10:25:08 +01:00
Casper Bonde
86574107dd Bluetooth: BAP: Unicast client sample accept EXT_ADV
Minor change to let the client accept EXT_ADV reports
when connecting.

Signed-off-by: Casper Bonde <casper_bonde@bose.com>
2022-02-22 10:23:44 +01:00
Carlo Caione
ac6060f966 code_relocation: Extend the nocopy sample to nRF5340dk
The nRF5340dk is shipping an external QSPI flash that can be used to do
XIP from. Extend the code_relocation nocopy sample to support this
platform so that part of the functions are executed from internal flash
and others from external flash.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-02-21 22:09:46 -05:00
Carlo Caione
d3203dc70d code_relocation: Add NOCOPY feature
* Use case of interest:

Some platforms are shipping in parallel to the internal FLASH some other
storage / external FLASH (usually a QSPI FLASH) that can be used to
execute (XIP) code from.

The content of this external FLASH can usually be written at flash time
using proper tools (see for example the case of the external FLASH on
the nRF5340DK that can be written at flash time using nrfjprog).

The external FLASH is a nice addition that is extremely useful when a
large application code doesn't entirely fit on the internal FLASH so
that we could want to move part of it in the auxiliary FLASH to XIP the
code from there.

* The problem:

Right now Zephyr doesn't have a formal and generic way to move at build
time part of the code to a different memory region.

* The current status:

Zephyr is indeed shipping a code_relocation feature but that doesn't
entirely match our needs.

When XIP is enabled, the code_relocation feature is used in Zephyr to
move the selected code (that is to copy text section, to initialize data
and zero bss) from FLASH to SRAM at run time and execute code from SRAM.

The relocation is done by a generated snippet of code that is
memcpy()-ing the right content to the destination region also using some
build-time generated portions of linker script to retrieve start and
destination addresses and regions.

* This patch:

This patch is leveraging the code_relocation code and adding a NOCOPY
feature. This feature is using the code_relocation feature to
dynamically build the linker script snippets but entirely skipping the
run-time code relocation so that the code can be XIP-ed from the
destination region.

* Example:

Let's say that we have a big file called `huge_file.c` that we want to
XIP from the external FLASH that is mapped in an EXTFLASH region.

In this case we should enable `CONFIG_XIP` and
`CONFIG_CODE_DATA_RELOCATION` and instruct cmake as follows:

  zephyr_code_relocate(src/huge_file.c EXTFLASH_TEXT NOCOPY)
  zephyr_code_relocate(src/huge_file.c SRAM_DATA)

this means that:

- The .text section of the `huge_file.c` must reside in the EXTFLASH
  memory region and we do not need to copy the section there because we
  are going to XIP it (and we assume that the file is going to be placed
  in the external FLASH at flash time).
- The .data section of the `huge_file.c` must still reside in the SRAM
  memory region.

* TODOs:

It's desirable to have the possibility to relocate libraries and
pre-build files instead of source code files.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-02-21 22:09:46 -05:00
Carlo Caione
11f1dd2370 pm: Reference pm_state_info only by pointer
It's unnecessary to move the pm_state_info around by value, just use a
pointer.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-02-21 20:58:01 -05:00
Sebastian Bøe
5e63f8fbce samples: rename user-tls.conf to user-tls-conf.h
user-tls.conf is a header file and should therefore have the suffix
.h.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2022-02-21 20:55:20 -05:00
Gerard Marull-Paretas
9636b46519 samples: boards: stm32: power_mgmt: blinky: use dtcompatible role
Reference DT compatible using the :dtcompatible: role.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 20:47:10 -05:00
Mike Szczys
e535cc76db doc: add OTA section to device management
Zephyr docs should mention OTA:
- Define Over-the-Air update
- Indicate OTA can be used with MCUboot
- Link examples of the OTA DFU process

Signed-off-by: Mike Szczys <mike@golioth.io>
2022-02-21 20:39:08 -05:00
Yuriy Vynnychek
e94b3f7a9f samples: openthread: overlay update to new Pinctrl driver.
Applied changes required by new Pinctrl driver.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2022-02-21 19:41:44 -05:00
Herman Berget
8b46aaaf69 Bluetooth: Add common BT_CONN_INTERVAL_TO_MS macro
The same macro was defined in multiple places.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-02-21 19:40:42 -05:00
Emil Gydesen
8671fa683e Samples: Bluetooth: Remove RX workround for iso connected benchmark
CONFIG_BT_ISO_TX_MTU=230 had been added to deal with the RX
buffers not fitting TX's of same size, which is fixed now.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-02-21 19:40:02 -05:00
Bartosz Bilas
1fd95768c8 samples: net: modem: add modem power callbacks
Register modem power callbacks to show how it can be
used to provide e.g modem power on and off sequences.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2022-02-21 19:38:32 -05:00
Ederson de Souza
863ffbf1b7 tests and samples: Don't build some C++ tests under XCC
XCC (based on GCC 4.2) doesn't support C++11, and can't build those
tests. So exclude them from twister.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-02-21 19:37:54 -05:00
Flavio Ceolin
bc3d166c74 samples: pm: device_pm: Fix harness
Both drivers enable device runtime on init, so they will be suspended
in the very beginning. The async get operation no longer exists, so
just remove the message related with this.

Fixes #42740

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-02-21 19:36:09 -05:00
Flavio Ceolin
955489fcc0 samples: pm: device_pm: Remove spurious comments
Remove comments that just make noise and does not add anything to the
test.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-02-21 19:36:09 -05:00
Flavio Ceolin
8fdb0117eb samples: pm: device_pm: Get the device before use it
The open function should resume the device, not only its parent.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-02-21 19:36:09 -05:00
Johann Fischer
3b7807cc9b usb: dfu: disable USB DFU uploading by default
Firmware uploading to the host may not always be desired,
disable it by default.

Enable it for existing USB DFU sample to keep
the usual behavior, add note about new option to README.rst.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-02-18 09:32:22 -08:00
Piotr Pryga
c3696cf06c samples: Bluetooth: df: add missing integration platforms
Add missing integration plaforms in direction finding samples.
There were no nRF52820 and nRF5340 added.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-02-17 13:07:12 +01:00
Piotr Pryga
63cc9decf7 Bluetooth: samples: df: Decrease RAM usage in DF connectionless RX
Direction finding connectionless RX sample didn't fit into
nRF52820 SRAM. The sample will not be able to store IQ samples
for maximum number of CTEs allowed by Bluetooth Core 5.3
specification.

For nRF52820 the new allowed maximum number of scanned CTEs
is set to one, to save more space in SRAM for an application.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-02-17 13:07:12 +01:00
Piotr Pryga
4f17726bb1 samples: Bluetooth: df: Fix problem with samples split build
Fix problem with building sample applications where Host is
split from Controller into separate binaries. In that situation
samples does not have access to controllers Kconfig options.
To optimize memory usage by an application, disable not needed
features (angle of arrival or angle of departure).

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-02-17 13:07:12 +01:00
Piotr Pryga
2b3ec2bd96 Revert "samples: Bluetooth: df: Forward GPIO pins from app to network core"
This reverts commit 9bd218347c.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-02-16 14:12:13 +01:00
Piotr Pryga
f126d23b67 Revert "samples: Bluetooth: df: add missing integration platforms"
This reverts commit ba939b1262.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-02-16 14:12:13 +01:00
Piotr Pryga
ba939b1262 samples: Bluetooth: df: add missing integration platforms
Add missing integration plaforms in direction finding samples.
There were no nRF52820 and nRF5340 added.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-02-16 09:56:34 +01:00
Piotr Pryga
9bd218347c samples: Bluetooth: df: Forward GPIO pins from app to network core
To give control over GPIO pins for Direction Finding Extension of
Radio peripheral when build for nRF53 network core, the application
core has to assign those pins to network core.

There is a mechanism that uses a device tree overlay to get
information about GPIO pins to be assigned to network core.

The commit adds overlays with appropriate configuration
to assign GPIO pins in all DF related samples.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-02-16 09:56:34 +01:00
Perry Hung
5d34652b3f samples: drivers: can: add CONFIG_GPIO to prj
This samples blinks an LED, so CONFIG_GPIO is required.

Signed-off-by: Perry Hung <perry@genrad.io>
2022-02-15 13:06:27 -05:00
Piotr Pryga
2f8a579ba6 samples: Bluetooth: df: Fix periodic sync termination handling
There was a bug it periodic advertising sync termination handling.
If a sync was terminated before sync established was reported,
for example sync may be filtered out by CTE type, then sample
will wait until sync_create_timeout_ms is reached.
Also sem_per_sync_lost semaphore is given in term_cb.
Result of the bug is next time a sync is established, CTE sampling
is enabled, sample starts waiting for periodic sync lost and
immediately ends waiting because sem_per_sync_lost is given.
Scan is restarted and already synchronized sync is terminated.

Correct behavior is, when term_cb is executed sem_per_sync_lost
may be given only if sync established was already reported.
Also sample must not wait for sem_per_sync if sync is terminated
due to wrong CTE type. It can end wait immediately.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-02-15 18:37:40 +01:00
Xabier Marquiegui
79047b5da8 samples: net: gptp: add NXP RT series config support
Add NXP RT samples config support for gptp sample

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Co-authored-by: Seb Laveze <sebastien.laveze@nxp.com>
Signed-off-by: Xabier Marquiegui <xmarquiegui@ainguraiiot.com>
2022-02-11 10:03:05 -06:00
Xabier Marquiegui
270b7c84bc samples: net: gptp: Enable deferred log mode
In applications where timing is critical it seems like enabling
deferred log mode could be desirable.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Co-authored-by: Seb Laveze <sebastien.laveze@nxp.com>
Signed-off-by: Xabier Marquiegui <xmarquiegui@ainguraiiot.com>
2022-02-11 10:03:05 -06:00
Daniel DeGrasse
5094a6e08c samples: blinky_pwm: decreased min PWM period for blinky sample
Blinky PWM sample minimum pwm period was too high for iMX.RT PWM module.
decrease the minimum pwm period so sample will pass pwm calibration
phase.

Fixes #38954

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-02-10 14:33:08 -05:00
Enjia Mai
6bec54401b samples: fix the metairq_dispatch sample failed on acrn_ehl_crb
The samples/kernel/metairq_dispatch runs failed on acrn_ehl_crb
due to the potential race condition in accessing the global stat
data. Add a spinlock to prevent this.

Fixes #40889

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-02-10 08:55:39 -05:00
Johann Fischer
d6c6c3fa20 sample: modbus: mark MODBUS samples as build only
Mark MODBUS samples as build only, otherwise they would
need different fixtures for each sample.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-02-09 22:11:16 -05:00
Daniel DeGrasse
41a63f48fd samples: task_wdt: Increase min watchdog timeout
MCUX watchdog timer supports min window of 500ms. Increase maximum task
watchdog timeout window to 500ms by default, so that this sample can run
on iMX RT SOCs. Also update iMX RT watchdog driver to reject timeout
maximums under 500ms with a useful error message

Fixes #40153

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-02-09 14:07:26 -06:00
Carles Cufi
7f6524949a lib: os: crc: Rework the crc16() implementation
As described in #42403, there was an issue with the existing crc16_ansi()
implementation, since it was not calculating the CRC-16-ANSI (aka
CRC-16-MODBUS). This is because the  existing crc16() function only
supported non-reflected input and output (and the CRC-16-ANSI requires
reflection on both) and also it did not seem to support correctly inial
seeds different from 0x0000 (and, again, the CRC-16-ANSI requires 0xffff
as an initial seed).

This commit replaces the existing crc16() with a functional pair,
crc16() and crc16_reflect(), that also work with any poly, any initial seed
and allow to select whether reflection is performed.
It also adapts crc16_ansi() so that it actually returns the correct CRC.

Fixes #42403.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-02-04 12:33:22 -05:00
Martí Bolívar
efc0e75463 samples: blinky: use a gpio_dt_spec
Using a gpio_dt_spec is the current best practice for getting at pins
defined in the DT, because it gets all the boilerplate and flags right
for you. Use that in blinky, keeping the documentation in sync with
the code.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-02-04 11:20:46 +01:00
Daniel Leung
77f832fde3 samples: logging/syst: expand to doing v1/v2 immediate/deferred
This expands the sample to do both v1 and v2, and both immediate
and deferred modes for each logging verion. This is to make sure
MIPI Sys-T output is not broken for all combinations. Default is
v2/immediate using prj.conf. Deferred mode is enabled via
overlay.

Also add qemu_x86 as an allowed platform as the samples are
working there too.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-02-04 11:14:55 +01:00
Daniel Leung
6eb3cc11e2 samples: logging/syst: add more lines to show string processing
This adds a few log lines to show how string processing works
with Sys-T.

Note that CONFIG_LOG_BLOCK_IN_THREAD=y to make sure all log
messages are printed instead of being dropped.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-02-04 11:14:55 +01:00
Attie Grande
ec1ab6d104 samples: drivers: adc: Add a device tree overlay for atsamd21_xpro
Add a basic device tree overlay to support the use of the ATSAMD21 XPro
dev board with the ADC sample application.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-02-04 10:49:09 +01:00
Attie Grande
c53a1e8b32 samples: drivers: adc: Revise handling of configurable inputs
All drivers that require input_positive to be set should be given it.
Some parts may require an offset, so abstract this away too.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2022-02-04 10:49:09 +01:00
Piotr Pryga
8f56d4ee19 samples: Bluetooth: df: Remove dep on CTLR Kconf in sample sources
Direction finding samples had dependency on KConfig option defined
in Controller. That caused a problem for split builds where
an application and host are not part of the same binary as
controller. The code dependend on the Kconfig option
was always disabled.

To fix that issue new Kconfig options were introduced to
Host. The dependency is removed. Unwanted features may stil be
disabled and samples binaier will be smaller.

The commit aligns all direction finding samples code.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-02-03 14:57:17 +01:00
Yong Cong Sin
731241f8d0 kernel: workq: Fix type errors in delayable work handlers
A common pattern here was to take the work item as the subfield of a
containing object. But the contained field is not a k_work, it's a
k_work_delayable.

Things were working only because the work field was first, so the
pointers had the same value. Do things right and fix things to
produce correct code if/when that field ever moves within delayable.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2022-02-02 18:43:12 -05:00
Joakim Andersson
17f8932f16 modules: trusted-firmware-m: Use TF-M install headers as interface
Use the set of headers that the TF-M build system places in the
install output. Not all public header files are available in the
interface/include directory and the TF-M build system uses the install
mechanism of cmake to include additional headers based on platform
or configuration.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-02-01 11:31:36 +01:00
Erwan Gouriou
fa16f8654a samples: lora: Add harnesses for execution with twister
Lora samples are missing harnesses and hence are reported
failed by default by twister.
Add required harnesses to be able to detect correct and faulty
test executions.

Fixes #42159

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-01-28 19:15:01 -05:00
David Leach
96599830cf samples: grove_display: Exclude ip_k66f from sample build
The ip_k66f doesn't have I2C_0 status set to OKAY so the build of
this sample generates warnings in the nightly build. Root problem
is that the groove display is not ported to the device tree so
there isn't a standard way of filtering on the display being
part of the platform.

fixes #41523

Signed-off-by: David Leach <david.leach@nxp.com>
2022-01-28 14:31:50 -06:00
Erwan Gouriou
d6f150e97b samples/compression/l4z: Increase min_ram
Increase minimum RAM requirements on this test as it appears
that 32 is too low and 40 is verified ok.

Fixes #42161

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-01-28 10:07:00 +01:00
Moritz Fischer
499cc72411 samples: modules: canopennode: Fix example code
When moving the samples to samples/modules the example code was not
updated accordingly.

Fixes: 613f1cde4a
Signed-off-by: Moritz Fischer <moritzf@google.com>
2022-01-28 10:05:58 +01:00
Henrik Brix Andersen
2aed5a1237 drivers: can: remove CAN_BUS_UNKNOWN CAN controller state
The CAN_BUS_UNKNOWN CAN controller state is only used to indicate that
the current CAN controller state could not be read.

Remove it and change the signature of the can_get_state() API function
to return an integer indicating success or failure.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-28 10:05:29 +01:00
Emil Gydesen
f24d4bcf75 Bluetooth: Samples: Add unicast audio client and server samples
Adds Basic Audio Profile (BAP) unicast server and client samples.

These are the barebones versions of what is needed to scan/advertise
for audio and setup a stream using the mandatory LC3 preset defined by
the BAP spec.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-01-27 12:01:34 +02:00
Emil Gydesen
ed268b734d Bluetooth: Samples: Add controller Kconfig requirement for ISO samples
Add reference to specific CONFIG_BT_CTLR_ Kconfig options
for the ISO samples. This is due to the fact that ISO
isn't fully supported in the Zephyr controller yet, and
won't be enabled by default for a while yet.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-01-26 13:29:45 +01:00
Wealian Liao
7467dc4c12 tracing_user: Add ISR nest level parameter
For tracing_user, the sys_trace_isr_enter() & sys_trace_isr_exit()
block any nest interrupts & most SMP interrupts for the user. It is
hard to analyze the IRQ preemption(e.g., each IRQ counter and execution
time). This commit adds ISR nest level for each CPU to the user instead
of blocking user call back when nest interrupts.

Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
2022-01-21 14:38:35 -05:00
Tom Burdick
b5d9c047d3 boards/intel_adsp_cavs25: Improve test coverage
Remove the only_tags filter for the board and add ignore_tags for net
and bt.

Adds a filter to a userspace sample that didn't correctly filter on
usermode being Kconfiged.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-01-21 14:36:49 -05:00
Emil Gydesen
59840b1a7b Bluetooth: Samples: Iso connected benchmark fix unidirectional tx
Add a check for SDU size and tx qos to ensure that we do not
attempt to send any data and neither central or peripheral
if the benchmark has been setup to be rx-only.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-01-21 14:25:04 -05:00
Emil Gydesen
e6265685a1 Bluetooth: Sample: ISO connected benchmark change to callback
Change the sample to use the callback instead of a timer
to send next packet.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-01-21 14:25:04 -05:00
Piotr Pryga
6590ffd330 samples: Bluetooth: df: Fix too early per sync create timeout
Periodic advertising synchronization create had a timeout set
to fixed value of 10 seconds. BT 5.3 Core specification defines
synchronization timeout as 6 consecutive periodic advertising
events. When advertiser set the periodic interval to be more than
1.6 second it was possible the application timeout is reached
before time allowed by BT Core specification.

Changed implementation of timeout to depend on the periodic
advertising interval.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-01-21 19:32:17 +02:00
Piotr Pryga
bda4eea41d samples: Bluetooth: df: Add DF peripheral sample
Add new sample application for direction finding to show
how the functionality works in connected mode for peripheral role.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-01-21 10:50:21 -05:00
Piotr Pryga
1acf326993 samples: Bluetooth: df: Add DF central sample
Add new sample application for direction finding to show
how the functionality works in connected mode for central role.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-01-21 10:48:26 -05:00
Henrik Brix Andersen
cc557260c8 samples: drivers: can: add support for CAN_ERROR_WARNING
Add support for CAN_ERROR_WARNING CAN controller state.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-19 18:34:26 +01:00
Gerard Marull-Paretas
8be86f7ffb samples: userspace: drop DEV_DATA/DEV_CFG usage
Stop using redundant DEV_DATA/DEV_CFG macros and use dev->data and
dev->config instead.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-01-19 18:16:02 +01:00
Krzysztof Chruscinski
2a0e66453c samples: boards: nrf: Add nrf53_sync_rtc sample
Add sample which demonstrates how RTC clocks are synchronized
between application and network core.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-01-19 17:46:28 +01:00
Anas Nashif
01b7800bc8 include: remove deprecated headers
Remove all deprecated headers which were moved to a different location.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-01-18 19:17:50 -05:00
Carlo Caione
993cb4cd62 sample: openamp: Add OpenAMP performance test.
Add a simple sample that tries to answer the silly question: how fast
can I move data from one core to another using OpenAMP?

It depends on a lot of factors but at least we can use this sample as a
skeleton to build tests on top.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-01-18 13:23:43 -05:00
Gerard Marull-Paretas
ddc168fa78 pm: s/PM_DEVICE_(DT_(INST))_REF/PM_DEVICE_(DT_(INST))_GET
In order to align with macros used to obtain a device reference (e.g.
DEVICE_DT_GET), align the PM macros to use "GET" instead of "REF". This
change should have low impact since no official release has gone out yet
with the "REF" macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-01-18 12:14:06 -05:00
Erwan Gouriou
322175e4fc boards: stm32l5: Update TFM related flashing instructions
Following the work done to add TFM support on b_u585i_iot02a,
update other STM32 TFM enabled boards to benefit from the
progress made on TFM flashing instructions.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-01-18 10:42:45 -05:00
Alexander Wachter
22a10752ed samples: net: sockets: can: Disable Ethernet
Disable Ethernet on SocketCAN sample because some Ethernet
drivers cannot operate on such small buffers.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2022-01-18 10:39:55 -05:00
Carlo Caione
93b0ea9782 ipc: Remove multi-instance backend
Remove the legacy multi-instance backend and the sample.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-01-17 15:50:58 -05:00
Krzysztof Chruscinski
262cc55609 logging: Deprecate v1, default to v2
Reduced logging mode selection to deferred, immediate, minimal and
frontend. Decoupled logging version from mode and created CONFIG_LOG1
which can be used to explicitly select deprecated version.

From now on, chosing CONFIG_LOG_MODE_{IMMEDIATE,DEFERRED} will result
in version2.

Deprecated CONFIG_LOG2_MODE_{IMMEDIATE,DEFERRED} with cmake warning.

Codebase adapted to those changes.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-01-17 15:49:10 -05:00
Piotr Pryga
ab32c06275 samples: Bluetooth: df: Fix possible stack overflow issue
Host receive thread has small default stack size.
Attempt to convert data from binany to string requires
large array. Allocation of such array on stack could
cause stack overflow.

To limit the scope of the array and avoid stack overflow
the array is changed to be static local variable in a function.

Also the array has been prepared to accept max advertising
data sieze of 1650 bytes.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-01-17 12:54:10 -05:00
Henrik Brix Andersen
2c0e0a74af doc: use extlink for github issue links
Use extlink for GitHub issue links in documentation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-17 12:48:43 -05:00
Alexander Mihajlovic
b9aca25206 samples: adc: Add nucleo_wl55jc support
Add support for nucleo_wl55jc board to adc driver sample.

Signed-off-by: Alexander Mihajlovic <a@abxy.se>
2022-01-17 11:48:30 -05:00
Francois Ramu
ff34965a0a samples: drivers led strip ws2812 overlay for stm32 nucleo
The spi node of the led_ws2812 now includes the frame format
as defined by the dts bindings spi-device.yaml
SPI_FRAME_FORMAT_TI is selected with overlay for target boards.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-01-17 11:46:14 -05:00
Manojkumar Subramaniam
4c54e23377 samples: drivers: nucleo_h7a3zi_q: Configuring ADC sample application
I tested ADC sample on the board mentioned above
0v = 0
3.3v = 4095

Signed-off-by: Manojkumar Subramaniam <manoj@electrolance.com>
2022-01-17 11:45:21 -05:00
HaiLong Yang
1d3c710eaf samples: eeprom: add gd32f450i_eval board
Add gd32f450i_eval board with AT2402C eeprom.

Signed-off-by: HaiLong Yang <cameledyang@pm.me>
2022-01-14 10:42:24 -06:00
Martin Jäger
9322a238db samples: drivers: uart: move echo_bot into dedicated folder
The STM32 single_wire example was merged in parallel to this sample
and ended up as a sub-folder of this one. Separate both into their
own folders.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-01-14 09:55:30 -06:00
Wouter Cappelle
c3ca3aa27d sensors: STM32: Add support for L5 die temp sensor
This PR adds the different handling of temperature sensor for the
STM32L5 soc. In this soc, there are some calibration settings which
need to be applied for temperature conversion.

Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
2022-01-13 10:34:10 +01:00
Wouter Cappelle
ba12740049 sensors: STM32: code formatting of stm32_temp with sample
clang format on stm32_temp.c & the sample

Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
2022-01-13 10:34:10 +01:00
Daniel Leung
b63b71aa1b tfm: remove @return doc for void functions
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-12 16:02:16 -05:00
Daniel Leung
1be8c15e4c cpp: remove @return doc for void functions
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-12 16:02:16 -05:00
Daniel Leung
c955a44f13 usb: remove @return doc for void functions
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-12 16:02:16 -05:00
Wealian Liao
1fd29fb131 tracing: Fix tracing_user config
`tracing_user.h` lost several definitions, which made
CONFIG_TRACING_USER build fail. This fixes the TRACING_USER
config & adds it to the test case.

Moreover, the idle task stack is overflow on qemu_x86, qemu_cortex_m0 &
qemu_riscv64. This makes the test fail. So this commit sets the idle
stack size to 2048 for this sample to avoid it.

Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
2022-01-11 18:13:18 -05:00
Henrik Brix Andersen
13e6d264bb samples: modules: canopennode: add stm32f3_disco support
Add support for the ST STM32F3 Discovery development board.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-11 14:40:49 -06:00
Henrik Brix Andersen
e919db3222 drivers: can: add user_data to state change callback
Add optional user data argument to can_set_state_change_callback() to
comply with Zephyr API design guidelines.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-11 11:54:04 +01:00
Jonathan Hahn
236aeadd4f samples: uart: Add sample for single line uart
The sample uses st single-line uart mode on stm32 boards.

Signed-off-by: Jonathan Hahn <Jonathan.Hahn@t-online.de>
2022-01-11 11:47:47 +01:00
Yuval Peress
ab1caef8c3 ztest: Update ztest with more powerful testing APIs
1. Test suites in prior ztest serve no purpose other than logical
ordering of tests into a named-group. Move the construct of setup and
teardown into the test suite and away from individual tests.
Additionally, add the constructs of before/after to the test suites.
This model more closely resembels other testing frameworks such as gTest
and Junit.
2. Test can be added to a suite by using ZTEST() or ZTEST_F() where _F
stands for fixture. In the case where _F is used, the argument `this`
will be provided with the type `struct suite_name##_fixture*`. Again,
this models other modern testing frameworks and allows the test to
directly access the already set up data related to the test suite.
3. Add the concept of test rules (from Junit). Rules are similar to the
before/after functions of the test suites but are global and run on all
suites. An example of a test rule can be to check that nothing was
logged to ERROR. The rule can cause the test to fail if anything was
logged to ERROR during an integration test. Another example would be a
rule that verifies that tests ran within some defined timeout.

Signed-off-by: Yuval Peress <peress@google.com>
2022-01-11 11:47:30 +01:00
Johann Fischer
cba4adecef samples: modbus: tcp_gateway: use default arduino header UART
Use default arduino header UART in DT overlay for FRDM-K64F board.
This is also consistent with documentation if a shield is to be
used for communication.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-01-10 09:45:42 -06:00
Martin Jäger
0bd3d46cfb samples: drivers: add UART serial sample
This sample demonstrates the use of the UART driver. The data is
received using an ISR callback and a message queue. For sending data,
the polling API is used.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-01-10 09:34:02 -06:00
Erwan Gouriou
60dea97942 samples/boards: STM32: Move Olimex E407 ccm sample under STM32
This sample could apply to more STM32 targets, so move it under
STM32 umbrella.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-01-10 10:23:57 -05:00
Erwan Gouriou
8a517109e6 samples/boards/stm32: stm32wb ble: Rework name for doc index coherency
Rename sample for sample index page consistency.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-01-10 10:23:57 -05:00
Henrik Brix Andersen
8af4bb722d drivers: can: rename API functions for better consistency
Rename a few CAN API functions for clarity and consistency with other
Zephyr RTOS APIs.

CAN_DEFINE_MSGQ() becomes CAN_MSGQ_DEFINE() to match K_MSGQ_DEFINE().

can_attach_isr() becomes can_add_rx_filter() since a filter callback
function is not an interrupt service routine (although it is called in
isr context). The word "attach" is replaced with "add" since filters are
added, not attached. This matches the terminology used is other Zephyr
APIs better.

can_detach() becomes can_remove_rx_filter() to pair with
can_add_rx_filter().

can_attach_msgq() becomes can_add_rx_filter_msgq() and documentation is
updated to mention its relationship with can_add_rx_filter().

can_register_state_change_isr() becomes can_set_state_change_callback()
since a state change callback function is not an interrupt service
routine (although it is called in isr context). The word "register" is
replaced with "set" since only one state change callback can be in
place.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-10 10:44:37 +01:00
Kai Vehmanen
60325019aa samples/subsys/audio/sof: use -fstrict-overflow for SOF
Align compiler flags of SOF Zephyr build with the build SOF XTOS
and use -fstrict-overflow.

With -fno-strict-overflow, some versions of XCC compiler (e.g. xt-xcc
12.0.8) always emit a "bltu" instruction to check for overflow in loops
like:

  unsigned int n;
  for(n = 0; n < 1024; n++)
	do_arithmetic();

With "-fno-strict-overflow", you'll have:
  18:   068076                  loop    a0, 22 <dummy_dspload+0x22>
  1b:   445a                    add.n   a4, a4, a5
  1d:   551b                    addi.n  a5, a5, 1
  1f:   023657                  bltu    a6, a5, 25 <dummy_dspload+0x25>
  22:   fffc86                  j       18 <dummy_dspload+0x18>

With "-fstrict-overflow":
  16:   038476                  loop    a4, 1d <dummy_dspload+0x1d>
  19:   223a                    add.n   a2, a2, a3
  1b:   331b                    addi.n  a3, a3, 1

As this is a common pattern in audio DSP code, change the default
for SOF builds to -fstrict-overflow.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-01-07 10:46:14 -05:00
Kai Vehmanen
212347f94d samples/subsys/audio/sof: build with CONFIG_SPEED_OPTIMIZATIONS
The inner loops of SOF audio algorithms benefit from
compiler optimizations. On Intel cAVS platforms, it was noted
zero-overhead loops ("loop" family of instructions) is not
used for fixed-size inner loops when using -Os (optimize for
size) and the XCC xtensa toolchain.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-01-07 10:46:14 -05:00
Jakub Rzeszutko
d4559f53fa lib: getopt: rework and extend getopt library
Getopt has been rework in this way that calling it does not require
extra state parameter and its execution is thread safe.
Global parameters describing the state of the getopt function have been
made available to ensure full API compatibility in using this library.
However, referencing these global variables directly is not thread
safe. In order to get the state of the getopt function for the thread
that is currently using it, call: getopt_state_get();

Extended the library with getopt_long and getopt_long_only functions.

Moved getopt libary from utils to posix.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2022-01-06 21:26:59 +01:00
Marc Herbert
f38c6b67ed samples: big_http_download: make num_iterations unsigned
It is documented as unsigned in
samples/net/sockets/big_http_download/Kconfig

Signed overflow is undefined behavior, unsigned is not. This fixes the
following warning:

   -Wstrict-overflow=1

samples/net/sockets/big_http_download/src/big_http_download.c:346:2:
In function 'main':
error: iteration 2147483648 invokes undefined behavior
                           [-Werror=aggressive-loop-optimizations]
  346 |  } while (--num_iterations != 0);

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-01-05 15:00:32 -05:00
Konstantinos Papadopoulos
5da3d3148d samples: exclude platform stm32f769i_disco
Excluded due to conflicts with adafruit_2_8_tft_touch_v2.
Both boards got a touch controller.

Signed-off-by: Konstantinos Papadopoulos <kostas.papadopulos@gmail.com>
2022-01-05 14:59:58 -05:00
Aastha Grover
d13613750b samples: logging: Add v2 logging support for sys-t sample.
Adding #ifndef CONFIG_LOG2 condition for log_msg_ids and
log_string_sync in sys-t sample. Extending support for
v2 logging in sys-t sample.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-01-05 14:41:51 +01:00
Lukasz Majewski
3e73fc287e samples: dts: Extend nucleo_h743 DTS to support attached QSPI memory
The nucleo_h743 allows extra capes to extend its functionality.

In our case it has been extended to use 32MiB SPI-NOR memory
connected to QUADSPI dedicated pins from block2.

Moreover, upper 16MiB of SPI-NOR memory has been used to store
littlefs data to test 4B addressing mode (which may cause problems
when NOR-flash is larger than 16 MiB).

Now the littlefs sample can be used to test this extension:
west build -p always -b nucleo_h743zi ./zephyr/samples/subsys/fs/littlefs

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2022-01-04 20:47:29 -05:00
Piotr Golyzniak
22e82ecf6d samples: fix wrong extra_args definitions
Fix wrong extra_args definitions wich cause that this args were not used
by CMake during building this samples via Twister in CI.

Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
2022-01-04 17:15:06 -05:00
Krzysztof Chruscinski
768c5d42c0 sample: logging: logger: Extend sample to use tag
Extended sample to use tag which is prepended to each message.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-01-04 14:57:31 -06:00
Enjia Mai
27db56468a samples: userspace: fix syscall_perf test cannot be run
The syscall_perf test cannot be built successfully due to region RAM
overflow on qemu_riscv32_xip and hifive1_revb. The dtim is only 16KB,
To reduce the main stack size to make it can be built successfully.

Base on the spec(fe310-g002-manual-v1p1.pdf), the size of itim should
be 8KB. Modify the definition in its DTS file.

And it also fix some of the gcc warning when testing it by twister.

This PR partially fixes #41399.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-01-04 15:51:43 -05:00
Piotr Pryga
3b5c1efc16 Bluetooth: host: Align usage of cte_type in DF host implementation
The CTE type is used in two ways by HCI layer:
1) single value representing particular CTE type: AoA, AoD 1 us,
  AoD 2 us
2) bit-filed where bits 0-2 represent particular CTE types AoA
  AoD 1 us, AoD 2 us

The bit-field is used to inform Controller about allowed types
of CTE, hence single value carries more than one value.
To avoid confusion between these use cases in code that refers
to case 1) all named cte_type (singular form). For case 2)
cte_types (plural form) is used.

There is an enumeration that is used for both cases:
bt_df_cte_type. For cte_type only single value from the
enumeration may be assigned to variable except
BT_DF_CTE_TYPE_NONE and BT_DF_CTE_TYPE_ALL.
For cte_types all enum members may be used. Ocasionally
BT_DF_CTE_TYPE_NONE may be excluded. If that is true,
it is described in code documentation.

Thanks to that applications are released from requirement
to include hci.h header file.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2022-01-04 16:02:40 +01:00
Erwan Gouriou
81bd4ba9c5 samples/tfm_integration: psa_crypto: Remove nucleo_l552ze_q
This sample requires to much flash compared to nucleo_l552ze_q
available resources.
Remove it from this sample.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-01-04 09:05:11 -05:00
Erwan Gouriou
830d9bdf89 samples/tfm_integration: nucleo_l552ze_q: Update flash partition
Due to a recent change in TFM, some more space should be allocated
to mcuboot flash partition (some space should be allocate for OTP)
(Cf commit db07170a34f ("Platform: Allocate space in flash for OTP")
in trusted-firmware-m repo)
Take this into account and increase mcuboot flash partition for
nucleo_l552ze_q_ns target.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-01-04 12:33:23 +01:00
Sebastian Bøe
22365b4dea mcumgr: kconfig: Have OS_MGMT_TASKSTAT default to n
OS_MGMT_TASKSTAT depends on THREAD_MONITOR, so when it defaults to y
and THREAD_MONITOR is disabled we get a build error.

Add a depends on to enforce a correct configuration.

Remove default y, as features should be default n.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2022-01-04 11:54:28 +01:00
TOKITA Hiroshi
a194ef6191 samples: drivers: dac: add longan_nano board
DAC sample support longan_nano and longan_nano_lite board.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-01-04 11:49:14 +01:00
Henrik Brix Andersen
b1b77c1774 drivers: can: change can_tx_callback_t function signature
Change the can_tx_callback_t function signature to use an "int" (not an
uint32_t) for representing transmission errors.

The "error" callback function parameter is functionally equivalent to
the return value from can_send() and thus needs to use the same data
type and needs to be able to hold negative errno values.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-01 07:40:29 -05:00
Gerard Marull-Paretas
bcab9f9ac5 samples: bluetooth: hci: replace SYS_DEVICE_DEFINE with SYS_INIT
SYS_INIT can be used for the same purpose, what is being run is simply
an initialization hook.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-12-24 20:59:10 -05:00
Carlo Caione
67ef1df950 mbox: Enforce callback registration before enabling the channel
Specify in the API that the callback must be registered before the
channel is enabled, fix the NRFX IPC driver to be compliant and change
the MBOX sample.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-12-23 12:38:21 +01:00
Henrik Brix Andersen
1f8255a311 samples: drivers: can: convert from can_attach_workq() to triggered work
Convert the CAN sample from using can_attach_workq() to using
can_attach_msgq() and triggered work via k_work_poll_submit().

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-22 18:04:02 +01:00
Andrzej Kuros
e1b845cc88 samples: echo_server: increase sys workqueue stack
For nrf5340 with 802.15.4 system work queue stack size was too small.

Signed-off-by: Andrzej Kuros <andrzej.kuros@nordicsemi.no>
2021-12-21 15:20:41 -05:00
Erwan Gouriou
215822d161 samples: Take into account PINCTRL in minimal configurations
Now that PINCTRL is available, don't forget to disable it
in minimal configurations.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-12-21 18:30:35 +01:00
Dominik Ermel
659fee4460 samples: subsys: dfu: Fix image signing tool executable name
It is imgtool.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-12-21 17:08:35 +01:00
Kevin Townsend
8dbf0f31f2 doc: guides: tfm: Add pages on test suites
Adds notes on how to run the two main test suites for TF-M using
the supplied sample applications.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2021-12-21 17:07:58 +01:00
Yong Cong Sin
1e32d44729 samples: sensor: Add sample for MH-Z19B
Add sample for MH-Z19B CO2
sensor.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-12-20 18:47:47 +01:00
Carlo Caione
11f936c87e samples: mbox: Fix incorrect DT addressing
Place the nodes to the proper place into the DT. The driver is calling
directly into the NRFX without using any direct memory addressing so
this is mostly a cosmetic fix.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-12-20 17:48:36 +01:00
Jimmy Johnson
5fda6a3b2f sample: sensor: tmp108: Add ti tmp108 sample
This sample writes the tmp108 temperature to the console
once every 3 seconds. There are macro definitions included
for turning off and on alerts if that is set up, and
also using low power one shot mode.

Signed-off-by: Jimmy Johnson <catch22@fastmail.net>
2021-12-17 21:15:25 +01:00
Anas Nashif
05ecd46a84 tests: fix typos and misnamed platforms
Various obsolote and misnamed platfomrs in test filters theat went
undetected for a while.

Fixes #41222

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-12-17 12:24:37 -05:00
Andrzej Głąbek
bf7d655a48 samples: boards: nrf: Add sample for the display_nrf_led_matrix driver
Add a sample that can be used to see the nRF LED matrix display driver
in action and that will prove that the driver is buildable for both the
bbc_microbit_v2 and bbc_microbit boards.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-12-17 15:48:08 +01:00
Glauber Maroto Ferreira
1abf5394e9 samples: fat_fs: esp_wrover_kit: sdmmc support
- adds support to sdmmc through SPI
- adds support to samples/subsys/fs/fat_fs

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-12-16 20:49:27 -05:00
Glauber Maroto Ferreira
2bea827f05 samples: blinky_pwm: esp_wrover_kit: pwm led support
- adds overlayed board info to support PWM LED
- adds support for blinky_pwm sample code.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-12-16 20:49:27 -05:00
Glauber Maroto Ferreira
47f13d99a6 samples: lvgl: esp_wrover_kit: lcd display support
- adds dts support to ESP-WROVER-KIT's LCD display
controller
- adds support to samples/subsys/display/lvgl
- updates sample code documentation

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-12-16 20:49:27 -05:00
HaiLong Yang
ff9d967832 samples: drivers: dac: add gd32f450i_eval board
DAC sample support gd32f450i_eval board.

Signed-off-by: HaiLong Yang <cameledyang@pm.me>
2021-12-16 10:13:56 +01:00
Jeremy Wood
8068ab5261 samples: led_apa102: overlay and config for blueclover_plt_demo_v2
Added dts overlay and config to support using
samples/driver/apa201 with blueclover_plt_demo_v2_nrf52832.

Signed-off-by: Jeremy Wood <jeremy@bcdevices.com>
2021-12-16 10:12:57 +01:00
Enjia Mai
521e6ffb7c samples: enlarge the stack size to run a sample successfully
CMSIS limits the stack size, but for qemu_x86_64, qemu_xtensa, qemu_leon3
and the boards sunch as up_squared, ehl_crb, acrn_ehl_crb need more
stack size to run this successfully, or the stack overflow will happened.
So we enlarge the stack size to 1024 for this sample case.

For other boards the original 512 is enough.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2021-12-15 21:23:29 -05:00
Joakim Andersson
0f3169648b cmake: Update messages mode using INFO to the correct mode STATUS
Search and replace `message(INFO " ` with `message(STATUS "`.
This would otherwise print "INFO <message"

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-12-15 14:58:05 -06:00
Flavio Ceolin
18b932f10d pm: device_runtime: Return possible error on enable
Change the function pm_device_runtime_enable() to return 0 on
success or an error code in case of error.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-12-14 19:23:05 -05:00
Casper Meijn
92e317c158 samples: boards: pinetime: Remove duplicate sample
samples/boards/pine64_pinetime has the same functionality as the more
general samples/basic/button application with the board specific
driver `pinetime-key-out`.

Signed-off-by: Casper Meijn <casper@meijn.net>
2021-12-14 12:32:32 +01:00
Jeffrey Urban
34a958f545 samples: net: google_iot_mqtt: Change read publish to blocking
Avoid endless loop in `case MQTT_EVT_PUBLISH`
Fail on any error for mqtt_read_publish_payload_blocking, inc. -EAGAIN.

Fixes zephyrproject-rtos#40965

Signed-off-by: Jeffrey Urban <jeffrey@jeffreyurban.com>
2021-12-14 12:30:59 +01:00
Alex Sergeev
a485eed871 samples: net: gptp: Add nucleo_f767zi and nucleo_h745zi_q boards
Add nucleo_f767zi and nucleo_h745zi_q boards to gPTP samples.

Signed-off-by: Alex Sergeev <asergeev@carbonrobotics.com>
2021-12-13 22:19:25 -05:00
Martí Bolívar
68e5745d05 samples: spi_flash_at45: fix build
Add a missing include.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-12-13 20:41:33 -05:00
Robert Lubos
6d3c1ddec2 samples: net: google_iot_mqtt: Fix CI for the sample
The sample did not specify any tests in its sample.yaml file, causing CI
failures.

Additionally, the sample requires to generate secure key before building
the sample, otherwise the build fails. For the CI needs, specify a dummy
test key, which is only included if the build was triggered by Twister.
For this, specify a USE_DUMMY_KEY variable in the sample.yaml file.

Finally, fix some minor build issues in the sample itself - remove
unused variable, and remove deleted (and also unneeded) mbed TLS header
inclusion.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-12-13 20:34:28 -05:00
Lauren Murphy
5b62546eed samples, modules: tflite-micro: reduce sample test case noise
Reduces noise of sample test case in CI by reducing number of
output lines from 50 to 10.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-12-13 19:24:32 -06:00
Glauber Maroto Ferreira
0dfc2ea103 doc: samples: display: update documentation
- fixes sample codes' relative paths
- updates instructions to build and run for native posix
platforms on its 64 flavor.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-12-13 19:39:47 -05:00
Erwan Gouriou
9407add27c samples/drivers: led_pca9633: Convert to build_only
Sample should only be run if led is present on board.
Since, this is not the case on any of the in tree boards,
set the sample as build-only.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-12-13 10:02:44 -06:00
Gerard Marull-Paretas
459c3f918f doc: drop single quote references
Many documents relied on single quotes to create references, e.g.
`my_reference`. This is possible because `default_role = "any"` is
enabled in Sphinx conf.py. However, this method comes with its problems:

- It mixes all domains together, so it's not clear to what are you
  referencing: a document? a Kconfig option? a C function?...
- It creates inconsistencies: in some places explicit roles are used
  (e.g. :ref:`my_page`) while in some others not.
- _Conflictis_ with markdown. Single quotes are used for literals in
  Markdown, so people tend to use the same syntax in Sphinx, even though
  it has a different purpose.

Usages have been found using `git grep ' `[^`]*` ' -- **/*.rst`.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-12-10 16:43:34 -05:00
Johann Fischer
5296339fde usb: rework to use macro STRUCT_SECTION_FOREACH
Replace deprecated macro USBD_CFG_DATA_DEFINE by
USBD_DEFINE_CFG_DATA which places usb_cfg_data structures
in specific iterable section.

Replace __usb_data_start, __usb_data_end usage patterns
  size_t size = (__usb_data_end - __usb_data_start);
  for (size_t i = 0; i < size; i++) {...}
by
  STRUCT_SECTION_FOREACH(usb_cfg_data, ...) {...}

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-12-10 07:22:15 -06:00
Johann Fischer
307c13b218 drivers: display: remove unused Kconfig options
remove unused options SDL_DISPLAY_* and DUMMY_DISPLAY_*.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-12-10 12:47:30 +01:00
Johann Fischer
bf0b879067 samples: cfb_custom_font: set required pixel format
Set for this sample required pixel format.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-12-10 12:47:30 +01:00
Johann Fischer
4541f1f76a samples: use chosen property to get default display controller
Rework samples to use DEVICE_DT_GET and DT_CHOSEN
to get default display controller device.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-12-10 12:47:30 +01:00
Johann Fischer
2d175d14f3 drivers: display_dummy: rework to obtain configuration from devicetree
Add bindings for dummy display controller.
Rework dummy display controller driver to obtain
configuration from devicetree. Remove unnecessary casts,
add multi-instance support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-12-10 12:47:30 +01:00
Johann Fischer
af620ef196 sample: dfu: exclude b_u585i_iot02a board
Exclude b_u585i_iot02a board from USB DFU sample since
it has no flash driver.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-12-10 12:47:10 +01:00
Daniel DeGrasse
e9b74593b8 boards: mimxrt11xx: Enable Flash driver on RT1160 and RT1170
Enable the flash on RT1170 and RT1160. When booting from the CM7 core,
flash will be started in XIP mode and used as storage as well as boot
memory. When booting from the CM4 core, flash is available as storage
only, and does not run in XIP mode.

This commit was tested with the following samples
-flash_shell
-littlefs

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-12-09 19:32:45 -05:00
Gerard Marull-Paretas
a66b79999b samples: tfm_integration: tfm_ipc: replace deprecated header
<power/reboot.h> needs to be replaced with <sys/reboot.h>

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-12-09 14:43:06 -05:00
Henrik Brix Andersen
f499559434 drivers: can: deprecate the use of CAN-specific error return values
Deprecate the use of CAN-specific error return values and replace them
with standard errno values.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-09 12:37:40 -05:00
Jukka Rissanen
4c038464c3 samples: net: gsm_modem: Fix gsm_ppp.h path
The gsm_ppp.h is currently in include/drivers/modem directory
so change the path accordingly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-12-08 10:06:55 -05:00
Guillaume Lager
ed68ef5678 samples: tmp116: Add access to eeprom
Add read access to internal tmp116 eeprom which
contains the device unique id after manufacturing

Signed-off-by: Guillaume Lager <g.lager@innoseis.com>
2021-12-08 07:51:46 -06:00
Alexander Wachter
2bf02f4854 samples: net: sockets: echo server/client add 6locan to yaml
Add congiguration for 6locan to the sample yaml file.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2021-12-06 08:15:14 -05:00
Robert Lubos
f85e37ae2c samples: net: sockets: coap_client: Make use of CoAP APIs for observe
The sample oversimplified the observe mechanism a bit - instead of
making use of CoAP APIs to verify the packets received (if they are
actually notifications for the observe) it blindly assumed that any
received packet was a notification. This could be misleading for
potential users of the CoAP library, as the sample had little use as
a reference for the Observer functionality.

Fix this by making use of `coap_reply` structure and a corresponding
`coap_response_received()` function.

Additionally, make the observe cancellation compliant with the CoAP
specification - it should be either an empty Reset message, or a GET
request with Observe option set to 1. The sample used invalid
construct of a Reset message with Observe option. For the purpose of
the sample, use the latter option.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-12-06 08:09:13 -05:00
Robert Lubos
ed497ba6f9 samples: net: sockets: coap_client: Fix notification ACK
The sample intended to send an empty ACK for the notification message
(response code equal to 0), yet it included a token in the ACK reply
(which is not correct for an empty ACK).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-12-06 08:09:13 -05:00
Robert Lubos
3bc0319940 samples: net: sockets: coap_server: Support both Observe cancel methods
Add support for both Observe cancellation methods - empty Reset reply
(in place of ACK) and GET message with Observe option set to 1.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-12-06 08:09:13 -05:00
Robert Lubos
0fb4b405be samples: net: sockets: coap_server: Switch to IPv6 by default
The documentation of the sample refers IPv6 instead of IPv4.
Additionally, the coexisting coap_client sample also uses IPv6 by
default. Therefore, switch the sample default configuration to use IPv6
instead of IPv4.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-12-06 08:09:13 -05:00
Marc Reilly
54b6d26242 drivers: spi: add spi-bitbang driver
This adds an spi master mode driver via bitbanged gpio. Only syncronous
transfers are implemented. Clock signal timing is accomplished via busy
waits, the gpios are manipulated via the standard gpio interface; these
two factors limit the frequency at which it can operate - but here
a simple and generic implementation was chosen over performance.

The driver supports the various clock polarity and phase
configurations, and can also work with word sizes which are non
multiples of 8bits, currently up to 16 bits.

A sample program is also added demonstrating basic use of the driver
with 9bit data words.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2021-12-06 07:29:45 -05:00
Gerard Marull-Paretas
7bfd0976aa pm: state: PM_STATE_DT_ITEMS_LEN->DT_NUM_CPU_POWER_STATES
Rename PM_STATE_DT_ITEMS_LEN to DT_NUM_CPU_POWER_STATES to make its
purpose more clear. This macro could be made part of a Devicetree API
for PM in the future.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-12-04 12:33:57 -05:00
Gerard Marull-Paretas
fa96955305 pm: state: PM_STATE_INFO_DT_ITEMS_LIST->PM_STATE_INFO_LIST_FROM_DT_CPU
Rename the PM_STATE_INFO_DT_ITEMS_LIST macro to
PM_STATE_INFO_LIST_FROM_DT_CPU to make its purpose more clear. Similar
naming scheme is found e.g. in the GPIO API.

Associated internal macros and docstrings have been adjusted, too.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-12-04 12:33:57 -05:00
Paul He
2bf27f5953 samples: prod_consumer: use app_shared.h instead of main.h
Normally main.c file doesn't have a header file, because it doesn't
need to declare any interfaces to other modules.

In this sample, it's better to put the shared variables in one place,
and provide the interfaces to other modules, such as app_a, app_b,
and main.

Signed-off-by: Paul He <pawpawhe@gmail.com>
2021-12-02 10:53:55 +01:00
Joakim Andersson
e4a88c4ce6 samples: tfm_secure_partition: Remove conditional from partition
Remove the conditional attribute from the sample partition manifest.
The conditional behavior will change with TF-M 1.5 to only accept
cmake bool values on/off enabled/disabled true/false and is intended
to be generated by the build system.
Since the partition is supposed to always be enabled in the sample
there is no need to have a conditional for it.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-12-01 14:14:59 -06:00
Krzysztof Chruscinski
08de059c8a samples: logging: logger: Add configuration for nrf52840dk
Added board specific configuration which enables use of
asynchronous UART API in UART log backend.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-12-01 10:02:28 +01:00
Daniel Leung
917b3cf7c0 samples: debug/gdbstub: update instructions to run
This corrects the directory pointing to sample in the README
file. Also changes the TCP port number for the second serial
port exposing the GDB stub. This allows QEMU itself to expose
GDB interface through port 1234, and Zephyr's GDB stub at
port 5678.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-11-30 15:24:00 -05:00
Kim Bøndergaard
ee6c552805 boards: frdm_k64f: Solve conflict between UART3 and enet
Arduino compatible boards should have a working UART on pin 0 & 1.
On frdm_k64f this is handled by uart3

Unfortunately pinmuxing of uart3 was destroyed when enabling NETWORKING,
because the uart3 RX/TX pins was reconfigured for 1588 timers.

1588 timers are enabled by the enet child node, ptp which by some reason
is enabled by default.
1588 timers aren't needed in most cases when ethernet is being used,
so this fix ensures ptp is by default disabled. Likewise pinmuxing of
the 1588 timer functionality is now dependant of ptp being active

Signed-off-by: Kim Bøndergaard <kim.boendergaard@escoglobal.com>
2021-11-30 11:08:15 -06:00
Francois Ramu
1fa0828d22 samples: stm32 power mngt enters low power
Remove this line because the pm_device_busy_set function will
prevent the system to enter low power.
This sample application wants to.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-11-29 18:19:46 -05:00
Christopher Friedt
7ea93a8853 tests: kernel: cycle64: mark test as slow
Previously cycle64 was under `samples/`. It's been moved to
`tests/` and has been marked with `slow: True` so that it
will not disrupt CI by adding excessive delays.

Fixes #40367

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-11-29 10:35:49 -05:00
Gerard Marull-Paretas
89a4f36fc8 device: remove inclusion of pm/device.h
The device PM subsystem _depends_ on device, not vice-versa. Devices
only hold a reference to struct pm_device now, and initialize this
reference with the value provided in Z_DEVICE_DEFINE. This requirement
can be solved with a forward struct declaration, meaning there is no
need to include device PM headers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-29 11:08:38 +01:00
Jair Jack
0b06a06814 net: lwm2m: Supported Protocol to pull firmware update must be optional
The supported protocol must be delivered to the firmware update object
as optional, then configured in the application.

This information is device/server dependent so does not can be fixed
in library.

Signed-off-by: Jair Jack <jack@icatorze.com.br>
2021-11-26 10:26:32 -05:00
Gerard Marull-Paretas
a6520ad690 samples: boards: nrf: dynamic_pinctrl: initial version
Add a sample that shows how dynamic pin control can be useful to remap a
peripheral to a different set of pins.

NOTE: default pin configuration is provided for the nRF52840-DK board.
Such configuration will be removed once all nRF-based boards are ported
to pinctrl.

Thanks to Francesco for documentation suggestions.

Co-authored-by: Francesco D. Servidio <francesco.servidio@nordicsemi.no>
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-26 14:20:51 +01:00
Erwan Gouriou
dd0b133a62 samples/drivers: led_pca9633: Replace target stm32373c_eval
Pinctrl is missing in i2c1 device description on stm32373c_eval
ovderlay file, besides using I2C1 this board (as mentioned in readme)
requires to remove 2 resistors on the board.

Make it simple and instead use a board with arduino_i2c port
available.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-26 11:36:42 +01:00
Robert Lubos
666e9f80d6 net: ipv6: Remove in6_addr from packed net_ipv6_hdr struct
Replace unpacked in6_addr structures with raw buffers in net_ipv6_hdr
struct, to prevent compiler warnings about unaligned access.

Remove __packed parameter from `struct net_6lo_context` since the
structure isn't really serialized.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-11-25 10:46:35 -05:00
Robert Lubos
064200b420 net: ipv4: Remove in_addr from packed net_ipv4_hdr struct
Replace unpacked in_addr structures with raw buffers in net_ipv4_hdr
struct, to prevent compiler warnings about unaligned access.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-11-25 10:46:35 -05:00
Maik Vermeulen
f2ca6a8c22 net: lwm2m: Add observe callback for observe and notification events
Added an observe callback so that the application can register to
receive events like observer added/deleted, and notification acked/
timed out. The notifications can be traced back to the exact data
contained within them by use of the user_data pointer.

Fixes #38531.

Signed-off-by: Maik Vermeulen <maik.vermeulen@innotractor.com>
2021-11-25 10:45:36 -05:00
Yeshvanth M
a1947006d6 samples: Bluetooth: Added Observer sample
This sample scans for nearby BLE devices and prints the address of the
device found and the RSSI value to the UART terminal.

Uses passive scanning and demonstrates the role of the observer.

Signed-off-by: Yeshvanth M <yeshvanthmuniraj@gmail.com>
2021-11-25 17:09:32 +02:00
Yeshvanth M
118f37b574 samples: Bluetooth: Added Broadcaster sample
This sample periodically sends out advertising data packets with
manufacturer data element.

The content of data sent is a single byte indicating how many
advertising packets the device has sent which rolls back to 0 after 255.
Demonstrates role of broadcaster.

Signed-off-by: Yeshvanth M <yeshvanthmuniraj@gmail.com>
2021-11-25 17:09:32 +02:00
Stephanos Ioannidis
6ee8182e0a samples: tflite-micro: hello_world: Increase main stack size
This commit increases the main stack size to 2048 since the current
stack size is insufficient for the `qemu_x86` board (the default stack
size is 1024 for that board) and results in a stack overflow in the
main thread.

Note that this is required because the newlib full variant, which is
used by this sample, included in the Zephyr SDK 0.13.2 now has an
increased stack usage requirement due to enabling the C99 format
specifier support.

For more details, refer to the issue #40469 [1].

[1] https://github.com/zephyrproject-rtos/zephyr/pull/40469#issuecomment-977854095

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-11-25 06:58:45 -05:00
Ryan McClelland
ed96eb6e63 samples: fix double promotion warnings
With -Wdouble-promotion added to the warning base, fix warnings given
by the compiler.

Signed-off-by: Ryan McClelland <ryanmcclelland@fb.com>
2021-11-24 17:14:25 -05:00
Abe Kohandel
a6f932a194 bluetooth: ots: Add Create and Delete procedures
Add the ability to perform an OTS Create or Delete Procedure.

Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
2021-11-24 21:49:11 +02:00
Flavio Ceolin
6451626ce7 pm: Use pm_device_action_run instead of state_set
Since drivers implement a callback based on action and not the state,
we should be using the API based on the action instead of the one based
on the state.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-11-24 14:21:50 -05:00
Jordan Yates
8e99db5801 Kconfig: net: deprecate NET_BUF_USER_DATA_LEN
As user data sizes are now set on a per pool basis, this Kconfig option
has no purpose.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-11-24 16:04:50 +02:00
Jordan Yates
df327eeb58 net: buf: POOL_FIXED_DEFINE explicit user data
Update the macro prototype to explicitly require the length of the
desired user data. Update all in-tree usage of this macro.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-11-24 16:04:50 +02:00
Johann Fischer
cf8d7764da usb: fix bulk endpoint configuration for high-speed capable device
In the current USB device support, the sizes of bulk endpoint
are mostly configure through Kconfig and do not care if a device
is high-speed capable. The information if a USB device controller
supports high-speed comes from devicetree. Add a Kconfig option to
map this information and configure bulk endpoint sizes
accordingly.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-11-24 12:28:02 +01:00
Johann Fischer
67a265b0df samples: cdc_acm: check return value of uart_fifo_read()
uart_fifo_read() can return negative values in case
it is not implemented or CONFIG_UART_INTERRUPT_DRIVEN
is not enabled. Both cases can not actually happen in the
case of CDC ACM UART, check it anyway in case behavior
of the UART API changes unnoticed.

Align the code in RX path code of both camples and
enable TX interrupt only if data was received successfully.

Fixes: #39835
Fixes: #39824
Fixes: #39809
Coverity-CID: 240667
Coverity-CID: 240679
Coverity-CID: 240697

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-11-24 10:50:11 +01:00
Carlo Caione
2e9c57ec28 sample: ipc_service: Add ipc_rpmsg_static_vrings sample
Add a new sample to show and test the usage of the newly introduced
backend.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-11-22 23:03:23 -05:00
Øyvind Rønningstad
449cb60815 samples: Add TF-M sample for custom secure partitions
The sample implements a dummy ARoT (Application Root of Trust) partition
in TF-M and calls it from the app.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-11-22 22:19:41 -05:00
Daniel Leung
bb595a85f1 kernel: mem_domain: add/remove partition funcs to return errors
This changes both k_mem_domain_add_partition() and
k_mem_domain_remove_partition() to return errors instead of
asserting when errors are encountered. This gives the application
chance to recover.

The arch_mem_domain_parition_add()/_remove() will be modified
later together with all the other arch_mem_domain_*() changes
since the architecture code for partition addition and removal
functions usually cannot be separately changed.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-11-22 12:45:22 -05:00
Daniel Leung
fb91ce2e21 kernel: mem_domain: init function to return error values
This changes k_mem_domain_init() to return error values
instead of asserting when errors are encountered.
This gives applications a chance to recover if needed.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-11-22 12:45:22 -05:00
Glauber Maroto Ferreira
66130da4c9 board: esp32: update SPI RAM sample code documentation
to mention sample code support added for ESP32-S2.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-11-20 11:57:38 -05:00
Glauber Maroto Ferreira
c5857dc0cd soc: esp32s2: SPIRAM: remove unused configs
and updates hal_espressif's revision.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-11-20 11:57:38 -05:00
Tomasz Bursztyka
f6be2835bd drivers: Apply SPI API change to relevant places
Mostly drivers, but also one sample and one test.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-11-19 11:50:38 +01:00
Gerard Marull-Paretas
16d1e80cbe samples: pm: use new PM macros
Use recently introduced PM macros to define device PM resources.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-19 10:11:32 +01:00
Gerard Marull-Paretas
f4417dab46 device: remove PM capability from SYS_DEVICE_DEFINE
The macro already mentions in the docstrings that PM is not supported:

"Invokes DEVICE_DEFINE() with no power management support".

This patch removed the PM entry from the macro and ajusts its uses.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-19 10:11:32 +01:00