Commit Graph

952 Commits

Author SHA1 Message Date
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
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
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
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
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
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 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 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
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
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 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
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
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 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 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
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
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
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
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
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 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
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
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
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
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
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 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
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
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 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
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
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
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
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
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 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
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 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 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
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 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 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
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 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
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
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
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
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
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
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
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
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 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
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
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 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
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 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
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 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
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
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
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
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
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
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 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
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
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
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
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
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
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
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
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
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
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 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Johann Fischer 5315c285cc sampes: shell: remove usage of CONFIG_USB_UART_CONSOLE
Remove option CONFIG_USB_UART_CONSOLE where it has no influence
or enable CONFIG_SHELL_BACKEND_SERIAL_CHECK_DTR without taking
a detour through CONFIG_USB_UART_CONSOLE.

Check the compatibility of chosen property instead
of usage of CONFIG_USB_UART_CONSOLE option.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-11-18 14:29:18 +01:00
Flavio Ceolin 4998c52ba8 pm: Make pm_power_state_force multicore aware
Change pm_power_state_force to receive which cpu the state should be
forced. Also, it changed the API behavior to force the given state only
when the idle thread for that core is executed.

In a multicore environment force arbitrarily a core to suspend is not
safe because the kernel cannot infer what that cpu is running and how it
impacts the overall system, for example, if it is holding a lock that is
required by a thread that is running in another cpu.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-11-18 13:56:15 +01:00
Erwan Gouriou 32f61c1d71 samples: Add a stm32wb sample code for ble shutdown
Target is shutdown after 4 sec advertisement.
Wake up using reset button.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-09 05:49:23 -05:00
Henrik Brix Andersen 265cdf8dc6 cmake: use find_package() instead of literal include in tests and samples
Convert remaining tests and samples to using find_package() instead of
literally including the CMake boilerplate code.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-11-01 10:33:09 -04:00
Radoslaw Koppel d1a93c1426 drivers: sensor: Const sensor trigger data in trigger handler
This commit adds const modifier in second argument for
sensor trigger handler.
There is no reason to modify this data and this change
would allow to store trigger configuration also in FLASH.

Fixes: #38929

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2021-10-27 15:09:35 -04:00
Gerard Marull-Paretas 838380bb63 doc: fix C domain reference usage
THis patch fixes multiple issues when referencing to the C domain. In
some cases there were typos (e.g. missing :), in some others no domain
syntax was used for referencing, etc.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-26 10:57:45 +02:00
Jacob Siverskog 046f29a8cb Bluetooth: ATT: Fix typo in defines
Fix typo in ATT first/last attribute defines.

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2021-10-23 20:39:36 -04:00
Tom Burdick f523c336ef pm: Use stats subsys for tracking system states
Uses the stats subsys to provide simple but useful debugging stats for
power management state changes and timing.

Removes the no longer needed PM_DEBUG config option

Replaces the use of PM_DEBUG for a test clock output pin for mec1501 and
adds in its place an SoC Kconfig option to enable it.

Adds a STATS_SET macro for assigning a value to a stat group field

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2021-10-17 10:56:21 -04:00
Glauber Maroto Ferreira 774aef0cf8 wifi: esp32s2: add board wifi station sample
by adding esp32s2 configs and documentation.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-10-01 10:51:37 -04:00
Carlo Caione 8f53f319cd reserved-memory: Fix layering violation
Move memory.h out of the way in a more "private" space
(include/linker/devicetree_reserved.h) to prevent polluting the
devicetree space.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-09-28 14:01:36 -04:00
Torsten Rasmussen d800b4a4d7 drivers: gpio: remove unused GPIO selection
Fixes: #38403

Removing unneeded `imply GPIO` and `CONFIG_GPIO=y` occurrences where no
files are added to the gpio zephyr library.

Also removed `CONFIG_GPIO=y` occurences where this is handled by
defconfigs for the soc or board.

Selection of GPIO without selecting any drivers results in the warning:

> No SOURCES given to Zephyr library: drivers__gpio
>
> Excluding target from build.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-09-28 12:13:23 +02:00
Andrzej Głąbek 4212e95763 samples: boards: nrfx: Fix setting up of (D)PPI channel endpoints
There is a copy-paste error in this sample code that results
in a function for input events being called for an output pin.
By chance, this has no influence on the behavior of the sample,
as the function returns a register offset that for events and
tasks is the same for a given channel, but obviously the code
is confusing.
This is fixed by replacing the relevant part with more suitable
function calls, to also simplify the code a little.

