Port the nordicsemi_nrf53_init to use soc_early_init_hook instead of
SYS_INIT as SYS_INIT is legacy.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Expand the CAP broadcast reception test to also run with
multiple acceptors to better verify correctness in the
procedures.
For this to run more stable, the maximum number of streams
has been reduce to 2, rather than
CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
In uuid.h the function uuid_generate_v5 had a 'namespace'
parameter which is a reserved C++ keywork.
Renamed to 'ns'.
Signed-off-by: Daniel Nicoletti <dantti12@gmail.com>
Change PWM to use buffers registers instead of writing period
and compare directly. This addressses an issue when updating
period to a value less than current counter, as demonstrated
in the blinky_pwm sample running on the CYW920829M2EVK_02
board.
Signed-off-by: John Batch <john.batch@infineon.com>
This commit fixes a type in kernel/driver/index.rst,
present in the "Drivers that do not use Zephyr Device
Model" subsection
Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
As the code noted, the RGMII RX and TX clock delay values may need to
change depending on the MAC configuration or the PCB layout. Add
properties to allow configuring these in the device tree, defaulting to
the previous hard-coded values if not present.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
pm_state_get() is used to get a PM state that can be forced.
Disabled states (not included in automatic state selection) can
also be forced thus they should be included in search inside
pm_state_get().
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The GPTM is a general purpose module with a 16 bit prescaler, 16 bit
counter, and 4 compare units that can be used for PWM generation.
Use the same style as gd32 where the timer is a counter and the PWM
mode is a child node.
Signed-off-by: Michael Hope <michaelh@juju.nz>
when following the example it was not clear that BUILD_DIR needs to point
to application for sysbuild builds
Signed-off-by: Tobias Meyer <tobiuhg@gmail.com>
`pyocd` fails the second time the MCU is flashed.
Add `pyocd` flags identical to other nucleo boards to fix the issue.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Currently the driver code does not actually request the flow control
state, it only checks if the state exists. To fix this we should
simply call pinctrl_apply_state() and if that fails, meaning no
flow control state exists, fall back to default pin mux settings.
Another case that needed fixing is run time flow control enabling
ie in the case where we have a WIFI/bluetooth module connected
and we initially operate without flow control but later enable
it after firmware download.
This patch addresses this as well by making a generic function
to achieve this.
Signed-off-by: Bas van Loon <bas@arch-embedded.com>
deleting two test-cases from drv8424 test-suite since these test-cases
are now present in stepper-api since #88835
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
The abs() function only takes an int as input - use llabs() instead
Fixes EBQ failure in LL/CON/PER/BV-105-C
Signed-off-by: Troels Nilsson <trnn@demant.com>
Some OpenThread logs were moved from L2 to the OpenThread module,
so enable logging from there to keep previous logging visibility.
Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
An implementation should use a dedicated function to get
openthread instance instead of using the private L2 data.
Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
Add an entry to the release note and migration guide regarding
moving the OpenThread implementation from the L2 networking layer
to the OpenThread module.
The migration guide note contains information about deprecated
functions, explains what functions should be used instead and
provides a guide for required updates in users' applications.
Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
Move OpenThread-related code from
zephyr/subsys/net/l2/openthread/openthread.c to
zephyr/modules/openthread/platform/openthread.c.
The primary goal of this refactor is to enable the use
of OpenThread as an independent module, without the necessity
of Zephyr's networking layer.
This change is particularly beneficial for simple applications
that have their own implementation of the IEEE802.15.4 driver
and do not require a networking layer. These applications can
now disable Zephyr's L2 and IEEE802.15.4 shim layers and
directly use the OpenThread module, saving valuable kilobytes
of memory.
In this approach if the CONFIG_NET_L2_OPENTHREAD
Kconfig option is set, Zephyr's L2 and IEEE802.15.4 layers
will be used, and everything will function as before.
The main difference is the Zephyr's L2 layer now uses
the OpenThread module, no longer implementing it.
While most of the functions in include/net/openthread.h
have been deprecated, they are still available for use to
maintain backwards compatibility.
Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
Add Asynchronous UART implementation, which does not drop data
when automatic hardware-flow-control is set in the device tree.
With automatic hardware flow control, the CTS pin will be
automatically deactivated when there are no more asynchronous
UART RX buffers available. After buffer space becomes available,
and UART RX is restarted, the CTS pin will be activated.
Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
Extend test modem uart backend test suite to support testing hw
flow control, which is performed by using a small receive
buffer for the modem uart backend, and slowing down the read
of received data, ensuring the buffer will be overrun if hw flow
control is not working.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Don't enable RTT by default on these development kits. They all have
a dedicated physical serial port that is intended to be the primary
serial comms channel.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Doing another init of the log_backend_net in
the net config init could lead to the
server, set during runtime, being overwritten
by the Kconfig default.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Mention the NEORV32 General Purpose Timer (GPTMR) as supported and add
instruction on how to enable it in the devicetree.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
When async UART is used & DCache is enabled, some SoCs, like STM32H7,
require UART buffers to be placed in nocache memory to avoid cache
coherence issues.
Fixes issue 87795
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
The commit '3b29b9fa3b (tests: logging: restore userspace testing,
2025-04-18)' set CONFIG_LOG_PRINTK=n which brakes the build on the
platform 'ip_k66f'.
Without CONFIG_LOG_PRINTK=n (dependency from CONFIG_USERSPACE=y) some
tests in 'tests/subsys/logging/log_core_additional/logging.log_user'
would not build.
Remove this dependency so that LOG_PRINTK can also be used from user
space, which is possible since '77925656ab (logging: Fix runtime
message creation in user-mode thread, 2025-04-18)' and reset
CONFIG_LOG_PRINTK=y.
Fixes: #89067
Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
Test integer overflow on Flash Area operation parameters.
All functions call the same is_in_flash_area_bounds
function for parameter verification, so it was enough
to test parameter checks of flash_read.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Prevent possible overflow in is_in_flash_area_bounds while
validating offset and length of an operation.
Fixes#89349
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
In case HTTP client read out more data from a socket that it processed
it will indicate there is leftover data in the receive buffer available.
Make use of it at the websocket level, so that no data is lost. As we
reuse the same receive buffer in this case, it's only needed to update
the count variable to indicate how many bytes are available.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The HTTP client would read data from a socket up to the size of the
receiving buffer, however it may not process them all. This is usually
only the case if protocol switching takes place, where the data read may
belong to another protocol. Therefore we need a way to notify the caller
about any potential data that is already present in the buffer and needs
to be processed.
Introduce an new data_len member in struct http_request to provide the
information about the data already available in the receive buffer. If,
after HTTP response processing, the value is non-zero, the data will be
available in the beginning of the user provided receive buffer.
To make this possible however, we need to track how many bytes were
actually processed by the http_parser, therefore the code will no longer
ignore the http_parser_execute() return value. To simplify processing,
it's also been changed how the receive buffer is used. Instead of using
it in a ring-buffer-like way, the offset variable will track how many
bytes are available in the buffer, and in the rare occasions when not
all data from the buffer was processed by the HTTP parser, we'll
memmomve the remaining data to the beginning of the buffer.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The central_multilink sample issues various API calls
(in particular because it does some from the bt_workq("BT RX WQ"))
this results in a deadlock since there are not enough
HCI command buffers available, this is causing deadlocks on hardware
that do not support BT_HCI_ACL_FLOW_CONTROL.
Below is the flow where assert is observed:
bt_hci_le_enh_conn_complete() -> bt_conn_connected()
-> connected() callback -> start_scan() -> bt_le_scan_start()
-> set_random_address() -> bt_hci_cmd_send_sync: opcode 0x2005
-> Controller unresponsive, command opcode 0x2005 timeout with err -11
Since the start_scan is called from the callback and BT RX WQ thread,
the command buffers are still not available for the system work queue
to process the hci commands it has to send out for starting the scan.
By adding additional buffers this deadlock can be avoided.
Signed-off-by: Gudipudi Ramana Kumar <ragudipu@silabs.com>
This PR adds a new devicetree property
that allows enabling external battery
backup functionality.
Signed-off-by: Marcin Lyda <elektromarcin@gmail.com>