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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Remove inclusion of moved and non needed header.
Other unneeded headers have been also removed.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
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>
Change automated searching for files using "IRQ_CONNECT()" API not
including <zephyr/irq.h>.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
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>
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>
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>
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>
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>
`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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Names of some testcases are duplicated in another files.
This change rename duplicated testcases.
Signed-off-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Add sample which demonstrates how RTC clocks are synchronized
between application and network core.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>