On the occasion, also a remark is added about no button debouncing
used in the sample, to prevent users from being surprised by its
possible behavior.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-09-23 13:13:30 -04:00
Erwan Gouriou 34a67cf2ff samples/board/stm32: PM blinky: Enable CONFIG_DEBUG in CI
Enable CONFIG_DEBUG when test is run in CI.
This will allow DGB access in stop modes (and specially flashing)
and avoid potential issues when test in run in a test suite.

Note that on some targets (stm32wb for instance) openocd is able
to do the same operation, and which allows to reflash the target
even if switch was not enabled, but this could not be the case
on all targets.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-09-23 12:54:03 -04:00
Gerard Marull-Paretas c58243d6ba samples: boards: nrf: battery: fix board in sample commands
The board name used in the zephyr-app-commands directive was the old
name for the Thingy52 board.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-09-23 08:38:44 -04:00
Gerard Marull-Paretas 652f25e094 samples: boards: nrf: battery: fix usage without voltage divider
The nRF battery sample claims that it works without the need of a vbatt
node (voltage divider). However, this was currently not possible because
the sample code did have no means to extract the necessary ADC details
(instance and channel) from Devicetree unless vbatt was present. Similar
to other ADC samples, the zephyr,user node is used to define io-channels
property in this case. The sample README has been updated with an
example of how measurement without a voltage divider can be achieved.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-09-23 08:38:44 -04:00
Carles Cufi 6de4747979 Bluetooth: Update terms in public API to spec v5.3
The Bluetooth Core Specification, version 5.3, has introduced multiple
changes to several widely-used terms in order to make them inclusive.
Update the public API to reflect this, excluding hci.h, which will be
done in a subsequent commit.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-09-15 14:02:50 +03:00
Johann Fischer 43d214bf5b samples: sensortile_box: get chosen console device from devicetree
Add app.overlay which contains chosen node
Rework sample to get CDC ACM UART device from devicetree.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-23 18:53:47 -04:00
Torsten Rasmussen 1cccc8a8fe cmake: increase minimal required version to 3.20.0
Move to CMake 3.20.0.

At the Toolchain WG it was decided to move to CMake 3.20.0.

The main reason for increasing CMake version is better toolchain
support.

Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-20 09:47:34 +02:00
Lingao Meng 8e1682d1ea samples: conn_cb replace to const zsector
It is more efficient and saves part of RAM
by replacing it with static one dynamically.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-08-11 13:42:28 +02:00
HaiLong Yang 88172bc918 samples: boards: stm32: add stm32 hsem ipm driver sample
Add a sample for stm32 hsem ipm driver.
Blinky led triggered by mailbox new message.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2021-08-09 16:11:28 +02:00
Gerard Marull-Paretas d41dadc569 pm: rename PM_DEVICE_STATE_SUSPEND to PM_DEVICE_STATE_SUSPENDED
The verb tense for the suspended state was not consistent with other
states. The likely reason: state was being used as a command/action.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-08-04 08:23:01 -04:00
Gerard Marull-Paretas 56a35e5682 pm: converge to suspend state for low power modes
The difference between low power and suspend states is a thin blur line
that is is not clear and most drivers have used indistinctly. This patch
converges to the usage of the suspend state for low power, since
contrary to the low power state, it is used by both system and runtime
device PM. The low power state is still kept, but its future is unclear
and needs some discussion.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-08-04 08:23:01 -04:00
Johann Fischer 946964e374 samples: remove USB configuration option
Remove USB configuration option, replace it where necessary
with USB_DEVICE_STACK.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-03 19:00:12 -04:00
Andrzej Głąbek 069bac094d samples: boards: nrf: Add an nrfx peripheral resource sharing sample
Add a sample that shows how to use in Zephyr nRF peripherals that
share the same ID and base address. Such peripherals cannot be used
simultaneously, but it is possible to switch between them. However,
currently it is not possible with Zephyr APIs, only using nrfx drivers
directly. This sample shows how to realize such switching for selected
peripheral instances while using standard Zephyr drivers for others.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-07-30 20:03:49 -04:00
Gerard Marull-Paretas 70322853a8 pm: device: move device busy APIs to pm subsystem
The following device busy APIs:

- device_busy_set()
- device_busy_clear()
- device_busy_check()
- device_any_busy_check()

were used for device PM, so they have been moved to the pm subsystem.
This means they are now prefixed with `pm_` and are defined in
`pm/device.h`.

