This commit ensures the CI will run test build for the STM32
that supports the IWDG early wake-up.
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
Add the support of the IWDG early wakeup.
Gives the possibility for the user to set a
callback that will be called before an IWDG reset.
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
A race condition was observed with concurrent net_context_get()
and net_context_unref() calls: If net_context_unref() is interrupted
just after clearing the NET_CONTEXT_IN_USE flag, net_context_get() may
try to reuse the context and reinitialize its mutex through
k_mutex_init(). Once net_context_unref() resumes, it calls
k_mutex_unlock() on the newly initialized mutex, which may lead to the
following assertion:
ASSERTION FAIL [mutex->lock_count > 0U] @ zephyr/kernel/mutex.c
Fix this by unlocking the context mutex before clearing the
NET_CONTEXT_IN_USE flag.
Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
The variable 'unspec_addr' in net_dhcpv6_init() is implicitly
initialized on some platforms and optimization levels, but not
guaranteed to be initialized on all code paths when built with
compiler instrumentation.
This leads to a build failure with the strict
'-Werror=maybe-uninitialized' warning when code coverage flags are
enabled (e.g., via twister --coverage).
```
zephyr/subsys/net/lib/dhcpv6/dhcpv6.c:2325:26: error: ‘unspec_addr’
may be used uninitialized [-Werror=maybe-uninitialized]
net_ipaddr_copy(&net_sin6(&unspec_addr)->sin6_addr,
```
Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
Added a MAC-layer filter to discard frames whose source MAC address
matches the devices own MAC address. These packets are looped-back
frames that do not need to be processed again by the network stack.
Dropping such frames early improves correctness, avoids redundant RX
processing, and reduces load on the IPv4/IPv6 protocol handlers.
This patch is a workaround for a bug in the NWP
Signed-off-by: Swamidas Nampalli <Swami.Das@silabs.com>
The content is almost identical to that of the legacy stack because we
either ported or rewrote all the samples.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add a simple sample demonstrating how the PWM event API can be
used to precisely time 5 periods of a PWM signal.
Signed-off-by: Jaro Van Landschoot <jaro.vanlandschoot@basalte.be>
The SAM4S pwm supports several events. This commit
implements the events when a channel period has ended
or a fault event has occured.
Signed-off-by: Jaro Van Landschoot <jaro.vanlandschoot@basalte.be>
Extend the PWM API to support events, as some
controllers allow interrupts if e.g., a pwm period
has ended or a fault occured.
Signed-off-by: Jaro Van Landschoot <jaro.vanlandschoot@basalte.be>
The broadcast_state variable was not used in
bt_bap_broadcast_source_update_metadata to verify the
state, but broadcast_source_get_state was instead called
twice.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Refactor the bt_bap_broadcast_source_reconfig function to be less
complex by splitting the verification into multiple functions.
Additionally, it also fixes a rare, but potential, issue where
some subgroups were updated before a later subgroup would fail
to be updated. Added can_merge_codec_cfg_data to verify correctness
before we attempt to update any subgroups. This new check is also
applied to bt_bap_broadcast_source_create.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Move the subgroup parameter validation to its own function to
reduce the size and complexity of valid_broadcast_source_param
to make Sonarcube happy.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Macro added to compare the devicetree bindings against
values in the MDK to clean up code and check out-div
bindings.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
It was previously possible to set output division setting
to an invalid number. These bindings ensure a valid number
is set of 0-8.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
Fix checkpatch not warning when blank line after declaration
is removed. Updated regexes to also handle context lines,
ensuring consistent detection.
Fixes: #98976
Signed-off-by: Vignesh Pandian <vignesh@aerlync.com>
Certain series (e.g., STM32WBA) require pins to be configured as input
to behave properly as wake-up pins.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Sometimes, the command `rfcomm_s send 9 1` will fail to execute due
to the DLC has not been established.
Check the DLC connected event before sending shell command
`rfcomm_s send 9 1`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add device tree support for enabling the second low pass filter
(LPF2) for the accelerometer output.
This adds additional low pass on top of the default ODR/2 from
the LPF1 output.
Signed-off-by: Emil Hammarström <emil.a.hammarstrom@gmail.com>
Log level in failures were changed from DBG to ERR so that the reason of
initialization failure may be known.
Signed-off-by: Emil Hammarström <emil.a.hammarstrom@gmail.com>
The "Documentation Generation" page listed a severely outdated "known-good"
version for Doxygen (1.8.13) which is no longer correct: recent attempts to
build the documentation using 1.9.1 failed miserably.
Update the minimum version to 1.15.0 which matches the version used by the
Zephyr-build Docker image, also used as part of CI, to ensure that what we
document as "known-good" is indeed a configuration known to work.
Following the same logic, bump up the known-good version of Latexmk to 4.83
which matches the version found in the Docker image. Even though some older
versions (such as 4.76) are also working, this documentation page is
informative rather than authoritative, so it's fine to merely document one
version known to work rather than the exact minimum version required.
The Graphviz version is untouched as it seems to match the Docker image.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Even though the USB driver does not support multi-instance yet, out-of-tree
or custom boards may want to use the USB2 instance instead of USB1, which
is not currently possible because its node is not declared.
Add missing USBOTGHS2 and corresponding USBPHYC2 nodes to STM32N6 series
root DTSI file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Updates documentation for clarifying that for secure provisioning
with the BTM_ECDH_P256_HMAC_SHA256_AES_CCM algorithm,
the Static OOB value should contain more than 128 bits of
entropy to provide adequate security against attacks.
Signed-off-by: Stine Åkredalen <stine.akredalen@nordicsemi.no>
Retrieve the desired tag length from the "struct cipher_ctx" being passed
to "cipher_begin_session()" when using CCM.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The `ll` part of driver's file name indicates that the implementation uses
the STM32Cube Low Level ("LL") library, which is not interesting because
there is only *one* STM32 driver implementation anyways. Addtionnally, the
presence of `ll` among STM32 drivers is not consistent.
Get rid of it for this class's driver to match most other STM32 drivers.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The `ll` part of driver's file name indicates that the implementation uses
the STM32Cube Low Level ("LL") library, which is not interesting because
there is only *one* STM32 driver implementation anyways. Addtionnally, the
presence of `ll` among STM32 drivers is not consistent.
Get rid of it for this class's driver to match most other STM32 drivers.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The `ll` part of drivers' file name indicates that the implementation uses
the STM32Cube Low Level ("LL") library, which is not interesting because
there is only *one* STM32 driver implementation anyways (per IP variant).
Addtionnally, the presence of `ll` among STM32 drivers is not consistent.
Get rid of it for drivers of this class to match most other STM32 drivers.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The `ll` part of drivers' file name indicates that the implementation uses
the STM32Cube Low Level ("LL") library, which is not interesting because
there is only *one* STM32 driver implementation anyways (per IP variant).
Addtionnally, the presence of `ll` among STM32 drivers is not consistent.
Get rid of it for drivers of this class to match most other STM32 drivers.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The `ll` part of driver's file name indicates that the implementation uses
the STM32Cube Low Level ("LL") library, which is not interesting because
there is only *one* STM32 driver implementation anyways. Addtionnally, the
presence of `ll` among STM32 drivers is not consistent.
Get rid of it for this class's driver to match most other STM32 drivers.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Document that libsbc (sbc.c and sbc.h) has been moved under the Bluetooth
subsystem, with sbc.h now located in include/zephyr/bluetooth.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
They are used in the sbc of bluedroid not in the sbc of Android bluetooth,
and Zephyr is using the sbc of Android bluetooth, so remove them.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>