If device PM is not enabled dummy functions are now provided that do
nothing or return `-ENOSYS`, meaning that the functionality is not
available.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-30 09:28:42 -04:00
Carlo Caione a168454814 samples: reserved_memory: Introduce sample application
Introduce sample application to test reserved-memory helpers.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-07-15 18:12:51 -05:00
Michał Narajowski 29ae06dfac samples: Update Mesh opcode handlers
Add return values to opcode handlers and update message length
definitions.

Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
2021-07-15 11:34:52 +02:00
Ingar Kulbrandstad 3ec6411c7f Bluetooth: Mesh: Align capitalization for BT mesh
Align the capitalization of the term "Bluetooth Mesh" to Bluetooth mesh"
in the documentation. This is done to to match the new updated naming
convention done in Bluetooth SIG. In the upcoming spec versions, it its
used "Bluetooth mesh" with the lower case convention.

Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
2021-07-13 11:23:54 -04:00
Gerard Marull-Paretas 26ad8376bd pm: remove callback from control function
The callback is not used anymore, so just delete it from the pm_control
callback signature.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-13 09:36:45 -04:00
Gerard Marull-Paretas 9dfbdf1997 doc: use kconfig role and directive
Stop using :option: for Kconfig options.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-06-29 10:26:28 -04:00
Rafał Kuźnia be95692744 samples: boards: nrf: ieee802154: set RTC user channels
The CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT must be set for 802154_rpmsg
sample to properly allocate timers for nRF-802154 driver.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2021-06-15 09:45:58 +02:00
Joakim Andersson 139035e0a2 Bluetooth: host: Use UUID encode macro for 128-bit UUIDs
Use UUID encode macro fro 128-bit UUIDs for readability. This makes
it easier to see which service you are working with as the
bt_uuid_to_str prints the 128-bit UUIDs in this format.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-06-11 16:13:35 +02:00
Erwan Gouriou 366a64cb1e samples/boards/stm32: PM Blinky: Rework README
Rework README to provide a correct and understandable status.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-06-02 16:50:02 -05:00
Anas Nashif ec5e3017ac boards: up_squared: remove 32bit variant
This board was created for the transition to all 64bit, it is not needed
anymore.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-01 14:06:56 -05:00
Erwan Gouriou 836dc911e0 samples/boards: stm32 pm blinky: Run with twister device testing
Add minimum harness and to get the sample passed when run using
twister.
Adding console validates uart init with DEVICE_RUTIME=y.

Additionally, clarify comment about DEBUG activation.

Fixes #35033

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-18 11:18:40 -05:00
Flavio Ceolin 0c607adb63 pm: device: Align state names with system states
Change device pm states to the same pattern used by system power
management.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-07 18:35:12 -04:00
Flavio Ceolin 565014a1ec samples: stm32: Set device busy in the blinky sample
This sample turn on/off the LED every two seconds and then sleeps. When
the LED is on we don't want the system putting it down when goes to
sleep. So, just setting this device as busy.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-07 18:35:12 -04:00
Erwan Gouriou da6727572d samples/boards/stm32: blinky: Limit execution on stm32 lptim enabled
Restrict sample execution in CI to boards that have
"st,stm32-lptim" enabled so we're sure it is a STM32 target.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-07 10:40:18 -05:00
Erwan Gouriou c730603332 samples/boards: stm32: Add low power blinky sample
This sample demonstrates a low power blinky application.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-06 14:31:13 -04:00
Trond Einar Snekvik 27a4c91ac5 samples: bbc_microbit: pong: Convert to new k_work API
Converts the bbc_microbit pong sample to new k_work API.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2021-05-06 10:12:59 -05:00
Joakim Andersson 6483e12a8a Bluetooth: Refactor bluetooth buffer configuration for simplification
Refactor and simplify the bluetooth buffer configurations to improve the
easy of configurations and eliminate invalid ones.
By moving configurations out of host and controller specific
configurations and into a common one it becomes easier to configure
the host and controller separately as the same configurations can be
used as would be for a combined build.

All HCI configurations are now given exluding the matching HCI header,
which eases the configuration as the application don't have to know the
different header sizes.
The BT_RX_BUF_LEN is split into ACL and Event, as well as the suprising
use of Command size.
BT_L2CAP_RX_MTU is removed as the stack does not support reassembling of
HCI ACL data to larger L2CAP PDUs. The application will have to set
ACL RX size and account for the L2CAP PDU header itself.
BT_EATT_RX_MTU was removed as it is only used for setting a different
default value for another option which leads to the stuck kconfig symbol
problem.

The configurations can be updated according to the table below:

** New configuration         | ** Old configuration
All configurations
BT_BUF_ACL_RX_SIZE           | BT_L2CAP_RX_MTU + 4
BT_BUF_ACL_RX_SIZE           | BT_RX_BUF_LEN - 4
BT_BUF_EVT_RX_SIZE           | BT_RX_BUF_LEN - 2
BT_BUF_CMD_TX_SIZE           | BT_RX_BUF_LEN - 3
BT_BUF_CMD_TX_COUNT          | BT_HCI_CMD_COUNT
BT_BUF_EVT_RX_COUNT          | BT_RX_BUF_COUNT
BT_BUF_ACL_RX_COUNT          | BT_RX_BUF_COUNT
BT_BUF_ACL_RX_COUNT          | BT_ACL_RX_COUNT
BT_BUF_EVT_DISCARDABLE_SIZE  | BT_DISCARDABLE_BUF_SIZE - 2
BT_BUF_EVT_DISCARDABLE_COUNT | BT_DISCARDABLE_BUF_COUNT
Controller-build
BT_BUF_ACL_TX_SIZE           | BT_CTLR_TX_BUFFERS_SIZE
BT_BUF_ACL_TX_COUNT          | BT_CTLR_TX_BUFFER
HCI-bridge
BT_BUF_ACL_TX_SIZE           | BT_HCI_ACL_DATA_SIZE
BT_BUF_ACL_TX_COUNT          | 6

Fixed invalid configurations setting either BT_L2CAP_RX_MTU or
BT_CTLR_DATA_LENGTH_MAX larger than BT_RX_BUF_LEN could lead to buffer
overruns.

Fix advertising report max data length calculation.
This always used the BT_DISCARDABLE_BUF_SIZE macro but this feature
can be turned off and advertising reports will be allocated from the RX
buffer in that case. Also controller-build does not have this buffer
(in hci_raw.c). Also the wrong HCI header was used in the calculation,
HCI event header should have been used instead of HCI ACL header.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-05-06 14:56:18 +02:00
Gerard Marull-Paretas 7988ab4a26 pm: rename device_set/get_power_state to pm_device_set/get
Make name consistent with other device PM APIs.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 2c7b763e47 pm: replace DEVICE_PM_* states with PM_DEVICE_*
Prefix device PM states with PM.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas b287725d41 samples: replace power/power.h with pm/pm.h
Replace old header with the new one.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Magdalena Kasenberg d0e0af74da Bluetooth: Add option to log btsnoops over RTT
There is a choice to log btmon logs over UART or RTT.
You can choose number of RTT buffer, set its name and size.

Replaced CONFIG_BT_DEBUG_MONITOR with CONFIG_BT_DEBUG_MONITOR_UART
for UART usage and CONFIG_BT_DEBUG_MONITOR_RTT for RTT.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2021-05-05 16:03:38 +02:00
Shubham Kulkarni 0719973436 esp32: Add SPIRAM test application
Adds application to test SPIRAM

Signed-off-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>
2021-05-05 08:46:35 -04:00
Flavio Ceolin e2d25bf031 samples: nrf: system_off: Remove unnecessary sleep
pm_power_state_force no longer requires the idle thread to run.
Just removing the following k_sleep for two reasons, first it is
not necessary, second it tests that pm_power_state_force works
as it should.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-26 08:21:30 -04:00
Flavio Ceolin 51c2013520 samples: ti: system_off: Remove unnecessary sleep
pm_power_state_force no longer requires the idle thread to run.  Just
removing the following k_sleep for two reasons, first it is not
necessary, second it tests that pm_power_state_force works as it
should.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-26 08:21:30 -04:00
Peter Bigot 20f502288a samples: mesh_badge: conversion of k_work API
Replace all existing deprecated API with the recommended alternative.

Be aware that this does not address architectural errors in the use
of the work API.

Fixes #34097

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-04-20 15:13:19 +02:00
Johann Fischer 2075cf1cf0 samples: intel_s1000_crb: remove unused and wrong implemented callbacks
This sample has implemented USB HID class callbacks that
actually have no function and should not return 0.
Remove unused and wrong implemented callbacks.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-04-20 15:06:35 +02:00
Peter Bigot 50cf28adb4 samples: boards: nrf: clock_skew: update k_work API
Trivial transformation for a periodic task.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-04-19 08:16:13 -05:00
Johann Fischer 5540fa0028 samples: mesh_badge: increase mesh loopback buf count
Similar to commit 24f34b1913
("Bluetooth: Mesh: Demo: Increase loopback buf count")'

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-04-15 17:18:27 +02:00
Peter Bigot 55c4db9c4c samples: boards: nrf: clock_skew: calculate corrected reference
The sample showed the error between the two clocks, but did not show
how to use the skew to reconstruct one clock from the other and the
resulting error.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-04-15 13:05:16 +02:00
Emil Gydesen 42da370df5 Bluetooth: Use ATT FIRST/LAST attribute handle defines where applicable
Change to use the BT_ATT_FIRST_ATTTRIBUTE_HANDLE and
BT_ATT_LAST_ATTTRIBUTE_HANDLE instead of the literal values where
applicable.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-04-08 16:35:57 +02:00
Armando Visconti 36eceba7e4 drivers/sensor: lsm6dso: move int-pin in DTS binding
Take the int-pin information (i.e. what pin between INT1
and INT2 the drdy is attached to) directly from DT.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-04-06 15:34:01 +02:00
Flavio Ceolin 9fd4ea91b7 coccinelle: Remove extra semicolon
coccicheck --mode=patch --cocci=semicolon.cocci

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-03-25 11:35:30 -05:00
Eugeniy Paltsev 8311d27afc ARC: Kconfig: cleanup CPU_ARCEM / CPU_ARCHS options usage
Don't allow user to choose CPU_ARCEM / CPU_ARCHS options
but select them when exact CPU type (i.e. EM4 / EM6 / HS3X/ etc)
is chosen.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2021-03-25 07:23:02 -04:00
Peter Bigot d7049b57d5 samples: microbit: pong: update work API usage
Use the reschedule solution as there may be cases where a newer
deadline should supersede an older one.

The implementation has no locking and so has data races between the
handler and external events.  Emit a console diagnostic in one case
where the race can be detected.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-03-16 19:58:12 -04:00
Kumar Gala d521129c4f dma: Kconfig remove unused kconfig symbols
All dma drivers are devicetree based now so we can remove the last
bits of Kconfig associated with the old driver style.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-02 20:28:35 -06:00
Kumar Gala 774ea5ad5b samples: board: nrf: battery: Convert to use DEVICE_DT_GET
Replace device_get_binding with DEVICE_DT_GET for getting access
to the io-channels/adc controller device.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-02 11:28:30 -06:00
Johann Fischer 9f3b60ab60 samples: intel_s1000_crb: replace deprecated HID macros
Replace deprecated HID macros.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-02-28 16:50:24 -05:00
Sylvio Alves 7fe8b710a8 wifi: esp32: add board wifi station sample
add esp32 wifi station  board example

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-02-25 17:00:20 -05:00
Piotr Szkotak feccb8f59f samples: boards: nrf: ieee802154: Optimize power on nRF53
Add an overlay disabling UART in the prj.conf.

Signed-off-by: Piotr Szkotak <piotr.szkotak@nordicsemi.no>
2021-02-18 15:24:30 +03:00
Peter Bigot bdba2e63f6 samples: nrf: system_off: add RAM retention example for nRF52
Add an object to retain data across both reboots and entry to
SYSTEM_OFF.  This only works on nRF52, since nRF51 and nRF53 require
different low-level operations to configure RAM retention.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-17 14:34:31 +01:00
Jose Alberto Meza 93a8f5f10e samples: boards: mec15xxevb: pm: Enable PECI and KSCAN drivers
Enable PECI and KSCAN drivers to evaluate any side-effect
in LPM entry/exit and power consumption.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2021-02-16 15:45:56 +03:00
Jedrzej Ciupis 2d4c13459e samples: boards: Add tests section to 802154_rpsmg sample
This commit adds tests section to sample.yaml file of the
ieee802154/802154_rpmsg sample.

Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2021-02-15 08:10:19 -05:00
Czeslaw Makarski 560c78c388 samples: 802154_rpmsg: Add SL fault handler
This commit adds the nRF IEEE 802.15.4 Service Layer Fault Handler
to the 802154_rpmsg sample.

Signed-off-by: Czeslaw Makarski <Czeslaw.Makarski@nordicsemi.no>
2021-02-15 08:10:19 -05:00
Czeslaw Makarski 12bc964c9b samples: 802154_rpmsg: Remove redundant kconfig
This commit removes the obsolete hardcoded kconfig in the
802154_rpmsg sample.

Signed-off-by: Czeslaw Makarski <Czeslaw.Makarski@nordicsemi.no>
2021-02-15 08:10:19 -05:00
Flavio Ceolin 86a624e2a2 power: Remove PM_STATE_LOCK option
Simplify pm subsystem removing PM_STATE_LOCK option. Constraints API is
small and is a key component of power subsystem.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-02-15 08:08:36 -05:00
Flavio Ceolin 3f87c5a0f4 power: Rename constraint API
Replace pm_ctrl_* with pm_constraint.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-02-15 08:08:36 -05:00
Gerard Marull-Paretas 68344cd87c samples: boards: stm32: add backup SRAM sample
The sample illustrates how to define and use a variable in the backup
SRAM.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-02-15 08:04:24 -05:00