Until https://github.com/zephyrproject-rtos/sdk-ng/pull/936 is merged,
SDK 0.18 is incompatible with previous versions as the paths to
find the cmake bits is different.
Deal with that by checking for files in the wrong place as well as the
right one.
Signed-off-by: Keith Packard <keithp@keithp.com>
The SDK has gratuitously moved all gcc toolchains to a subdirectory; adapt
to that by adding 'gnu/' when necessary
Signed-off-by: Keith Packard <keithp@keithp.com>
Combine toolchains provided by the host into one variant. This includes
both gcc and llvm installationt typically coming from the distribution
(on Linux).
Both gcc and llvm are now part of the 'host' variant, the default is the
gnu compiler, so setting
ZEPHYR_TOOLCHAIN_VARIANT=host
Will select the gnu compiler. To select llvm or any other compuler
provided in this variant, use the follwoing format:
ZEPHYR_TOOLCHAIN_VARIANT=<variant>/<compiler>
The following will select llvm:
ZEPHYR_TOOLCHAIN_VARIANT=host/llvm
Although gnu is the default, it can also be selected using the above
syntax:
ZEPHYR_TOOLCHAIN_VARIANT=host/gcc
This commit removes the llvm variant for now, it should be deperecated
in another commit to follow.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Override the GCC-specific `-Wno-volatile` flag specified by GCC
`compiler_flags.cmake` with the Clang-equivalent
`-Wno-deprecated-volatile`.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
When LLVM linker is used, the toolchain-provided C standard library is
always linked, even when the Zephyr minimal libc is selected, because `c`
is unconditionally specified in `link_order_library`, which causes `-lc` to
be specified in the linker flags.
This commit adds a check to ensure that `-lc` is not specified when the
Zephyr minimal libc is selected because it is a standalone C standard
library and it does not make sense to link two C standard libraries at
once.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
LLVM C++ Standard Library aka. libc++ makes use of POSIX and GNU C
extensions in its headers.
While far from ideal, there is no other option but to globally enable these
extensions for C++ source files in order to ensure that libc++ headers can
be used.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit adds a new C++ standard library test variant that builds with
Picolibc and LLVM C++ Standard Library aka. libc++ on the supported
toolchains (e.g. LLVM Embedded Toolchain for Arm and Zephyr SDK LLVM).
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
LLVM C++ Standard Library aka. libc++ may be used with Picolibc -- for
example, LLVM Embedded Toolchain for Arm ships with Picolibc and libc++
compiled for Picolibc, and so does Zephyr SDK LLVM toolchain.
Ideally, we would a flag like `TOOLCHAIN_HAS_LIBCXX_PICOLIBC` indicating
that toolchain has libc++ compiled specifically for Picolibc; but, we do
not want to overcomplicate the toolchain feature flags at this time without
proper underlying infrastructure to handle it.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit introduces `TOOLCHAIN_HAS_LIBCXX` CMake variable, which is set
to `y` when LLVM C++ Standard Library aka. libc++ is available.
This helps filter libc++-specific Kconfig and tests in a more refined
manner.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit introduces `TOOLCHAIN_HAS_GLIBCXX` CMake variable, which is
set to `y` when GNU C++ Standard Library aka. libstdc++ is available.
This helps filter libstdc++-specific Kconfig and tests in a more refined
manner.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The CONFIG_DNS_RESOLVER_MAX_NAME_LEN should be large enough so that
IPv6 address can be stored into it. So increase the max name length
to 46 if IPv6 is enabled.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Test expected path "zephyr/boards/Kconfig" but failed when the
repository had a different name.
Changed to "boards/Kconfig" to work with any repository name,
as code below.
Signed-off-by: Mateusz Junkier <mateusz.junkier@intel.com>
`choice STM32_LTDC_PIXEL_FORMAT` is already enclosed in an `if STM32_LTDC`
block - there is no need to add a `depends on` on this option.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The nrf54h20 cpurad has CONFIG_PM enabled by default. This causes
some of the IRQs reserved for the test to be triggered as they
are used for PM as well. Disable PM for the test to make sure
nothing triggers the IRQs outside of the test itself.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
If several ADCs are used and share a common clock property (for example
ADC1/2 prescaler value on STM32U5), none of them should be enabled when
the clock is set.
To that end, make sure to disable ADC at the end of the initialization,
it will be enabled later when necessary anyway.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Ensure that data is transmitted before logging
as it could cause lockups in some setups.
Also update i2c_stm32_v2_rtio.c to match
this behavior to always send data in order to avoid
the I2C to lockup.
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
Add support for RTC calibration API by implementing set_calibration
and get_calibration functions. RV3028 RTC supports calibration to
adjust for errors from +243.2 ppm to -244.1 ppm in steps of 0.9537 ppm.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
When calculating the PLL output rate, take into account the fractional part
of the PLL multiplier N. This ensures that the calculated output frequency
is correct.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
The bmm350_prep_reg_write_rtio_async() function was incorrectly using two
separate SQEs for register writes, creating two distinct I2C transactions:
Before: [START][ADDR+W][REG][RESTART] + [START][ADDR+W][DATA][STOP]
Change to use a single SQE for the entire write:
After: [START][ADDR+W][REG][DATA][STOP]
Signed-off-by: Trond F. Christiansen <trond.christiansen@nordicsemi.no>
The default MCXW7x platform's clock uncertainty in microseconds for
Coordinated Sampled Listening (CSL) timing synchronization in
OpenThread shall be set to 20.
Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
The lptmr clock frequency was wrong and equal to 32000.
The clock frequency is 32.768KHz (32768).
Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
Few functions have been corrected to the SSED attachment for the
MCXW72 as leader :
- mcxw_tx():
tx_frame.tx_delay corrected.
Adjusts the scheduled transmission start time to account for the SHR
duration (160us) as requested by the OpenThread radio API.
- mcxw_rx_thread():
Stores the frame counter and key ID from a
security-enabled enhanced ACK into the received packet's metadata
for cryptographic verification.
- mcxw_tx_started() added:
Notifies the registered event handler that a frame transmission has
started, passing the frame buffer as context.
- pd_mac_sap_handler(): timestamp corrected
- mcxw_configure(): IEEE802154_CONFIG_EVENT_HANDLER case updated
Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
STM32 platforms now use the default MCUboot operating mode
swap using offset instead of swap using move.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Since the addition of a new storage partition definition in
the nucleo_f746zg dts, there is no need to have this configuration
in the overlay file.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
SomeSTM32 series, like F2, F4, and F7, do not have homogeneous flash
sector sizes; they include very large sectors such as 128 KB
and even 256 KB.
The scratch partition needs to be large enough to hold the largest
sector size ( 256k for F7 and 128k for F2).
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
- Swap using offset requires that slot1 has one extra sector size
compared to slot0
- Additionally, add a storage partition with at least 3 sectors for
NVS if needed.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Update MCUboot configuration so that STM32 no longer defaults to
SWAP_USING_MOVE. Instead, SWAP_USING_OFFSET becomes the default mode
for STM32 boards.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Added overlay files for sam_e54_xpro TC nodes
Added sam_e54_xpro platform allow in testcase.yaml.
Added an extra scenario to testcase.yaml
Signed-off-by: Farsin Nasar V A <farsin.nasarva@microchip.com>
Add pwm driver using tc g1 peripheral.
Adds the support for generating pwm output.
Supports 8-bit, 16-bit and 32-bit mode of tc peripheral
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
Adds binding yaml for tc peripheral
Adds the dts nodes for tc peripheral for same5xd5x series and its
default configurations.
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
Add a simple function that exposes the airtime of a packet of a given
length.
Use the new internal implementations of the airtime function when
calculating TX durations inside the send functions to reduce code
duplication on a complex function.
Signed-off-by: Jordan Yates <jordan@embeint.com>
add initial version of devicetree for amebadplus SOC.
amebadplus devicetree file is main platform dtsi file, which should
be included from board dts (e.g rtl872xda_evb.dts)
Signed-off-by: zjian zhang <zjian_zhang@realsil.com.cn>
Added dns_query() function to perform DNS lookup before attempting
SNTP synchronization. This ensures the SNTP server hostname is
properly resolved to an IP address before making the time request.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
The current implementation has a bug in the calculation of
tile offsets, causing them to be calculated incorrectly.
This is particularly evident when there are fractional rows or columns.
Also, there was an assertion that assumed vtiled.
The logic has become too complicated,
so we'll reimplement to simplify this.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Ensure that pins configured as inputs are driven high in the port
output register, consistent with open-drain operation. This prevents
inputs from being driven low unintentionally and aligns behavior
with hardware expectations.
Signed-off-by: Josia Strack <j.strack98@gmail.com>
Move the no propagation segment configuration and prop_seg must be 0
logic from the general timing configuration to only apply within the
CAN FD specific sections.
This ensures that for classic CAN mode or platfrom without enhanced
bit timing, prop_seg is always decremented by 1.
The previous implementation incorrectly applied the enhanced bit timing
logic to classic CAN mode, which could cause timing misconfiguration
on devices with enhanced bit timing register support when operating in
classic CAN mode.
Fixes#99746
Signed-off-by: William Tang <william.tang@nxp.com>
Include the header so that resets can be added in
each driver node, for such platforms: mcxaxxx6, mcxa344.
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
- Add a self-contained alarm_capable() probe that starts the device, sets
and cancels a 1-tick alarm, and stops the counter again. This treats
-ENOTSUP as “not capable” and avoids leaving pending alarms.
- Switch single/multiple alarm capability checks to reuse alarm_capable(),
preventing unsupported drivers from running alarm cases and reducing
false failures.
- Ensure capability probing no longer leaves the driver running or with
active alarms, preventing teardown/set_top_value failures in later tests.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Using "pkt->out_len" as the output length of "psa_cipher_[en|de]crypt"
caused a crash in RISCV 64 bits platforms due to misaligned address
access.
The solution is to add a temporary value on the stack to store this lenght
and only after the [en|de]cryption copy it to "pkt->out_len".
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Update regex matching for the Mbed TLS shim driver scenario in order to
match all the supported cases and ensure that they all passed.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Increase heap memory size when Mbed TLS shim driver is used otherwise
all crypto tests will fail on some platforms.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The reset pin, like most reset pins, is active low. Fix the driver to
treat it as active low and simplify the pin control logic while at it.
Fix all current boards using the wrong pin definition and add a note for
out of tree users.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
add nucleo_g071rb overlay and conf files to configure board
to execute spi_loopback to set up the board for executing the
spi_loopback test on CI.
With this addition, we will now be able to detect SPI and RTIO
regressions on this board.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
If the comparator driver does not support BOTH edge trigger mode,
skip the test instead of failing it.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add RTC node in pic32cx_sg61_cult.dts
Update pic32cx_sg61_cult.yaml to reflect RTC G1 support on the board.
Signed-off-by: Farsin Nasar V A <farsin.nasarva@microchip.com>
Add RTC node in pic32cx_sg41_cult.dts
Update pic32cx_sg41_cult.yaml to reflect RTC G1 support on the board.
Signed-off-by: Farsin Nasar V A <farsin.nasarva@microchip.com>
Use the last configured region in the boot config for the next boot,
as opposed to a default region.
Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
The STM32U0 series MCUs don't support TF-M and therefore the
note regarding the `build/tfm` directory needs to be removed.
Signed-off-by: Martin Lampacher <martin.lampacher@gmail.com>
The MQTT-SN v1.2 [0] specification specified the GwAddr as follows:
The GwAdd field has a variable length and contains the address of a GW. Its
depends on the network over which MQTT-SN operates and is indicated in the
first octet of this field. For example, in a ZigBee network the network
address is 2-octet long.
It specifies neither the possible values for the first octet, nor the
format of the network-specific address that follows. Thus, the
specification is incomplete and this functionality unusable.
I also wasn't able to find any implementation which implements a gwinfo
message where the address length is not zero. This includes
https://github.com/eclipse-paho/paho.mqtt-sn.embedded-c .
The current implementation in Zephyr simply copies a `struct sockaddr`
into GwAddr. This is a bad idea for many reasons, the most important one
being that the format is not even specified by POSIX [1]. They only say,
which defines must exist, not what their values are. And in fact, these
even differ between Zephyr and Linux.
Thus, I think it's best to remove the implementation to prevent people from
using this, which may even lead to memory safety issues, depending on the
length of CONFIG_MQTT_SN_LIB_MAX_ADDR_SIZE. If we were to receive an
updated specification, all we'd have to do is to convert between `struct
sockaddr` and mqtt-sn addresses both ways.
[0] https://groups.oasis-open.org/higherlogic/ws/public/download/66091/MQTT-SN_spec_v1.2.pdf
[1] https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_socket.h.html
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
When the response comes from a gateway, the address length is 0. I renamed
the test which tests a gwinfo from another client to make this more clear.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Enable the CRC peripheral for MCXE24x and turn it on in the
FRDM-MCXE247 board DTS. Add a CRC sample board config to run
on FRDM-MCXE247 with default.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Support CRC16 and CRC32 variants; return -ENOTSUP for unsupported types.
Use kCrcBits16/kCrcBits32 and complementChecksum for IEEE CRC-32.
Stream data via CRC_WriteData() and fetch results via
CRC_Get16bitResult()/CRC_Get32bitResult().
Provide simple thread-safety with a semaphore.
Work around the name clash between Zephyr's typedef crc_result_t and the
MCUX enum name by temporarily redefining crc_result_t around fsl_crc.h
include in this TU.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Make CRC tests conditional based on driver capabilities to support
drivers that implement only a subset of CRC protocols.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Choose CRC protocol in the sample at build time using
CONFIG_CRC_DRIVER_HAS_* guards (CRC8, CRC16-CCITT, CRC32-IEEE, CRC32-C).
Allow optional verification via EXPECTED_* macros; otherwise log result.
Update README to describe selection and add build instructions for
frdm_mcxe247 in addition to ek_ra8m1.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Updates the `bt_le_oob_set_legacy_tk` API docs to encourage the temp key
to be generated randomly for each pairing process.
Updates the `bt_le_oob_get_local` and `bt_le_ext_adv_oob_get_local` to
encourage the user to generate new OOB information for each paring
process.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Most of Espressif drivers ISRs are already running in IRAM area, except
those in this PR. Move ISRs accordingly so we avoid any
interrupt miss when cache is disabled.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
We currently only disable "normal" IRQs with irq_lock(). This is not
sufficient if ZLIs are enabled, as even though they are supposed to
be "above" the kernel, they must not interrupt the poweroff procedure.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
We currently only disable "normal" IRQs with irq_lock(). This is not
sufficient if ZLIs are enabled, as even though they are supposed to
be "above" the kernel, they must not interrupt the reboot procedure.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Implement arch_zli_lock and arch_zli_unlock for the currently only
supported target cortex-M.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Introduce APIs for locking zero latency interrupts.
Zero latency interrupts are defined as non-maskable interrupts
"above" the kernel. They can not be locked by the kernel.
However, there are cases where we do need to mask/lock ZLIs from the
kernel, namely when accessing and changing the state of core shared
hardware like RAM and the CPU which must be done atomically.
A common case is when powering down or rebooting the SoC. We can't
allow any IRQ, ZLI or not, to interrupt these operations. In any case,
such an interrupt would be immediately followed by the CPU being off,
and whatever process running from ZLIs would be terminated anyway.
Since we have specific usecases which require these APIs, and there
are already drivers and socs which do lock ZLIs by directly calling
arch APIs to acheive this, let's officially add the APIs with
appropriate documentation detailing expected usecases and warning of
the dire consequences of misusing it, keeping it in arch/cpu.h to
limit exposure of the API (compared to having it in zephyr/irq.h).
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Call pm_policy_device_power_lock_put/pm_policy_device_power_lock_get
to coordinate with system level power modes.
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
- Ensure that properties have 2 new lines when node is above it.
- Enures that 1 new line is required between a node and #if/#ifdef...
- Enures that 2 new line are required between #endif and node.
- Wraps property values that exceed 100 characters in length.
Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
dts-linter 0.3.7-hotfix2 Security Updates:
- Update `glob` to address CVE-2025-64756
- Update `js-yaml` to address CVE-2025-64718
Formatting updates:
- Ensure that properties have 2 new lines when node is above it.
- Enures that 1 new line is required between a node and #if/#ifdef...
- Enures that 2 new line are required between #endif and node.
- Wraps property values that exceed 100 characters in length.
Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
The packet priority support is disabled by default so that the
application can work "normally" as a sample for trying network
packet filtering.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The readme file did not mention the network packet priority
based rules 1-5 introduced recently.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Shorten long lines with \ chars in NPF_PRIORITY macro so that the output
looks good if user is using narrower window to view the code.
Reformat \ in NPF_RULE macro so that the code looks better.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Honor the comment in the code and make sure RX is started
before TX so that we can receive responses to any data we
are sending.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Configure ADC and DAC to use the Analog pin on the Mikrobus
connector as input/output to enable ADC and DAC samples.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add ADC to supported list for testing on boards that have a
zephyr,user io-channels property.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add PWM configuration on boards that have LEDs, but were
missing a definition of pwm-leds.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
xg24_dk2601b and bg22_ek4108a has PWM configuration in Devicetree,
but didn't enable PWM for testing. xg24_dk2601b has RGB LEDs,
add aliases to enable the rgb_led sample.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
The Counter alarm sample contains a hard-coded list of devicetree
nodes to use. Since the definition of the counter node was changed
on Series 2 devices in #97912, this sample hasn't compiled.
Update the sample to select the correct devicetree node, and
add representative boards to platform_allow to allow the sample
to be tested on Series 2 boards.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add overlays enabling DMA for Silabs boards to enable use of the
async API on the default shell uart.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Adds mag-gain-correction DT property, which sets the magnetic gain
correction value. Previously a property to select the channel for gain
correction existed, but there was no way to configure the correction
value itself.
Signed-off-by: Marek Maškarinec <marek.maskarinec@hardwario.com>
Add EHCI controller configuration with dual USB instances (USB1/USB2),
device tree bindings, 8 bidirectional endpoints, and UDC workqueue
stack optimization for frdm_imx93 A55 platform.
Signed-off-by: Jason He <jason.he_1@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Signed-off-by: Jony Zhang <jony.zhang@nxp.com>
The original driver is only feasible for M-Core, but for Cortex-A Core,
it need to do MMU mapping to map physical address to virtual address,
to the main update is to add MMIO mapping in this driver, and all the
register access should use virtual address.
Replace direct base address access with DEVICE_MMIO_NAMED_* macros
to provide better memory mapping abstraction and improve platform
portability.
This change:
- Adds DEVICE_MMIO_NAMED_ROM/RAM to config and data structures
- Maps the register base address during driver pre-initialization
- Updates all base address references to use DEVICE_MMIO_NAMED_GET
- Maintains backward compatibility with existing functionality
The DEVICE_MMIO API provides a standardized way to handle memory-mapped
registers across different platforms and memory protection schemes.
Signed-off-by: Jason He <jason.he_1@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Signed-off-by: Jony Zhang <jony.zhang@nxp.com>
As middleware.cmake could be included by mcux-sdk's CMakeLists.txt,
so use CMAKE_CURRENT_LIST_DIR to make sure the directory is correct.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Signed-off-by: Jony Zhang <jony.zhang@nxp.com>
If the modem reboots or stops responding to AT commands while in
RUN_DIAL, AWAIT_REGISTERED, or CARRIER_ON, the modem_cellular state
machine could previously dead-end. Applications had to recover by
manually issuing device PM suspend/resume.
This change adds an internal recovery path: after repeated chat/script
failures in the states above, the driver resets the state to INIT, and
posts an immediate RESUME event. This allows the initialization sequence
to run again and restores connectivity, including after unexpected modem
reboots.
No API changes; behavior only differs in failure scenarios.
Signed-off-by: Tomas Gudelevičius <tomas.gudelevicius@draeger.com>
Skips updating files if the output already matches the file
contents, this prevents a random occurance whereby sysbuild
reconfigures itself after a reconfiguration for no known
discernable reason
Signed-off-by: Jamie McCrae <spam@helper3000.net>
Add support for building Trusted Firmware-M (TF-M) non-secure
applications for the STM32H573I-DK board.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
When Ethernet is enabled, `net_config_init_app` function will use the
first found interface that has auto start enabled. In this particular
case, backbone interface will not be able to perform dhcp request
because OpenThread interface gets to be the first interface found
and chose. Openthread will fail this procedure, as it has no
direct connectivity to backbone.
This is why, ethernet app has `CONFIG_IEEE802154_NET_IF_NO_AUTO_START`
set.
In this case, make sure to call net_if_up for OpenThread interface from
border router code when backbone events are triggered.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Currently only TWIM peripheral is verified against TWIS.
Add new test variant to verify nRF52 TWI peripheral as well.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
1) Also build the CRC shell:
Even if we do not runtime test that part, let's at least build it.
Otherwise we do not have any test building it, and it just rots.
2) Do not limit the test to devices with HW CRC acceleration.
The CRC module has a SW version, and it makes sense to test it also.
(we were only build testing the HW support side in CI so far).
3) Limit what we test in integration to one platform for the SW version
and one HW platform.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
To use the shell one does not need anymore to pull unistd.h,
if one uses sys_getopt, we need to include sys/sys_getopt.h
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add Kconfig option to skip or execute the verification of the ic
type. This adds a delay of 100ms to the initialization.
Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
The sensor requires at least 94ms of delay before starting
communication after a reset. This is not mentioned in the
datasheet but is arbitrarily defined.
Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
Several test sources used the misspelled string "Unsupported
configuraiton".
Fix the typo across all affected files to improve clarity and
consistency.
Updated files:
- tests/boards/nrf/rram_throttling/src/main.c
- tests/drivers/flash/common/src/main.c
- tests/drivers/flash/negative_tests/src/main.c
No functional change.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
- reduced block length from 100ms to 33.33ms to compile for low ram
- add compile time conditional option to slave mode
- add overlay file for max32655fthr
Signed-off-by: Anuj Pathak <anuj@croxel.com>
- add basic dma only i2s dts binding for max32-i2s
- add i2s node with default config to max32655.dtsi
- add i2s pin definition for max32655fthr board as per spec
Signed-off-by: Anuj Pathak <anuj@croxel.com>
The GRTC timer, typically used as sys clock on newer nordic chips,
is currently tightly coupled to the CLOCK_CONTROL_NRF drivers though
not being dependent on it. The GRTC and its device driver is
independent from CLOCK_CONTROL, its clock requirements are managed
by hardware, based on its clock source selection.
This commit moves the clock source selection to the GRTC driver, and
removes the hard coupling to the CLOCK_CONTROL drivers. To preserve
backwards compatibility, if CLOCK_CONTROL_NRF_K32SRC_RC is selected,
GRTC will default to LFLPRC.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
As per our naming conventions for public symbols, these utility functions
and macros should be prefixed with "sys_".
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
When EC reboot, pwm pins go back to default GPI mode.
After we set pin mode to pwm mode at init(), it would
output low, so LED will be light (LED is low-activated).
And until set_cycles() is called to set output high,
then LED will be turn off the light (PWM-LED flicker).
So add the property to set PWM channel init output level.
Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
Currently all drivers which uses a slot from the debug window have fragile
hardwired slot 'mapping', they are locked to use specific slots even if
there are free slots available for them to take.
The new API hides the management of the slots and descriptors and users
can ask, release or even seize slots that they want to use.
Add a new debug slot manager API and a new default no config option to
allow selection between the hardwired or dynamic debug slot management.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Resize the reserved part of the debug window to cover the first 1K and
define the partial_page0 which will cover the partial slot in page 0.
Add comment to describe the debug window layout.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The current default of 8192 will provide only 2 pages in debug window:
page0: descriptors
page1: slot0
However, the coredump is hardwired to use slot1, which by default is not
valid.
Increase the default window size to 12288 to allow three pages.
This change affects CAVS25 only as it is using default window sizes and the
window 3 is not used in this configuration at all (it was used with IPC3
only), so we do have enough space for the three page - we could even
increase the default to cover 4 pages (8192+8192), but let's be
conservative on this.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The z_gdb_backend_init() is defined to return with success/error code
with return type of int.
Fixes: a9c47a47a4 ("intel_adsp: cavs: add gdb support")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Add additional call before starting time measurement to ensure that
all calls that are benchmarked are already cached. This change allows
to get more stable results as all exectutions are from cache.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This fix addresses a PM failure caused by an inconsistency
between the device tree and the build system. The device tree
was updated with `reg = <0x00000400 DT_SIZE_K(319)>;`,
but the corresponding value for `SL_SI91X_SI917_RAM_MEM_CONFIG`
in CMakeLists.txt was not updated, leading to the problem.
The build system now automatically sets `SL_SI91X_SI917_RAM_MEM_CONFIG`
based on the sram0 RAM size from the device tree using `dt_prop()`
and `list(GET)`, ensuring the configuration matches the device tree
and preventing future mismatches.
Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
This test does not build correctly on some modules, namely TFM, just run
it on a few platform, that should be enough to validate that the feature
is working correctly.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit aims to implement IPv4 packet filtering for NAT64 translator.
If packets are consumed, those are not processed anymore by network
stack.
NAT64 packets are created by OpenThread stack and sent on backbone
interface using a raw socket.
This commit attempts to fix an issue where a TCP connection is initiated
by an OpenThread node, but discarded by network stack since there is no
active known connection.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Add memory section which is placed in cpuapp TCM (Tightly Coupled
Memory) RAM0 which is fast, non-cacheable.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
When UART TX pin is in sleep state it should have pull up. So far it
was floating and that could lead to garbage output on terminal.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The FW loader reports and manages exactly two slots:
- slot 0: this is the slot for the application code to update
- slot 1: this is the slot, in which the FW loader is placed
The slot 1 is reported, so tools can fetch metadata about the
FW loader installed on the device.
Unfortunately, currently SMP-based FW loader allows to issue slot erase
command for the slot 1, effectively erasing the FW loader code that is
being executed.
This change correctly identifies the slot 1 as an active one, marking it
as used and blocking erase operation on that slot.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Adds `test_null_pointer_access` to verify that attempting to write to a
null pointer (address 0x0) correctly triggers a fatal error, confirming
the Physical Memory Protection (PMP) guard functionality.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Currently, clk_div_factor is force to 1 if user request more than 110MHz.
However, in this case, gspi_siwx91x_get_divider() will never return 2 or
more, unless the input clock is >= 220MHz. The si91x is not designed for
such high clock frequency. So, this case has never been tested.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
In gspi_siwx91x_config(), clk_div_factor can't be < 1. Therefore, we can
remove the dead code.
This code has been tested with tests/drivers/spi/spi_loopback, with a PLL
clock configured to 160MHz and a bus clock to 80MHz with success. I have
not found the case where change in GSPI_CLK_CONFIG are required.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Until now, GSPI_DATA_SAMPLE_EDGE was enabled as soon as the user requested
> 40Mhz (even if the actual frequency was in fact 40Mhz). However, at 40MHz
and at 80MHz, use of GSPI_DATA_SAMPLE_EDGE generated read errors on the
last bit of the transaction:
Buffer contents are different:
[...],0xaa,0xaa,0xaa,0xaa,
vs:
[...],0xaa,0xaa,0xaa,0xab,
I have not found any case where GSPI_DATA_SAMPLE_EDGE is useful, so this
patch just remove this parameter.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
In functions requiring to lock/release resources, it is less error prone to
have only one exit point and user goto to manage errors.
The behavior of the new code is exactly identical to the initial one.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Add myself alongside @seankyer and @tomi-font as the engineers
involved in development of this backend.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
The option CONFIG_I2C_DUMP_MESSAGES_ALLOWLIST should automatically be
turned on if the depedencies are satisfied.
Signed-off-by: Keith Short <keithshort@google.com>
Use the newly added API to get specific type of stats (if supported) but
also keep the backwards compatibility.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
nRF70 queries FW to fet the stats, use the new stats API and filter FW
query depending on the type.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Add a new API that takes stat type, the networking stack only needs
NATIVE stats per-packet, it doesn't need to update vendor stats
per-packet. This saves unncessary exchanges in case driver needs to
query the firmware for the vendor stats.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Add required CMake directives to enable working CONFIG_SRAM_VECTOR_TABLE=y
on STM32F0 series when CONFIG_CMAKE_LINKER_GENERATOR=y.
Builds OK with both ZEPHYR_TOOLCHAIN_VARIANT undefined (uses GNU toolchain
from Zephyr SDK) and set to "iar" (uses IAR toochain from EWARM v9.70.1).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
In 55c49cdb8f the mayority of the
Zephyr wifi drivers was changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
will fail to build.
Note that the net_offload struct was updated accordingly in
d45cd6716b
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In d45cd6716b the mayority of the
Zephyr codebased was changed to use the Zephyr native net_ prefixed
types. This comment was fogotten.
Let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In b5588ed684 the mayority of the
Zephyr modem drivers were changed to use the Zephyr native
net_ prefixed types, but this one was forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.
Note that the net_offload struct was updated accordingly in
d45cd6716b
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In e6daacf3c9 the mayority of the
Zephyr ethernet drivers were changed to use the Zephyr native
net_ prefixed types, but this one was forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
When running the samples/sensor/accel_trig sample with a adxl345 sensor
the logged output values were doubled compared to the expected values.
The sensor_channel_get() path calls adxl345_accel_convert which did not
handle the configured g-range, resulting in invalid sample values except
for the +/-16g range. To fix this issue the configured range is taken
into account and different conversion factors are applied.
adxl345_accel_convert is also made static. It is not used by another file.
Signed-off-by: Stefan Schmidt <kontakt@stefanschmidt-embedded.de>
Like other devices, the USBPHYC should be disabled by default. Add missing
property `status` with value `disabled` on the node in DTSI.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The RPU0 mailbox node in `zynqmp_rpu.dtsi` used incorrect IPI
message buffer base addresses. According to UG1085 (Table 13-3)[1],
RPU0 should use the channel 1 message buffer region at `0xFF99_0080`
for local request/response and `0xFF99_0400` for remote request/
response. The previous values pointed to the APU channel 0
buffer (`0xFF99_0200`), which does not match the hardware mapping.
The same is true for rpu1.
The IPI buffer base looks something like this:
IPI1 - 0xFF990000
IPI2 - 0xFF990200
IPI0 - 0xFF990400
Fix the DTS by updating the RPU0, RPU1 mailbox nodes to use the correct
base addresses from the documentation.
[1] https://docs.amd.com/v/u/en-US/ug1085-zynq-ultrascale-trm
Signed-off-by: Hank Wang <wanghanchi2000@gmail.com>
Signed-off-by: Harini T <harini.t@amd.com>
gcc complains about the posibility of ret and gfn being used
unitialiazed (with the input npages == 0).
Let's fix it by initializing ret to 0.
The warnings being:
```
zephyr/CMakeFiles/zephyr.dir/drivers/xen/gnttab.c.obj
In file included from include/zephyr/logging/log.h:11,
from drivers/xen/gnttab.c:31:
include/zephyr/logging/log_core.h: In function 'gnttab_get_pages':
include/zephyr/logging/log_core.h:221:9: warning: 'gfn' may be used
uninitialized [-Wmaybe-uninitialized]
221 | z_log_minimal_printk("%c: " fmt "\n", \
| ^~~~~~~~~~~~~~~~~~~~
drivers/xen/gnttab.c:202:19: note: 'gfn' was declared here
202 | xen_pfn_t gfn;
| ^~~
include/zephyr/logging/log_core.h:221:9: warning: 'ret' may be used
uninitialized [-Wmaybe-uninitialized]
221 | z_log_minimal_printk("%c: " fmt "\n", \
| ^~~~~~~~~~~~~~~~~~~~
drivers/xen/gnttab.c:199:13: note: 'ret' was declared here
199 | int ret;
| ^~~
```
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add more information to network packet filter documentation to
make it more useful to end users.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
When clock get_rate() is called, return by default the calibrated
frequency instead of nominal one. This improves accuracy specially
when internal RC SLOW clock is used.
To guarantee that nominal values can be still be retrieved, add a
new type of clock subsys for such scenario.
west.yml is also updated to add fix into calibration sources.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
According to the docs the millis were in the format `.SSSSSS`. In
reality though, it only accepted exactly `.SSS`, not `.SS` or `.SSSS`
and specifically also not `.SSSSSS`, contrary to the docs. Further, it did
not fail with an error message but simply produced the wrong value.
With this change it accepts everything from `.` to `.SSSSSS` and
produces the correct result. This is compatible with the previous
behavior, with the documentation and with everything in between.
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
The as6221 is functionally equivalent to ti tmp108 and ams as6212,
so it is added as a new variant of tmp108.
Signed-off-by: Atilla Filiz <atilla@fi-tech.be>
Don't quote the section names provided to Z_GENERIC_SECTION: the macro
already performs stringification on our behalf.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Also build the latency monitor support code.
As a sideeffect, we run out of bits in the kernel objects per thread
permissions tracking field. So let's increase it to 6 bytes.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This subsystem does not use the POSIX_API, and the sample only used one
call to the POSIX API to close a socket instead of using the native
networking API.
Let's just use the native networking API, so we avoid pulling-in more
dependencies.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In d45cd6716b the mayority of the Zephyr
networking code was changed to use the Zephyr native net_/zsock_
prefixed types, but some symbols were forgotten.
Let's change them.
Without these fixes/changes the code still builds in most cases as we are
by now setting CONFIG_NET_NAMESPACE_COMPAT_MODE.
But when this is not set, things will fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
- split stepper api into stepper and stepper_drv api
- stepper api now comprises only of motion control apis
- stepper_drv api comprises of apis for configuring stepper
drivers
- add documentation about stepper and stepper_drv api
- move stepper.rst in a dedicated stepper folder
- add information about stepper_drv api and relevant functions
in stepper documentation.
- drop motion control functions from all the stepper_drv drivers
- create a common a library for controlling stepper motors by
toggling gpios via h-bridge or step-dir stepper_drivers
- tmc5xxx devices are a combination of motion controller and
stepper driver devices. tmc5xxx devices need to be modelled as
mfds in order to address the split in stepper driver subsystem
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
zephyr,random-mac-address defaults to 0 or 1, which is always
available in generated code. so we can use the value itself.
Signed-off-by: Sven Ginka <s.ginka@sensry.de>
802.15.4 specifies that a device may send a DATA_REQUEST command to the
coordinator after waiting for "macResponseWaitTime", starting after the
acknowledgment to the association request command.
This change adds support to generate DATA_REQUEST frames and sends one
for the association usecase only. The two other usecases, for MLME-POLL
or for beacon-enabled PAN, are not yet supported.
Signed-off-by: Simon Piriou <spiriou31@gmail.com>
Remove selecting `CONFIG_HAS_HW_NRF_RADIO_IEEE802154` that should be
generated from DTS based on the SoC selection.
Signed-off-by: Michał Grochala <michal.grochala@nordicsemi.no>
Extend the counter_basic_api tests with a dedicated configuration that
enables the MCUX LPTMR driver in alarm mode.
The new testcase:
- Selects CONFIG_COUNTER_MCUX_LPTMR_ALARM
- Runs the existing counter_basic_api suite against nxp_lptmr devices
when built for a board that instantiates the LPTMR
This verifies that the alarm-only LPTMR configuration passes the common
counter API tests without relying on the TOP callback feature.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
The counter alarm irq shall set the match value
to the max top value after stopping the timer, otherwise
the next start of the lptmr counter may shortly match the
the previous match value thus cause test_valid_function_without_alarm
run failed.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
OpenThread NAT64 translator creates a packet that has header checksum
computed and appended.
In case of using ethernet as backbone interface, some NICs may want to
have checksum set to 0 for a correct computation.
This commit aims to address this issue by checking if hardware has
offload capabilities and setting NAT64 packet checksums to 0, if needed.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Current implementation uses tls_connection_export_keys_cb to retrieve
exporter_master_secret, client_random, and server_random, which only
works for TLS 1.2. TLS 1.3 introduces a different key derivation
mechanism.
In mbedtls 3.6.4, MBEDTLS_SSL_KEYING_MATERIAL_EXPORT supports exporting
keying material for both TLS 1.2 and TLS 1.3. Update logic to use this
macro and remove redundant MBEDTLS_SSL_PROTO_TLS1_3 check in TLS 1.2
handling.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Introduce WIFI_NM_WPA_SUPPLICANT_DEBUG_SHOW_KEYS to allow key dump
when using the NXP board debug configuration.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Enable MBEDTLS_SSL_KEYING_MATERIAL_EXPORT by default to support TLS
keying material export for enterprise scenarios.
Replace deprecated TLS 1.3 configs with MBEDTLS_SSL_PROTO_TLS1_3 and
MBEDTLS_SSL_SESSION_TICKETS.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Introduce MBEDTLS_SSL_KEYING_MATERIAL_EXPORT configuration option to
control support for TLS keying material export.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
This commit relegates some of the Microchip RISC-V area maitainers to the
collabolator tier.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
The existing PMP permission tests relied on hardcoded region indices
(e.g., index 0 or 2). This makes the tests fragile and dependent
on the exact memory attribute region setup.
This change refactors the tests to dynamically determine region counts
and indices based on the output of `mem_attr_get_regions()`:
- `test_pmp_change_perm_invalid_permission`: Uses the last valid
region index to test invalid permission flags.
- `test_pmp_change_perm_invalid_region_index`: Uses the total number
of regions as the out-of-bounds index.
- `test_successful_permission_change`: Locates the index of the
target test region (`dt_regions[0]`) by matching its base address
and size. The test now also inverts the X bit of the current
permissions to ensure a change is applied and verified.
These changes make the tests more robust and less dependent on a
specific static configuration.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Since pin retention handling was moved to nrfx,
GPIO HAL no longer has to be included in analog drivers.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
WS_MAGIC is a constant string and when calculating lengths for copying
we always exclude the NULL terminator. In result, using strncpy() for
copying can generate a warning about truncated string, as WS_MAGIC will
always be truncated from the NULL terminator. Therefore replace
strncpy() with memcpy() as it seems more appropriate for this case.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit aims to make use of sin6_scope_id field of net_sockaddr_in6
structure to correctly choose the network interface when destination
address in link-local.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
remove `imply MDIO` from the
ethernet drivers, that don't directly use mdio
and only use the ethernet phy api, now that the
phys select MDIO.
in 648c8252b5 the
`select MDIO` ones were remove, unfortunatly I forgot
the implyed ones.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The guard against rx_bufs == NULL was originally added to prevent a
DMA misconfiguration observed when no RX buffer was provided.
The issue can no longer be reproduced, and the check was incomplete
since it did not cover rx_bufs->buffers == NULL or rx_bufs->count == 0,
which lead to the same effective condition.
Removing the check simplifies the driver and avoids blocking valid
TX-only transfers.
Signed-off-by: Alexandre Rey <alx.rey@icloud.com>
Replaces direct byte shifting and assignment with `sys_put_le16`,
`sys_put_le32`, and `sys_put_le64` to simplify the `memory_dump` function.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
To improve code clarity, use `shell_print` in place of `shell_fprintf`
with `SHELL_NORMAL` where appropriate.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
We're now checking if there is space prior to executing the loop body,
therefore guaranteeing this condition is never going to fire in a
single-threaded context.
Signed-off-by: Stuart Longland <stuartl@vrt.com.au>
Before calling `uart_poll_in`, check we have space to store the character
in the ring buffer beforehand. If we do, *then* poll for the character.
That way we don't miss out on serial traffic when our ring buffer is full
unless we fill our hardware ring buffer too.
Signed-off-by: Stuart Longland <stuartl@vrt.com.au>
Removed usart_intenset attribute from conditional compilation
in mcux_flexcomm_data structure since this parameter needs to
be saved/restored independently if the interrupts are enabled
or not based on the PR feedback
Signed-off-by: Missael Maciel <davidmissael.maciel@nxp.com>
The PM action saves the interrupts enabled using a
global variable called usart_intenset. The problem is
when you have multiple uart instances that have different
configurations, when entering/exiting from a power level,
only one configuration is saved and will be applied to all
uart instances when exiting from a power level. We need to
keep this setting individual for each instance. To do this,
usart_intenset was added as a new element to mcux_flexcomm_data
structure. In this way, each uart instance will keep/restore
each own setting.
Signed-off-by: Missael Maciel <davidmissael.maciel@nxp.com>
- Reads the Pad Status Register (PSR) to get
the current GPIO input value, instead of the Data Register (DR).
Following IMXRT1170RM.pdf "13.5.2 GPIO Write Mode".
- Enables input buffer via Software Input On (SION)
to get correct pin value in PSR for both input/output pins.
- Issue has been discovered during Safety DIO self-tests.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
1. Remove 'XIP_BOOT_HEADER_ENABLE', it is not
used in the mcxn947 build tree.
2. Remove 'BOARD_FLASH_SIZE', it is not used
in the rw612 build tree.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
RIF configuration is now done at soc init time in a centralized
way so it is no more necessary for drivers to perform this
configuration.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Perform all the IPs RIF configuration at init time in case of this
isn't yet performed by an earlier entity during the boot sequence.
This configuration depends on TRUSTED_EXECUTION_SECURE which is
currently always enabled on STM32N6x but will be configurable in
future.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Remove the CONFIG_RISCV_PMP #ifdef guards from the function
declarations in pmp.h. This allows the header to be included
unconditionally, while the function definitions remain conditional
on the Kconfig option.
Add @kconfig_dep to the Doxygen comments for all functions
to clearly indicate the dependency on CONFIG_RISCV_PMP.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
SYSCON0 IP can be accessed by CPU0, HiFi4, EZH-V, eDMA0, eDMA1.
So cm33_cpu1 can't be supported this feature.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
These samples do not seem to need the unistd.h header, but including it
limits us to C libraries which have it, which as it is a POSIX
extension is not all.
So let's not include it so we do not limit ourselves unnecessarily.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add a check for a chosen flash controller to avoid attempting to clear the
settings flash with no controller available.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
This file does not seem to need unistd.h, and that header is a
POSIX extension to the C library which is not avaiable in general.
So let's not include it.
Without this change this file fails to build with minimal libc or
other C libraries which do not have this extra header.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Increase the RAM size of the SB variant to enable execution of relevant
tests that require at least 172 KB.
This ensures continuous tracking of these tests on CI.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
A device with zephyr,deferred-init is initialized by the application, so
we cannot check if it is initialized in "the correct order". On the other
hand, a non-deferred device must not depend on a deferred-init device: this
is guaranteed to be initialized out of order.
Also adjust existing test cases and add a new test case to validate this
behavior.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
There is a bit of logic to run every time an error is reported. Factor it
out into a dedicated function.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Extend UART_MAX32_TX_AE_WORKAROUND to also apply when building for
MAX32657.
Without this option, logging output may become fragmented or delayed
because TX interrupts fail to trigger reliably for small chunks of data.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
api_irq_update was clearing TX interrupt flags before the TX interrupt
could be served, breaking synchronization in time-sensitive applications.
Changes:
1. Remove unnecessary MXC_UART_ClearFlags() calls in api_fifo_read() and
api_irq_update to avoid premature flag clearing; ISR handler already
clears them after returning from the callback.
2. Replace raw flag checks in irq_is_pending() with more complete
api_irq_rx_ready() and api_irq_tx_ready().
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Support for selecting the IRQ output via the `irq-output-select` property
in devicetree. Updates interrupt configuration and ISR logic to use the
selected IRQ index. For i.MX95 M7, ensures pins and IRQs are configured
only when secure access is allowed by checking PCNS and ICNS registers.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
The default configuration for all STM32 microcontrollers in HAL is
to replace the ehternet MAC address with the address configured in
replace address zero. In "modules/hal", Grep for:
macDefaultConf.SourceAddrControl = ETH_SOURCEADDRESS_REPLACE_ADDR0;
But this is a bad thing for bridging. Since Zephyr ethernet LL code
always writes the source address, this patch has no impact on normal
operation. And has the benefit of maintaining the source MAC address
of bridged packets.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
Workaround GH running workflows from main on release branches.
The assignment script fails and does wrong assignments based on wrong
versions of the maintainer file and manifest.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Added DMM buffer preparation to I2C TWIM driver.
Adds little impact as buffer content is already copied
into message buffer which is places in proper memory for
optimized transfer.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Removed unused macros. Moved common macros to common header.
Aligned naming and style to other nrf drivers.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
This commit introduces a new DMA driver for NXP platforms,
specifically supporting the MCXC/kinetis series.
Please access https://www.nxp.com/webapp/sps/download/preDownload.jsp?render=true
to download MCXC44x Sub-Family Reference Manual for more details.
DMAMUX can be found in Chapter 20 and DMA in Chapter 21.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add initial implementation of the Infineon PSOC4 UART driver based on the
Peripheral Driver Library (PDL) for PSOC4 (PSoC 4100TP) devices.
Features:
- UART transmit and receive using PDL SCB UART APIs
- Configurable baud rate, parity, stop bits, and data bits from devicetree
- Pinctrl integration for TX/RX pins
- Support for Zephyr console and shell subsystems
- Build-time validation for UART configuration parameters
Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Deepika aerlync <deepika@aerlync.com>
Add board porting for the Infineon CY8CPROTO-041TP evaluation kit:
- Board devicetree and pinctrl configuration
- Kconfig and YAML definitions
- Documentation
- Support for west build, west flash, and west debug (OpenOCD)
Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Signed-off-by: Deepika aerlync <deepika@aerlync.com>
Add Kconfig configuration support for PSoC4 family in hal_infineon module.
Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Signed-off-by: Deepika aerlync <deepika@aerlync.com>
The qsort() function takes a callback argument that is having the
same semantics as strcmp(). Fix uvc_compare_frmival_desc() sorting
to make qsort() list frame intervals in increasing values.
Fix a bug where Windows would not enumerate devices when the video device
have multiple frame interval supported.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Change the Code of Conduct title from the one used in the template to
reflect that this is the Code of Conduct for the Zephyr Project, not the
Contributor Covenant project.
The attribution for the Contributor Covenant template is present at the
very last paragraph.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This device indicates 4KiB sector size and has an impossible
partition layout that starts part the way through a sector,
this fixes the issue by having proper partition alignment
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
BT_LE_PER_ADV_SYNC_OPT_FILTER_DUPLICATE option is only available when
BT_FEAT_LE_PER_ADV_ADI_SUPP is enabled in chipset.
Signed-off-by: Gang He <ganghe@sifli.com>
In option of HCI_LE_Periodic_Advertising_Create_Sync, bit 2
depend on Periodic Advertising ADI Support feature.
Signed-off-by: Gang He <ganghe@sifli.com>
In addition to the DT_HAS_<compat>_ENABLED options, the autogenerated
Kconfig.dts file also provides the DT_COMPAT_<compat> *macros* which avoid
manually declaring them when working around the no comma limitation. Unlike
options which can be referenced before their declaration, macros MUST
be defined before their usage (otherwise, they expand to nothing ("")).
Because the defconfig files were sourced before "dts/Kconfig", it was not
possible to use the DT_COMPAT macros from shields/boards/SoC defconfig;
this is not only confusing but also suboptimal because the macros must be
defined manually.
Include "dts/Kconfig" earlier to allow usage of the DT_COMPAT macros from
shields, boards and SoC defconfig. This should have no adverse effect
since there is no reason to override the options provided by the
autogenerated Kconfig.dts anyways.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The DT_COMPAT_<...> macro variables are generated for every compatible
found in bindings: document them as existing and recommend using them
in various Kconfig documentation pages.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Modify dts/arm/nuvoton/m* to better align with Numaker platform
naming conventions. Also add one more collaborator.
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
Update the Renesas RA MIPI DSI driver and bindings to align
with RA8P1 SoC support:
- Add SoC-specific PHY PLL multiplier ranges
- RA8D1: 20–180
- RA8P1: 40–375
- Correct t_init limit from 15 bits to 19 bits as specified in HUM
- Update devicetree bindings:
- Clarify `pll-div` as input frequency divisor
- Add `pll-out-div` property as output frequency divisor
Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Make sure that certificate-based DTLS config is built by twister and
also mention it in the README file.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add missing PSA configs required for successful DTLS handshake with PSK.
Cert-based config also needed to enable some RSA support, as otherwise
mbed TLS throws errors about some undefined RSA error mapping.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Use a sample point of 75% for the data phase timing to match the bitrate of
1Mbit/s.
Fixes: #100615
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Relax the CAN sample point location accuracy requirements in the CAN API
test suites by taking CONFIG_CAN_SAMPLE_POINT_MARGIN into account.
Fixes: #100615
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Uses the modern nrfutil command for checking ironside versions
through the boot report, rather than hardcoded addressing.
Signed-off-by: Stephen Stauts <stephen.stauts@nordicsemi.no>
Configure the fractional divider (FRACN) for PLL2 and PLL3
on STM32H5 series when specified in the device tree.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Improve I2C error logs by adding port number to all timeout and host
error messages, making it easier to identify which controller reports
failures.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Set dma tcd queue size to 4 defaultly to fix build issues,
- error: static assertion failed: NUM_DMA_BLOCKS_RX_PREP must be
< CONFIG_DMA_TCD_QUEUE_SIZE
#define BUILD_ASSERT(EXPR, MSG...) _Static_assert((EXPR),...
drivers/i2s/i2s_mcux_sai.c:45: note: in expansion of
macro BUILD_ASSERT
BUILD_ASSERT(MAX_TX_DMA_BLOCKS > NUM_DMA_BLOCKS_RX_PREP,
Signed-off-by: Biwen Li <biwen.li@nxp.com>
The RAK11160 WisDuo module is a low-power, long-range LoRaWAN
module based on the STM32WLE5 and Espressif ESP8684H2 MCUs.
Signed-off-by: Sercan Erat <sercanerat@gmail.com>
This change moves the dma stream from _config to _data,
allowing direct reference the DMA stream rather than
duplicating it on the stack. Additionally, it aligns the
declaration to the other STM32 drivers.
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
This change removes the on-stack copying and instead
uses a pointer to the configuration to avoid unnecessary
stack usage
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Fix SonarQube warnings, move variable declarations to the
top of the block according to Zephyr code style
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Protected Storage is another type of secure (encrypted and
authenticated) storage available using PSA interfaces.
When targeting TF-M builds, allow making use of PS for storing settings
Fixes#94681
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Prepare for extending this backend to also allow storing settings in the
PS (Protected Storage).
Mostly file and kconfig renames, as well as updates
to comments and log messages.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Adds a new meta-IRQ test just for SMP. This test verifies that
a cooperative thread preempted by a meta-IRQ thread resumes on
the same CPU after the meta-IRQ thread finishes.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Adds a note to the meta-IRQ thread documentation indicating that
that when a cooperative thread resumes after being preempted by
a meta-IRQ thread it will resume on the same CPU from which it was
preempted.
On a UP system such behavior is a given. However, this behavior becomes
relevant on an SMP system to ensure that both schedule-locked and
cooperative threads are not accidentally shuffled to another CPU while
querying the properties associated with their current CPU.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
If the thread being aborted or suspended was preempted by a metaIRQ
thread then clear the metairq_preempted record. In the case of
aborting a thread, this prevents a re-used thread from being
mistaken for a preempted thread. Furthermore, it removes the need
to test the recorded thread for readiness in next_up().
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
When a cooperative thread (temporary or otherwise) is preempted by a
metaIRQ thread on SMP, it is no longer re-inserted into the readyQ.
This prevents it from being scheduled by another CPU while the
preempting metaIRQ thread runs.
Fixes#95081
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Adjust the bounds for tracking metairq preemption to include the
case where the number of metairq threads matches the number of
cooperative threads. This is needed as a thread that is schedule
locked through k_sched_lock() is documented to be treated as a
cooperative thread. This implies that if such a thread is preempted
by a metairq thread that execution control must return to that
thread after the metairq thread finishes its work.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Add support for new get_properties_copy() method. This allows to
use ssp driver from user-space threads.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The DAI interface is not used from user-space in all configurations
where Zephyr user-space is enabled, so it is beneficial to have
a build option to contorl whether the DAI syscalls are included or
not.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add a variant of get_properties() method that writes the properties
to a caller provided pointer. Unlike the old variant, this copy
variant can be exported to user-space in a safe way.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add user-space support to the dai.h interface. No functional
impact to builds when CONFIG_USERSPACE is not set.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add tracing support for timer expiry and stop function callbacks,
enabling measurement of callback execution duration and facilitating
debugging of cases where callbacks take longer than expected.
Signed-off-by: Vijay Sharma <vijshar@qti.qualcomm.com>
During reboot operations, interrupts are disabled but k_is_pre_kernel()
returns false, causing SCMI communication to fail when using interrupt
mode. Force polling mode to ensure reliable operation in all contexts.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Implement sys_arch_reboot() using SCMI system power protocol
for warm and cold reset operations on SCMI-enabled platforms.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Add SCMI System Power Domain Protocol support with:
- System power state set operations
- Standard SCMI power states (shutdown, cold/warm reset, suspend)
- Graceful and forceful power transitions
- Optional NXP vendor-specific power states
- Device tree binding for "arm,scmi-system"
This enables system-wide power management through standardized
SCMI interfaces for reboot and power control operations.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Add SCMI protocol version negotiation to handle compatibility between
different agent and platform versions. The negotiation automatically
downgrades to supported version when needed and maintains backward
compatibility with legacy systems.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Add standardized SCMI protocol common interface functions that can be
reused across different SCMI protocol implementations:
- scmi_protocol_get_version(): Query protocol version
- scmi_protocol_attributes_get(): Get protocol-specific attributes
- scmi_protocol_message_attributes_get(): Query message capabilities
- scmi_protocol_version_negotiate(): Negotiate protocol version support
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Add `integration_platforms` to the `drivers.usb.udc.skeleton` test case to
ensure the UDC Skeleton driver is built and tested by CI.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Instead of having one "make_thread" function per instance, called through
a function pointer in the instance configuration, save the thread stack
information instead and consume it from shared code in the driver pre-init
function. This makes the driver more readable (less code in the instance
creation macro) and should reduce its footprint impact (since the thread
creation code is no longer duplicated).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add support for resetting the LPTIM peripheral to its default state
on initialization. This ensures that any previous configurations
do not interfere with the new settings.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add resets property to lptim binding and define resets for all lptim
instances in device tree files for STM32 MCUs.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add support for the Zephyr device power management framework to
enable runtime power control of the ADXL345 accelerometer.
This implementation adds a pm_device_action callback that handles
SUSPEND and RESUME actions. When suspended, the sensor enters
standby mode for low power operation. On resume, it returns to
measurement mode.
The implementation follows the standard pattern used by other
sensor drivers (lis2dh, bme280, vcnl4040) and integrates with
the PM_DEVICE_DT_INST_DEFINE macro for automatic PM setup.
Tested on nRF52832 with CONFIG_PM_DEVICE enabled.
Signed-off-by: Tobias Kässer <t.kaesser@gmail.com>
According to DSP0283 1.0.1, Length byte in MCTP over USB header
fields should start from the "MCTP over USB Header" to the last
byte in the "MCTP packet payload"
Signed-off-by: John Chung <john.chung@arm.com>
This fixes ruff warnings on coredump parser scripts.
Note SIM115 is not fixed yet as it requires more intrusive
changes to handle opened file with context manager.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This fixes ruff warnings on top level coredump scripts.
This is done via "ruff check --fix" without manual editing.
Note SIM115 is not fixed yet as it requires more intrusive
changes to handle opened file with context manager.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This disables the duplicate code warnings on x86 and x86_64
gdbstubs. The exception vector tables may look the same now but
can deviate depending on supported features on architecture.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
All power.c files in Espressif SoCs depends on un-registered
soc log module. When CONFIG_LOG=y and CONFIG_LOG_DEFAULT_LEVEL=4,
build fails as LOG_DBG used in those files won't have its proper
declaration.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Changes the type used in _system_heap extern declarations to use
k_heap instead of sys_heap.
Fixes#100530
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
When uart_ns16550_irq_tx_enable() is called and the TX FIFO is already
empty, no new interrupt is generated, causing data transmission to stall
in some cases. This patch introduces a workaround to simulate an ISR
callback if the FIFO is empty when enabling the TX IRQ.
Signed-off-by: Jacky Lee <jacky.lee@egistec.com>
This patch achieves that by:
- Waiting one second between each message sent by the host, so people
can actually follow what's going on;
- Wraping the content of the messages (strings "hello" and "world") in
quotes, so it's clear what they are;
- Toning down the logging to INF - no need for DBG;
- Removing astray `\n` - LOG_XXX already takes care of that.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
It only needs to be started once - all subsequent start will fail with
-EBUSY and possibly print some error message.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
We are hitting the limit of 256 events possible with event id right now
defined as uint8_t.
The bandwidth increase is minimal (2 bytes per event) compared to the
payload data, and the scalability benefits far outweigh the costs.
Existing CTF traces with 8-bit IDs won't be compatible.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Document remplacement of the ST-specific `zephyr,ccm` by `zephyr,dtcm`
along with actions to take in application code in the migration guide.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The `zephyr,ccm` chosen was an ST-specific property which has been replaced
by the generic `zephyr,dtcm`. Remove it from the DTS documentation.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The `st,stm32-ccm` is now used though the generic DTCM mechanism: remove
all SoC-specific code which was used to implement support for it.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Remove section names and symbols relating to the STM32 CCM region,
`/chosen/zephyr,ccm`, which is replaced by the standard DTCM region
`/chosen/zephyr,dtcm`.
For backwards compatibility, the old `__ccm_<...>_section` attribute
macros are aliased to `__dtcm_<...>_section` (until release 4.5).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
doc: dts: api: remove documentation of chosen `zephyr,ccm`
The `zephyr,ccm` chosen was an ST-specific property which has been replaced
by the generic `zephyr,dtcm`. Remove region initialization code from the
common arch init code (+ BSS zeroing from common XIP init code).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The STM32 CCM can be used as `/chosen/zephyr,dtcm` - transition all boards
to this chosen to allow deprecation/removal of the legacy `zephyr,ccm`.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Rename the CCM memory region for STM32F3 and STM32F4 series such that the
CCM node can be used as a `zephyr,dtcm`.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Allow to use `stlink_gdbserver` as a gdb server when running
`west debug -r stlink_gdbserver`. This is helpful when OpenOCD does not
yet support the chip, for example, **nucleo_c071rb**.
In my tests, I have flashed the debug build of *blinky* sample and used
GDB to add a temporary hardware breakpoint to the main function. When I
reached there, I stepped through the code.
I have tested this with the following boards:
- disco_l475_iot1
- nucleo_c071rb
- nucleo_f042k6
- nucleo_f303k8
- nucleo_f303re
- nucleo_f411re
- nucleo_l432kc
- nucleo_l452re
- nucleo_wl55jc
- stm32f0_disco
- stm32f3_disco
- stm32f411e_disco
- stm32f412g_disco
- stm32f429i_disc1
- stm32f4_disco
- stm32f769i_disco
- stm32l1_disco
- stm32l476g_disco
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
This patch introduces overlay for xg23_rb4210a for the spi_loopback
test. It is needed because it has another peripheral ip version than
all the other already tested board.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Increase the default number of software-limited CAN RX filters across the
drivers. Some of these were chosen quite conservative, requiring custom
configuration for even simple in-tree samples.
Users can reduce the number of available RX filters to reduce RAM footprint
as needed.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Rename Kconfig option CONFIG_CAN_RCAR_MAX_FILTER to
CONFIG_CAN_RCAR_MAX_FILTERS to match remaining CAN driver Kconfig option
naming.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN xmc4xxx Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_XMC4XXX_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the STM32 FDCAN Kconfig symbols, renaming
CONFIG_CAN_MAX_STD_ID_FILTER to CONFIG_CAN_STM32_FDCAN_MAX_STD_ID_FILTERS
and CONFIG_CAN_MAX_EXT_ID_FILTER to
CONFIG_CAN_STM32_FDCAN_MAX_EXT_ID_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the STM32 bxCAN Kconfig symbols, renaming
CONFIG_CAN_MAX_STD_ID_FILTER to CONFIG_CAN_STM32_BXCAN_MAX_STD_ID_FILTERS
and CONFIG_CAN_MAX_EXT_ID_FILTER to
CONFIG_CAN_STM32_BXCAN_MAX_EXT_ID_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the MCUX FlexCAN Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_MCUX_FLEXCAN_MAX_FILTERS and
CONFIG_CAN_MAX_MB to CONFIG_CAN_MCUX_FLEXCAN_MAX_MB.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN mcp251xfd Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_MCP251XFD_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN max32 Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_MAX32_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN mcp2515 Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_MCP2515_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN sja1000 Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_SJA1000_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN native_linux driver Kconfig symbols,
renaming CONFIG_CAN_MAX_FILTER to CONFIG_CAN_NATIVE_LINUX_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Use proper namespace for the CAN loopback driver Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_LOOPBACK_MAX_FILTERS.
This prevents Kconfig symbol clashes between different CAN controller
drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This patch add the clock-frequency property for two board. Without this
patch, the frequency is silently set to 1 Mhz which can introduce
some lack of understanding.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
The shift is an old leftover from when the BAP API was
different and BIT(1) means BIS Index 1, but now BIT(0)
means BIT Index 1.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When parsing AT command responses, empty string arguments were being
ignored if they occur it the end of the response.
This is not only iconsistent behavior, but also causes issues when
parsing responses where we need to know the number of arguments.
For example, the +CEREG response and unsolicited command response which
we need to know if it is response or unsolicited command response to
correctly parse the it, as the first argument will be different.
Example:
Response: +CEREG: 5,4,\"0A0B\",\"FFFFFFFF\",9,0,0,,
Notification: +CEREG: 4,\"0A0B\",\"FFFFFFFF\",9,0,0,,
Here we want to know that response has 8 arguments, not 7, or we will
confuse it with the notification.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
Introduce CONFIG_MCUX_OS_TIMER_MIN_DELAY to allow the configuration
of the minimum delay cycles.
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
Selecting the correct CTRLSEL value for VPR IO pins relies on
mapping any pinctrl psel value with the correct port/pin set on the
VPR nodes in devicetree to the same CTRLSEL value, to avoid enumerating
all permutations of (pin function, port, pin).
However, the mechanism did not work as intended and ended up mapping all
these pins to GPIO instead, which meant that the pins did not behave
as expected.
Update the handling so that it works as intended.
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
This commit introduces helper functions to avoid having large
#if DT_HAS_COMPAT_STATUS_OKAY ... #else blocks,
improving readability.
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
When an invalid GPIO configuration is provided for a wake-up pin on
STM32WBA series, display a series-specific message and return an error.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
When an error occurs while attempting to configure a GPIO pin as wake-up
pin, return the error to the caller instead of merely printing a log
message which may not even be displayed.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Introduce the optional OMA 10523/10524 send scheduler extension to manage
cached resources, including control and sampling rule objects, cache
filter with gt/lt/st and pmin/pmax handling, max-age/max-sample limits,
and registration flush helper.
Add an overlay to the LWM2M client sample.
Add a fake humidity sensor.
Signed-off-by: Julien Vermillard <julien@clunkymachines.com>
A invalid indicator index will cause the underflow of the array
`ag_ind` if the indicator index is not returned by AG in the
response of AT command `AT+CIND=?`.
Replace hardcoded `-1` values with HFP_HF_INDICATOR_INVALID constant
for better code readability and maintainability. Add proper bounds
checking to validate indicator indices before accessing the `ag_ind`
array using the `ind_table` mapping.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
There is an issue found that the sco conn cannot be released when the
SCO has been disconnected. The sco conn count is referred in the sco
connected callback due to the `sco_conn` is NULL while `sco_conn`
should not be NULL when the sco connected callback is triggered.
It is a race condition issue where the sco connected callback is
triggered before `sco_conn` is updated. The sco conn reference count
has been referred incorrectly, actually it should not be referred.
Replace direct pointer access to `sco_conn` with atomic operations to
prevent race conditions in concurrent SCO connection scenarios.
If the value of `sco_conn` is not NULL when trying to set the return
value of `bt_conn_create_sco()` to `sco_conn`, it means the race
condition occurs. In this situation, discount the sco conn reference
count to fix the issue.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add a macro that allows to get the node identifier of the flash
controller the area/partition resides on.
Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Clarify the pixel-format property of a lcd-controller in order to
indicate that this is the pixel-format of data generated by the
lcd-controller, not only for a panel attached to this controller
but also for another device such as interface converter which
would be receiving the data from the lcd-controller.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Use the pixelformat information provided by the DSI panel in order
to control the color coding of the DSI host.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
So far the LTDC driver has not be using the pixel-format property
defined in the lcd_controller bindings. This property describes the
format of the panel connected to the LTDC output. It is not to be
confused with the format of the LTDC layers (aka format of data stored
into the framebuffer). The LTDC accepts various input formats while in
most cases only RGB888 is supported for output. RGB666 is also supported
by enabling Dithering however it is not supported currently by the
driver.
Enforce verification of the pixel-format given to the LTDC device-tree
by checking that it matches with the platform supported formats.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
LTDC pixel-format property has been wrongly set to various values
so far without being actually used by the LTDC driver itself.
This property describes the format of the output of the LTDC
(aka format of data between the LTDC and a panel or between
the LTDC and the MIPI-DSI block). Currently only RGB888 is
supported.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
If test is to be run in coverage mode, wait for output to
dump at the end of a failing testcase.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
This ensures, we pick a `urllib` version >2.6.0.
See:
- CVE-2025-66418 High severity
- CVE-2025-66471 High severity
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This ensures, we pick a `urllib` version >2.6.0.
See:
- CVE-2025-66418 High severity
- CVE-2025-66471 High severity
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The QDEC driver does not use any of the functions implemented in the TIM
LL full driver module (`stm32XXxx_ll_tim.c`), only those provided by the
LL header (`stm32XXxx_ll_tim.h`).
Disable compilation of the unnecessary full driver module.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The RTC driver does not use any of the functions implemented in the LL full
driver module (`stm32XXxx_ll_rtc.c`), only those provided by the LL header
(`stm32XXxx_ll_rtc.h`).
Disable compilation of the unnecessary full driver module.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
STM32H5 series now uses the dedicated `flash_stm32_xspi` driver instead.
Remove all quirks related to H5 in the STM32 OSPI driver.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
When CONFIG_NO_OPTIMIZATIONS=n then kobject area can get inflated.
Some targets are currently fail to compile due to that.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
When the number of input bits changes, the value in the `CR_DATASIZE`
register should be modified accordingly.
The CRC32_C algorithm does not require the result to be XOR
Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
The buffer length check was not updated with the change to the H4 header
push location (changed in 6113230c). As the complete buffer is now
provided, a buffer of length `SPI_MAX_MSG_LEN` is now valid.
Signed-off-by: Jordan Yates <jordan@embeint.com>
No activity from this user for over 2 years. It is likely that they're
now @ppryga-nordic but since it doesn't seem anybody noticed the
discrepancy in many years, I think it is safe to drop the entry :)
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
- Enable the DTCM region in soc.c
- Apply MPU configuration for the new memory region (itcm, dtcm,
sram,...)
- Turn on the Kconfig to relocate the vector table to 0x0.
Signed-off-by: Phuc Pham <phuc.pham.xr@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Zephyr generates the system call headers using CMake custom
targets and various scripts. Some platforms, like the Nordic onces,
reuse some files located in Zephyr inside the TF-M build as well.
Because of this the generated Zephyr headers needs to exist before
TF-M starts the build process in order to succeed.
This adds a dependency to make sure TF-M starts building after the
Zephyr custom command which generates the system call headers is
executed.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
This patch allows a DMA device that is part of a power domain to start
the test in a suspended power-management state. If another device makes
the power domain active (for example, the console UART), the DMA device
within the same power domain may enter a suspended state.
The test will now verify that the device is suspended/off before the
test begins, active during the test, and restored to its initial state
at the end.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
During L2 page table duplication, there are cases where we
should copy the table over instead of restoring the PTEs.
Add the ability to copy the table over.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds a spinlock to guard page table counter updates.
For some reasons, without this, xt-clang generated code would
result in incorrect counter update possibly due to memory
access ordering (though GCC generated code works fine without
the spin lock).
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Use CONFIG_CACHE_HAS_MIRRORED_MEMORY_REGIONS instead.
The new kconfig reflects more correctly on what is going on
in hardware. Also, this is not enabled by default if CPU
cache is not coherent. CPU cache can be incoherent and yet
there are no mirrored memory regions. Those relying on this
deprecated default behavior has their config adding
CONFIG_CACHE_HAS_MIRRORED_MEMORY_REGIONS separately.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This removes the following kconfigs:
() CONFIG_XTENSA_RPO_CACHE
() CONFIG_XTENSA_CACHED_REGION
() CONFIG_XTENSA_UNCACHED_REGION
The associated feature is actually SoC specific and not general
architecture feature. Since the only user of these have its own
implementation, we can now safely remove these.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This re-implements the CONFIG_XTENSA_RPO_CACHE and its cached
and uncached region support in the SoC layer. This is in
preparation for removing RPO cache in the architecture layer
as this is a SoC feature and not an architecture feature.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Make sure code using these kconfigs are only compiled if they
are defined. They will be removed later. But for now, we need
these #ifdef to avoid breaking the build when we move these
caching functions to SoC layer.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This allows SoC to define their custom cache related functions
and are used by sys_cache_*() functions.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
arch_mem_coherent() is cache related so it is better to move it
under cache subsys. It is renamed to sys_cache_is_mem_coherent()
to reflect this change.
The only user of arch_mem_coherent() is Xtensa. However, it is
not an architecture feature. That's why it is moved to the cache
subsys.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The macro ARCH_XTENSA_SET_RPO_TLB is only used for Intel Audio
DSP. The specific memory mapping requiring this is SoC specific
feature and not a feature on Xtensa in general. It should not be
declared in the architecture layer. So move it.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds a kconfig to indicate a memory mapping where physical
memory regions are both mirrored and mapped in different
addresses. Accessing one set of addresses is via CPU cache
while the other is directed to memory.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This moves the ace-link.ld into include/linker to indicate it is
to be included by the main linker script. Also rename it to
ace-link-mirrored.ld to indicate that it is for the mirrored
cache configuration.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The Zephyr linker script usually puts something before
z_mapped_start (where .text is), for example, vecbase vectors.
So we need to reserve those space or else k_mem_map() would be
mapping those which may result in faults.
To avoid mapping there, CONFIG_ARCH_HAS_RESERVED_PAGE_FRAMES
needs to be used. Since it is common when MMU is enabled, we
should enable it by default using imply. All current Xtensa
MMU SoCs all have this selected anyway. Using 'imply' instead
of 'select' is to allow it to be disabled if so desired.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This removes CONFIG_XTENSA_MMU_DOUBLE_MAP and its associated
code. The double mapping of a page into both cached and
uncached memory regions should be done in SoC and application,
as it gives finer control on what actually is being mapped.
For example, if a page only needs to mapped in cached region,
there is no need to map it in the uncached region. This may
save the need to allocate a L2 page table for it, and saves
some memory.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Rework the SoC MMU mappings in preparation for removal of
double mapping code in Xtensa architecture code. This will let
the SoC layer and application to fine tune memory mappings
instead of having double mapping forcibly applied everywhere.
The modified mapping array mimics what the double mapping
would have done simply to have the same behavior. Future
optimizations can be done to remove unnecessary mappings.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds the arch default MMU mappings into the SoC mapping
array. This is in preparation of not forcibly doing double
mapping in architecture code as this type of double mapping
should be specified for individual regions. This allows
the SoC layer to fine tune the mappings as not anything
needs to be double-mapped.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Adds kconfig CONFIG_XTENSA_MMU_USE_DEFAULT_MAPPINGS for arch
code to initialize the page tables with a few default mappings
covering text, data, BSS and RODATA. Disabling this allows
the SoC to customize and fine-tune the mappings if needed.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Moves the HiFi related kconfigs to their respective SoC
kconfigs as it is specific to the SoC... and this requires
creating new kconfigs for each SoC series.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The newlib that comes with the Xtensa toolchain is very old,
and is not thread-safe _at all_. So the newlib tests would
fail sometimes but pass in the next run. So skip the newlib
tests for intel_adsp platforms.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Due to CONFIG_DCACHE_LINE_SIZE=64, the stack is always aligned
on 64 bytes. With data cache line size and the default of
CONFIG_STACK_POINTER_RANDOM=64 in test, there is not much
randomness as any added offset (<= 64) would be rounded up to
64 bytes due to stack alignment. For the added offset to stack
pointer to actually mean something, CONFIG_STACK_POINTER_RANDOM
has to be larger.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The reset gpio field was in the config structure but was not coded
into the initialization path. So, add the appropriate code to handle
the gpio setup when it is defined in the device tree.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
Extend the lan9250 driver to support using a local administered
unicast random mac address during init. This follows the device tree
settings for zephyr_random_mac_address from other ethernet drivers
for the added support.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
Sibling transitions are now detected in smf_set_state() when source and
destination share the same parent, removing the need for states to flag
the sibling transition explicitly.
Restore include/zephyr/smf.h and lib/smf/Kconfig to match main so this
change only carries the functional update in lib/smf/smf.c, and add a
micro-benchmark test. For accurate statistics, run the test on a board.
Micro-benchmark setup
- Board: NUCLEO-F746ZG (STM32F746, ~192 MHz)
- 200000 iterations per state transition
- Simple HSM (letters are nodes; R is root):
=== SMF transition micro-benchmark ===
R
/ \
A B
/ \ / \
C D E F
/ \ \
G H J
Current smf_set_state:
======================
Sibling Transitions
(A->B) : 459 cycles/transition (2390 ns)
(C->D) : 482 cycles/transition (2510 ns)
(G->H) : 522 cycles/transition (2718 ns)
Other Transitions
(G<->G) : 237 cycles/transition (1234 ns)
(C->G) : 343 cycles/transition (1786 ns)
(A->H) : 452 cycles/transition (2354 ns)
(G->D) : 651 cycles/transition (3390 ns)
(D->E) : 752 cycles/transition (3916 ns)
(J->D) : 893 cycles/transition (4651 ns)
(J->G) : 1077 cycles/transition (5609 ns)
New smf_set_state:
==================
Sibling Transitions
(A->B) : 356 cycles/transition (1854 ns)(22% faster)
(C->D) : 356 cycles/transition (1854 ns)(26% faster)
(G->H) : 356 cycles/transition (1854 ns)(32% faster)
Other Transitions
(G<->G) : 258 cycles/transition (1343 ns)(9% slower)
(C->G) : 356 cycles/transition (1854 ns)(4% slower)
(A->H) : 464 cycles/transition (2416 ns)(3% slower)
(G->D) : 707 cycles/transition (3682 ns)(9% slower)
(D->E) : 797 cycles/transition (4151 ns)(6% slower)
(J->D) : 970 cycles/transition (5052 ns)(9% slower)
(J->G) : 1157 cycles/transition (6026 ns)(8% slower)
This change makes sibling transitions
deterministic and cheaper (356 cycles on nsim),
at the cost of a small increase for deeper/LCA
transitions (~7–9%). This is a net win for state machines
that mostly hop between siblings.
Signed-off-by: Vladislav Kulikov <vlad_kulikov_c@pm.me>
The SCMI CPU protocol is in fact a vendor extension from NXP. The current
naming used for the CPU protocol definitions (i.e. functions, structures,
macros) follows that of the SCMI standard protocols, which might be
misleading.
Include "nxp" in the name of all of the CPU protocol definitions.
This change was performed mechanically using "git grep" and "sed -i"
with some manual intervention.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Ensure mcumgr handler variables are consts in order to make ld happy and
not emit the "LOAD segment with RWX permissions" warning
Signed-off-by: Dennis Grijalva <dennisgrijalva@meta.com>
This is available in util.h since 646f255373 and the existing one
creates a collision and build breakage. Just drop it.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Once the primary CPU receives the block, it will immediately try to ask
the remote for blocks left to send.
On real hardware, this would typically work fine, since the IRQ
round-trip allows remote to finish the loop iteration.
However on nrf5340bsim the host answers immediately, receiving wrong
data and failing the test.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Busy loops without any way to yield to the kernel are not recommended,
and here it causes a multicore BabbleSim simulation to stall.
Co-authored-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Add helpers to compute Greates Common Divisor (GCD) and Least Common
Multiple (LCM).
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
This commit implements a new unit test suite to validate the
`z_riscv_pmp_change_permissions` function.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
The new function 'z_riscv_pmp_change_permissions' provides a mechanism
to modify the Read, Write, and Execute (R/W/X) permissions of an
existing PMP region based on its memory attribute index.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
When the firmware wrote data to KBC/AUX output buffer, the hardware
automatically generated IRQ1/12 to notify the host. After the host read
the data, the EC received an output buffer empty (OBE) interrupt to
indicate that the next byte could be written. However, on the NPCX9M7FB,
this mechanism may cause IRQ1/12 to be missed if the firmware write new
data immediately after detecting that the output buffer is empty,
resulting in incorrect behavior.
To avoid missing IRQ1/12, the flow is changed so that it first checks
VWIRE_AVAIL to ensure no pending VW events. If no VW event is pending,
the firmware writes data to the output buffer and explicitly asserts
IRQ1/12 to notify the host. After the host reads the data and the OBE
interrupt triggers, the firmware clears IRQ1/12.
This updated sequence prevents IRQ1/12 from being lost and ensure
correct notification behavior.
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Ensure static thread data variables are consts in order to make ld happy
and not emit the "LOAD segment with RWX permissions" warning
Signed-off-by: Dennis Grijalva <dennisgrijalva@meta.com>
Transition my MAINTAINERS file statuses to align better with my new role
at Infineon. I loved my time at Intel and am forever thankful to have
been part of an amazing team. I look forward to leading Infineon in the
project.
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
Fix for 1d70b70. Original code used start_time (set before flashing)
to calculate serial port wait timeout, which caused wait loop
to include flash duration, leading to exceed overall timeout.
Added serial_wait_start timestamp for avoid
including flash time in serial port enumeration timeout.
Make timeout dynamic (20% of flash_timeout, minimum 10s).
Signed-off-by: Mateusz Junkier <mateusz.junkier@intel.com>
The device_map() is not defined for SoCs with no MMU, add the
device_map() macro when !DEVICE_MMIO_IS_IN_RAM to support building for
SoCs with no MMU.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Display the total run duration to two decimal points instead of ~14,
similar to the other displayed timestamps.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Display how long it takes to build the testplan in the logs. This can
be useful since the duration to bulid the plan can vary wildly depending
on the arguments given. Without this information, it is difficult to
tell (from CI logs) whether a long execution time is from actually
building and running the tests, or just generating the testplan.
For example, in a downstream repo:
```
./zephyr/scripts/twister --integration -iv -T . --dry-run
INFO - Building initial testsuite list...
INFO - Built testsuite list in 10.58 seconds
```
vs
```
./zephyr/scripts/twister --integration -iv -T . --dry-run \
--vendor nordic --vendor zephyr
INFO - Building initial testsuite list...
INFO - Built testsuite list in 201.01 seconds
```
Signed-off-by: Jordan Yates <jordan@embeint.com>
The macro to initialise a struct adc_dt_spec instance uses a FOREACH macro,
which can be problematic when nesting in other FOREACH macros, for example
in driver implementations.
Replace it with DT_CHILD_BY_UNIT_ADDR_INT.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Introduce test cases to the devicetree API test suite for
DT_CHILD_BY_UNIT_ADDR_INT and DT_INST_CHILD_BY_UNIT_ADDR_INT.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
SYS_CLOCK_HW_CYCLES_TO_NS_AVG is not correct since we are tracking
cpu tick and SYS_CLOCK_HW_CYCLES_TO_NS_AVG convert it with the clock
frequency.
This patch used the correct conversion function (same api as function
to get the timestamp).
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Do not use this workflow for running tests, it should be limited to
blackbox tests only testing command line already happens somewhere else.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
- Currently, it is not possible to use mcumgr client with smp server
since there is no way to specify smp server address for requests.
- This patch series adds support for creating smp_client_object
containing information regarding the host server. This design allows
multiple smp_client_object to exist for the same underlying smp_udp
transport, making it much easier to use the same udp socket for multiple
OTAs.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
1. Add power-states for MCXN23x devices
2. Add power management related device nodes to MCXN23x,
including spc, cmc vbat, and wuu.
3. Add 'zephyr,cortex-m-idle-timer' node in frdm_mcxn236.dts
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
When a different VDD_CORE level is configured in low
power modes (LP_CFG register) compared to active modes
(ACTIVE_CFG register), the LPWKUP_DELAY register must
be configured to a minimum value.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The region sizes already match ones in nrf91xx_partition.dtsi,
and the overlay has not been adapted to the new partition DT updates.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Instead of relying on this board being the default.
Let's explicitly set it in the script.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In the console log, print out in which board the test failed, so it
is easier for developers, so they don't need to scroll up to the
beginning of the batch to see it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Allow passing some context to the shell bypass callback function by
providing a void pointer user data argument.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Update pic32cx_sg41_cult.yml to include DMA in the supported
features list.
Also enable the DMA controller node in pic32cx_sg41_cult.dts.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
Update pic32cx_sg61_cult.yml to include DMA in the supported
features list.
Also enable the DMA controller node in pic32cx_sg61_cult.dts.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
Add DT helper file for PIC32CX-SG family devices to support
SoC-specific device tree definitions and utilities.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
Remove nRF9160DK examples from Zephyr's cellular modem sample as
these use nRF91 as an external modem and the pin configuration
heavily depends on the build target.
Therefore we would like to host and document our own examples
within our own repository with the Serial Modem application.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Improve the logic for detecting counter wrap-around events when exiting
low power mode.
Add idle_timer_alarm_ticks variable to track alarm configuration at LPM
entry. Implement comprehensive wrap detection that considers:
- Counter overflow (pre > post)
- Alarm pending with same pre/post values
- Alarm pending when pre + alarm_ticks would exceed counter top value
This ensures accurate time calculation across all counter wrap scenarios
during low power mode transitions.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
- Add new hardware info driver for Microchip G1 series.
- Update Kconfig and CMakeLists.txt to support the new driver.
Signed-off-by: Farsin Nasar V A <farsin.nasarva@microchip.com>
- Added hwinfo node in the samd5xe5x.dtsi file.
- Added device tree binding file for Microchip HWINFO G1.
Signed-off-by: Farsin Nasar V A <farsin.nasarva@microchip.com>
The hwinfo driver should build inconditionally. It checks if the rstc
node is present and when CONFIG_HWINFO=y is selected by the user the
rstc information will be available. The fallback mechanism will provide
a weak implementation for all APIs that are not available.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The CMakeLists.txt file in the MTB HAL CAT1 module incorrectly appended
a '.c' extension to the source file reference for the 320 BGA pin package,
causing a build error.
Remove the extraneous '.c' extension to
correctly reference cyhal_xmc7200_320_bga.c.
Fixes#100523
Signed-off-by: Shreyas G Khanapur <ShreyasG.Khanapur@infineon.com>
Incorrect symbols were used for detecting nRF5340 Network-specific
reset reasons presence.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
Update documentation comments to reference the correct function name
'bt_a2dp_register_ep' instead of the outdated
'bt_a2dp_register_endpoint' in SBC endpoint macro descriptions.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Enable the CAP Commander role for the BT tester. This will
help pass some TMAP and GMAP tests that require the CAP
Commander to be enabled.
The actual implementation of the tests related to the
CAP commander is not implemented.
TMAP also requires that handover is supported if we
support both unicast and broadcast, so enable the config
for now. Support for the handover tests will follow in
a separate commit.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
If spi_sam_configure() is called with more than 4 chip selects the
current check fails even if the pins are used as gpios. The variable
spi_csr_idx already has the correct index to be checked and must be
used in this check.
Signed-off-by: Munawar Ali <ali@sofiha.de>
Signed-off-by: Axel Utech <utech@sofiha.de>
If the image is not confirmed, there is no need to pad the entire flash
slot with empty data. This reduces the size of
`tfm_s_zephyr_ns.signed.bin` (the file actually sent for an OTA upgrade)
from 100% of the slot size down to the size of the application.
Signed-off-by: Jordan Yates <jordan@embeint.com>
If CONFIG_WDT_DISABLE_AT_BOOT is not defined (i.e. WDT should be enabled
at boot), DISABLE_WDOG should be 0 (disabled).
Signed-off-by: Alexandre Rey <alx.rey@icloud.com>
If the event timer or free-run timer is close to expiration when
system enters idle with I2C target DMA mode enabled, the memory
and CPU clocks may become unsynchronized after wakeup. This
causes CPU to fetch incorrect data and eventually trigger SoC
watchdog timeout.
Due to this hardware limitation, SoC should skip entering idle
mode if the remaining timer value is less than 150µs(safe margin).
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Update segger with a change in SEGGER_RTT_Conf.h that allows to use
DT memory section for RTT data.
Added help section to SEGGER_RTT_SECTION_CUSTOM_DTS_REGION Kconfig
explaining what alias need to be added to DTS.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The accuracy field of lfocs lfxo is incorrectly parsed from the SVD
file. Instead of stripping the "ppm" from the value before converting
it to an int, we are taking only the first three digits. This works
for 500ppm, but not for 20ppm.
Patch to strip last three digits instead.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Where possible (i.e. not running in NS), erase the flash before testing the
write once secure storage API.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Returning `-ENOTSUP` (and logging a `LOG_ERR`) is not the correct
behaviour if there is no enable GPIO. The fact there was no work to do
does not make the result an error.
From the docs for `pm_device_runtime_get`
```
* @retval 0 If it succeeds. In case device runtime PM is not enabled or
* not available this function will be a no-op and will also return 0.
```
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add support for Nucoron NuMaker-M3334KI board
To run the test, check board overlay file for I2C wiring
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Complement #99761 that added register includes to too few files.
Fix build error for some boards using these SoCs.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Minimal changes to OV760 drive to use generic ov767x structures.
- This includes changes to function names.
- Includes changes to defines as necessary.
- Deleted camera_id as no longer required
Signed-off-by: Michael Smorto <CyberMerln@gmail.com>
Add two fixed-regulator nodes to model the load switches on the M5Stack
CoreS3 that control 5V output to the M-Bus/Grove connectors and the USB
VBUS line.
- `bus_out_reg`: controls the BUS_OUT 5V rail (BUS_OUT_EN).
- `usb_otg_reg`: controls USB VBUS output (USB_OTG_EN).
The BUS_OUT regulator is enabled by default to match the behavior of
existing M5Stack boards. USB_OTG remains disabled by default, since
ESP32-S3 does not currently support USB host mode.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
Add a `bus_5v` fixed-regulator node driven by the `BOOST_EN` pin. This
enables drivers and shields to reference the 5V supply through the standard
`vin-supply` property, providing correct power sequencing and runtime
control via Zephyr’s regulator API.
This regulator is equivalent to the `bus_5v` already defined on the M5Stack
Core2 board.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
This commit introduces a new comparison for the ARM (AArch32) architecture
in the GICv3 interrupt controller.
It specifically compares the lower 24 bits of the affinity values,
because there is no aff3 in AArch32 or Arm-v7.
Signed-off-by: Guowei Li <15035660024@163.com>
During the actual development process, it was discovered that the
controller/device' would describe the bus type in the binding. However,
when the two sides did not match, the generated process would not be
affected and there were no any prompts. This made it very difficult for
developers to identify the problem.
I've updated the implementation to:
1. Add a `warn_bus_mismatch` kwarg to `edtlib.EDT()` constructor
(default: False)
2. Add a `--warn-bus-mismatch` flag to gen_edt.py
3. Only show the warning when explicitly opted in
4. Add some checks in the edtlib. When the bus type of the node
does not match the binding requirements, provide some auxiliary
judgment information:
a. bus position of the node
b. available binding types
c. expected binding type.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Allows "egis_et171_spi" to use basic clock information
provided by the clock driver to calculate the runtime
SPI frequency.
Signed-off-by: Jacky Lee <jacky.lee@egistec.com>
The Cadence SPI controller has a hardware issue (Xilinx AR#65885
contains more details) where the RX_NOT_EMPTY (RNE) status bit
reports inconsistent state. This causes the driver to unreliably
detect when RX FIFO contains valid data, leading to transfer
failures and test hangs.
Signed-off-by: Srikanth Boyapally <srikanth.boyapally@amd.com>
Prevents a random occurance whereby sysbuild reconfigures itself
after a reconfiguration for no known discernable reason
Signed-off-by: Jamie McCrae <spam@helper3000.net>
We added Microchip MEC15xx, MEC172x, MEC174x, and MEC175x evalutaion
boards to the GPIO driver gpio_basic_api, gpio_api_1pin, and
gpio_get_direction tests.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
Microchip MEC parts have a similar GPIO peripheral block. We
create a unified driver for all parts. NOTE: MEC GPIO interrupt
detection sets active status when changed from interrupt detect
disabled to any enabled mode. Driver ISR and interrupt configuration
implementation includes work-arounds for this issue.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
Stores data to output in a temporary buffer and only outputs data
to a file if the data is different to the file's existing data
(assuming it exists). This prevents a random occurance whereby
sysbuild reconfigures itself after a reconfiguration for no known
discernable reason
Signed-off-by: Jamie McCrae <spam@helper3000.net>
The .ARM.extab and .ARM.exidx sections are now mapped under the
zephyr_rodata MMU region, ensuring they remain accessible at runtime.
These sections contain unwind information required for C++ exception
handling, so they must reside in readable memory.
Fixes#96070
Signed-off-by: Simon Maurer <mail@maurer.systems>
This commit fixes build issue when multi level interrupts feature
is enabled, define new macro TEST_1ST_LEVEL_INTERRUPTS_MAX to
support multi level interrupts case.
- error: array subscript 24 is above array bounds of 'volatile
uint32_t[16]' {aka 'volatile unsigned int[16]'}
[-Werror=array-bounds])
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Fix build issue when multi level interrupts is enabled,
define new macro TEST_1ST_LEVEL_INTERRUPTS_MAX to support multi
level interrupts case.
- core_cm33.h:2559:47: error: iteration 496 invokes undefined behavior
[-Werror=aggressive-loop-optimizations]
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Setting a prescaler of 256 would overflow the uint8_t.
Also get cycles calculation was wrong.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Currently, if the role is used like this: :zephyr_file:`blah <link>`
the regex for the link text group is greedy and captures "blah " (note
trailing space). This is incorrect and causes the link to render poorly.
Make regex non-greedy.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Instead of mirroring the ld linker script, the CMake Linker Generator for
ARM was placing the IDT_LIST region right after the Zephyr SRAM. While this
may work fine in most cases, this scheme leads to build errors on some SoCs
such as STM32WBxx, where there are multiple RAM banks that are contiguous
but split over multiple `zephyr,memory-region`s: in such scenarios, the
IDT_LIST region will overlap with one of these `zephyr,memory-region` and
cause a build failure.
Mimic the IDT_LIST placement found in ld linker script to avoid this issue,
except that the region start address is aligned: 0xFFFF8000 instead of
0xFFFF7FFF. This is required by `gen_isr_tables.py` which otherwise errors
out due to finding one more byte than expected in the .intList section.
(The exact reason is not clear, but aligning the region fixes the issue)
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
SOC_MKE16z4 and MKE15z4 (64kB, 48MHz) is now supported by DT
LPFLL clock option with proper frequency select
dts: nxp_ke1xz64.dtsi added.
Tested on board: frdm_ke16z
Signed-off-by: Michael Galda <michael.galda@nxp.com>
Signed-off-by: Hake Huang <hake.huang@nxp.com>
LPFLL (soc: scg: "lpfll_clk") clock source can be now selected
in KE1xz Device tree (nxp_ke1xz.dtsi., board.dts or overlay)
Tested on boards: frdm_ke15z, frdm_ke17z, frdm_ke17z512
Signed-off-by: Michael Galda <michael.galda@nxp.com>
Signed-off-by: Hake Huang <hake.huang@nxp.com>
TSI (Touch Sensing IP) is now supported by DT
for the Kinetis KE1x family
dts: nxp_ke1xz, nxp_ke17z and nxp_ke17z512.dtsi
Tested on freedom boards
Signed-off-by: Michael Galda <michael.galda@nxp.com>
Signed-off-by: Hake Huang <hake.huang@nxp.com>
add driver and dts-binding for kinetis_scg driver
used on ke1xz
Signed-off-by: Hake Huang <hake.huang@nxp.com>
Signed-off-by: Michael Galda <michael.galda@nxp.com>
In install timeout api, the cfg parameter does not make sense to cop, we
can ignore it rather than return an error code to keep forward
compatibility.
Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
The mcux_adc16 driver's read function fails to validate the user-provided
buffer size when `adc_sequence.options` are used (extra samplings).
The calculation erroneously considered only the size required for one
channel, neglecting the total number of channels in the sequence.
This leads to a **buffer overflow** when reading multiple channels.
Fix this by using `POPCOUNT(sequence->channels)` to determine the
correct channel count and ensure the buffer size is sufficient.
Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
The zc143ac72mipi panel can only accept update area
that has even size and coordinates, so the panel
driver was updated to maintain a buffer to collect
all dirty areas. This buffer shall have address and
pitch alignments which compliant to the board's display
driver's requirement, and can be placed outside of ram.
Update the board specific overlay to add such configurations.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
1. Fix wrong backlight pin in driver overlay
2. Remove the power-on pin configuration in code and binding, and
add mipi display panel regulator in panel overlay instead. Set
regulator-boot-on' to true means the power-on pin will be enabled
uring system boot.
3. Remove 'last_known_framebuffer' from panel data structure. It is
not used anywhere
4. Fix bug in 'co5300_set_pixel_format' function.
5. Fix the issue that the panel does not support start coordinates
and the width/height of the updated area being odd value.
Solution: In panel driver, maintain a full screen-sized buffer,
its address and pitch alignment is configurable in device tree
and shall be compliant with the display controller's requirements.
It can be placed in RAM or if the RAM space is not enough it can
also be placed in other memory resion. When there is a frame
update request, the updated area will be first filled to the
buffer, if the area's size or coordinate is odd, adjust the value
so the real updated area covers the requested updated area, then
use this buffer to send pixel to panel, this can ensure the
updated area's size and coordinate are always even.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
The mimxrt700_evk uses DC8000 to drive panel which requires a 64
byte align of buffer address and stride.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
If the stack is in ITCM, DTCM, or FlexRAM OCRAM, flexram_dt_partition()
may change its contents. The comment on flexram_dt_partition()
acknowledges that, stating that it's inlined because it "cannot use
[the] stack". But we currently call SystemInit(), which is not inlined
and does use the stack, prior to flexram_dt_partition()! Fix that issue
by reordering the calls.
It seems to me that flexram_dt_partition() would be safer as a
soc_early_reset_hook implemented in assembly, but this fix does work for
the moment. Tested on an i.MX RT1061, with the stack in FlexRAM OCRAM
and entering Zephyr with all FlexRAM allocated to ITCM and DTCM.
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
If the stack is in ITCM, DTCM, or FlexRAM OCRAM, flexram_dt_partition()
may change its contents. The comment on flexram_dt_partition()
acknowledges that, stating that it's inlined because it "cannot use
[the] stack". But we currently call SystemInit(), which is not inlined
and does use the stack, prior to flexram_dt_partition()! Fix that issue
by reordering the calls.
It seems to me that flexram_dt_partition() would be safer as a
soc_early_reset_hook implemented in assembly, but this fix does work for
the moment. Tested on an i.MX RT1061, with the stack in FlexRAM OCRAM
and entering Zephyr with all FlexRAM allocated to ITCM and DTCM.
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
The irq_lock area including net_pkt_rx_alloc_with_buffer() was causing
error "Context switching while holding lock!".
Actually we didn't have any hardware access to protect in netc_eth_rx,
so just removed irq_lock.
Fixes#99694
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
For stm32h7 the order matters to get the pwm to output the values as
expected. As reported for the the H730 doesn't produce PWM output when
the LL_TIM_OC_SetDeadTime is called after LL_TIM_EnableAllOutputs. So,
switch the order of the calls and this doesn't impact the stm32f413zh
boards.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
Add a config for the nrf52840dongle to use the CDC_ACM interface
for the ot_uart. Without this building the OpenThread coprocessor
fails to build when using the nrf52840 dongle because the UART
isn't defined so fix it.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
This enables building the UART shell alongside with the UART
backend test. The UART shell source file was not built in CI
before this, so this will provide build coverage.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Extend the number of SPI data sizes supported for series that allow it.
The driver uses the new property st,stm32-data-width to create a table
with all compatible data widths and to check if the SPI instance
support the required width (some instances may have a limited set
of widths compared to others on the same SoC).
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Inverts ll_func_spi_dma_busy logic so that the function returns true if
the SPI DMA is busy (as suggested by the name) instead of the other way
around.
Also completes the check for H7-compatible with the LL_SPI_IsActiveFlag_EOT
function when transfer size is set.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Adds a new property for STM32 SPI bindings to indicate which data widths
are supported by each SPI instance.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
The xmc47_relax_kit i2c driver is incorrectly using the
I2C_SPEED_STANDARD macro to set the clock frequency. The correct macro
to use is XMC4_I2C_SPEED_STANDARD which is defined by the XMC4 driver.
Signed-off-by: Yassine Safraoui <yassine.safraoui@grenoble-inp.org>
Increase CONFIG_SPI_IDEAL_TRANSFER_DURATION_SCALING to
compensate for the additional burst size calculation in
the SPI driver, which slightly increases transfer time.
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
Guard callback registration with CONFIG_SPI_ASYNC to avoid
build error for blocking SPI transfers using DMA
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
Swap the write and read data paths within the GSPI controller to ensure
correct data is seen on the SPI lines during 16-bit transfers.
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
Updated mosi_overrun alignment from 4 bytes to 32 bytes to
ensure compatibility with the GPDMA driver. This prevents
alignment-related errors during DMA transfers.
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
Enable higher SPI burst sizes when using GPDMA to improve throughput.
Bursts are only enabled when both TX and RX channels use GPDMA and
the SPI clock frequency is at least 10 MHz, as DMA flow control is
unreliable at lower SPI rates.
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
Add gspi_siwx91x_pick_lower_freq() to select the nearest lower
supported GSPI clock frequency based on the requested value.
The GSPI clock can operate only at discrete frequencies such as
80 MHz, 40 MHz, 26.6 MHz, 20 MHz, and so on (80 MHz divided by
integer factors). If the requested frequency does not match one
of these valid steps, it is rounded down to the nearest lower
supported frequency.
The driver now logs both the requested and the actual programmed
frequency along with the divider value, helping users verify the
effective SPI clock configuration.
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
The GSPI and QSPI peripherals run on the interface PLL clock.
To ensure correct operation, the interface PLL frequency should
be set to 160 MHz. This provides a base clock of 80 MHz to the
QSPI peripheral, which matches its required operating frequency.
The GSPI peripheral can continue to operate at higher frequencies
as it receives the full interface PLL clock.
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
Wait a bit before performing timed spi_loopback_transceive() in
test_spi_complete_multiple_timed to ensure the console is idle,
otherwise the console completing and suspending in the "background"
near the end of the spi transaction can introduce latency.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Update some header files with nested COND_CODE_1 macros to use a single
COND_CASE_1 macro instead.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Update the gpio_basic_api test to support device runtime
power management. This ensures the test runs correctly when
runtime PM is enabled on GPIO devices.
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
The existing device runtime PM model requires applications to call
pm_device_runtime_get()/put() on the GPIO controller device directly,
which is not ideal when GPIO ports are exposed as child nodes.
This update enables runtime PM at the GPIO port (child node) level,
allowing applications to manage power through the port devices instead
of the top-level controller.
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
This patch introduce multiple silabs boards overlay that are needed to
test different ip version of the peripheral.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Without this clock definition, you will get compilation error
when using acmp device on board that use xg21 SoC.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Add `get_calibration` and `set_calibration` subcommands to allow users
to read and modify the RTC calibration settings from the shell.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Adds a new sub-group to nRF platforms, specifically for board
files, and add myself to this sub-group as a collaborator
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Generate PERIPHCONF SPU/CTRLSEL entries based on pinctrl properties
on the local domain peripherals as well as the global ones.
This fixes an issue where the required pin configuration was not
generated for the pinctrls on the radio local domain GPIOTE0 on
nrf54h20.
The secure attribute of nodes without an address and without a bus node
are now interpreted as being secure by default, instead of failing with
an error. This prevents the parsing of certain nodes from triggering
failing the build (in particular the 'ieee802154' node in
cpurad_peripherals).
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Update migration guide for HL78xx Kconfig option renames and startup
time changes. Add release notes for new AT Shell and AirVantage FOTA
support.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
The previous delay could cause missed URCs because the pipe and chat
layer were not yet attached when the modem started sending its first
messages (+KSUP). The modem boot takes ~1.8s, while the driver only
needs ~120ms to set up the interfaces, so reducing the delay ensures
the receiver is ready before the modem outputs any URCs.
Increase hl78xx_init_chat_script command limit from 10 to 100 to allow
longer initialization sequences.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
This update refactors the HL78xx initialization and runtime state
machine to provide robust handling of unexpected modem restarts
and improve PDP and boot status management.
Key changes:
- Add KSUP unsolicited response to the global chat match table
so modem boot status is monitored independently from the
initialization script.
- Introduce a boot-status structure tracking previous boot state
to detect unexpected restarts.
- Dispatch a new MODEM_HL78XX_EVENT_MDM_RESTART event when the
modem reports a READY status after having been previously
booted.
- Add restart-handling transitions across relevant states
(await-power-on, RAT-config, await-registered, carrier-on) to
ensure the driver cleanly re-enters the initialization
sequence.
- Rework init and post-restart script entry points to run
asynchronously via hl78xx_run_init_script_async() and
hl78xx_run_post_restart_script_async().
- Move bus-open and chat-attach operations out of the
init-script state and into the await-power-on state for
clearer separation of responsibilities.
- Expose a getter for the AT-ready match structure.
These changes improve resilience during modem restarts, clarify
the state machine flow, and prepare the driver for multi-PDP-
context configurations.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Fix several issues in GSM mode for the HL78xx modem driver to
ensure correct registration reporting, RAT handling, and PDP
context activation.
Changes include:
- Skip band configuration when RAT=GSM to prevent +CME ERROR
responses.
- Explicit PDP activation (AT+CGACT=1,1) for GSM data sessions.
- Parse +CGACT URCs and track PDP activation state internally.
- Introduce gprs status struct and update initialization
scripts to handle GSM reliably.
- Add helper functions and chat scripts to manage GSM
registration and PDP flow.
- Correct GSM registration-status handling: enable CREG=3 and
disable unused CEREG.
- Dynamically switch between CREG (GSM) and CEREG (LTE/NB-IoT)
based on active RAT.
These changes improve driver stability and ensure reliable data
and registration behavior on GSM networks.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
This patch applies multiple small cleanups across the HL78xx modem
driver, improving readability, consistency, and diagnostics without
changing logic.
Key changes:
- Added missing blank lines in Kconfig sections for readability.
- Improved several log messages for clarity and guidance to users.
- Added a debug log when RAT/Band configuration requires a modem restart.
- Replaced an incorrect SET_RAT_GMS_CMD macro name with SET_RAT_GSM_CMD.
- Added TODO marker for unhandled script failure case.
- Corrected log format string in event handler to include event ID.
- Added an informational log on modem initialization.
- Added clarifying comments in header structures and APN lookup path.
- Normalized #endif comment style throughout the driver.
- Fixed use of CME_ERROR_STRING in chat match definitions.
- Applied formatting hints (clang-format off/on) around multi-line
MODEM_CHAT_MATCHES blocks.
- Improved enum documentation in public API header.
These changes improve maintainability and developer usability without
modifying driver behavior.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
In current implementation, the useless for loop is called in function
`_wait_for_shell_response()` if the target message has been found. It
causes the case will consume too much time.
Exit the useless for loop to reduce the time consumption when the
target message is found.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
In current implementation, the useless for loop is called in function
`_wait_for_shell_response()` if the target message has been found. It
causes the case will consume too much time.
Exit the useless for loop to reduce the time consumption when the
target message is found.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Preprocessor evaluates CYC_PER_TICK as zero in condition
`(COUNTER_MAX / CYC_PER_TICK) == 1` when
CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME is defined.
This commit skips the check when
CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME is defined.
Fixes: #100040
Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
moves the fixed link functionality of the
generic ethernet phy into its own driver.
This makes both drivers more readable and
efficient.
Also makes it easier to use the normal generic
phy as a base for a vendor specific driver, as
the fixed link functionality is not needed on
them.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
sockaddr_un.sun_path is limited to 108 in Linux
(and to similarly small numbers in other systems).
Let's check that it fits before copying it, and error out otherwise
(the user won't be able to connect to that socket if the path
is truncated, and if we overflow we will just corrupt memory).
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add configuration for nrf9160dk/nrf9160/ns and
nrf5340dk/nrf5340/cpuapp/ns targets.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Some STM32 SPI have the ability to bypass the baudrate prescaler, which is
equivalent to having a prescaler of 1.
Adds this new value in the prescaler calculation if available.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
The CHSC5X chip requires reads to be aligned to multiples of 4 bytes.
If the read length is not a multiple of 4, the device pulls SDA/SCL low
for about 140 ms. The IC_TYPE address is corrected to 0x80.
Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
Improve GPPI documenation and fixes for bsim support in PPI
implementation of GPPI helper.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Providing a guide on how to setup an Ubuntu24.04 x86_64 host
for arm builds and how to build and run locally the arm binary.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Support cross-compiling from one Linux host for another Linux target.
This is done by allowing users to set NATIVE_TARGET_HOST for cmake
which will override the automatic detection.
At the same time, add support for building for 32bit arm targets.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This check is meant to be easier on users so they do not need to bother
setting ZEPHYR_TOOLCHAIN_VARIANT to "host" when building for
native_simulator based targets, so we default in that case to it.
But when somebody has actively set it to "cross-compile" we should not
override it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Merge the GEN_ABSOLUTE* macros for architectures which have
the same assembler.
Add support for building the POSIX architecture for armhf targets.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
drivers/crypto/crypto_mbedtls_shim.c:310:3: error: label followed by a
declaration is a C23 extension [-Werror,-Wc23-extensions]
uint16_t tag_len = ctx->mode_params.ccm_info.tag_len;
^
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
The lfclk was left enabled by mistake, it has status disabled
followed by status okay a few lines down. Remove the spurious
status = "okay";
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The global variable ipi_lock is both local to the file ipi.c and
only used when CONFIG_SCHED_IPI_SUPPORTED is enabled. As such its
definition should be wrapped with an ifdef.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Explcitly zero the flags of the SQE obtained from `rtio_sqe_acquire`
when the `rtio_sqe_prep_*` helpers aren't used (the helpers memset the
entire struct to 0).
The flags must be reset to ensure the `RTIO_SQE_TRANSACTION` and
`RTIO_SQE_CHAINED` are not retained from a previous SQE.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Introduce steps to maintain cache coherence around DMA accesses to the
underlying SD / eMMC storage.
Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
Remove the manual encoding of edata->header.channels and
edata->header.timestamp as these are now handled during rm3100_encode()
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
Use rm3100_encode() to populate cycle_count info when
configured in streaming mode.
Previously when configured for streaming, cycle_count would
be 0 and rm3100_convert_raw_to_q31 would default to always
use the 600hz divider resulting in values off by a factor of 2.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
The scale factor when used as a divider from the datasheet specifies
units in LSB/uT not uT/LSB. This change corrects the comment to reflect
the correct units for the divider.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
msx-gpios is now replaced with m0/m1-gpios for adi,tmc2209 in order
to be consistent with other step/dir drivers
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
unify msx-gpios for step-dir drivers. tmc2209 is an exception
for now and hence migrating to m0/m1-gpios instead of msx-gpios.
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Add a Kconfig option to tweak the i2c shell command buffer size,
similarly to other shell commands.
This is allocated on the stack so add a note about it.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
When MOPL exceeds MTU, adjust it to match MTU instead of failing the
connection. This handles the common case where mainstream mobile
operating systems (iPhone and Android) negotiate
MOPL values greater than the RFCOMM or L2CAP MTU.
Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
FRDM/RD RW612 overlays are updated to provide explicit AHB RX buffer
configuration for the FlexSPI controller, aligning with RW61x features:
- FlexSPI flash (port A): 32 KiB cache, dynamic decryption, XIP, DMA
- FlexSPI pSRAM (port B): 32 KiB cache, dynamic decryption, XIP, DMA
The rx-buffer-config now assigns a dedicated buffer for the primary
CPU traffic and leaves buffer 7 as the generic fallback, matching the
expected cache/DMA behavior and MCUX SDK defaults. This ensures sane
defaults when PSRAM is enabled without requiring users to patch AHB
buffer settings manually.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Originally, function 'mcux_lptmr_get_pending_int' checks if both
TCF and TIE flags are set to determine if an interrupt is pending.
But function 'LPTMR_GetStatusFlags' only returns the status flags,
that is we will never get TIE flag from it. then the function
always returns false.
The correct approach is to read the CSR register directly and check
if both TIE and TCF bits are 1. If yes, there's a pending interrupt;
if not, there isn't.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Test the implementation of `PDM_DT_IO_CFG_GET`. Implemented as a
distinct test from `dmic_api` to allow running natively in CI.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add a macro to construct a `struct pdm_io_cfg` instance from the
devicetree node with the appropriate properties.
Add macros to query which PDM channels are available.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The allowable ranges for the clock frequency and duty cycle, together
with the enabled channels, are hardware configuration parameters that
should be described in devicetree.
`pdm-dmic.yaml` is its own file to allow more complicated hardware
configurations to inherit it.
Signed-off-by: Jordan Yates <jordan@embeint.com>
When CMUX channels are closed, UART goes back to AT command mode.
Switch Chat pipe to use the plain UART as DLCI2 pipe does not
exist anymore.
Add a small delay, so the remote end have time to clean up and
go back to normal AT command mode.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Configure the alignment of the data buffers based on the
dma_buf_addr_alignment property. Default to 32 if property isn't set.
Signed-off-by: Alex Apostolu <aapostolu@tenstorrent.com>
In the `airoc_mgmt_connect` function, if the user provides a security
type of `WIFI_SECURITY_TYPE_NONE` along with a PSK, the driver attempts
to scan for the AP to determine the correct security protocol.
However, if this scan fails or does not find the AP, the driver would
previously fail the connection attempt instead of using the security
type originally provided by the user.
This change ensures that if the scan does not resolve the security
type (`WHD_SECURITY_UNKNOWN`), the driver falls back to using the
security type from the connection parameters. This makes the connection
process more robust and resilient to scan failures.
Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
Since caching is enabled before z_data_copy(), RAM
functions may still be cached in the d-cache instead
of being written to SRAM. In this case, the i-cache
will fetch the wrong content from SRAM. Thus, using
"fence.i" to fix it.
Signed-off-by: Jacky Lee <jacky.lee@egistec.com>
Remove the default configuration FLASH_LOAD_SIZE, because
"linker.ld" will automatically configure FLASH_LOAD_SIZE
to the same default value
Signed-off-by: Jacky Lee <jacky.lee@egistec.com>
The -Wno-stringop-overflow flag is specific to GCC and causes issues
with other compilers like Clang. Separate the compiler options so that
the warning suppression flag is only applied when using GCC.
This change wraps the -Wno-stringop-overflow flag in a compiler ID
check while keeping the optimization flags (-O3 -std=c11 -ffast-math)
applied for all compilers.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Add RTC node in sam_e54_xpro.dts
Update sam_e54_xpro.yaml to reflect RTC G1 support on the board.
Signed-off-by: farsin NASAR V A <farsin.nasarva@microchip.com>
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>
move sbc to bluetooth because only bluetooth uses it,
change CONFIG_LIBSBC_ENCODER and CONFIG_LIBSBC_DECODER as CONFIG_LIBSBC.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Remove `-Wno-array-bounds` as there does not seem to be any issues
that require it anymore.
Add -Wno-stringop-overflow to avoid what seem like false positive
warnings with gcc 13.3.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
This commit introduces a suite of unit tests for the `pmp_decode_region`
function using the Ztest framework. The tests validate the correct
calculation of start and end addresses for various RISC-V PMP
(Physical Memory Protection) entry configurations.
The following scenarios are covered:
- TOR (Top of Range) mode for index 0.
- TOR (Top of Range) mode for index > 0.
- NA4 (Naturally Aligned Four-byte) mode.
- NAPOT (Naturally Aligned Power-of-Two) mode.
- Default behavior for a disabled PMP entry.
These tests ensure the PMP region decoding logic is accurate across
different addressing modes.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Adds the pinctrl node and encapsulates the port nodes within
the pinctrl node for pic32cz ca series of socs, and updates
the binding file
Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
When working on CMUX power saving, it is typical
that we end up closing the pipe before the last
RX_READY event is handled from workqueue, so we end up
receiving -EPERM which is not really a fatal error.
Pipes recover when they are re-opened. So drop this error
and return zero instead, like modem_pipe_open() and close() does.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Instead of copying all fields from cmux_config into run-time
struct cmux, just have the configuration structure as a member.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add documentation and state machine diagrams for CMUX power saving
feature and how to use it with Zephyr.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Use ring indicator to wake up the CMUX device
from sleep.
Only used for runtime power management, but same event
could be used for initiating idle -> connected as well.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Ringbuffer is not safe in ISR but k_pipe without waiting is.
So use pipe for events, so that possible GPIO callbacks from
ISR content can post events.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
CMUX driver can enable the support for idle-timer in
devicetree and can be requested to shut down the pipe
during sleep.
Then UART backend put the actual device into sleep when
pipe is closed.
Waking up is requested by sending data to DLC pipe
or by manually opening the uart_pipe.
Modem may request similar wake-up by a RING interrupt which
would open the same pipe.
When UART is powered and pipe is not closed, CMUX wake-up
procedure is automatic. Either end may initiate the wake-up.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Signal powersaving mode for the remote end using PSC command.
Wakes up the remote end from powersaving mode by sending flag characters.
This method is defined in 3GPP TS 27.010.
Sections 5.4.6.3.2 Power Saving Control (PSC) and
5.4.7 Power Control and Wake-up Mechanisms.
Essentially it is one PSC command to indicate a sleep state, and
then repeated flag characters to wake up the remote end or indicate
that we have been woken up.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add eim, erm and edac instance for frdm_mcxa153, frdm_mcxn236,
frdm_mcxn947, frdm_mcxe247 and frdm_mcxe31b.
Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
Add edac driver for NXP's ERM and EIM peripherals. It can inject ECC
error to specific channel within EIM and then report the error address,
syndrome and count within ERM.
Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
Added mchp_v1_subsys.h and sam_e54_xpro.overlay file and .conf file
Added Added sam_e54_xpro platform allow in testcase.yaml
Signed-off-by: farsin NASAR V A <farsin.nasarva@microchip.com>
The burst length unit is bytes, not number of transfers. This had not been
an issue since the DMA driver historically ignored the values, but has now
become one since they are used and (most importantly for us) validated.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The burst length unit is bytes, not number of transfers. This had not been
an issue since the DMA driver historically ignored the values, but has now
become one since they are used and (most importantly for us) validated.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The burst length unit is bytes, not number of transfers. This had not been
an issue since the DMA driver historically ignored the values, but has now
become one since they are used and (most importantly for us) validated.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The burst length unit is bytes, not number of transfers. This had not been
an issue since the DMA driver historically ignored the values, but has now
become one since they are used and (most importantly for us) validated.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The burst length unit is bytes, not number of transfers. This had not been
an issue since the DMA driver historically ignored the values, but has now
become one since they are used and (most importantly for us) validated.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The burst length unit is bytes, not number of transfers. This had not been
an issue since the DMA driver historically ignored the values, but has now
become one since they are used and (most importantly for us) validated.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The burst length unit is bytes, not number of transfers. This had not been
an issue since the DMA driver historically ignored the values, but has now
become one since they are used and (most importantly for us) validated.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The burst length unit is bytes, not number of transfers. This had not been
an issue since the DMA driver historically ignored the values, but has now
become one since they are used and (most importantly for us) validated.
Fixes broken 16-bit on STM32N6 series.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The range check should be inclusive: scale 4 allows *up to* 25 MHz, scale 3
*up to* 55 MHz, etc.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add support for the new `voltage-scale` property on the STM32U5-specific
Power Controller binding.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add the "st,stm32u5-pwr" compatible to the Power Controller node in the
DTSI for STM32U5 series.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
nrfx_power_constlat API returns negative value if
the requested action has no effect, which is expected
in cases of multiple requests/releases. Align nrf_sys_event
to not treat it as an error.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Instead of returning a converted ADC reading, return the
raw ADC sample. Conversion is left to the user based on
the selected ADC mode (single-ended or differential).
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
The Siwx91x ADC reference voltage is configurable rather than fixed.
Expose `ref_internal` in the device API so the driver can retrieve the
reference voltage from the device tree instead of assuming a constant
value.
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
Please note that when performing conversions,
the selected channels must all be of the same type
(either ADC raw or V2T.)
Mixing ADC and V2T channels in a single conversion sequence is
not supported.
Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
This commit corrects board configuration to enable the memory controller
and set proper initialization priorities, ensuring PSRAM is correctly
initialized during system startup.
Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
The TLS cipher RSA3K ciphersuites ECDHE-RSA-AES256-GCM-SHA384 and
DHE-RSA-AES256-GCM-SHA384 only support TLS1.2, but TLS1.3 enabled,
version check failed in ssl_tls13_validate_peer_ciphersuite
during parse client hello.
Disable TLS1.3 for TLS cipher RSA3K to fix this issue.
Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
Updates the spawn_threads() sleep_sec parameter name to sleep_msec
to more accurately reflect the units of measurement.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Fixes the max3421e devicetree compatible to follow the convention of
using a hyphen rather than an underscore as the word separator.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Some but not all LOG_OUTPUT_ format flags were Kconfigurable
for log backends using log_backend_std_get_flags()
Adding the missing configurable flags to Kconfig and referencing
them in log_backend_std_get_flags() for full control of output:
- CRLF_NONE
- CRLF_LFONLY
- SKIP_SOURCE
FORMAT_SYSLOG was omitted b/c it is specific to NET log backend.
Signed-off-by: Nicholas Lowell <Nicholas.Lowell@lexmark.com>
Many dts/dtsi files where its dt-bindings are in-tree
do not include zephyr prefix in the #include path.
Add it to make it consistent globally.
Some dt-bindings that resides in hal can not be changed.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Enable instruction cache support for LPC55S36 SoC:
- Select CPU_HAS_ICACHE and HAS_MCUX_SYSCON_LPCAC
- Enable CACHE_MANAGEMENT and EXTERNAL_CACHE by default
- Set ICACHE_LINE_SIZE to 256 bytes
This enables the SYSCON LPCAC cache driver for improved
performance on the LPC55S36 SoC.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
add cache driver for NXP SYSCON LPCAC controller,
this driver provides instruction cache management
with enable/disable and invalidation support.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
This patch put in the same place the default value for
SYS_CLOCK_TICKS_PER_SEC. It also apply the sleeptimer clock frequency
when sleeptimer is used for sys clock.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This patch introduce configuration of the symbol
'SYS_CLOCK_HW_CYCLES_PER_SEC' with dts entry rather than a hardcoded
value.
Clock control on siwx91x needs to use the clock frequency of the cpu
to init rather than the 'SYS_CLOCK_HW_CYCLES_PER_SEC' symbol,
otherwise we initialize the m4 clock with the ULP ref clock.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Add wrapper function for XEN_DOMCTL_deassign_device hypercall to
support deassigning device tree devices from guest domains.
Signed-off-by: Damjan Belavic <damjan_belavic@epam.com>
If the WPA3 is disabled in the build handle gracefully rather than
cryptic supplicant internal messages.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
In case WPA3 is disabled in the config but auto security is used, the
wifi status shows security as "Unknown".
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
There is no point benchmarking on the posix architecture, and
how the test is now it just hungs. So let's filter it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
To enhance throughput performance on the SiWx91x series, Added
some Siwx91x configurations by deafult.
Signed-off-by: Rahul Gurram <rahul.gurram@silabs.com>
Extend the functionality to limit the number of stack bytes
included in the core dump by allowing the limit to be
different for the current thread and remaining threads.
This is useful because it is more likely that we need more
call frames of the thread that was running when the
exception occurred than of the other threads in order to
analyze the exception.
Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
Rephrase the file header to make sure these dependencies cannot be
misinterpreted as standalone.
The doc requirements were standalone in January 2021 as demonstrated by
commit e21ffe6baa ("requirements-doc: add PyYAML which removes
dependency on -base") and were most likely tested as standalone by CI
until January 2025 when commit b6922c83a8 ("ci: doc: add
action-zephyr-setup") added a Zephyr setup step to
`.github/workflows/doc-build.yml`
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The current configuration of the touch controller node inverts the x and
y axes, which doesn't match the current display configuration in the
ili9488_buydisplay_3_5_tft_touch_arduino node, ie. pointing to the
right/bottom side of the screen registers a touch in the left/top side.
Fix it by removing the inverted-x and inverted-y properties.
Signed-off-by: Ricardo Cañuelo Navarro <rcn@igalia.com>
Fixes the dereferencing of a NULL pointer when interrupts of an
input device happen early in the application.
Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
GPPI initialization shall be executed as early as possible.
Add _ prefix to the initialization function to reduce chances that
other function calls uninitialized GPPI.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Fix assertion failure when buf_rx_freed_notify() is called from ISR
by replacing k_sched_lock with atomic_ptr operations for callback
pointer access.
The scheduler lock is retained during callback execution in thread
context to maintain backward compatibility, but is skipped in ISR
context where it's not available.
Updated documentation to clarify the behavior difference between
thread and ISR contexts.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
According to API docs, wdt_disable() should return
EFAULT when called too early. Adjusted driver.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Verify that the interface is in operational UP state before attempting
to send the packet with net_send_data() / net_try_send_data().
So far there's only been an NET_IF_LOWER_UP check in a lower level
function, net_if_try_send_data(), however that didn't work well with
interface like Wi-Fi, whouch could have carrier state set to ON, but
was still not associated with the network (so the interface was no
operational UP). Protocols like ICMP or DHCP, which use net_send_data()
directly, should not be able to send packets in such case.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
TDM peripheral requires TXD.MAXCNT and RXD.MAXCNT registers to be:
- multiple of 4 bytes
- larger than 8 bytes
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Since the number of function arguments grows out of hand, place them into
structs and pass a struct to the method instead.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Adds `SDL_DISPLAY_ROUNDED_MASK` and `SDL_DISPLAY_ROUNDED_MASK_COLOR`
Kconfig options to mask a elliptical area of the display. This is useful
for prototyping alignments for rounded displays.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Now that the STM32CubeProgrammer runner supports the standard `--dev-id`
argument, replace usage of `--tool-opt` in the Twister device handler code.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Now that the STM32CubeProgrammer runner supports the standard `--dev-id`
argument, replace usage of `--tool-opt` in the pytest harness hardware
adapter.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add support for the standard `--dev-id` argument used to select
target ST-Link debug probe based on serial number. Note that this
could already be achieved using custom argument `--conn-modifiers`.
(`--dev-id <XXX>` is equivalent to `--conn-modifiers sn=<XXX>`)
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Silence CI warning caused by line "from . import ZEPHYR_BASE". This is a
legitimate pattern, but pylint seems unable to deduce so. Many other
scripts perform a similar silencing.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Properties in bclk nodes were defined after the bclkout subnode,
disk subnode was defined before properties in a few boards DTS files
which violates the Devicetree Specification v0.4, section 6.3:
"Nodes may contain property definitions and/or child node definitions.
If both are present, properties shall come before child nodes."
This caused the Device Tree Compiler error:
"Properties must precede subnodes. Unable to parse input tree"
This commit moves nested nodes after properties,
fixing the syntax error and ensuring compliance with
the Devicetree Specification.
Signed-off-by: Stanislav Bobokalo <stanislav.b@embedd.it>
Added dts binding for Nordic Tamper Controller with
property to configure SWD pins as GPIOs.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
When SHA is activated in the DT, configure it's register region with
strong ordered, read and write access.
Signed-off-by: Tony Han <tony.han@microchip.com>
The macro SETTINGS_STATIC_HANDLER_DEFINE did not have a docstring alghough
it's used in-tree more than the documented
SETTINGS_STATIC_HANDLER_DEFINE_WITH_CPRIO.
Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
Use the same docstring style throughout the public header. Prefer to
have struct field documentation above the field definition instead of
placing it after using "/**<". Also use the doxygen special commands for
documenting function parameters and return values.
Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
Enable ARM Trusted Firmware support for Versal NET APU board with
platform-specific optimizations.
Changes:
- Add TF-A platform configuration (PLAT=versal_net)
- Configure board-specific TF-A parameters (TFA_NO_PM, PRELOADED_BL33_BASE)
- Add automatic TF-A module selection in Kconfig
- Update QEMU kernel loading to use TF-A bl31.elf
- Modified data address configuration to match QEMU implementation
The board now automatically builds ARM Trusted Firmware during Zephyr
application compilation with Versal NET specific optimizations.
Boot flow: Boot PDI -> TF-A -> Zephyr
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
Enhance the TF-A build system to support board-specific build parameters
through TFA_EXTRA_ARGS mechanism.
Changes:
- Add TFA_EXTRA_ARGS variable support for board-specific parameters
- Implement proper string-to-list conversion for make argument expansion
This allows individual board configurations to specify platform-specific
TF-A build parameters without modifying the core TF-A build logic.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
Do not generate a compliance error when referring to generated Kconfig
symbols from Devicetree.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Commit fixes the issue when lpn device relays
broad- and group cast messages received over
friendship queue. This is specification violation,
see Table 3.13: Network layer Network PDU retransmission
requirements. Also, it does not have sense since
sending messages have already happened and lpn
just consumes extra power to retransmit useless data.
In general, lpn device will be more power efficient after
this fix.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Only modify the definitions that need to be changed in the pinmux register;
SR/IS will retain their default values after reset.
Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
- Add sifli and analog definitions
- Modify the drive-strength definition to use the original register
definition instead of the physical current value, as different I/O
pins may have different definitions
Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
This commit fixes build issue when multi level interrupts is enabled,
define TEST_IRQ_NUM as (CONFIG_2ND_LVL_ISR_TBL_OFFSET - 1)
- CMSIS/Core/Include/core_cm33.h:2438:15: error: array subscript 24
is above array bounds of volatile uint32_t[16]
Signed-off-by: Biwen Li <biwen.li@nxp.com>
LPTMR is a commonly used wake-up source for many NXP MCUs and
may be used as the companion low-power timer for the Cortex-M
systick. This commit enabled LPTMR set and cancel ALARM functions.
Enabling single-shot alarm support requires reprogramming
the hardware compare register (COMPARE/CMR), which is the same
resource used for the periodic TOP callback. Because of this
hardware limitation, we added Kconfig 'CONFIG_COUNTER_MCUX_LPTMR_ALARM'
to select whether alarm support is enabled. When alarm support is
enabled the driver will not allow support set TOP operation at runtime
(attempts to set TOP will return -ENOTSUP); When alarm support is
disabled the driver will not allow set and cancel ALARM operation
at runtime (attempts to set and cancel ALARM will return -ENOTSUP).
Choose the configuration that matches your application's requirements.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
PTS may send absolute volume values with bit 7 set, which exceed the
valid range. Instead of rejecting these values, mask the invalid bit
to ensure compatibility.
Signed-off-by: Make Shi <make.shi@nxp.com>
Added a check in the vendor dependent handler to ensure the PDU ID
matches supported command handlers. If the PDU ID or command type
is invalid, respond with BT_AVRCP_STATUS_INVALID_COMMAND.
Signed-off-by: Make Shi <make.shi@nxp.com>
Add the functions below to the minimal libc ctype.h since they are
missing, and are required as of C89 (C99 for `isblank()`)
* `isblank()`
* `islower()`
* `ispunct()`
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
A review comment in the PR below requested that unnecessary casts were
removed from ctype.h in the PR below.
https://github.com/zephyrproject-rtos/zephyr/pull/99451
Tested with manual compilation in C and C++ mode with the arguments
```shell
gcc -Wconversion -Werror -Wall -Wextra -Wint-conversion
clang -Wconversion -Werror -Wall -Wextra -Wint-conversion
gcc -Wconversion -Werror -Wall -Wimplicit--Wextra
clang++ -Wconversion -Werror -Wall -Wextra
```
and also with `-- -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y`
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Based on review feedback, it was suggested to express ctype
character checks in a more direct fashion, rather than using
arithmetic, and allow the compiler to optimize as it sees fit.
https://github.com/zephyrproject-rtos/zephyr/pull/99451#\
discussion_r2530339430
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The "check warns" workflow in CI warned over the use of `unsigned` as a
shorthand for `unsigned int` in several locations in
`lib/libc/minimal/include/ctype.h`.
```
UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
File:lib/libc/minimal/include/ctype.h
```
Adjust `unsigned` to `unsigned int` to avoid linter warnings.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Select CPU_HAS_ICACHE and HAS_MCUX_LMEM_CACHE.
Default CACHE_MANAGEMENT=y and select EXTERNAL_CACHE.
Prepares MCXE24x to use the LMEM cache driver.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Add LMEM cache driver implementing instruction cache ops.
Wire driver into cache Kconfig menu and CMake build.
Enables I-cache control on SoCs with NXP LMEM controller.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Select cache_lmem component for MCXE24X devices.
This exposes the LMEM cache API needed by the Zephyr driver
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Add myself as a collaborator for the firmware drivers subsystem.
I have been actively contributing to SCMI protocol implementations
and will continue developing new features, reviewing patches,
and testing firmware functionality
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
When originally introduced in [1], `title` was described as optional, but
this information was lost when the documentation was reworked in [2], even
though the underlying behavior in edtlib is unchanged.
Update the documentation to indicate that that `title` is optional. While
at it, fix a little typo in modified paragraph.
[1]: ee17657ad3
[2]: 3a2f839d45
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Adds a missing f in the second line of a multiline f-string.
Previously, having the wrong top-level keys in a DTS binding YAML file
could cause a partially unformatted error message to be printed.
Signed-off-by: Anton Puppe <anton-noel-flynn.puppe@zeiss.com>
on-behalf-of: @ZEISS anton-noel-flynn.puppe@zeiss.com
When creating a "choice" block, it is possible to associate a name to the
choice, resulting in a so-called "named choice" being created. This allows
modification of the choice after its initial declaration - for example, its
default value can be overridden from another Kconfig file.
This feature originates from Linux and is supported by Kconfiglib; however,
since [1] (first found in release v6.9), Linux no longer supports this
feature. Critically, this means that the feature is no longer covered by
the Linux Kconfig Language documentation [2], even though it is supported
and used in Zephyr.
Add "named choices" to the Kconfig language extensions documentation page
since it has de facto become an extension after its support was dropped
from Linux.
[1] c83f020973bc72d9eec65474d8c47495191aef20 (on Linux source tree)
[2] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Fixes an issue where input events which have the sync flag set but are
neither X/Y coordiante updates nor press/release updates triggers a false
reporting of input to LVGL.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
We added support for the MEC1653B daughter card on the
mec_assy6941 EVB base board. We removed variant specific
kconfig files since none of the boards require board
specific settings.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
We add MEC165xB chip device tree files. We are sharing the
same base mec5.dtsi which required modifications due to
peripherals not present in MEC165xB.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
add tests for DT_STRING_TOKEN_BY_IDX_OR macro
add tests for DT_INST_STRING_TOKEN_BY_IDX_OR macro
Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
This commit introduces the DT_INST_STRING_TOKEN_BY_IDX_OR()
and DT_STRING_TOKEN_BY_IDX_OR() macros, which allow
specifying a default value if the indexed string token is not
defined.
Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
When not using the async API, the rx_woken flag can be set but cannot be
cleared, leading to an indefinitely locked pm state. This commit
prevents the flag from being set when not using the async API.
Signed-off-by: Adrien Lessard <adrien.lessard.42@gmail.com>
Update write_name function to check the offset value against 0 as long
writes are not used here.
Simplify write_appearance function also to remove long writes support.
The appearance property is always 16 bit and is should not even support
long writes.
Signed-off-by: Radosław Koppel <r.koppel@k-el.com>
Add ITCM and DTCM memory region definitions to the common STM32H7
devicetree.
ITCM: 64 KB @ 0x00000000
DTCM: 128 KB @ 0x20000000
Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
Enable the lpcxpresso55s69_cpu0_ns board for the Internal Trusted
Storage (ITS) settings test case. This platform supports the required
settings subsystem functionality needed for ITS testing.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Match number of supported periodic advertising instances with
configure extended advertising instances and increase number
of advertising buffers to match qualification tests requirements.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Fix configuration overlay file to support observer sample
with Extended Scanning on BBC Micro:bit board.
Due to slow CPU, there were assertions and, this commit
addresses them by defaulting to use of BT_CTLR_LOW_LAT.
Asserts mitigated:
- ASSERTION FAIL [start_us == (aux_start_us + 1U)]
@ WEST_TOPDIR/zephyr/subsys/bluetooth/controller/ll_sw/
nordic/lll/lll_scan_aux.c:359
This will happen for small aux offset value, definitely
for the 300 us because CPU usage latency to setup such
auxiliary PDU reception on nRF51 is high due to slow CPU.
- ASSERTION FAIL [0]
@ WEST_TOPDIR/zephyr/subsys/bluetooth/controller/ll_sw/
nordic/lll/lll_scan_aux.c:592
prepare_cb: Actual EVENT_OVERHEAD_START_US = 579
This will happen due to CPU usage latencies scheduling
the radio events, due to slow CPU.
Relates to commit eba31282e8 ("samples: Bluetooth:
observer: Extended Scanning on BBC Micro Bit board").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
When using BT_CTLR_LOW_LAT and LLL_PRIO equals ULL_LOW_PRIO,
add missing mayfly_enable() call for ULL_LOW execution
context, without this ticker_stop() does not get processed.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Expose internal temperature sensor for rv-3032-c7. Driver is reporting
temperature from internal deice sensors and have HIGH an LOW temperature
treshhold which are triggering interrupts. I2C communication and IRQ are
handled from parent MFD driver.
Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
Expose timer functionality from rv-3032-c7 via counter api.
I2C communication and IRQs are arbitrated via MFD parent driver
for rtc, sensor and counter at once.
Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
Rework rv3032 implementaion to use MFD driver unstead of local
implementaion for I2C access and Interrupt managements. This way
could be utilized parts which are not implemented because did not fit
in to RTC api - counter and temperature sensor. To have propper
sincronization arbitration is need which is handled from mfd_rv3032.
Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
Remove backup flag from RTC driver and move it to parent instead.
RTC driver still can access the values of the flags but MFD need
to know what is expected in term of initial behaviour.
Some assumptions done in RTC driver are causing inconsistant behaviour.
We cannot assume that the RTC alarms and notifications need to be
cleaned only if POR bit is triggered. We can have situation where
whole system go throigh soft restart and need to zero RV3032, so driver
need to have option to allow that kind of behaviour.
Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
Remove gpio-int since interrupts will be managed from MFD driver
insted, acticting like dispatcher for interrupts.
Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
Add dependecy for MFD driver and remove I2C dependency since it will
be managed from MFD driver together with interrupts.
Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
Add MFD driver for managing rv3032 functionality which did not fit RTC
api. That way are implemented part which otherwise will not be used:
- RTC
- counter/timer
- temperature sensor
Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
This commit adds the GPIO overlay files for the brd4342a board,
enabling gpio_basic_api support in Zephyr.
Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
On the STM32C0 series, the availability of certain wake-up pins depends on
the exact SoC in use. To avoid providing a large amout of SoC DTSI files,
boards are responsible for defining these "optional" wake-up pins inside
their own DTS.
Update existing STM32C0 boards' DTS to include the missing wake-up pins.
While at it, align Nucleo-C092RC which has the pins, but no comment about
why they are provided.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add a new API function zbus_chan_from_name() that allows retrieving a
zbus channel by its name string. This complements the existing
zbus_chan_from_id() function and provides more flexibility for channel
lookup operations.
The implementation is conditionally compiled when CONFIG_ZBUS_CHANNEL_NAME
is enabled, ensuring it's only available when channel names are configured
in the system.
Signed-off-by: Trond F. Christiansen <trond.christiansen@nordicsemi.no>
use I2C_INIT_PRIORITY as default for gpio chips,
that are on a i2c bus.
If childs have the same priority as their parents,
the init order is decided by the devicetree ordinals.
This ensures, that these childs are init after their parent.
Because of that gpio chips on a i2c bus can have the
same priority as the i2c controller.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
use if instead of multiple depends on for pca95xx and pca_series GPIO
Kconfig files to improve readability.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add a switch/case like variant of the COND_CODE_1 macro where the first
flag that equals 1 has its value expanded, with a default fallback.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Enable clock control by default for siwx91x SoCs. Moreover, most
drivers for siwx91x soc depend on clock control, but didn't declare
it.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Update various properties using hex values in STM32 boards DTS to comply
with the DTS Coding Style which says that "hex values in properties should
use lowercase hex".
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Update all `vrefint-cal-addr` properties in STM32 DTSI to comply with DTS
Coding Style which says that "hex values in properties should use lowercase
hex".
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Update all `cal-addr` properties in STM32 DTSI to comply with DTS Coding
Style which says that "hex values in properties should use lowercase hex".
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Update all `reg` properties in STM32 DTSI to comply with DTS Coding Style
which says that "hex values in properties should use lowercase hex".
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
This workflow spins forever if the manifest workflow does not run, and
apparently sometimes GitHub "forgets" to run it.
Add a timeout so that this fails after some time rather than the whole
6h timeout.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Split STM32 family-wide common Kconfig in two separate files: a new Kconfig
file `soc/st/stm32/common/Kconfig` to hold options that affect the common
code found in the same directory, and the existing top-level Kconfig file
`soc/st/stm32/Kconfig` which now only holds options used by multiple series
but not consumed by the common code - for example, options that are used by
SoC-specific code or consumed by the STM32Cube HAL module go in this file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Instead of defining our own, use the DT_COMPAT_<> macro variables generated
by the build system inside the STM32 SoC Kconfig file.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add initial board support for the Space Cubics SC-OBC Module V1. The
hardware is based on an AMD Versal AI Edge VE2302 and a Microchip
IGLOO2. This Zephyr port runs on the Versal device’s Real-Time Processing
Unit (dual Arm Cortex-R5F).
This commit is the first in the series and only supports the basic devices
needed to run samples/hello_world and samples/philosophers. Specifically,
it adds the Cortex-R5F, UARTs, and the GIC interrupt controller.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
TMC51XX would have to be remodeled as a mfd, this means
that each device tmc51xx, tmc51xx_motion_controller and
tmc51xx_stepper_driver will have their own DT_DRV_COMPATs.
Whenever the common header is included as of now, the
adi_tmc51xx DT_DRV_COMPAT would have to be undef-ed each time
in order to define a new DT_DRV_COMPAT i.e. required by the devices
of the tmc51xx mfd.
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Make ULPI reset GPIO accessible via a pointer in the instance configuration
block, initialized only when the instance's PHY is an ULPI PHY with the
corresponding property. Check at runtime during instance initialization for
this GPIO, and perform appropriate action depending on its presence.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Make disconnect GPIO accessible via a pointer in the instance configuration
block, initialized only when the instance does have it as property. Always
provide the HAL_PCDEx_SetConnectionState() callback which configures the
GPIO when present in the instance configuration block.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Move message queue backing buffer inside instance data block to reduce
usage of globals. The message queue structure itself was already inside the
instance data block, only the initialization code needed an update.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Obtain the stack info for each instance's worker thread from the instance
configuration block instead of using globals.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Use pinctrl from the instance configuration block instead of global object.
Create pinctrl on all series (even STM32N6) and always attempt to configure
it, but don't treat empty configuration as an error to allow pinctrl-less
series to work.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Get rid of global macro USB_NUM_BIDIR_ENDPOINTS by using the direct DT
macro when creating the endpoint configuration arrays and initializing
the instance configuration block. Access the endpoint configurations
through the instance configuration block instead of using global objects.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Get rid of global macros UDC_STM32_IRQ and UDC_STM32_IRQ_PRI by using the
direct DT macro when initializing the instance configuration block, and
performing IRQ_CONNECT() in a per-instance function called indirectly via
the instance configuration block.
While at it, get rid of the driver's useless ISR wrapping layer: the Zephyr
ISR calling convention just so happens to allow using the HAL IRQ handler
directly without a trampoline, which is slightly faster and ought to use
less ROM.
Note that global UDC_STM32_IRQ_NAME is still consumed, but it will be
replaced by another mechanism as part of the final step of multi-instance
support implementation.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The previous source file was copied from Mbed TLS several years ago and
since then not many updates were made. For example:
- testing stopped at CTR-DRBG exiting with failure;
- emulation wasn't really catching any output so a timeout of 60 seconds
was required in order to fully complete the testing;
- the "harness: crypto" was preventing the code from being really tested
with twister.
Last but not least, all of the functions used here belong to the legacy
Mbed TLS crypto support that is going to be removed from the next
TF-PSA-Crypto release.
The goal of this commit is to renew the test code making it really usable
and testable. For the time being hash and ciphers are tested, but
asymmetric key testing can be added in the future if desired.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The file "mbedtls.c" was copied from upstream Mbed TLS several years ago
and since then only minor fixes has been added when failing, no real
upgrade was made since then.
Reasons for removal include:
- some of the symbols were already removed (ex: MD2, MD4, RIPEMD160, ARC4,
etc) but their testing was not removed;
- most of the code is guarded but "prj.conf" doesn't set any Kconfig
related to the crypto features in Mbed TLS, so likely only the default
ones are really tested;
- last but not least all of these "mbedtls_xxx_self_test()" function will
disappear in the next TF-PSA-Crypto release so they cannot be maintained
here.
This suite is replaced with tests in "zephyr/tests/crypto/mbedtls_psa".
"MAINTAINERS.yml" was also updated in this commit in order to reflect
this removal and add path for existing tests.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Add a note about CONFIG_JWT_SIGN_RSA_LEGACY removal. The note also includes
details on why this removal is done before the usual Zephyr deprecation
period.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Since support for CONFIG_JWT_SIGN_RSA_LEGACY has been removed,
corresponding tests should be removed as well.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
CONFIG_JWT_SIGN_RSA_LEGACY was already deprecated, but we agreed on
removing all usages of legacy Mbed TLS crypto from Zephyr codebase quickly
in order to prepare for the transition to Mbed TLS 4.0/TF-PSA-Crypto 1.0.
Therefore this commit remvoes support for CONFIG_JWT_SIGN_RSA_LEGACY
before the deprecation period expires.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Add an mcuboot board variant under the S32K344 SoC in board.yml.
New target is - mr_canhubk3/s32k344/mcuboot. This enables a
single sysbuild invocation to build MCUboot and the application.
Also make a common dtsi for all mr_canhubk3 board variants.
Extend the board documentation with an “MCUboot (sysbuild)” section
that:
Shows one-command sysbuild to produce both MCUboot and app
Documents signing via sysbuild (SB_CONFIG_BOOT_SIGNATURE_*),
and where the signed artifacts are generated.
Provides simple flashing instructions and a troubleshooting
note about using a 1 KiB (0x400) image header and not emitting
an IVT for chain-loaded apps.
Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
Emit the IVT section and IVT header only when XIP and the image is either
a standalone XIP app or MCUboot itself. Do not emit the IVT when the
Zephyr image is chain-loaded by MCUboot (BOOTLOADER_MCUBOOT=y).
- linker.ld/sections.ld: place .ivt_header at IVT_HEADER only under
XIP && (!BOOTLOADER_MCUBOOT || MCUBOOT).
Provide __ivt_region_start/end symbols.
- soc.c: guard IVT struct under the same condition and mark it 'used'
so the linker keeps it when needed.
- Kconfig.defconfig - Make the bootloader and the sign tool compatible
with the vector table.
This avoids populating 0x400000 IVT from the app image while retaining it
for MCUboot or standalone XIP use-cases.
Files:
- soc/nxp/s32/s32k3/linker.ld
- soc/nxp/s32/s32k3/sections.ld
- soc/nxp/s32/s32k3/soc.c
- soc/nxp/s32/s32k3/Kconfig.defconfig
Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
Use devicetree to provide the system clock frequency for S32K3
instead of hardcoding it in board defconfigs.
- Add clock-frequency to /cpus/cpu@0 in nxp_s32k344_m7.dtsi using
DT_FREQ_M(160).
- Define DT_SYSCLK_PATH and derive SYS_CLOCK_HW_CYCLES_PER_SEC from
the sysclk node via dt_node_int_prop_int() when CORTEX_M_SYSTICK.
- Remove CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC from mr_canhubk3
This keeps the clock configuration in a single SoC-level place,
aligns S32K3 with other NXP Cortex-M SoCs, and ensures both the
MCUboot and application builds share the same
SYS_CLOCK_HW_CYCLES_PER_SEC.
Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
Introduce DT bindings for on-chip C40 flash and its controller
and describe their corresponding nodes in nxp_s32k344_m7.dtsi.
- Binding: dts/bindings/mtd/nxp,c40-flash.yaml
Erase/write block sizes.
- Binding: dts/bindings/flash_controller/nxp,c40-flash-controller.yaml
Describe flash device (child) ranges
- SoC nodes: With the new compatible and geometry
properties. Keep status = "disabled" at the SoC level
so boards opt-in.
This prepares the platform for using Zephyr’s flash API / FLASH_MAP /
MCUboot with internal code flash.
Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
Add flash controller driver for the on-chip C40 flash controller
The driver is backed by the MCUX C40 HAL and implements
read/erase/program, page layout, and an optional protection policy
that can lock well-known regions (IVT/MCUboot) derived from devicetree.
Key details:
- Selects FLASH_HAS_DRIVER_ENABLED / FLASH_HAS_EXPLICIT_ERASE /
FLASH_HAS_PAGE_LAYOUT.
- Runs erase/program from SRAM when XIP by relocating both the shim and
the MCUX HAL source if CODE_DATA_RELOCATION_SRAM=y.
- Optional protection pass at init (FLASH_MCUX_C40_APPLY_PROTECTION),
which aligns windows to sector boundaries and applies lock/unlock
using the HAL. This is useful on XIP systems to keep IVT/bootloader
ranges read-only; can be disabled if a bootloader or security policy
manages protection instead.
Files:
- drivers/flash/flash_mcux_c40.c (new)
- drivers/flash/CMakeLists.txt (+zephyr_code_relocate when needed,
Compliance fixes)
- drivers/flash/Kconfig.mcux (enable flash driver, reloc & protection)
- modules/hal_nxp/mcux/mcux-sdk-ng/drivers/drivers.cmake
Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
Add a sensor channel for the encoder counts. This is useful for
reading the encoder counts and calculating an absolute position
of a linear actuator.
Signed-off-by: Omeed Baboli <omeedbaboli@gmail.com>
Add board support for the WEMOS LOLIN32 Lite, a compact ESP32-D0WDQ6/
ESP32-D0WD-V3 based development board with integrated Wi-Fi and BLE.
Features:
- 4MB flash (W25Q32)
- Onboard battery charging (TP4054, PH-2 connector)
- CH340C USB-to-serial converter
- Onboard LED on GPIO22
- Micro-USB or USB Type-C variants
Signed-off-by: Siratul Islam <email@sirat.me>
In TLS 1.3, when mbedtls_ssl_read() returns an error, wpabuf_free() is
called twice: first in tls_connection_handshake() and then again in
eap_tls_process_input(), leading to an assertion failure. Remove the
redundant wpabuf_free() to prevent the double-free issue.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
PEAP Wi-Fi connections on RW612 may fail due to memory allocation
errors in mbedTLS. Increasing the mbedTLS heap size resolves this
issue.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
The supplicant currently supports TLS 1.3 only for EAP-TLS. To prevent
TLS handshake failures in PEAP-TLS phase2, add the flag
'tls_disable_tlsv1_3=1' to phase2 configuration, ensuring TLS 1.3 is
disabled for inner authentication.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
If the TRNG has been unretained, it's not sufficient to enable
the clock, it must be fully reinitialized.
This is a minimal fix to ensure entropy is accumulated after sleep.
Long term, this driver should be made to use device power
management with power domain awareness.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Improved code quality with below changes.
- Avoided declaration shadowing variable in the global scope.
- Avoided missing default in switch block.
- Dropped unused variable.
- Reduced the level of if statements properly.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Added Ethernet bridge sample and enable mimxrt1180_evk_mimxrt1189_cm33
board as an example. On mimxrt1180_evk_mimxrt1189_cm33, 5 ports are
bridged with DHCPv4 enabled to test, including 4 DSA ports and
1 normal Ethernet port.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Dropping packet is normal operation when iface is down.
So, we don't have to use warning here for much noise.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Ethernet bridge performs L2 forwarding between bridged interfaces.
But for the virtual bridge interface, we could make it perform as
normal Ethernet interface with IP address to use.
This is useful allowing applications to communicate with network,
like LAN router or switch with a host IP.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Current bridge function is very simple which does forwarding for all
packets. There will be more and more features of bridge RX handling.
Let's move bridge RX handling to bridge_input.c for next IPv4/IPv6
protocols support for virtual bridge interface.
And currently there is no path to call bridge_iface_recv function.
Let's rework it for proper function returning NET_CONTINUE.
Also fixed another issue of link local address checking. Because
net_linkaddr structure changed. So fixed
is_link_local_addr((struct net_eth_addr *)net_pkt_lladdr_dst(pkt))
to
is_link_local_addr((struct net_eth_addr *)(net_pkt_lladdr_dst(pkt)->addr))
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Add !BT_ADV_RPA_VALID check to force RPA regeneration when re-enabling
an advertising set after RPA rotation occurred while disabled.
The BT_ADV_RANDOM_ADDR_UPDATED flag was added to prevent unnecessary
address regeneration (RPA/NRPA) between bt_le_ext_adv_param_set() and
bt_le_ext_adv_start() calls. However, this revealed an issue:
When RPA rotation (le_force_rpa_timeout) occurs while an advertiser is
disabled, BT_ADV_RPA_VALID is cleared but the RPA is not regenerated.
On subsequent bt_le_ext_adv_start() without a new param_set() call:
- BT_ADV_RANDOM_ADDR_UPDATED is already cleared (from previous start)
- Without BT_PER_ADV_ENABLED, no regeneration occurs
- Stale RPA is used, violating privacy requirements
Add !BT_ADV_RPA_VALID check for both connectable and non-connectable
advertisers to ensure fresh RPA generation when the previous RPA was
invalidated while the advertiser was disabled.
Fixes regression introduced in #98117.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Replace selection of legacy Mbed TLS Kconfigs with PSA Crypto API ones.
While at this, add also a test case using "overlay-tls.conf" since this
is also mentioned in README file.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Replace legacy Mbed TLS crypto support with PSA API.
RSA key exchange dependency was removed because all certificates and
keys used in the test are EC.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Test had forever loop that was attempting to read k_timer_remaining_ticks
while system tick did not change. If target has relatively fast system
clock then it might be impossible.
Tweak test to repeat few times and if k_timer_remaining_ticks is not
read in the known tick then range is used to validate correctness of
the returned value.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Fixes the auto channel status by using the channel number from fetched
wireless info, rather than the input config variable.
Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
Add explanation of the `CONFIG_LV_Z_POINTER_FROM_CHOSEN_TOUCH` interaction
with the `zephyr,touch` chosen node.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
After removing the `zephyr,lvgl-pointer-input` device the init level
entries have shifted by one entry. Update them accordingly.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
With the new LV_Z_POINTER_FROM_CHOSEN_TOUCH most boards do not need to
specify a dedicated pseudo device anymore.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Adds a Kconfig option LV_Z_POINTER_FROM_CHOSEN_TOUCH which automatically
creates a lvgl input pointer device from the chosen zephyr,touch node.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
On M55M1 series, the clock module index is virtual to stay compatible
with 32-bit only cell value in devicetree. Its real value of being
64-bit integer needs to acquire indirectly.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Fix invalid pointer-to-integer cast and comparison warnings in
ADXL362, ADXL367, and ADXL372 decoder drivers. The previous code
used `(uint8_t *)*fit` for offset comparison, which triggered
`-Wint-to-pointer-cast` warnings on recent compilers and could
lead to undefined behavior.
This patch replaces unsafe casts with `uintptr_t` arithmetic and
ensures type-safe offset calculations, preserving existing logic
while eliminating all build warnings.
Signed-off-by: Dilip Raman <dilipr@aerlync.com>
This commit adds the rtc_api overlay file for the brd4342a board,
enabling rtc support and also updates the rtc tag in
siwx917_rb4342a.yaml.
Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
This commit adds the counter_basic_api overlay file for the
brd4338a board,enabling counter support.
Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
This commit adds the pwm overlay file for the brd4342a board,
enabling pwm support and also updates the pwm tag in
siwx917_dk2605a.yaml.
Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
This commit adds the DMA overlay and config file for the brd4342a board,
enabling chan_blen_transfer support in Zephyr.
Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
The 'common' folder is under 'soc/microchip/sam' which contains both MCU
and MPU devices. Currently all the files in 'common' is for MPU. Adding
if(foo) in 'CMakeLists.txt' to make more obvious of where the files are
used.
Update soc/microchip/sam/common/CMakeLists.txt with combining the .c
files with the same usage into one 'zephyr_source' call.
Signed-off-by: Tony Han <tony.han@microchip.com>
Select MMU and CACHE_MANAGEMENT in 'config SOC_FAMILY_MICROCHIP_SAMA7'.
Replace 'config' with 'configdefault' for items in defconfig file.
Remove duplicated linker script in CMakeLists.txt in sama7d6 and sama7g5
directories, use the one in sama7 directory.
Signed-off-by: Tony Han <tony.han@microchip.com>
Add SAMA7G5 series System-in-Package (SiP) MPUs to Kconfig.soc and
soc.yml, update the header files for them too.
Signed-off-by: Tony Han <tony.han@microchip.com>
Update directory structure to the following hierarchy for MPU devices:
Product Architecture
|__ SOC Series
|__ Product Group
Move directory 'soc/microchip/sama7g5/' into 'soc/microchip/sama7/'.
Add sama7g5 to 'soc/microchip/sam/sama7/soc.yml'.
Remove the files under soc/microchip/sam due to they became useless
with the reorganization.
Signed-off-by: Tony Han <tony.han@microchip.com>
If `period_ms` is 3 or less `tmp` is 0. Since `tmp` is type `uint32`
subtracting 1 from 0 will wrap around to `UINT32_MAX` and is then clamped
to `UINT8_MAX`.
Fix the issue by changing `tmp` and `1` to signed types.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
To support mocking we cannot rely on the default
Kconfig options and values. The required Kconfig options
to satisfy dependencies are overridden in the Kconfig
file and the necessary Kconfig files are sourced.
We cannot enable e.g. CONFIG_BT as that would attempt
to pull in a lot of files we do not want in this test.
This commit also removes unused includes in the CMakelists
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
To support mocking we cannot rely on the default
Kconfig options and values. The required Kconfig options
to satisfy dependencies are overridden in the Kconfig
file and the necessary Kconfig files are sourced.
We cannot enable e.g. CONFIG_BT as that would attempt
to pull in a lot of files we do not want in this test.
This commit also removes unused includes in the CMakelists
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
To support mocking we cannot rely on the default
Kconfig options and values. The required Kconfig options
to satisfy dependencies are overridden in the Kconfig
file and the necessary Kconfig files are sourced.
We cannot enable e.g. CONFIG_BT as that would attempt
to pull in a lot of files we do not want in this test.
This commit also removes unused includes in the CMakelists
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
To support mocking we cannot rely on the default
Kconfig options and values. The required Kconfig options
to satisfy dependencies are overridden in the Kconfig
file and the necessary Kconfig files are sourced.
We cannot enable e.g. CONFIG_BT as that would attempt
to pull in a lot of files we do not want in this test.
This commit also removes unused includes in the CMakelists,
and cleans up the code.
Since the kernel is actually running, we also need to support
that e.g. k_work items are actually scheduled, and that we have
to wait for them to finish. test_drain_syswq has been implemented
as a way to drain the system workqueue before we check for
callbacks or perform subsequent actions.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
To support mocking we cannot rely on the default
Kconfig options and values. The required Kconfig options
to satisfy dependencies are overridden in the Kconfig
file and the necessary Kconfig files are sourced.
We cannot enable e.g. CONFIG_BT as that would attempt
to pull in a lot of files we do not want in this test.
This commit also removes unused includes in the CMakelists,
and moves the mock bap_broadcast_source.c file to the
correct location.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Enable test for s32z270 hash crypto.
Enable samples for cipher cryptoEndable samples for EBC, CBC,
CTR mode of cipher crypto.
Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
Add device tree node for MU instances that will be used by HSE and RTU
for s32z270.
Add support hash crypto for NXP S32 with Algo 2:
SHA224, SHA256, SHA384 and SHA512.
Add support cipher crypto with ECB, CBC and CTR mode by using ram key
catalog.
Add support 128/256 bits ram key length.
Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
The INA232 is another device in the INA2XX family and is very similar
to the already implemented INA230 and INA236. The main difference
between the INA232 and the INA236 is that the INA232 does not have a
Device ID register. Because of these similarities, it is implemented
in the ina230.x files in the same way as the IN236. Modifications to
the corresponding tests are included as well.
Signed-off-by: Johannes Meyer <johannes.meyer@intego.de>
Add CONFIG_SAMPLE_TFLM_ETHOSU_PMU to collect PMU counters per inference
in the sample. Disabled by default.
Signed-off-by: Johan Alfvén <johan.alfven@arm.com>
NRF54H20 cpuflpr and cpuppr do not share common interrupts
(VEVIF TASKS) that can be used in this test, so they need
to be separated.
Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
The 250745e198 OT stack upmerge pulled upstream commit 079852b67e9b
("[uptime] enforce `UPTIME` feature for MTD and FTD builds (#11354)")
which made `OPENTHREAD_CONFIG_UPTIME_ENABLE` mandatory for MTD builds.
Update the module configuration accordingly to fix a build failure with
CONFIG_OPENTHREAD_MTD=y.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
auto negotiation might already be finished when we
check the link status, therefore check directly
instead of waiting 100 ms.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The latched bits are defined in the ethernet specification,
as the only latched bit, that we use, is the link status, improve
the code for it.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add JarmouniA as collaborator to MIPI-DSI area.
Add JarmouniA and VynDragon as collaborators to MIPI-DBI area.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Add a SAMPLE_USBD_VID Kconfig to allow changing the USB VID on samples
using the common code. Can be handy for testing things against code that
expects a specific vid.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Doxygen 1.15.0 is now available and a bug previously impacting
STRIP_FROM_INC_PATH handling has been fixed. Update the list of
paths accordingly to have headers from lib/libc/minimal/include/
covered.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Update to Doxygen 1.15.0 version (html build uses doxygen from the
docker image but PDF build uses vanilla Ubuntu runner from GitHub
so installation is done manually).
Replace MD5SUM by SHA256SUM since Doxygen project now conveniently makes
the checksums available on their Github releases page.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Adjusting sleep times as core is to slow too run
the test with the default system clock frequency,
and fixing outdated comment in the test manifest file.
Signed-off-by: Paweł Pelikan <pawel.pelikan@nordicsemi.no>
Added new target nrf54h20/cpuflpr/xip to counter basic
api tests. Only XIP is supported for cpuflpr since
RAM memory for this cpu is too small to fit whole
counter basic test code and data.
Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
- When we are a peripheral we want to be able to start a stream
from the stream_connected_cb, given that we are in an enabling state
and the stream is in the sink direction
Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
Fix config dependency between MMU KERNEL_VM_SUPPORT and KERNEL_DIRECT_MAP
This fix following build issue:
warning: KERNEL_DIRECT_MAP (defined at kernel/Kconfig.vm:83) has direct
dependencies MMU && KERNEL_VM_SUPPORT with value n, but is currently
being y-selected by the following symbols:
- SOC_SERIES_STM32MP13X (defined at soc/st/stm32/stm32mp13x/Kconfig.soc:6,
soc/st/stm32/stm32mp13x/Kconfig:6), with value y, direct dependencies y
(value: y), and select condition SOC_FAMILY_STM32 (value: y)
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Add a page with information on how ethernet drivers can be assigned a MAC
address, using the MAC address configuration mechanism.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Replaces the legacy SDFW compatible board configuration with the
IronSide SE compatible one, thus removing support for running samples
and tests on nRF9280 devices with the old firmware.
Signed-off-by: Ville Kujala <ville.kujala@nordicsemi.no>
wid 145 requests handle of a UUID of a long characteristic. wid 167
requests to remove the characteristic by handle requested in wid 145.
2 new commands are added to support these wids:
- BTP_GATT_GET_HANDLE_FROM_UUID to request handle of a certain UUID
- BTP_GATT_REMOVE_HANDLE_FROM_DB to remove attribute by handle.
Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
There are two ways in the current implementation to join a network,
either with an association request or a via MLME-SET(macShortAddress) to
rejoin a previously associated network.
The coordinator address needs to be valid in the rejoin case. It can be
lost, for example if the device power cycles. This commit fixes that gap
with new MLME GET/SET for:
- macCoordShortAddress
- macCoordExtendedAddress
Signed-off-by: Simon Piriou <spiriou31@gmail.com>
This commit prefixes "0x%x" debug logs with the entity, and prints the
"set" parameter when updating a filter.
Signed-off-by: Simon Piriou <spiriou31@gmail.com>
Trying to remove filter with NOT_ASSOCIATED parameter results in noisy
warning logs in most of the radio drivers. It's safe to ignore it as
this is an invalid operation.
Signed-off-by: Simon Piriou <spiriou31@gmail.com>
Add openamp_rsc_table support for STM32MP257F EV1 and DK boards to
enable communication between the Cortex-M33 and Cortex-A35 (running Linux).
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Add the support of the mailbox IPCC1 for communication between
the Cortex-M33 and the Cortex-A35
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
On the STM32MP2 series, the IPCC clock is managed at the system
level by the CPU responsible for system configuration.
In topologies where the Cortex-M33 acts as a companion processor, it
cannot enable the IPCC clock.
This update makes the IPCC clock optional in both the device tree
and the driver.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Add migration guide and release notes entries for the radio-related
devicetree binding renames:
- generic-fem-two-ctrl-pins -> radio-fem-two-ctrl-pins
- gpio-radio-coex -> radio-gpio-coex
- tx-high-power-supported -> radio-tx-high-power-supported
Also document the new radio.yaml base binding for generic radio
hardware capabilities.
Signed-off-by: Ivan Pankratov <ivan.pankratov@silabs.com>
Rename GPIO coex binding to use 'radio-' prefix for consistency with
other radio bindings (radio.yaml, radio-fem-two-ctrl-pins.yaml).
Updated beacon sample overlay and coex documentation.
Signed-off-by: Ivan Pankratov <ivan.pankratov@silabs.com>
Rename generic FEM binding to use 'radio-' prefix for consistency with
other radio bindings (radio.yaml, ble-radio.yaml).
Updated 3 board files, Nordic BLE controller HAL, documentation, and
test overlays. Added missing settle-time properties to pan1783a board.
Signed-off-by: Ivan Pankratov <ivan.pankratov@silabs.com>
Create a shared base binding (ble-radio.yaml) for common Bluetooth LE
radio hardware capabilities to avoid duplication between vendors and
ensure consistent property naming across the ecosystem.
Properties are prefixed with 'ble-' and ordered chronologically by
Bluetooth Core Specification version (5.0, 5.1, 6.0). Each property
indicates a hardware capability, not current enablement state.
Signed-off-by: Ivan Pankratov <ivan.pankratov@silabs.com>
Some of the CAP initiator unit tests did not delete the group
after creation, even if they easily could.
Especially for test_initiator_unicast_group_add_streams it was
a problem, as the stream added was stack allocated, and by the
end of the test it was deallocated, causing issues when the
group was finally deleted in
cap_initiator_test_unicast_group_after.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
To support mocking we cannot rely on the default
Kconfig options and values. The required Kconfig options
to satisfy dependencies are overridden in the Kconfig
file and the necessary Kconfig files are sourced.
We cannot enable e.g. CONFIG_BT as that would attempt
to pull in a lot of files we do not want in this test.
This commit also removes unused includes in the CMakelists
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Similar to logging and shell, allow application to override and
extend the ASSERT macros globally. This enables intercepting log strings
at the macro level for things like string tokenizations.
Signed-off-by: Kevin Zeng <zengk@google.com>
Removed conditional checks for device runtime put in DMA RX and
TX callbacks, ensuring that device runtime is always released
asynchronously.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This patch fix a reg write that needs to be done before calling the
callback. Since the user can start a new dma transfer in the callback,
it can miss the interrupt from the new transfer if the new transfer is
done before the interrupt bit is cleared.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Removed unnecessary power management state lock calls since the DMA is
on a power domain that already handles state locking.
It will now managed directly pm_device which will active power_domain
and then block pm_state.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Added calls to pm_device_runtime_put() to ensure proper device runtime
management when configuration or DMA transceive operations fail.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This patch is needed to block the pm_state "PM_STATE_SUSPEND_TO_IDLE"
when a device on the power domain (actually all the peripherals) is
active. Without this patch, cpu can decide to go to deep sleep while
a peripheral is active.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Most drivers for Series 2 depend on clock control, but didn't
declare it. Enable clock control by default for Series 2 SoCs.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
The watchdog timer on SiWx91x devices is designed to
pause during deep-sleep and resume after wakeup.
However, an incorrect check in`wdt_setup` was
preventing this intended behavior. This patch removes
the check, restoring the correct pause-in-sleep
functionality.
Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
Relocate the contents of app.overlay into a board-specific overlay for
native_sim. This change prepares the codebase for adding regulator tests
for other boards.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
NuMaker watchdog control register is write-once after power-on
or reset. Thus, the control registeris written in the setup
function and the disable function only disables IRQ.
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
Set PPN (Physical Page Number) in L2 entry in the region_map_update
function to ensure correct mapping for memory that was not previously
mapped based on xtensa_soc_mmu_ranges.
When a new memory domain is created, the arch_mem_domain_init function
allocates new ptables using the dup_table function. This function only
copies original L2 entries created from xtensa_soc_mmu_ranges with
OPTION_SAVE_ATTRS. Entries added later by arch_mem_map are replaced with
XTENSA_MMU_PTE_L2_ILLEGAL and have PPN (Physical Page Number) set to zero.
When adding a new partition to a memory domain, the update_region function
is used. It sets new access attributes in the L2 table without setting the
PPN value. As a result, it does not work correctly for memory that was not
previously mapped based on xtensa_soc_mmu_ranges.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Add macro PTE_PPN_SET to simplify setting the physical page
number assigned in the page table entry.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Add macro PTE_PPN_GET to simplify retrieval of the physical page
number assigned to a page table entry.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Added PTP timestamping support in NETC ENETC host driver for no-tag
supported NETC switch.
On RX path, extended descriptor is used on host (pseudo MAC) to get
timestamp writeback.
On TX path, TX timestamp response should be enabled on host (pseudo MAC).
After TX, writeback TX timestamp ID should be updated to tx pkt fifo.
Once RX path received TX timestamp response, match TX timestamp to tx
pkt in fifo with the timestamp ID.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
For NETC switch with tag support, PTP timestamping had already been
supported in tag driver.
This patch is to add PTP timestamping support for no-tag supported switch.
Timestamp functions are implemented and exported for host driver to
handle.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Converted to use NETC_PTP_TIMESTAMPING_SUPPORT for PTP timestamping.
PTP timestamping is needed only when NET_L2_PTP and PTP_CLOCK_NXP_NETC
are selected.
Used default 16 bytes for ETH_NXP_IMX_RX_RING_LEN for PTP timestamping
because RX extended descriptor would be used.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
PTP timestamping should be enabled only when NET_L2_PTP and
PTP_CLOCK_NXP_NETC are selected. And NET_PKT_CONTROL_BLOCK
is required for PTP timestamping code.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
This patch removes the use of sscanf to maintain compatibility with
tests that use the minimal cpp library. The expected version is now
defined using multiple individual values rather than a single
formatted string.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
C macro INSTR_FETCHABLE is missing parentheses in its definition,
this could lead to incorrect expansion when combined with logical
operators
Signed-off-by: Andrea Gilardoni <a.gilardoni@arduino.cc>
This is a negative detection. The conn index should be never out of
bounds of the array `connection`. Because the size of the array is
`CONFIG_BT_MAX_CONN`.
To improve the readability, add a `__ASSERT` checking to check if the
conn index is out of bounds.
CID 487769
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This is a negative detection. The conn index should be never out of
bounds of the array `bt_sdp_client_pool`. Because the size of the
array is `CONFIG_BT_MAX_CONN`.
To improve the readability, add a `__ASSERT` checking here. Check
whether the conn index is out of bounds.
Fix#99985
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
There is a corner case that the connect complete event is notified
before the function `bt_hci_cmd_send_sync()` returns. Because the
created conn object is in the state of `BT_CONN_DISCONNECTED`, it
cannot be found in the connect complete event. As a result, the
connect can not established normally.
Fix the issue by setting the connect state and role before calling
the function `bt_hci_cmd_send_sync()`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add a conditional compile around data in `cdns_i3c_irq_handler` to
prevent a warning when building controller only and without ibi.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
This moves nvmem docs to a better suited home since we already have
a section for all things storage.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This moves fs docs to a better suited home since we already have
a section for all things storage.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This moves retention into a better suited home since we already have
a section for all things storage.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Changed ACTIVE_HIGH to ACTIVE_LOW, for LEDs green and blue in c33.dts file
These appear to have been cofigured wrong from the beginning.
Signed-off-by: Bogdan Ivanus <b.ivanus@arduino.cc>
Enable QEMU emulation for the AN386, which gives a QEMU platform for the
cortex-m4 architecture. This allows testing of hardware floating point
operations.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Replace zephyr_compile_definitions with zephyr_library_compile_definitions
to avoid setting options globally.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Extends the devicetree library test to exercise the hwspinlock dt spec
macros and detect the context initializer build warning that was fixed
in commit 8b208b0d5a. Previously the build
warning wasn't reproducible in-tree.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
There can be a race conditon where another interrupt fires while it
is in the callback, but then the interrupt is cleared towards the
end of the interrupt. Clear the interrupts it intends to service
at the beginning of the ISR.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
commit a763207962 ("arch: arm: dwt: use the cmsis_6 macro
unconditionally") use cmsis_6 macro unconditionally, we can use DCB
instead of CoreDebug macro unconditionally.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
commit a763207962 ("arch: arm: dwt: use the cmsis_6 macro
unconditionally") use cmsis_6 macro unconditionally, we can use DCB
instead of CoreDebug macro unconditionally.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
commit a763207962 ("arch: arm: dwt: use the cmsis_6 macro
unconditionally") use cmsis_6 macro unconditionally, we can use DCB
instead of CoreDebug macro unconditionally.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
commit a763207962 ("arch: arm: dwt: use the cmsis_6 macro
unconditionally") use cmsis_6 macro unconditionally, we can use DCB
instead of CoreDebug macro unconditionally.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Add a new function to free an mbedtls_shim session:
'mbedtls_free_session()'. Together with 'mbedtls_get_unused_session()',
these will be the only entry points to acquire/release sessions.
In this way it's easier to ensure that the mutex is properly held while
setting the 'in_use' parameter.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Move mbedtls_get_unused_session_index() at the top of the file and leave
cipher and hash functions below.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Imply XIP from the SoC config to make XIP the default to match the
behaviour between Cortex-M33 and Hazard3 variants.
This fixes cbe6a716d3, which stopped
selecting XIP at the SoC level.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Use net_buf_tail() instead of __buf for proper buffer positioning.
Add null check and error handling for nocache buffer allocation.
Only copy data for OUT transfers during buffer setup.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Differentiating between IN and OUT transfers for proper buffer setup.
For OUT transfers: use existing data from buf->data with buf->len.
For IN transfers: use available space from net_buf_tail() with tailroom.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Make sure that arch.mode is set with appropriate flags before setting up
the privileged stack start.
Fixes#99895
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Introduce BUILD_ASSERT checks in the UDP transport implementation to
ensure the configured maximum address size is large enough for the
enabled IP families.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Add guidelines in Kconfig explaining the minimum required
MQTT_SN_LIB_MAX_ADDR_SIZE for UDP transport and IPv4 and or IPv6. Also
explain when this value might need to be changed.
Use these values to provide a sane default for IPv4 and IPv6.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This update modify some ROM reentrant calls to weak in order
to use the one provided in libc.
This also remove the usage of logging that requires locking
handling before scheduler is running.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Completely overhaul the documentation landing page to improve user
experience and navigability.
Key changes:
- Replace the static grid list with a modern, responsive HTML/CSS layout.
- Introduce "Persona" cards (App Developer, Hardware Engineer, Product
Maker) to guide users to relevant sections faster.
- Highlight key reference resources (API, Kconfig, DeviceTree, ...) in a
dedicated reference section.
- Call out "How to contribute" with a dedicated card.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This is done to avoid this error
Too many thread objects (38)
Increase CONFIG_MAX_THREAD_BYTES to 5
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The platform_allow line in common: overrides the setting in
individual tests, so add the platform_allow line to each test
separately so that OpenThread tests are run with proper platform.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Some of the socket calls still used POSIX symbols, replace these
by native Zephyr network API calls.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add myself (alxelax) as Bluetooth Qualification
collaborator. The main reason is as Bluetooth Mesh
collaborator would like to follow up qualification tool
updates since it impacts Mesh qualification too.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Other variants of arch.interrupt test pass on this platform,
but arch.shared_interrupt.lto asserts in test_isr_offload_job_identi.
The issue was reported in #98658.
Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
Update Espressif flash related snippets:
* add support for ESP32-H2
* add 2M,64M and 128M flash support
* change included overlays structure
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Using the `gen_ftab.py` script, we can retrieve the current image
distribution information from the device tree and generate the
corresponding `ftab.bin` file. This eliminates the need to burn an
additional `ftab.bin` externally before running the device
Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
In addition to Zephyr's default build artifacts, other build processes
may generate additional images. Therefore, we have added the
`--flash-file` parameter to flash these supplementary images
Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
On STM boards without an FPU (like nucleo_f091rc) the WWDG driver
requires 4K more of flash than the IWDG due to the use of floating
point math. Fixed it by refactoring to use integer math.
Reduced sample build ROM size from 24848 B to 21620 B on
nucleo_f091rc.
Signed-off-by: James Torres <jamesktorres2022@gmail.com>
Updated in-system profiling for CPU usage with on target
measurements and added assertion checks.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Set correct MPU memory type and size for the uniqe device id, package code
and ADC VREF/TS calibration read-only flash region.
REGION_IO_ATTR configures the MPU region to device-memory with RW access,
which is also used for the PERIPH region. To avoid complicating things
unnecessarily, we use this type instead of defining a new device-RO.
The size is reduced to 512 bytes, because RM0477 table 28 and chapter
5.3.12 state that this read-only flash area has a size of 512 bytes.
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
Refer to the M5Stack official code, it need to correct
the value of x-offset of st7789v display driver from 53 to 52,
or the leftmost column of the LCD shows an anomaly.
Signed-off-by: Xianglong Zhang <zhangxianglong@cvte.com>
This ensure people browsing the JSON doc page will see a few more
options in terms of code samples exercising JSON API
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
As described in this issue:
https://github.com/zephyrproject-rtos/sdk-ng/issues/1038
`-flto=auto` fails on some (slower) Windows machines due to an issue with
the Zephyr SDK's GCC toolchain for Windows.
In order to allow users to work around this issue, introduce a new
CONFIG_LTO_SINGLE_THREADED option that switches to `-flto=1`, which
enforces a single thread when processing LTO.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Adds four new test cases to validate the PMP stack guard protection when
`CONFIG_PMP_NO_LOCK_GLOBAL` is enabled (i.e., when PMP entries are not
globally locked).
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Adds the Kconfig option PMP_NO_LOCK_GLOBAL to remove the PMP Lock bit
usage. The global entry is an internal detail of the driver
implementation and should not be reflected in the user interface. This
allows the application to dynamically reconfigure the PMP entries
without requiring hard reset. This is essential for firmware that
performs an RO-to-RW jump. By keeping these system entries unlocked,
higher-privileged M-mode code can dynamically reconfigure memory
permissions during the secure handover process, which is not possible if
the entries are permanently locked during early boot.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Verify that the interface index, converted to array index,
does not exceed the preallocated string array for dynamic index
completion.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
As explained in the comment in the code, both structs have the same
offsets for it's fields, but sockaddr_in is smaller, hence it can
confuse static analyzer, giving warnings about potential out-of-bound
access. Therefore, cast to sockaddr_in6 instead to avoid the warning.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This change aligns sample rates to the datasheet and removes
non existing values for 11.025kHz, 22.05kHz, & 44.1kHz
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Completes the STM32 overlays:
- Adds missing timers
- Adds copyright notice
- Adds okay to timer instances so that shared interrupts can be enabled
if needed
- Adds an overlay for STM32H7R/S
- Removes the conf file for N6 that is useless now that userspace works.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
For some STM32 series, some interrupts are shared between different timer
instances. Use the SHARED_INTERRUPTS for these series so that all timers
can be used at the same time.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Counter driver was not functional with STM32 advanced timers (like
TIMER1/8) due to them having more than one interrupt line.
This commit defines the proper interrupts for the advanced timers so that
they can be used as counters.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This commit updates the CI workflows to use the CI image v0.28.7, which
updates versions of the following components:
- Doxygen 1.15.0.
- Renode 1.16.0.
- BSIM 3.0.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Sphinx has a built-in `:rfc:` role for referencing RFC documents.
This commit updates documentation pages referencing RFCs to use this role.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
After we found the target GPIO port and configured I/O retention on target
wake-up pin, break from the search loop.
Applies only to STM32WBA series.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The rank cannot be notified and the function allowed for
just updated to the rank. The CSIS spec does not mention
the usecase, nor support, for changing the rank of a device.
The spec only seems to allow for dynamic changes to the set
size (and only during that can the rank be set).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Disable cache modeling in FVP and skip a few tests that have not been
working for a while to unblock the running ci on this board.
The tests will be tracked by an issue and fixed later.
Related issue #97602
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Rename the board config to fix ci issue while running samples for
fvp_baser_aemv8r:
```
INFO - 1) sample.net.zperf.async_tx.stm32 on
fvp_baser_aemv8r/fvp_aemv8r_aarch32 error (CMake build failure - CMake
Error at cmake/modules/extensions.cmake:2905 (message): Board
fvp_baser_aemv8r defines multiple SoCs.)
```
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Make sure bindesc are placed right after the vector table and fix ci
failure with sample.bindesc for fvp_baser_aemv8r/fvp_aemv8r_aarch32.
Without this change the bindesc are placed at a location that is not
mapped leading to a data abort while running the sample.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Move ARCH_HAS_STACKWALK under CPU_CORTEX_A section since only Cortex-A
implements arch_stack_walk(), while Cortex-R does not.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Skip running the test scenario `drivers.watchdog` on Arm FVP for the
board `mps2/an385`.
Since the test runs by default on qemu, this issue was missed earlier
when the test was excluded for the other MPS2 variants that use FVP.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Add support for configuring hardware-specific boot feature bitmaps
through Devicetree and software-specific boot configurations through
Kconfig options.
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Add new Devicetree properties under the SiWx91x NWP node to describe
hardware-specific boot configuration options.
The properties are documented in the SiWx91x NWP YAML binding.
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
DWC2 core automatically clears USBActEP (for all endpoints other than
endpoint 0) on bus reset. While core is deactivating the endpoint, it
does not disarm it.
On bus reset USB stack first calls ep_disable API and then ep_dequeue.
This was leading to endpoint is not active warning followed by endpoint
disable timeout. Disable timeout was effectively caused by waiting for
EPDisbld interrupt on endpoint with disabled interrupts.
Solve the issue by unconditionally disarming endpoint in ep_disable API
handler. Remove the false warning because USBActEP cannot really be used
for sanity checking as it is not only the driver that clears it.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Add FDCAN1 configuration to the board's .dtsi file and
comments explaining how to enable it, since fdcan1 and i2c1
share the pb9 pin. Updated documentation to explain CAN usage.
Signed-off-by: Benjamin Klaric <benjamin.klaric01@gmail.com>
The `add_dependencies` command in CMake is used to specify dependencies
between targets - here it was used to specify a dependency on a folder,
which is not valid (and causes failures on CMake 4.2 when using
the cmake-file-api).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This update was seemingly forgotten when additional image support
was added to supporting MCUboot files
Signed-off-by: Jamie McCrae <spam@helper3000.net>
Prevents this module from just trampling over your logging with
debug logs no matter the configuration
Signed-off-by: Jamie McCrae <spam@helper3000.net>
This commit refactors the pio isr handling to avoid losing i2c
transactions that occur back-to-back. It also removes the
compile-time check for target buffer mode config, as both pio
and dma modes are now supported.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
It's been periodically reported that the default connect timeout shared
with regular TCP sockets (3 seconds) is not enough for the TLS handshake
to complete. Therefore, it'd make sense to increase the default value
for TLS sockets specifically. However currently the option is used by
both TCP and TLS connections, which makes this impractical.
Therefore, introduce a separate CONFIG_NET_SOCKETS_TLS_CONNECT_TIMEOUT
Kconfig option for TLS sockets specifically, and set the default to 10
seconds. For samples/tests that modified the old option for TLS-specific
purpose, update the new option value as well.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case a handshake timed out on a blocking accept() call, the TLS
socket would return EAGAIN error which is ambiguous and not intuitive.
Report ETIMEDOUT instead.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
New nrfx release contains major rework of nrfx drivers
instantiation making it easier to integrate with dts nodes.
Now, nrfx driver instances can no longer be `const`
because they contain driver runtime state.
Additionally, all nrfx drivers return `errno` error codes
instead of deprecated `nrfx_err_t`.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
On IPv6, IPPROTO_IPV6 needs to be replaced by IPPROTO_IP and
IP_MULTICAST_TTL by IPV6_MULTICAST_HOPS.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
On IPv6, the host is subscribed to a few multicast addresses by default.
Reusing such an address for MQTT-SN leads to an EALREADY error. Ignore
this error instead of returning. Do the same for IPv4 for consistency,
and because it could happen if the multicast address has already been
added manually from another part of the code, although this is really a
corner case.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
The current allocated buffer for storing the IP address is not always
large enough to hold an IPv6 address. Instead of using a hard-coded
value, use NET_INET6_ADDRSTRLEN, which covers all cases, including
possible mapped IPv4 addresses.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
errno returns a positive value, while the API specifies that a negative
value is returned in case of error. Therefore replaces "return errno" by
"return -errno".
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
There is an issue with AF_PACKET sockets bound to ieee802154 l2 iface.
The socket keeps track of the iface link_addr with a sockaddr_ll_ptr
structure, with sll_addr pointing to the iface link_addr address, and
sll_halen being a copy of the iface link_addr length.
The iface link address for ieee802154 can change during association
between extended address (8 bytes) and short address (2 bytes). The
iface link_addr s correctly updated, but the sll_halen of already bound
sockets is not, as it's a out of sync local copy.
This commit fixes#99711 by replacing all the sll_halen usage for
AF_PACKET socket with the iface link_addr length directly on recv and
send paths.
Signed-off-by: Simon Piriou <spiriou31@gmail.com>
If the connect type is not `LE`, the return value of function
`bt_conn_get_dst()` is a NULL pointer. In function `bt_addr_le_str()`,
the NULL pointer will be accessed without any checking. It will cause
the issue `Segmentation fault` in the platform `native_sim`.
Fix the issue by checking the conn type at the beginning of the
function `eatt_auto_connect()`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Based on api lifecycle documentation, the lora driver has been recently
moved to unstable. This means that the state of this driver is no longer
experimental. Due this new state, the change should be updated on
Kconfig.
This commit remove the `EXPERIMENTAL` symbol selection from the driver
itself. It also remove the word `experimental` from the lora basic
modem backend since the api lifecycle documentation only describes the
state of the api based upon the api itself and not any particular
backend implementation.
Signed-off-by: Kiara Navarro <knavarro@paltatech.com>
Add an extra _ on the handler struct name generated bu the
EC_HOST_CMD_HANDLER macros, this makes them a bit easier to list as they
now look something like
__cmd_EC_CMD_GET_VERSION
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add two macro variants for registering handlers that have either only a
request structure or only a response structure.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
On the stm32u5 series, this commit will enable backup sram regulator
when the regulator is LDO, during SOC init. Then stm32_backup_sram_init
does not change the backup SRAM retention anymore.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit fixes bug #95402. When the GNU toolchain is installed
in its default path the library include dir will contain spaces.
By encasulating the library path in quotes the linker works again.
Signed-off-by: Rico van Dongen <rdongen@ziggo.nl>
In current implementation, the call will be terminated, or rejected if
the audio connect cannot be established. But from the application
view, if the sco connect cannot be established, the audio paths can be
routed towards the AG. So force routeing the audio towards the HF is
not reasonable and it is not the mandatory.
The changes aim to keep the sequence that creating SCO connect in the
right time. And ignore the result whether the SCO connect has been
created or can be established.
If the audio connect cannot be established, the application can try to
change the audio route paths according to the audio connection
procedure.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add support for test app on Renesas mck_ra4t1:
- tests/drivers/dma/chan_blen_transfer
- tests/drivers/dma/chan_blen_transfer
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Add support for test app on Renesas mck_ra4t1:
- tests/drivers/dac/dac_api
- tests/drivers/dac/dac_loopback
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Add support for test app on Renesas mck_ra4t1:
- tests/drivers/adc/adc_accuracy_test
- tests/drivers/adc/adc_api
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
The VBUS bounces when the USB connector is plugged in. This can lead to
events VBUS removed and Suspended occurring in that order. With
hibernation support enabled, hibernation request, as result of the
suspend interrupt, will be delegated to the driver thread. Once the
driver thread is scheduled to process hibernation request, the
controller may be already disabled and controller/phy clocks be off. On
nRF54LM20 this leads to CPU crash and a hang.
To avoid this happening, cancel the possible hibernation request after
interrupts are disabled. Although the thread could be still waked up
because of USBSUSP interrupt raised and event posted, this is considered
to be harmless, as there would be a second check in the thread whether
the event is still valid or is cleared in between.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
CONFIG_NUM_IRQS - 1 may be a second-level interrupt number on platforms
with multi-level interrupt support. Second-level interrupts cannot be
used for direct ISR testing.
Use CONFIG_2ND_LVL_ISR_TBL_OFFSET - 1 when available to ensure we test
with a first-level interrupt that supports direct ISR functionality.
Signed-off-by: Qiang Zhao <qiang.zhao@nxp.com>
The workaround in bt_cmd_send_sync should no longer by needed when
tx_processor is not on the system work queue.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
When thread that TX processor is used to send commands and data to
Controller is also used for sync commands sending and command buffer
allocation, a deadlock happens.
This thread is used to avoid such deadlocks by moving TX processor to
its own dedicated thread exclusively used by tx processor only.
Co-authored-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Reduce BT_MAX_CONN from 62 to 61 to make it build on integration
platform qemu_cortex_m3/ti_lm3s6965 when we add bt_taskq in subsequent
commit.
The number 62 seems arbitrary here, so reducing it by one should not
have any practical impact.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
ATT is invoking user callbacks in its net_buf destroy function. It is
common practice that these callbacks can block on bt_hci_cmd_alloc().
This is a deadlock when the net_buf_unref() happens inside the HCI
driver, invoked from tx_processor.
Blocking callbacks like this appear in our own samples. See further down
about how this problem was detected.
tx_processor not protect against blocking callbacks so it is de-facto
forbidden. The Host should not equip net_bufs with dangerous destroy
callbacks.
This commit makes ATT defer its net_buf destruction and user callback
invocation to the system workqueue, so that net_buf_unref is safe to
call from non-blocking threads. In the case of the deadlock, the
net_buf_unref() was below the tx_processor in the call stack, which (at
the time of this commit) is on the system work queue, so defering it to
the system work queue is preserving the existing behavior.
Future improvement may be to allow the user to provide their own
workqueue for ATT callbacks.
This deadlock was detected because the following test was failing while
moving tx_processor to the bt_taskq:
tests/bsim/bluetooth/ll/throughput/tests_scripts/gatt_write.sh
The above test has an ATT callback `write_cmd_cb` invokes
`bt_conn_le_param_update` can block waiting for `tx_processor`.
The reason it was not failing while tx_processor was on the system work
queue is that the GATT API has a special non-blocking behavior when
called from the system work queue.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Allow flash devices to be accessed using the NVMEM API. Note that it simply
uses the read/write API functions. Erasing should be handled by the
application.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Move the existing "--no-load" argument from the OpenOCD and Intel Cyclone V
runners into an argument in the runners base class such that it can be used
by all runners. Also update the existing runners to work with the common
option instead of their own.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
This commit adds a prompt to the Kconfig file to make
CORTEX_M_SYSTICK_RESET_BY_LPM option more visible to users
configuring the driver.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
When low-power mode timer is enabled, a counter alarm is set on the
idle timer before entering low-power mode. The counter API requires
a non-NULL callback function for the alarm. This commit adds a stub
callback function to satisfy the API requirement.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Removing references to infineon,cat1-spi-pdl. Differentiation between
PDL and HAL drivers have been changed to use Kconfig options.
Signed-off-by: John Batch <john.batch@infineon.com>
Removing references to infineon,cat1-spi-pdl from the device tree files.
Updates the driver bindings and driver file to look at the
infineon,cat1-spi binding and uses a Kconfig option to select Legacy HAL
implementation instead.
See https://github.com/zephyrproject-rtos/zephyr/pull/98035 for context.
Signed-off-by: John Batch <john.batch@infineon.com>
Multiple submitted requests are getting merged to single cancelled
net_buf on endpoint dequeue. While MSC class was correctly decrementing
the usage counters, it was not freeing SCSI buffer pointed to by frags.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Similarly to what was present on L0, GPIO port indexes are not continuous
in EXTI configuration register and a dedicated treatment is required.
Deal with it case by case.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
entropy_get_entropy() is allowed to block while waiting for
entropy. Don't exit with an error if entropy is exhausted,
wait instead. Move clock enable out of the inner loop to avoid
unnecessarily calling it multiple times.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Enable IS_GEN_UICR_IMAGE by default for the gen_uicr image.
A recent change accidentally made this default n, and broke a bunch of
users.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
When calling net_hostname_set() from C++, you will hit compile
errors if you attempt to use a const char *. Since the internals
of net_hostname_set() just uses memcpy(), we should pass in the
new hostname as a const char * to better support C++.
Tested using samples/cpp/hello_world, with an added call to
net_hostname_set().
Signed-off-by: Andrew Kontra <andrew@legatoxp.com>
Add missing getting/putting of the device when the RX interrupt is
enabled/disabled. Also fix enabling and disabling of the TX interrupt
so that the device is got/put only if the interrupt wasn't already
enabled/disabled and device PM reference counting is done correctly.
This fixes `console_getchar()` that would hang when used with
`CONFIG_PM_DEVICE_RUNTIME=y`.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add an overlay for some STM32 boards that embed an SDRAM connected
through FMC interface to better cover their accessibility. Despite
each SDRAM is a few MByte large test are not too long lasting:
- stm32f429i_disc1 .... 8MByte: <1s
- stm32f469i_disco ... 16MByte: <1.5s
- stm32f746g_disco .... 8MByte: <1s
- stm32f7508_dk ...... 8MByte: not tested
- stm32f769i_disco ... 16MByte: ~2s
- stm32h745i_disco .... 8MByte: <0.2s
- stm32h747i_disco ... 32MByte: <0.6s
- stm32h750b_dk ....... 8Mbyte: <0.2s
- stm32h757i_eval .... 32MByte: not tested
- stm32h7b31i_dk ..... 16MByte: not tested
Adding these test ensures non-regression on SDRAM support.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct memc driver test application to allocated only the required
size for the tests and print valid information instead of byte
offset that was actually a 32bit cell pointer offset.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Testing full SDRAM access on stm32h750b_disco showed instabilities
and corrupted accessed. Increasing the FMC SDRAM clock period fixes
the issue.
This change ensures stability of transactions with the SDRAM but
may be sub-optimized regarding performances. An alternate correction
would need further investigations in the FMC interface timings
and clocks configuration.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Testing full SDRAM access on stm32h745i_disco showed instabilities
and corrupted accessed. Increasing the FMC SDRAM clock period fixes
the issue.
This change ensures stability of transactions with the SDRAM but
may be sub-optimized regarding performances. An alternate correction
would need further investigations in the FMC interface timings
and clocks configuration.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
This commit introduces some clarifications to the "General
Recommendations" in the board porting documentation, in particular it
makes it clearer that DT nodes for key peripherals should be configured
AND enabled. It also makes it easier to see the set of recommendations
at a glance by adding a short summary for each item.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Co-authored-by: Erwan Gouriou <erwan.gouriou@st.com>
In current implementation, there are two issues found,
Issue 1, the feature defined in the SDP HFP HF record are used in
combination as HFP HF supported features reported via `+BRSF`.
Issue 2, the macro `BT_HFP_HF_FEATURE_CODEC_NEG_ENABLE` is not
aligned with macro name of other features. The other macros are named
with prefix `BT_HFP_HF_FEATURE_`.
Use `BT_HFP_HF_FEATURE_VOLUME_ENABLE` to set the volume feature
instead of `BT_HFP_HF_SDP_FEATURE_VOLUME_ENABLE`.
Rename `BT_HFP_HF_CODEC_NEG_ENABLE` with new name
`BT_HFP_HF_FEATURE_CODEC_NEG_ENABLE`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Set Log Level to Info when the Telnet socket reports ENETDOWN,
instead of logging an error each time the network is down.
Signed-off-by: Joel Schaller <joel.schaller16@gmail.com>
Clean indentation in macros used to define instances in STM32
HSEM hardware semaphore drivers.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Simplify interrupt handler helper macros by removing
STM32_UART_IRQ_HANDLER_DECL(), using STM32_UART_IRQ_HANDLER() only
renamed STM32_UART_IRQ_HANDLER_DEFINE() and aggregating where the
macro and STM32_UART_IRQ_HANDLER_FUNC() macro are defined.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Clean indentation in local macros used to define UART instances.
Remove extra line escape ending CONFIG_UART_ASYNC_API() macro value.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Clean indentation in IRQ_CONNECT_AND_ENABLE_BY_NAME(), IRQ_CONFIG_FUNC()
and IRQ_CONNECT_AND_ENABLE_DEFAULT() macros of STM32 PWM driver.
Remove a useless trailing semi column character in the interrupt function
defined with IRQ_CONFIG_FUNC() macro.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Clean indentation in STM32_I3C_DMA_CHANNEL_INIT() and
STM32_I3C_DMA_CHANNEL() macros of STM32 I3C driver.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Clean indentation in SDMMC_DMA_CHANNEL() macro and fix an extra line
escape at last line of SDMMC_DMA_CHANNEL_INIT() macro value.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Clean indentation in STM32_MCO_INIT() and STM32_MUX_CLK_INIT() macros.
Add after coma pclken field value in stm32_clk_mux_cfg_##id to ease
possible later changes.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add zephyr-keep-sorted tags to force sorted titles in the "Device Drivers
and Devicetree" section.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Update pyocd version to be greater than or equal to 0.36.0 to fix
the potential hang issue when execute "west packages pip --install"
This PR is to fix the issue #99115.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
VIM is a vector interrupt manager that TI devices have and is used a
interrupt controller. the driver's Kconfig selection is created as "VIM"
and is resulting in the confusion with a Text Editor name.
Make the VIM Kconfig option to indicate the vendor TI name in it.
Signed-off-by: Mihira Madhava Bollapragada <madhava@ti.com>
Disable gpio node in imx95 m7 which not owner gpio privilege
in default system manager config, the status should be set as okay
in specific case test instead of nxp_imx95_m7.dtsi
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
This private header can be used by tests for information on UID ranges
that should be cleaned for testing.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
xt-clang complains about l2_page_tables_counter_inc() being
unused but not GCC. So fix that by using it somewhere else.
Fixes#99753
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Increase the slot size for secure applications to
support testing applications that require more than
the default size of 0x20000
Signed-off-by: Bill Waters <bill.waters@infineon.com>
Utilize `data_reg` to select the appropriate SFF/EFF data register
base and use a single read/write loop for frame data access.
This replaces the separate SFF/EFF loops, streamlining the code
and reducing its footprint.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
macros with very generic name like DEVICE_ID are really not ideal so
prefix them all with GT911_.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Expanding responsibilities for hal_nxp:
- Add ZhaoxiangJin to the maintainers list to allow merge rights on HAL
- Add zejiang0jason and Holt-Sun to the collaborators list for review
Signed-off-by: David Leach <david.leach@nxp.com>
Starting in v2.21.0, the STM32 signing tool ('STM32_SigningTool_CLI')
stopped automatically adding padding bytes at the beginning of the
payload to align it to the 0x400 offset. To restore this behavior, the
'-align' flag must be passed to the signing tool post-build command.
This commit checks for signing tool version v2.21.0 or higher and
appends the '-align' flag to the post-build signing command. It also
changes local CMake variable names to lower case and corrects some
indentation issues.
Fixeszephyrproject-rtos/zephyr#99456
Signed-off-by: Chris Wilson <chris@binho.io>
This updates the thread analyzer to optionally leverage the kernel's
thread runtime stack safety infrastructure to act upon threads whose
unused stack space has fallen below their configured thresholds.
By default, the thread analyzer merely reports what it has found.
However, a developer can override this behavior with a custom handler
using thread_analyzer_stack_safety_handler_set().
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Adds support for thread runtime stack safety. This kernel feature
allows a developer to run enhanced stack usage checks on threads
such that if the amount of unused stack space drops below a thread's
configured threshold, it will invoke a custom handler/callback.
This can be used by monitoring software to log warnings, suspend
or abort threads, or even reboot the system.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
A few debug logs in TCP code relied on a fact that IP address offset is
the same in struct sockaddr_in and sockaddr_in6. However, the logs
casted the address to struct sockaddr_in, which is smaller than
sockaddr_in6, causing theoretical out-of-bounds access warnings in IPv6
case. Fix this by casting to struct sockaddr_in6 instead.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Early init stack pointer can interfere with bss segments if grown
enought, therefore stack pointer is set to safe area before starting
init.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Instead of using globals, save the clock configuration from DTS in each
instance's configuration block, from which it is consumed by the driver's
clock configuration functions.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
To enable/disable clocks, the UDC driver used function pointers stored in
the instance private data(!), which *could* be NULL... but in practice,
they were always initialized. Furthermore, the clock configuration is
done through Clock Control API calls so the code can be shared by all
instances.
Replace indirect calls through function pointers with direct calls to the
"priv_clock_(dis|en)able" function, which are renamed to "udc_stm32_..."
for consistency with the rest of the driver. The now-unused function
pointers are also removed from the instance data structure.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Instead of using global macro "USB_RAM_SIZE", replace it by its content
(i.e., DT_INST_PROP()) in the only place where it was used.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The HAL used by the SiWx91x SoC implements a mechanism to protect
atomic sections. Since this HAL also supports a zero-latency
interrupt (ZLI) mechanism, we need to ensure the same number of
bits are used for ZLI interrupts.
The interrupt priority level (2) depends on a hardcoded value in the
Simplicity SDK (CORE_ATOMIC_BASE_PRIORITY_LEVEL).
Without this fix, arch_irq_lock (which sets the BASEPRI register to
0x4 when zero-latency interrupts are not enabled) is overridden by
CORE_EnterAtomic in the HAL, which sets BASEPRI to 0xC since the HAL
does not use the BASEPRI_MAX function. IRQ might then fires since it's
register with a lowest priority in Zephyr.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
It is now more obvious that the move_current_to_end_or_prio_q() logic
is supposed to match that of k_yield() (without the schedule point).
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
All instances of the internal routine move_thread_to_end_of_prio_q()
use the current thread. Renaming it to move_current_to_end_of_prio_q()
to reflect that.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
The routine z_move_thread_to_end_of_prio_q() has been renamed to
z_yield_testing_only() as it was only both only used for test code
and always operated on the current thread.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
`west sdk install` may fail with a GitHub API rate-limit (HTTP 403)
error. This typically occurs when the command is run multiple times
after previous failures, which is common for new users setting up
the project. Currently, the thrown exception only links to a generic
GitHub rate-limit documentation page, which may be confusing to users.
Users can bypass the rate limit by authenticating with GitHub using a
Personal Access Token. The install script supports this via the
`--personal-access-token` argument. Therefore, detect rate-limit related
failures and print a helpful message suggesting the use of this
argument or netrc based authentication.
Signed-off-by: Beleswar Prasad Padhi <b-padhi@ti.com>
The k_poll signal and event code is reworked a bit such that
signal is raised and event is processed only when appropriate.
We want to avoid changing the internal of event and signal
objects at the same time we try to raise the signal (which
changes the internal states too).
In addition, print out some information on how many signals
raised and received to indicate we are actually switching
all related threads.
Fixes#98136
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Allow placing a custom bicr.json file in the application source
folder which will be used instead of the default one in the
boards folder. Also allows setting a custom name to use for the
file so multiple files can be placed in either boards or app dirs
and selected with Kconfig (prj.conf or <board>.conf)
The following will take precedence over the bicr.json file in the
board folder:
- <app>/bicr.json
- <app>/bicr_foo.json + CONFIG_SOC_NRF54H20_BICR_NAME="bicr_foo.json"
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add an entry with the symbols introduced for Ethernet MAC address
configuration.
Add removed symbols to the migration guide.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Rework the Atmel SAM GMAC driver to read a MAC address from the provided
NVMEM cell instead of using I2C commands directly.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add a preprocessor check to ensure that DWARF Control Flow Integrity (CFI)
headers are only included when building with GCC or Clang toolchains, as
CFI support is currently limited to these compilers. This prevents
unsupported compilers from including architecture-specific CFI headers.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Replace "struct sockaddr" by "struct net_sockaddr" as that is
the remaining of the POSIX symbols found in the tftp library.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The native_sim Ethernet driver was still using POSIX symbols,
so convert these to use Zephyr ones.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
These samples were still using POSIX symbols without enabling
POSIX APIs, so convert these to use Zephyr ones.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Convert coap_download and coap_upload to use POSIX APIs just to be
consistent with other samples in sockets directory.
Replace non-POSIX network symbols by POSIX ones in the network
samples. We do not want to have network samples that mix both
Zephyr network API with the relevant POSIX API like
zsock_socket() and socket() etc.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Remove the tests/posix/headers testsuite.
A large part of this testsuite was originally feeling-out what types,
functions, and other declarations were expected in POSIX headers when
CONFIG_POSIX_API was not selected.
Really, libraries and applications should generally not expect to be able
to use POSIX headers in particularly meaningful ways when POSIX APIs are
not enabled.
The portions of the testsuite that check for the existence of declarations
and symbols when POSIX APIs are configured also effectively duplicates
the implicit tests of simply compiling code and testsuites.
Also, given that CONFIG_POSIX_API is effectively deprecated, it does not
make a lot of sense to maintain the testsuite.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The overlay indicated the pin was active-low with a pull-up resistor, but
the hardware forces a pull-DOWN which makes the pin active-HIGH instead.
Also add a comment indicating that the pin is not wired to a button and
a short (to Vdd!) must be applied via a jumper wire.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Fixes an issue introduced in commit
32615695ad which wrongly did not
check what the residing device was on before determining if a
slot was part of a partition area
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
SiFli HAL is using HAL_Delay_us to delay for certain microseconds.
This is a weak function. I overwrites this function with Zephyr k_sleep.
Signed-off-by: Gang He <ganghe@sifli.com>
Make SNTP resynchronization asynchronous, so that it doesn't block the
system work queue while waiting for response.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Move the code responsible for setting clocks into a helper function,
as it'll be reused with asynchronous resynchronization.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Documentation for west blobs `--cache-dirs` and `--auto-cache`,
respectively config options `blobs.cache-dirs` and `blobs.auto-cache`.
Signed-off-by: Thorsten Klein <Thorsten.Klein@bshg.com>
An auto-cache directory can be provided via the `west blobs fetch
--auto-cache` argument or the `blobs.auto-cache-dir` config option.
When enabled, the auto-cache is automatically filled whenever a blob is
missing and must be downloaded.
One or more additional cache directories can be specified via argument
`west blobs fetch --cache-dirs` or the `blobs.cache-dir` config option
(multiple paths separated by `;`).
`west blobs fetch` searches all configured cache directories (including
the auto-cache) for a matching blob filename. Cached files may be stored
either under their original filename or with a SHA-256 suffix
(`<filename>.<sha>`).
If found, the blob is copied from the cache to the blob path; otherwise
it is downloaded from its url to the blob path.
Signed-off-by: Thorsten Klein <Thorsten.Klein@bshg.com>
Regarding documentation, when changing an excluded file, contributors
are encouraged to remove it from the list and format it in a separate
commit.
Signed-off-by: Thorsten Klein <Thorsten.Klein@bshg.com>
Add support for connecting the CIS in QoS state.
To support this some checks were added to check the CIS
state while entering the enabling state, as well as the
ASE state when the CIS was connected to determine when to
send the ASE start opcode.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When CONFIG_BLINK_DELAY_SHORT or CONFIG_BLINK_DELAY_LONG exceed the
timer's range, automatically calculate blink delays from the LED's
PWM period defined in devicetree using configurable divisors.
Add led_periods_ns array to store PWM periods for each LED and new
Kconfig options BLINK_DELAY_SHORT_LED_PERIOD_DIV and
BLINK_DELAY_LONG_LED_PERIOD_DIV to control the calculation.
This ensures the LED PWM sample works on platforms with timer
limitations by providing hardware-appropriate fallback delays.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
The source and destination burst lengths can be configured with a value
from 1 to 64. As the appropriate values are available in the DMA
configuration structure provided by Zephyr, these can be set during driver
configuration. Unfortunately, the STM32 DMA LL API does currently not
provide the minimum and maximum values.
Signed-off-by: Pascal Linder <pascal.linder@zuehlke.com>
Added conditional compilication for 'power_state_set' function. The
changes ensure that mode of NBU domain is manually set only when
the NBU is not used. If NBU is enabled, the mode of NBU domain is
auto updated by software run on NBU.
Change include:
- Conditional checks around the NBU mode in sleep and deep sleep mode.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Move lz4 to become external module. It is not in the default manifest
anymore (through submanifests) and will need to be added if application
requires it per the docs.
Samples will be moved to the module itself.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Those tests are needed for verifying and testing tf-m. While not needed
directly by zephyr, they are needed for testing and CI.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Adds the missing INPUT_TOUCH_STRUCT_CHECK for the config struct, to harden
against member reordering.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Adds an assert to inform the user of possible coordinate wrap around
due to missing screen dimension configurations.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Use the new file-groups feature to consolidate the NXP areas, and have
more specific collaborators/reviewers over certain areas.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Fix incorrect TLV (Type-Length-Value) data length calculation for
SSP configuration blob version 3.0. The blob30->size field does not
include auxiliary TLV data appended after the main structure, leading
to incorrect parsing boundaries.
Changes:
- Use the total 'size' parameter instead of blob30->size for v3.0
- Pass size parameter through dai_ssp_parse_aux_data() chain
- Ensures correct parsing of auxiliary data (clocks, sync, DMA controls)
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Add explicit bespoke_cfg_size parameter to the dai_config_set()
function and its underlying driver API to improve configuration
validation and security.
Changes:
- Add 'size_t size' parameter to dai_driver_api.config_set callback
- Update dai_config_set() inline wrapper to pass size parameter
- Update all DAI driver implementations:
- Intel: SSP, DMIC, HDA, ALH
- NXP: SAI, ESAI, MICFIL
- Add documentation for new size parameter
This change enables drivers to validate the size of bespoke
configuration data, preventing buffer overruns and improving
robustness of the DAI configuration interface.
All existing callers must be updated to pass the size of their
bespoke configuration structures.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Add handling for SSP_GTW_DMA_CONFIG_ID (0x1000) TLV type in SSP driver's
auxiliary data parsing functions. This TLV type is explicitly ignored as
it does not require any processing by the driver.
Changes:
- Define SSP_GTW_DMA_CONFIG_ID constant (0x1000) in dai-params-intel-ipc4.h
- Add case handling in dai_ssp_check_aux_data() to validate this TLV
- Add case handling in dai_ssp_parse_tlv() to skip processing of this TLV
This allows SSP configuration blobs containing SSP_GTW_DMA_CONFIG_ID
entries to be parsed successfully without triggering errors
for undefined TLV types.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Add a support for Hycon Technology HY4245 fuel gauge driver.
The HY4245 operates with Single and Two Cells Li+ battery cells as a
stand–along battery gauge. The device uses GaugePackTM algorithm, which
mixes Coulomb–Counting and Open–Circuit–Voltage (OCV) measurements with
battery cell characteristics to manage battery gauge, to maintain accurate
battery capacity estimates with compensation for rate, temperature, age
and self–discharge effects.
Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
Adds devicetree nodes for IMR (Isolated Memory Regions)
information registers across all ACE platforms.
These registers provide information about the IMR memory region,
such as whether it is in use and its size.
Implements structures and utility functions to access
these registers and retrieve IMR information programmatically.
This allows dynamic detection of IMR availability and its size at runtime,
instead of relying on hardcoded values.
Removes the hardcoded IMR_L3_HEAP_SIZE definition since the size can now be
determined dynamically using the newly added ace_imr_get_mem_size() func.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
This patch will extend MMU mapping range for hwreg1 entry
because it is required to access lower register addresses
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Replace the outdated :ref:`mps3_board` reference with the proper
:zephyr:board:`mps3` role to align with current board documentation.
Signed-off-by: Marco Domingo <marco.domingo2@arm.com>
Update board YAML full_name to improve searchability and make it
easier to find Corstone FVP platforms in the supported boards list.
Update the mps3 .rst file to align the title and zephyr:board
directive with the YAML full_name, consistent with the mps4 board
documentation.
- mps3_an547 -> "MPS3 FPGA/Corstone FVP"
- mps4 -> "MPS4 Corstone FVP"
Signed-off-by: Marco Domingo <marco.domingo2@arm.com>
When CONFIG_MAX_XLAT_TABLES is too small and new_table() cannot allocate
a translation table, the system must halt rather than continue with
undefined behavior.
This change ensures k_panic() is called after reporting the error,
preventing the system from proceeding when it runs out of translation
tables. Additionally, adds printk() fallback for configurations where
CONFIG_LOG is disabled to ensure the error is always visible.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
- It seems that the mask variants of GPIO functions are not present in
the latest sdk, so replace those with direct register access.
- This was already done in [0], but was reverted due to some hal
problems.
- I am working on a hal update, but since this change does not require a
hal update to work, it would be best to merge this first.
[0]: https://github.com/zephyrproject-rtos/zephyr/pull/83402
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
From testing on STM32F723E-DISCO, it seems necessary to enable OTGHSULPI
clock in addition to USBPHYC when the internal USBPHYC HS PHY is used.
(USBPHYC is found on STM32F723xx, STM32F730Z8 and STM32F730I8 SoCs)
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Update workflow to use the new version of Vermin to enrich the Python
minimum version checks in the CI pipelines.
Signed-off-by: Morten Kristensen <me@mortens.dev>
Sam Burke has agreed to step down as maintainer of the State Machine
Framework (SMF), per discussion with Keith Short. Update the SMF
MAINTAINERS entry to reflect this by removing Sam.
Signed-off-by: Vladislav Kulikov <vlad_kulikov_c@pm.me>
mdns_responder.h did not include header guards for C++, causing
it to fail if used in a C++ file. This change adds the header
guards.
Tested using samples/cpp/hello_world, with an added call to
mdns_responder_set_ext_records().
Signed-off-by: Andrew Kontra <andrew@legatoxp.com>
Previously, the LCP MRU option sent by the peer was ignored.
This could result in the interface MTU remaining at the default (1500),
even if the peer requested a smaller MRU, potentially leading to packet
loss. This commit adds parsing for the peer's MRU option and updates the
network interface MTU accordingly.
Signed-off-by: Nik Schewtschuk <nik@schew.dev>
Perform cache operations in thread context when the buffer ownership
changes between USB stack and UDC driver. This offers clearly measurable
throughput increase on Mass Storage when double buffering is enabled.
When endpoint operations are not double buffered the difference is
negligible. The positive side effect is reducing number of operations
performed in interrupt context.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Adds the `CONFIG_BT_SMP_LEGACY_PAIR_ONLY` Kconfig option to force
devices to use legacy pairing. This has a dependency on
`CONFIG_BT_TESTING` as it is only intended for testing purposes, and use
of legacy pairing is discouraged.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Quotes around `"SUBALIGN ${SUBALIGN}"` results in the parameters to
become a text string with a space, and therefore will give the warning
> CMake Warning at /.../extensions.cmake:5197 (message):
> zephyr_linker_section(NAME ...) given unknown arguments: SUBALIGN 4
> Call Stack (most recent call first):
> /.../extensions.cmake:5333 (zephyr_linker_section)
> /.../CMakeLists.txt:x (zephyr_iterable_section)
Remove the quotes so that `SUBALIGN` and the value are correctly treated
as argument name and value.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
WS_MAGIC is a constant string and when calculating lengths for copying
we always exclude the NULL terminator. In result, using strncpy() for
copying can generate a warning about truncated string, as WS_MAGIC will
always be truncated from the NULL terminator. Therefore replace
strncpy() with memcpy() as it seems more appropriate for this case.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
`zbus_chan_pub_stats_msg_age` returns milliseconds, while `clock_window`
is in clock ticks. Update the thresholds to refer to the same 50ms
window as `clock_window`.
Fixes#99500.
Signed-off-by: Jordan Yates <jordan@embeint.com>
In order for wake-up pins to behave properly in Standby mode on STM32WBA,
the I/O Standby Retention must be enabled. (It only comes in effect when
the SoC does enter Standby mode, and has no effect otherwise).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
- Currently, ADC driver does not implement any PM related constraints.
Due to this, when using it with PM enabled (example ieee802154, which
enabled PM by default), it will stall the system.
- Similar to pwm driver, disable standby when ADC is sampling. The
variable standby_disabled is just a flag to ensure that we disable (or
enable) standby only when ADC driver selects it. Otherwise, it is
possible to have a condition where ADC enabled PM and ieee802154
disables it.
- This follows what TI SDK ADC driver does [0].
[0]: 507c93efc8/source/ti/drivers/adc/ADCCC26XX.c (L186)
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
A CIS may be connected in either the QoS Configured state
or the enabling state. The QoS Configured state is the
earliest state it is allowed, due to it being the first
state where the CIS_ID and ASE_ID are paired.
The enabling state is the "last" state it is allowed,
as if the ASE is in the streaming, disabling or releasing
state we should not allow/expect a CIS connection to happen.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Driver did not allow to execute any invalidate all operation.
This operation should not be allowed for data cache as it will lead to
undefined behavior but it is ok to invalidate instruction cache.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Update wakeup source dump function to DBG level. This function will
print and clear wakeup source registers of NXP wifi chips with
CONFIG_WIFI_LOG_LEVEL_DBG enabled. By changing debug level of this file,
user can avoid wakeup source clear.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Testing on linux, --flash-before argument did not work to wait for jlink
upload to complete. Instead Serial port opening throws file not found. The
fix ensures that the code waits for the serial port to appear before
attempting to connect. Tested on a proprietary platform with virtual UART
through usb.
Signed-off-by: Eemil Visakorpi <eemil@doublepoint.com>
This change implements full AVRCP Browsing support on both CT/TG,
and included all public APIs and callbacks, and add shell commands
for testing.
Signed-off-by: Make Shi <make.shi@nxp.com>
Introduce an optional alloc_buf() callback into AVCTP so that each
session can decide which RX buffer pool to use. Provided a dedicated
RX pool for the AVRCP browsing channel.
Also provided BT_AVRCP_BROWSING_L2CAP_MTU for configure.
Signed-off-by: Make Shi <make.shi@nxp.com>
Drop the 'U' suffix from enum hex literals keep style consistent
and rename `bt_avrcp_list_app_setting_attr_rsp` to the clearer.
Signed-off-by: Make Shi <make.shi@nxp.com>
Extend jesd216 sample with nrf54l15dk cases. These platforms have
jesd216 compatible flash memories on board.
Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
Add case for using flash with some parameters read with runtime sfdp
instead of dt declarations.
Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
Support added for clock control using TISCI for devices using the binding
ti,k2g-sci-clk. This driver relies on the TISCI layer to make calls to the
DMSC core to set and get the clock rate and retrieve clock status.
Signed-off-by: Dave Joseph <d-joseph@ti.com>
If the option BTP_L2CAP_CONNECT_V2_OPT_HOLD_CREDIT or
BTP_L2CAP_LISTEN_V2_OPT_HOLD_CREDIT is set, set the local flag
`hold_credit`. When the data received, holds the buffer and returns
the error code `-EINPROGRESS`.
The held buffers will be released if the L2CAP channel disconnect
callback is triggered. Or only of the held buffers will be released
if the L2CAP BTP command `credits` is received.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
If `CONFIG_BT_CLASSIC` and `CONFIG_BT_L2CAP_MAX_WINDOW_SIZE` are
defined, set the TX data buffer count to
CONFIG_BT_L2CAP_MAX_WINDOW_SIZE. Or, set the TX data buffer count to
CHANNELS.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add a new BTP L2CAP command BTP_L2CAP_LISTEN_V2 to extend the L2CAP
server feature.
Compared with BTP command `listen`, two fields are added, including
`mode` and `options`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add a new BTP L2CAP command BTP_L2CAP_CONNECT_V2 to set extend the
L2CAP connect request.
Compared with BTP command `connect`, two fields are extended,
including `mode` and `options`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Register ECHO callbacks in function `tester_init_l2cap()`.
Unregister ECHO callbacks in function `tester_unregister_l2cap()`.
Send ECHO response if ECHO request is received.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add the function `br_alloc_buf_cb()` to allocate receiving buffer for
BR L2CAP channel.
Add the function `br_recv_cb()` to report the received BR L2CAP
channel data.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Configure the following configurations to support the L2CAP
retransmission and flow-control mode.
CONFIG_BT_L2CAP_RET=y
CONFIG_BT_L2CAP_FC=y
CONFIG_BT_L2CAP_ENH_RET=y
CONFIG_BT_L2CAP_STREAM=y
CONFIG_BT_L2CAP_FCS=y
CONFIG_BT_L2CAP_EXT_WIN_SIZE=y
CONFIG_BT_L2CAP_MAX_WINDOW_SIZE=5
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The script currently only adds the 'size: XS' label for small PRs (1
commit with ≤1 addition and ≤1 deletion), but it doesn't remove this
label if the PR grows larger after subsequent updates.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Allows you to relocate the vector table from Flash to ITCM/DTCM to
minimize interrupt latency. TCM offers single-cycle access compared to
multi-cycle SRAM reads and even slower flash reads. This improves exception
handling speed for real-time workloads.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Couple of AF_UNSPEC need to be replaced by NET_AF_UNSPEC so that
OpenThread tests will pass.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Do not delete the thread from within the thread callback function,
secure thread_delete against trying to delete a terminated thread.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Fix a bug in the test which caused it to fail (depending on compiler,
platform and optimization level).
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Change direction for raw data file from $ZEPHYR_BASE
to <path_to>twister-out/../<test>/
Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
Fix broken copyright parsing. Since REUSE 6.0.0 the copyright_lines
attribute has been removed. The new attribute copyright_notices is used.
Additionally, the python package REUSE should now be at least v0.6.0.
This will require an update of REUSE for users that were using a
version earlier than 0.6.
Fixes#98378
Signed-off-by: Simone Orru <simone.orru@secomind.com>
As of Core v6.2, the passkey entry pairing method for legacy pairing
does no longer grant authenticated MITM protection. This commit
updates `smp.c` accordingly to not grant the authenticated states when
using legacy passkey entry pairing.
Adds a check to make sure that bonds that have been stored persistently
adheres to these changes. Bonds that have been generated using the
legacy passkey entry pairing method will thus be downgraded from
authenticated to unauthenticated when restored from storage.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Update top-level comment of `include/zephyr/crypto/crypto.h` as the API is
no longer experimental, as indicated by the @version 1.0.0 tag in Doxygen.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
MAX32657 NS does not have access to the flash peripheral, so ensure the
placeholder flash controller node is disabled, and update the "storage"
node in the evkit board definition to properly document its use for TFM.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
remove mdio_bus_enable/mdio_bus_disable, as they are no
longer needed and make the mdio api simpler.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Removes differentiation between pdl and hal based drivers from device
tree. This differentiation is now done as a Kconfig option.
Signed-off-by: John Batch <john.batch@infineon.com>
Fixing build errors related to reference to an incorrect define.
Adds missing headers to pinctrl_soc.h for Edge platform.
Signed-off-by: John Batch <john.batch@infineon.com>
Add checks for the values in btp_ascs_preconfigure_qos
to determine if they are valid. If they are invalid
we reject the command.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
If both the TX and RX SDUs are 0, then we reject
the call as that is an invalid configuration
(minimum SDU size is 1, and 0 indicates that
no data in that direction is being configured).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fixes the max32 can driver to follow the convention for drivers to
select pin control if they need it.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
SDIO is now fully supported on STM32 targets, and this enabled the use
of Wi-Fi functionality on Arduino H7 boards. Remove the note in the
documentation that states only Bluetooth is supported.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The tests are failing in architectures that support SMP. Filtering them to
make CI happy, as done in #97827. Issue #98217 was created to address that
separately for all tests.
Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
Add a new type of observer: Async Listeners. They are executed within the
system work queue context, offering distinct advantages:
- Asychrouness: obviously it gains the ability of run some urgent/light
work load in a separate context.
- Prioritization: Async Listeners typically execute before other
application observers, as they run within the system work queue context
which is cooperative.
- Reliability: Ensures no message loss during execution. They use the same
mechanism as Message Subscribers.
Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
This commit deinitializes platform modules when external network
interface is brought down. It also delets the multicast routes that are
added for OpenThread interface.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
In this commit, `net_socket_service_register` is called when a platform
module that has sockets is deinitialized, and it's socket/sockets are
closed.
This commit also handles a case when a module tries to join a multicast
group and a subscription, from another module, is already present.
Also, covered network namespace changes done in #99169
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
OpenThread interface is initialized beform Wi-Fi interface.
`otPlatTrelEnable` is called by OpenThread stack when it's interface is
being initialized. Given this scenario, socket operation, like `bind`,
will fail. There is also no mean to get a valid pointer to backbone
interface. This is why, `trel_plat_init` was declared and called when
backbone interface reported connectivity.
This commit handles the `ot trel disable/ot trel enable` scenario that
can be initialized from CLI. `otPlatTrelEnable` will be called, but
`trel_plat_init` will not be called anymore, leaving trel socket without
any options set, and `net_socket_service_register` is not called
anymore, to handle incoming traffic.
Now, when `otPlatTrelEnable` is called, it will verify if Wi-Fi
interface is connected and will call `trel_plat_init` if needed.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Zephyr subsystems' headers should not duplicate C library prototypes
(in this case strdup(), which is either ISO C23 or a POSIX extension to
the C library <string.h>).
Instead they should request those prototypes from the C library.
By now Zephyr only requires ISO C17, but many C libraries will have
strdup() and expose it also when the POSIX extensions prototypes are
requested, so let's request these prototype from the C library by
setting the feature test macro _POSIX_C_SOURCE to version 2008.09
which includes it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix a missing unref of a bt_conn reference, leading to a ref count
mismatch, and causing the following warning to be printed:
bt_conn: Found valid connection ... in disconnected state.
Signed-off-by: Aleksandar Stanoev <aleksandar.stanoev@nordicsemi.no>
USBD_MAX_UDC_MSG configures the number of events coming from the UDC
driver that the stack can keep. This can be filled very quickly if there
would be multiple bus events for some reason, or function handlers of
those events are blocked for long time. As a consequence, subsequent
events could be dropped, and completed transfers not handled. To avoid
it, we can store completed transfer requests in a slist and check it on
every event.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
SOC_RESET_HOOK is already too late because the code touches ram already
instead use the newer SOC_EARLY_RESET_HOOK so we can do ECC
initialization before using the memory
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Verify that dns_unpack_name() generates a valid DNS name when unpacking
records and that it returns an error in case of overflow.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
As the loop unpacking the DNS name from records checks the current
label length on each iteration, it's also needed to update the remaining
buffer length on each iteration, otherwise the buffer length checks
doesn't work as expected.
Additionally, the remaining buffer checks while technically worked, they
were conceptually wrong and unintuitive. The buf->data pointer doesn't
move, so comparing against this pointer when adding new labels doesn't
make sense. It's more intuitive to simply compare the label size vs
the remaining buffer space.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The rewrite by ruff seems to wrongly pass a single argument to filter(),
as seen in the logs:
```
f.process()
File "/home/runner/work/zephyr/zephyr/zephyr/./scripts/ci/test_plan.py",
line 145, in process
self.find_boards()
File "/home/runner/work/zephyr/zephyr/zephyr/./scripts/ci/test_plan.py",
line 292, in find_boards
self.resolved_files.extend(list(filter(resolved_filter)))
^^^^^^^^^^^^^^^^^^^^^^^
TypeError: filter expected 2 arguments, got 1
```
Split things up properly to avoid this.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Verify that if the application triggers asynchronous connect with
non-blocking sockets, and starts to monitor the socket with poll()
immediately but with POLLIN only set, the poll() is still able to
report an error if the connection fails. As no POLLOUT is monitored, the
application won't know when the connection is done in case of success,
but it should still be notified in case of errors.
To achieve this, modify the existing test case to allow to specify what
events should be monitored by poll(). Additionally monitor the time
spent in poll() - an error should cause poll() to exit immediately,
not after the specified timeout.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
If a thread was sleeping in poll(), monitoring POLLIN only, it should
still be notified if an asynchronous connection, triggered by
non-blocking connect(), failed. Currently that's not the case.
In result the application would never know whether the connection
was successful or not and would be stuck with a disconnected socket
that would not report anything with poll().
This was not an issue if POLLOUT was monitored as well, because POLLOUT
sets up a connect semaphore that was reset in case of errors. POLLIN
however only monitors the recv fifo, which was not waken up in such
case.
Fix this by canceling any pending waits on recv fifo and recv
condition variable.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The function prototype for `z_riscv_pmp_read_config()` was previously
declared in `tests/arch/riscv/pmp/clear-pmp-unlocked-entries/src/main.c`.
This local declaration is no longer necessary as the prototype is now
defined within the centralized PMP header, `include/arch/riscv/pmp.h`,
which is already included via `kernel_internal.h`. The prototype
is guarded by the `CONFIG_ZTEST` Kconfig option.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
- BASS mandates that a remove_source operation is not done if
we are synced to PA or BIS. This PR fixes that
- Update BabbleSim tests to reflect this behavior
- Fixes BASS/SR/SPE/BI-05-C
Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
Change the zephyr,memory-attr of the ext_memory / ext_flash_mem node to
ATTR_MPU_FLASH because ATTR_MPU_IO does not allow unaligned memory access.
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
Remove the ext_memory: memory@70000000 node as the external flash memory
is part of the board design. The nucleo_h7s3l8 and stm32h7s78_dk boards
already have this node.
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
Until now the code was using the path to the .hex file to select the
directory where the generated JSON file required for nrfutil would be
generated. But this has a problem: if the .hex file in a sysbuild
project is located in the tree as a precompiled binary, the runner would
place a file in there and make the tree dirty. Instead use the build_dir
folder which always corresponds (in both sysbuild and regular builds)
to the current target build directory.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This cannot possibly work, if POSIX is disabled, then the POSIX
symbols are also not found so remove the "without_posix_api" tests.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
west: update hal_nxp to integrate mcux: middleware: ieee_802_15_4 MAC: Add
CONFIG_NXP_IEEE802154_MAC
zephyr: blobs: add MCXW71 & MCXW72 BLE controller and Host libraries
(ieee-802.15.4-mac) to MCUXSDK 25.09.00 release
This new version of the BLE controller is for ZigBee support and
implements ieee-802.15.4 MAC interface.
Update connectivity framework for MCXW71 & MCXW72 BLE controller
(ieee-802.15.4 MAC) from MCUXSDK 25.09 release.
Signed-off-by: Guillaume Legoupil <guillaume.legoupil@nxp.com>
STM32H7 platforms now enable cache management by default.
To ensure data coherency after flash writes, invalidate cache
lines to the region written.
This prevents stale data and ensures proper memory visibility.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
On STM32H7 targets with cache management enabled by default, blocking
access to flash option/control registers using flash_ex_op() may cause
imprecise Bus Faults when attempting to unlock them immediately afterward.
This is due to instruction pipeline and cache effects, where the CPU might
execute a forbidden access before the lock is fully acknowledged.
Adding barrier_isync_fence_full() ensures that all prior
instructions are completed and the pipeline is flushed,preventing premature
access and avoiding the fault.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Do not enable network compatibility mode flag for network tests
so that we will get better coverage of the wrong network APIs
used.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Use the underlaying zsock_ prefixed fcntl macros instead of the
POSIX_API fcntl renames.
After d45cd6716b and this, we do not
anymore use fcntl directly but use the underlaying Zephyr APIs.
So, let's also remove this include.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
According to the compiler, the ret variable might be uninitialized
in the function (looks like a false positive but fix it anyway).
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If the sensor_value only has an integer part N, this always resulted in q31
value of <N-1>.999999.
As the calculated shift value already uses 'abs(sample.val1) + 1' it is
safe to assume we can't have 100% scaling of this integer part and we can
omit the -1.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add a build-all test for stm32n6_axisram driver that is currentl not
default enabled in any STM32N6xx based boards.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Correct clock config info recently modified that should use
STM32_DT_INST_CLOCK_INFO_BY_NAME() macro instead of
STM32_CLOCK_INFO_BY_NAME() macro.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
The BMCA comparator ptp_btca_ds_cmp() did not follow the IEEE1588
ranking order: priority fields handled only the “greater” case, causing
valid winners to fall through to the clockIdentity tie-breaker and
resulting in incorrect grandmaster selection. This also caused the
state transition from TIME_TRANSMITTER to GRAND_MASTER to be missed.
Fixes: #99562Fixes: #99566
Signed-off-by: Peter Büchler <peter.buechler@gmail.com>
Use a list of ports and FOR_EACH to instantiate GPIO devices instead of
having one line to instantiate each port. This is much shorter and also
makes it easier to add support for new ports, if necessary in the future.
While at it, cover all ports from A to Z since it is now trivial to do so.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Introduce documentation for using dtsh (a Devicetree Shell)
as an external module in Zephyr.
This module installs a West extension.
See also RFC #59863.
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
Add SCMI generic power state definitions for ON and OFF as specified
by the SCMI Power Domain protocol.
These constants will be used when setting or querying power states.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
It is thus possible to enable CONFIG_UART_USE_RUNTIME_CONFIGURE for
this driver and re-configure a uart device at runtime.
Driver's init function was moved to the bottom of the file for two
reasons: to ease factorization and to follow the common device driver
source structure (usually: the init function is right before the
API structure and the instanciation macros).
Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
On destructive or functional reset, the soc_reset_hook will check reset
source and clear SRAM TCM.
Add support to let developer clear specify reset source to retein memory
content.
Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
MSC BOT can work with just one buffer because buffer to receive CBW is
never queued at the same time as CSW. SCSI buffer needs to be multiple
of bulk endpoint wMaxPacketSize and therefore is suitable for handling
both CBW and CSW. Take advantage of this to reduce memory usage.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Double buffering make it possible to significantly increase the transfer
rates by avoiding idle states. With two SCSI buffers, one buffer can be
used by disk subsystem while the other is being used by UDC (ideally
with DMA).
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
When endpoint enqueue fails the device has no reliable means of recovery
other than a reset. Implement 6.6.2 Internal Device Error handling on
failed enqueue.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Configure GPT timers as system tick source when PM is enabled to resolve
low power mode issues:
- Cortex-M SysTick loses state during mix power-off
- SysTick cannot maintain time during system suspend
Configuration changes:
- Disable Cortex-M SysTick when GPT timer is enabled
- Set GPT clock frequency to 32768 Hz for low power operation, 32k is
reserved in soc level system sleep mode
- Configure system tick rate to 1024 Hz
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Enable GPT hardware timers on imx943_evk boards:
- gpt_hw_timer1 for M33 core
- gpt_hw_timer2 for M7_0 core
- gpt_hw_timer3 for M7_1 core
These will be used as system tick sources when PM is enabled.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Add GPT timer nodes to support system tick and counter functionality:
- gpt_hw_timer1/2/3: System timers for M33/M7_0/M7_1 cores
- gpt4: General purpose timer/counter
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Fix Device Tree formatting issues to comply with Zephyr coding style
guidelines for i.MX943 EVK board and dts files
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Introduce HID_USAGE_PAGE16() in order to be able to declare vendor
specific usage pages which require 16-bit numbers.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Let's use CONFIG_NATIVE_LIBC to detect builds with the host C library
instead of pressuming that any build targetting the POSIX architecture
uses it. This has not been the case for several years now, as we can
select different C libraries when targetting the POSIX architecture.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's use CONFIG_NATIVE_LIBC to detect builds with the host C library
instead of pressuming that any build targetting the POSIX architecture
uses it. This has not been the case for several years now, as we can
select different C libraries when targetting the POSIX architecture.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's use CONFIG_NATIVE_LIBC to detect builds with the host C library
instead of pressuming that any build targetting the POSIX architecture
uses it. This has not been the case for several years now, as we can
select different C libraries when targetting the POSIX architecture.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's use CONFIG_NATIVE_LIBC to detect builds with the host C library
instead of checking for both CONFIG_ARCH_POSIX && CONFIG_EXTERNAL_LIBC
as it is just simpler since we have this option.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's use CONFIG_NATIVE_LIBC to detect builds with the host C library
instead of checking for both CONFIG_ARCH_POSIX && CONFIG_EXTERNAL_LIBC
as it is just simpler since we have this option.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Commit 08fedb4a80 ("drivers: uart: npcx: add asychronous API support")
missed updating the clocks for uart2. This patch fixes it.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Changes the default value of the INPUT_CST816S_INTERRUPT flag to default to
true if the there is a compatible with the irq-gpio property enabled.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Some CID-related functionalities of the DTLS sockets are conditionally
compiled, make sure that code is built with tests/net/all test suite.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Some CID-related symbols were prefixed but not updated in sockets_tls.c
as that configuration was not built by the tests/net/all test suite,
hence easy to miss.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Since we are using sys_getopt now we do not need to pull unistd.h
for anything amore.
Let's remove it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
sys_getopt has now its global status variables prefixed with sys_getopt_
Let's fix the use here. Note this worked as Zephyr's POSIX_C_LIB_EXT
keeps a replica of these variables without the prefix.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
sys_getopt has now its global status variables prefixed with sys_getopt_
Let's fix the use here. Note this worked as Zephyr's POSIX_C_LIB_EXT
keeps a replica of these variables without the prefix, and it is
enabled by default.
And since sys_getopt was split from POSIX_C_LIB_EXT this component
only needs to enable GETOPT and no the whole POSIX_C_LIB_EXT.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
sys_getopt has now its global status variables prefixed with sys_getopt_
Let's fix the use here. Note this worked as Zephyr's POSIX_C_LIB_EXT
keeps a replica of these variables without the prefix, and it is
enabled by default.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
sys_getopt has now its global status variables prefixed with sys_getopt_
Let's fix the use here. Note this worked as Zephyr's POSIX_C_LIB_EXT
keeps a replica of these variables without the prefix.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
sys_getopt has now its global status variables prefixed.
Let's fix the docs.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This Kconfig, which it itself admits is for a "very specific case"
was set to default as yes, this includes extra code in drivers with
this functionality and increases driver struct size for cases where
this function isn't needed (i.e. all because it's enabled by
default), therefore change it to be opt-in rather than opt-out
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds this Kconfig, which is needed for the test, because it will
no longer be globally enabled by default
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds this Kconfig, which is needed for the test, because it will
no longer be globally enabled by default
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes an issue with an unused function being defined if
CONFIG_DEVICE_DEINIT_SUPPORT was disabled
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes an issue with an unused function being defined if
CONFIG_DEVICE_DEINIT_SUPPORT was disabled
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The test required an SD card to be plugged into the board.
the test only passes with the bus width set to 1
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Decide to remove stm32n6570_dk from this scenario since it seems to
be relevant and work when CONFIG_STM32_MEMMAP is enabled based on
how flash_stm32_xspi.c driver is implemented.
Since there is already a scenario(sample.drivers.spi.flash.stm32.memmap)
that test this mode, excluding from this scenario could also help us
avoid erasing the memory twice every day at the same address.
Note:
test with dma/interrupt mode will succeed without enable
CONFIG_STM32_MEMMAP if we remove dependency
on CONFIG_STM32_APP_IN_EXT_FLASH in 'flash_stm32_xspi_read'.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
add SOC_SERIES_STM32N6X dependency with USE_STM32_HAL_DMA_EX
to enable building applications that use XSPI with DMA
configuration.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
The test requires RAM-based vector table relocation
(CONFIG_SRAM_VECTOR_TABLE), which depends on CONFIG_XIP being enabled.
However, stm32n6570_dk lacks internal flash and does not support XIP,
making SRAM vector relocation unsupported.As a result, the test cannot
validate ISR execution from RAM on this platform.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
some scenarios (libraries.cmsis_dsp.transform.cq31,
libraries.cmsis_dsp.transform.rq31.fpu) in the test
tests/lib/cmsis_dsp/transform require a minimum RAM of 1024 KB
because they deal with data needing large buffer sizes for dynamic
allocation. However, 1024KB is insufficient for the tests to succeed.
By decreasing these values, the test will no longer be performed.
The rest of the tests will try to fit within SRAM size.
Note: checks have been made to ensure that 512 KB of flash and
128 Kb of RAM are enough to perform relevant daily tests on the
stm32n6570_dk.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Increase the size of the main stack to avoid a stack overflow error
when running some sample scenarios.
This occur by example on stm32n6570_dk,
sample.subsys.usb.uvc.encoder.jpeg scenario.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Replace the green user LED 1 with the red user LED 2 from alias led0
for the test to succeed.
LED1 is connect from a circuitry that prevents GPIO state from
triggering a interrupt while LED2 is directly wired to the GPIO pin.
While we're at it, change the LED's state from GPIO_ACTIVE_HIGH to
GPIO_ACTIVE_LOW to match the circuitry.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
There is no openthread_instance so the assert will always fail so
remove it to prevent compilation issue.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add an entry about the STM32 power supply configuration to the migration
guide for release 4.4 - it is now done through Devicetree instead of
Kconfig, and all existing Kconfig symbols have been deleted.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Replace the existing infrastructure to specify power supply configuration
through Kconfig with Devicetree, and update all boards according to new
mechanism.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Replace the existing infrastructure to specify power supply configuration
through Kconfig with Devicetree.
Set the LDO as default to reduce out-of-tree breakage - most users were
relying on LDO being the default and it is harmless to use LDO if board
is designed for SMPS. (Existing SMPS users should break anyways since the
Kconfig symbol no longer exists, but this ensures they actively set the
power supply to SMPS in DT)
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Introduce power controller binding for series equipped with two voltage
regulators (LDO + SMPS).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Replace the existing infrastructure to specify power supply configuration
through Kconfig with Devicetree. Also update all boards that were defining
the Kconfig to no longer do so.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add node representing the Power Controller to SoC DTSI of STM32H7RS series,
and update DTS of all STM32H7RS-based boards since the new node has
required properties.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Replace the existing infrastructure to specify power supply configuration
through Kconfig with Devicetree. Also update all boards that were defining
the Kconfig to no longer do so.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add node representing the Power Controller to SoC DTSI of STM32H7 series,
and update DTS of all STM32H7-based boards since the new node has required
properties.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
- Add support for chaining multiple 32x16 panels horizontally by
setting width to multiples of 32 (64, 96, 128, etc).
Signed-off-by: Siratul Islam <email@sirat.me>
Exclude SOC_CY8C6244LQI_S4D92 from UART async API support due to
hardware limitations, similar to SOC_FAMILY_INFINEON_CAT1C.
Signed-off-by: Yurii Lozynskyi <yurii.lozynskyi@infineon.com>
Add overlay files and sample configuration for cy8ckit_062s2_ai
to enable UART async API functionality.
Signed-off-by: Yurii Lozynskyi <yurii.lozynskyi@infineon.com>
Update board full names to include PSOC™ trade mark symbols
for consistent branding across Infineon board definitions.
Signed-off-by: Yurii Lozynskyi <yurii.lozynskyi@infineon.com>
C99 has been the minimum required C standard version for Zephyr since
its inception. After multiple attempts and discussions, a decision has
been made to upgrade to C17 going forward.
This commits replaces the default C standard from C99 to C17 in the
configuration and build system, and deprecates support for the older
standards.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add a new Kconfig option CONFIG_XEN_SYSCTL_INTERFACE_VERSION that allows
to change the version of the Sysctl interface used by Zephyr to issue
sysctl hypercalls.
For now versions 0x15 is supported.
Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Add a new Kconfig option CONFIG_XEN_DOMCTL_INTERFACE_VERSION that allows
to change the version of the Domctl interface used by Zephyr to issue
domctl hypercalls. Add compile-time checks to enable or disable certain
Domctl operations based on the selected Domctl interface version.
For now versions 0x15, 0x16, and 0x17 are supported.
Also it required to correctly guard domctl call that were not supported
prior to specified version.
Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
If 0 is passed as domain id to the Xen createdomain hypercall, it will
allocate a new domain id and return it via the domctl structure.
Allow callers to access this new domain id via a pointer arg.
This will allow to create domains without explicitly specifying the
domain id for them.
Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
The size is passed in bytes, not in megabytes. So rename the parameter
to avoid confusion.
Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Domain control call "XEN_DOMCTL_getvcpuinfo" provides information
about domain's virtual CPU(s). It can be used by Domain-0 services
for gathering statistic and vCPUs current status.
Signed-off-by: Dmytro Semenets <dmytro_semenets@epam.com>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
This hypercall can be used get some information about physical machine
and running guests:
- sysctl hypercall "xen_sysctl_getphysinfo" allows read information about
physical machine: number CPUs, memory sizes, hardware capabilities, etc.
- sysctl hypercall "xen_sysctl_getdomaininfolist" returns array of domain
info structures that provide information about particular domain(s).
Signed-off-by: Dmytro Semenets <dmytro_semenets@epam.com>
Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Xen API contains hypercall, which allows domains to identify Xen
version, that is currently used on the system. It can be used to check
if current version is supported by Zephyr or to change behavior of the
drivers or services.
Signed-off-by: Dmytro Semenets <dmytro_semenets@epam.com>
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Refactor how receive states are handled in the BAP
shell.
The scan delegator's receive states are not available from
the broadcast sink, and the broadcast sink makes sure to
properly set the pa_sync object in the receive state
struct.
The receive states are now also using the BAP service data to
identity the receive state when using PAST.
The broadcast assistant will now cache data from a remote device,
and makes it available to e.g. CAP.
Additionally if there is a broadcast source, we cache the values
neccesary to identity if a remote receive state represents our
local broadcast source.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds jsbatch and billwatersiii as collaborators for Infineon Platform
and hal_infineon west project.
Signed-off-by: John Batch <john.batch@infineon.com>
When using the add_src and mod_src APIs the
aggregated_bis_syncs variable was only ever set to 0
and never updated, thus making all calls to
bis_syncs_unique_or_no_pref to be true.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add DWARF hint to handle z_thread_entry correctly
in debuggers. This function starts a new thread and never returns.
Use `.cfi_undefined` so DWARF-based unwinding does not rely on return.
Without this, unwinding may follow a bogus return address, leading to
invalid memory reads and potential bus faults during backtrace.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Commit fixes the model rx handler.
Model can receive maximum access payload.
Test should be able fit maximum access payload and
its own header for serial communication.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
As per the Zephyr coding guidelines, functions declarations
in header files should not be conditionally compiled.
This fixes an issue with tester_gap_clear_adv_instance
where btp_gap.c always expect it to be available.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add wrappers for following XEN_DMOP_* hypercalls.
These enables Xen device model control path:
dm_op provides operations to create/manage the ioreq server
so guest MMIO accesses are trapped and handled by the hypervisor.
These are guarded by CONFIG_XEN_DMOP.
- dmop
- dmop_create_ioreq_server
XEN_DMOP_create_ioreq_server
- dmop_map_io_range_to_ioreq_server
XEN_DMOP_map_io_range_to_ioreq_server
- dmop_set_ioreq_server_state
XEN_DMOP_set_ioreq_server_state
- dmop_nr_vcpus
XEN_DMOP_nr_vcpus
- dmop_set_irq_level:
XEN_DMOP_set_irq_level
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Remove non-compliant EOL in the mikrobus_i2c empty node declaration in
boards/nxp/lpcxpresso55s69/lpcxpresso55s69.dtsi.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Add aliases to domain DT overlay and instantiate the wm8962 driver in
it. Add Kconfig fragment and a DT overlay for the sample.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Instantiate the wm8904 driver in rd_rw612_bga's DT. Add MCLK clock
configuration to rw612's soc.c. Modify pinmux definitions to route
those. Add DT and Kconfig fragments to the sample. Document output jack
utilised.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Modify board's pinctrl nodes to include the MCLK signal. Instantiate the
wm8904 driver. Add board specific Kconfig fragment and DT overlay. Set
up the MCLK signal.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Add SCK and WS signals to a shared signal set between Flexcomm #1 and
Flexcomm #3 for the mimxrt685_evk/mimxrt685s/cm33.
This enables the board to both transmit and receive audio, as the BCK
and WS signals produced by the WM8904 codec are only connected to the
Flexcomm #1 peripheral.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
Map all pins of RT685's Flexcomm #1 peripheral.
Needed for opration of Flexcomm #1 in I2S mode or Flexcomm #3 in I2S
mode with shared signals.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
When using an stm32 in a bridge circuit with complementary outputs,
the deadtime needs to be configurable to avoid shoot-thru current
on the circuit. So, the HAL has the configuration in the BDTR init
and use that api access to set the configuration.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
Adds the following processor variants and associated cards to the
cyw920829m2evk development kit:
- cyw20829b1010
- cyw20829b1340
Signed-off-by: John Batch <john.batch@infineon.com>
Reorganizing board hardware definition in the device tree to better
reflect hardware design of separate processor board and base board.
Signed-off-by: John Batch <john.batch@infineon.com>
- Updates Bluetooth driver to include bluetooth firmware for B1 device
revision.
- Changes build behavior to allow building without blobs being fetched
to allow CI to verify build.
- Adds cmake warning if blobs are not present.
Signed-off-by: John Batch <john.batch@infineon.com>
Adding new MPN files for B1 part revision.
Updating existing parts to be consistent with changes made for other new
devices (PSOC Edge, PSOC Control C3).
Signed-off-by: John Batch <john.batch@infineon.com>
Renames mpn device tree files to lowercase for consistency with other
devices.
Removes incorrect mpn and package devicetree files.
Signed-off-by: John Batch <john.batch@infineon.com>
Ensure that x,y/width-height rectangle mentioned in display_read
and display_write are actually part of the framebuffer, otherwise
return an error.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Fix the active client validation in OBEX abort operations to
handle concurrent request scenarios. The check now
ensures that if there is an active client and it's different
from the current client, the operation is rejected with -EBUSY.
Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
Remove the `nxp,flexcan-fd` compatible property from flexcan2 node
for S32K146, keeping only `nxp,flexcan`. The FlexCAN2 instance on
S32K146 does not support CAN FD functionality, unlike flexcan0 and
flexcan1.
Signed-off-by: William Tang <william.tang@nxp.com>
Despite the datasheet stating otherwise, the Pinnacle based trackpads can
have their X/Y data inverted when operating in relative mode, so set those
configs in all modes during init.
Signed-off-by: Peter Johanson <peter@peterjohanson.com>
Add STATIC macro definition to conditionally expose static functions
for testing purposes. When CONFIG_ZTEST is enabled, STATIC expands
to nothing, making functions globally visible for unit tests.
Otherwise, STATIC expands to 'static' for normal builds.
Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
The CYC_TO_TICK macro converts hardware cycles to
system ticks. Smartbond timers can be driven by XTAL32,
RC32K, or RCX sources. At the application level,
tests use milliseconds, which introduces rounding when
converting to hardware cycles.
Previously, CYC_TO_TICK rounded up, causing sys_clock_elapsed()
to sometimes report one extra tick. This value, propagated
through z_add_timeout() via elapsed(), was then used by tests
to determine the current time and the next wake-up point.
As a result, sleep duration was shortened by one tick,
leading to an unnecessary extra wake-up detected by the test.
With this fix, sys_clock_elapsed() no longer reports ticks
that have not fully elapsed, ensuring accurate sleep timing.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg.xr@bp.renesas.com>
kernel context test check timing and extra interrupts
being thrown during sleep tests.
Power management is disabled because during tests
code tests sleep and with power management enabled
it could result in going to deep sleep that takes
more time than is allowed.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg.xr@bp.renesas.com>
Lists new Kconfigs added to settings allowing single settings to be
saved to NVM without modifying their value
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Expands the test to check thr functionality of the newly adding save
subtree/save single setting
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds functionality that allows saving a single setting to NVM using
the newly added function in the settings subsystem. This also
replaces calling the subtree save function if it the underlying
Kconfig is enabled to reduce code paths in settings mgmt
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Enables the Kconfig for the newly introduced
settings_save_subtree_or_single_without_modification() settings
function so that it is tested in CI
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds a test for the newly introduced
settings_save_subtree_or_single_without_modification() settings
function which allows saving a single value or subtree to NVM
without modifying the values
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds a function that allows saving of a single setting item without
changing the value, or saving a subtree of settings, to the storage
backend
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The test creates two threads: a producer that calls mpsc_pbuf_alloc and
may block inside add_skip_item when entering k_sem_take, and a consumer
that calls mpsc_pbuf_claim when only a small amount of buffer space is
left.
In this condition mpsc_pbuf_claim attempts to reserve space even though
no data is available, preventing the producer from making progress.
Without the fix, the producer thread remains blocked indefinitely in
k_sem_take. With the fix applied, the consumer performs the required
k_sem_give, allowing the producer to resume allocation and the test to
complete.
Signed-off-by: Fei Wang <fei.wang@jaguarmicro.com>
One thread calls mpsc_pbuf_alloc to produce data, which invokes
add_skip_item and steps into k_sem_take.
Another thread calls mpsc_pbuf_claim to consume data. In this condition,
mpsc_pbuf_claim has only small remaining space and needs to call rd_idx_inc
to reserve space, but there is still no data available.
The consumer should call k_sem_give to wake mpsc_pbuf_alloc again,
so the producer can allocate space and continue producing data.
Without this wake-up, the producer thread may wait forever in
k_sem_take, leading to a deadlock situation.
Signed-off-by: Fei Wang <fei.wang@jaguarmicro.com>
Fix mismatch between `*_run` function return type and implementation.
The run functions return `enum smf_state_result`, but the event-driven
sample defined them as void while still returning a value.
Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
Add myself as a collaborator for Xilinx components. I have been actively
contributing and will continue reviewing and testing patches for the Xilinx
subsystems.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
Replace manual '1 << n' flag definitions in the flat SMF test with the
common BIT(n) macro. This aligns the test with other SMF test.
Signed-off-by: Vladislav Kulikov <vlad_kulikov_c@pm.me>
Smartbond device schedules periodic calibrations work
and delayed work for xtal32 settle.
Those works can disrupt strict timing that test checks.
This change disables calibration for RCX and RC32K.
Xtal32k settle work is schedule late as not to be
executed during tests.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg.xr@bp.renesas.com>
Calibration interval was specified in Kconfig now
configuration is moved to device tree.
This allows to have different values for RCX and RC32K.
While calibration is vital for correct system timing, it
periodically schedules work that measures frequency of RCX or
RC32K.
Now it's also possible to set calibration interval to 0
to prevent calibration entirely. This may be useful for
scheduling tests that are sensitive to number of active
threads.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg.xr@bp.renesas.com>
- Fixes bug where bis_sync_requests were wrongfully validated.
- Two BISes across subgroups should not have the same bits set
- Remove use of internal->bis_syncs before it's updated in mod_src.
Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
Make the websocket path configurable since having it hardcoded in the
sample is not practical.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Since many boards enable features that require multithreading (e.g. USB)
that conflict directly with the `CONFIG_MULTITHREADING=n` required for
the test variant, and the filter:
filter: dt_alias_exists("mspi0") and CONFIG_FLASH_MSPI_NOR
does not work since that requires Devicetree and Kconfig building
successfully, which is not the case here (Kconfig fails since
dependencies are not met).
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
`priv_pcd_prepare` now only consumes per-instance information or constants.
Instead of calling it indirectly through a function pointer, it could be
called directly, but since it is very shorted and used from only one place,
inline it instead.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Instead of consuming the DT property directly, save the USB controller base
address in the instance configuration block and retrieve it at runtime.
This makes the driver more instance-aware.
While at it, cleanup `priv_pcd_prepare` to always consume the property
(through the instance configuration) instead of sometimes using the base
address from CMSIS.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Move the controller's IRQn from instance data to instance configuration,
and update all consumers accordingly. One instance which used the global
UDC_STM32_IRQ is also updated to consume the per-instance field instead.
While at it, add missing comments for certain fields of the configuration.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The docs signaled to readers that Read and Decode was an experimental API
while Kconfig did not. These are no longer experimental APIs. We have a
solid number of implementations in the tree now showing these APIs in
use in the real world. They are still however stabilizing!
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Add Ibrahim Abdelkader and Mattia Pennasilico as collaborators for the
Arduino boards area, as they have long experience on our boards and
will provide insightful reviews.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Fix uncontroversional issues detected by SonarCloud, whose fixes are
trivial, and improve code readability.
This commit fixes multiple sonar cloud detected issues like:
"Give names to the parameters of this function prototype."
"Declare the variable "i"/"j" inside the loop"
"Remove this empty statement"
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Since 820cd34dbb these net components
use ZVFS_EVENTFD directly instead of thru EVENTFD.
So, let's select ZVFS_EVENTFD directly instead of indirectly
thru EVENTFD.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add access to functions in cold section for XTENSA_MMU_MAP_SHARED
(used for user-space threads). This allows to call functions marked
with "__cold" from user threads.
Suggested-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Since Shorter Connection Intervals changes the unit that connection
intervals can be represented in. It is necessary to change how
they are stored and represented.
This commit deprecates interval in favour of interval_us.
Remove use of interval in internal bt_conn struct since it is no longer
needed.
Signed-off-by: Timothy Keys <timothy.keys@nordicsemi.no>
Some modem revisions can hang up on gnss functionality. Added
a warning and a workaround to doxygen documentation.
Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
This patch fixes a compilation error when CONFIG_PM_DEVICE is enabled
without CONFIG_PM_DEVICE_RUNTIME and CONFIG_POWER_DOMAIN.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Updated platform code to make use of number of socket services defined
in Kconfig. In this way, hardcoded values are avoided.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Set ADC prescaler to 2 instead of 1 for the STM32U5G9J-DK board.
A prescaler of 1 results in incorrect measurements while 2 returns the
expected values.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add `adc_read_async_dt()`, based on `adc_read_async()` and
`adc_read_dt()`, as static inline function.
Signed-off-by: Ruben Völl <ruben.voell@sevenlab.de>
This patch refactors the power management initialization for the Intel
ADSP power domain driver to align with the recommended practices
outlined in the documentation. The changes include:
1. Replacing the manual power management initialization sequence
(`pm_device_init_suspended` + `pm_device_runtime_enable`) with a call
to `pm_device_driver_init` in the `pd_intel_adsp_init` function.
2. Adding the `zephyr,pm-device-runtime-auto` property to the power
domain nodes in the device tree files for ACE15, ACE20, ACE30, and
ACE40.
These changes ensure that the power domain driver is initialized with
the appropriate power management state and that runtime power management
is automatically enabled based on the device tree configuration. The
functionality of the power management state remains unchanged, ensuring
consistent behavior.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Adds support for the memory pool statistics (mpstat) command, which
will list details on various memory heaps on the device
Signed-off-by: Jamie McCrae <spam@helper3000.net>
Replaces the img_mgmt specific function with the common SMP
function for resetting the zcbor buffer and allowing a new response
to be sent
Signed-off-by: Jamie McCrae <spam@helper3000.net>
Adds a common zcbor reset buffer function, this allows for the
buffer to be reset after data has been added already to add a
different response, e.g. an error response
Signed-off-by: Jamie McCrae <spam@helper3000.net>
The LPIT is missing in nxp_mcxe24x_common.dtsi,
this patch add lpit 0 address, registers, interrupts
and channel setting.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Enable lpit0 clock according to dts setting.
Enable lpit0 and its four channels.
Verified pass with counter_basic_api test.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
For devices like MCXE247, the LPIT instance hase multiple
interrupts, however the current driver code just support
one interrupt. This patch has improved the code for this
requirement.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
This is a follow-up to commit d1abe40fb0.
Function `qspi_wait_while_writing()` (and also `qspi_rdsr()` that is
called by it) is now always required for `qspi_erase()`, so it can no
longer be under `#if !IS_EQUAL(INST_0_QER, JESD216_DW15_QER_VAL_NONE)`.
Also definition of `dev_config` in `configure_chip()` needs to be moved,
as for QER set to NONE, it is not used and causes a compilation warning.
Add a test case that will ensure the driver can be built successfully
with `quad-enable-requirements = "NONE"`.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
When EC wakes by GPIO, it may fall back to SUSPEND_TO_IDLE
before the host or peripherals have a chance to take further action.
Add a lightweight delay-sleep mechanism to keep system awake
for as short period after a GPIO wake event.
Signed-off-by: Elmo Lan <elmo_lan@realtek.com>
This commit removes data signing related ICS.
Removed ICS:
- SM 6/1: Signing Algorithm Generation
- SM 6/2: Signing Algorithm Resolving
- GATT 3/13: Signed Write Without Response
- GATT 9/10: Signed Write Command
- GATT 7/3: LE Security mode 2
- GAP 25/2: LE Security mode 2
- GAP 35/2: LE Security mode 2
- GAP 25/5: Connection data signing procedure
- GAP 35/5: Connection data signing procedure
- GAP 25/6: Authenticate signed data procedure
- GAP 35/6: Authenticate signed data procedure
- GAP 27b/8: Connection Signature Resolving Key (CSRK)
- GAP 37b/8: Connection Signature Resolving Key (CSRK)
The following tests are not supported any longer:
- GAP/SEC/CSIGN/BI-01-C
- GAP/SEC/CSIGN/BI-02-C
- GAP/SEC/CSIGN/BI-03-C
- GAP/SEC/CSIGN/BI-04-C
- GAP/SEC/CSIGN/BV-01-C
- GAP/SEC/CSIGN/BV-02-C
- GATT/CL/GAW/BV-02-C
- SM/CEN/SIGN/BV-01-C
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Remove duplicated prj.conf file.
prj_6, prj_7, prj_14 are identicall. Since prj_6.conf is unchanged,
keeping it.
prj_8, prj_9, prj_15 are identicall. Since prj_15.conf is
unchanged, keeping it.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit deprecates:
- the `CONFIG_BT_SIGNING` Kconfig option
- `BT_GATT_CHRC_AUTH` property
IOW, this commit deprecates the LE Security mode 2 support.
Explanation:
Erratum ES-26047 introduced in Bluetooth Core Specification v6.2
requires SingCounter to be persistently stored to prevent replay
attacks.
Currently, the Host doesn't store SignCounter, therefore the device is
vulnerable to replay attacks after reboot.
Additionally, the current implementation doesn't assume that SignCounter
of a received message can be incremented by more than one and thus may
not validate correct message.
The Bluetooth Security and Privacy Best Practices Guide recommends to
not using Data signing and recommends to use LE Security mode 1 levels
2, 3 or 4 instead.
The Signed Write Without Response sub-procedure, which is the only user
of Data signing, is optional (see Vol 3, Part G, Table 4.1).
See also ES-18901.
The aforementioned reasons make no sense to keep this feature.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Extend the system off samples by adding an option to disable
the system clock. When the system clock is disabled additional
power savings can be observed.
After using the `sys_clock_disable()` function, the GRTC is
turned off making system time-related features unavailable.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
The commit 1fe332de61 moved the maintainer
file check step from a standalone workflow to the assigner workflow, which
uses the `action-python-env` action to install the Python requirements.
The version of PyGithub package installed by the `action-python-env` action
in the assigner workflow is 2.6.1, which is older than the minimum required
version 2.7.0 (see 5a4b0ac4d7 for more
details), and this caused the maintainer file check to erroneously flag the
users with "Triage" role.
This commit updates the assigner workflow to use the
action-python-env@32e53bef090c33d53aa94f1d9a9d29c93cfdc5f7, the latest
version at the time of this change with up-to-date requirements file, in
order to ensure that PyGithub>=2.7.0 is installed.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
It seems the new microvolt/microamp rework (#95588) simply forgot to
implement zero current voltage offsets.
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
Due to slight differences in the way that LLVM and GNU linkers work,
the call to `z_stack_space_get()` is not dead-stripped when linking
with `lld` but it is dead-stripped when linking with GNU `ld`.
The `z_stack_space_get()` function is only available when
`CONFIG_INIT_STACKS` and `CONFIG_THREAD_STACK_INFO` are defined.
The issue is reproducible (although requires building LLVM and
setting up some environment variables) and goes away with the proposed
workaround.
Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Drop the "area: Sensors" label from Wurth and TDK sensor areas, the
current setup is causing the issue assigner script to pick up those
maintainers for any issue labeled as sensor as it does not know better,
if these areas wants a label for issue tracking their maintainer can
make an area specific one and use it.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
FVP's (ARM Fixed Virtual Platform) atomic instruction emulation appears
to not properly implement the cache coherency guarantees specified by the
ARM architecture. Atomic instructions with acquire/release semantics (LDAR,
LDAXR, LDADDAL, etc.) should ensure that loaded values reflect any prior
stores from other CPUs, but on FVP this can fail, leading to stale cached
values being read in SMP configurations.
This manifests as performance issues in lockfree data structures as
demonstrated by tests/lib/lockfree hanging with excessive retries.
This commit adds board-specific atomic operation implementations with
explicit (and, in theory, redundant) data memory barrier (DMB SY)
instructions before all operations that read from memory. These barriers
force cache invalidation before reads, working around the FVP issue by
ensuring CPUs observe the latest values written by other CPUs. This
should be temporary until this FVP situation is better understood/fixed.
Note: FVP's cache_state_modelled parameter can improve the lockfree test
outcome but this is also 10x slower or more with many tests.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Increase FVP Base RevC 2xAEM DRAM from 2 MB to 128 MB to match the
platform's actual capabilities and align with QEMU's configuration.
The FVP Base RevC supports ~4 GB of RAM as documented in the Linux
kernel device tree (arch/arm64/boot/dts/arm/fvp-base-revc.dts), which
defines two memory regions totaling approximately 4 GB.
The previous 2 MB limitation caused issues with demand paging tests
where the kernel VM size (8 MB) exceeded available RAM, triggering
early page faults before the page frame allocator was initialized.
With 128 MB, demand paging workloads have sufficient memory to operate
without premature paging.
This change brings FVP's memory configuration in line with QEMU
Cortex-A53 (128 MB).
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Memory protection and userspace tests require more MMU translation
tables than the default. Without this increase, tests fail with:
E: CONFIG_MAX_XLAT_TABLES too small
ASSERTION FAIL [ret == 0] @ arch/arm64/core/mmu.c:1244
privatize_page_range() returned -12
Increase defaults when both USERSPACE and TEST are enabled:
- 32 tables for SMP configurations
- 24 tables for non-SMP configurations
This fixes:
- sample.kernel.memory_protection.shared_mem (all platforms)
- rtio.api.userspace (v8a, v9a)
- rtio.api.userspace.submit_sem (v8a, v9a)
- portability.posix.common.userspace
Consequently the demand paging test needed adjustment to its
qemu_cortex_a53 configs to keep working as this test is highly
sensitive to the amount of available free memory.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Increase ARM64 stack sizes to accommodate deeper call stacks in
userspace and SMP configurations when FPU_SHARING is enabled:
- PRIVILEGED_STACK_SIZE: 1024 → 4096 bytes (with FPU_SHARING)
- TEST_EXTRA_STACK_SIZE: 2048 → 4096 bytes (with FPU_SHARING)
The default 1KB privileged stack is insufficient for ARM64 userspace
syscalls when FPU context switching is enabled.
Symptom: Userspace tests crash with Data Abort (EC 0x24) near stack
boundaries during syscalls, particularly on SMP configurations where
multiple threads exercise FPU lazy switching.
Fixes previously failing CI test on fvp_base_revc_2xaem SMP variants:
- kernel.threads.dynamic
- Multiple userspace tests with FPU_SHARING enabled
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add stress test for SIMD register save/restore during context switching.
The test validates correct FPU context handling using either ARM Neon or
SVE2 instructions depending on the build target.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Expand the SVE context switching test to cover all thread privilege
combinations with validation of SVE state preservation across different
contexts.
Test Coverage:
- Privileged vs Privileged threads (kernel mode)
- User vs User threads (userspace with memory domains)
- User vs Privileged threads (mixed privilege levels)
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add test to validate SVE (Scalable Vector Extension) context switching
implementation, ensuring proper register preservation across thread
switches in multi-threaded environments.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Implement Scalable Vector Extension (SVE) context switching support,
enabling threads to use SVE and SVE2 instructions with lazy context
preservation across task switches.
The implementation is incremental: if only FPU instructions are used
then only the NEON access is granted and preserved to minimize context
switching overhead. If SVE is used then the NEON context is upgraded to
SVE and then full SVE access is granted and preserved from that point
onwards.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This fixes the following:
CMakeStyle File:cmake/gcc-m-cpu.cmake Line:7
Column:Remove space before '(' in if() statements
CMakeStyle File:cmake/gcc-m-cpu.cmake Line:22
Column:Remove space before '(' in if() statements
CMakeStyle File:cmake/gcc-m-cpu.cmake Line:28
Column:Remove space before '(' in if() statements
CMakeStyle File:cmake/gcc-m-cpu.cmake Line:38
Column:Remove space before '(' in if() statements
CMakeStyle File:cmake/gcc-m-cpu.cmake Line:48
Column:Remove space before '(' in if() statements
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add Cortex-A320 support to the unified FVP board structure with ARMv9.2-A
specific configuration parameters.
New board target:
- fvp_base_revc_2xaem/a320
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
ARMv9-A is AArch64-only and does not support AArch32 execution states
at EL1/EL2/EL3. Configure TF-A build to disable AArch32 register
context (CTX_INCLUDE_AARCH32_REGS=0) when building for ARMv9-A platforms.
This fixes TF-A boot failures on ARMv9-A non-secure variants where
TF-A would panic with:
ERROR: EL1 supports AArch64-only. Please set build flag
CTX_INCLUDE_AARCH32_REGS = 0
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add ARMv9-A architecture support with Cortex-A510 CPU as the default
processor for generic ARMv9-A targets.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add deprecated.cmake mappings to redirect old board names to new
unified structure:
- fvp_base_revc_2xaemv8a
→ fvp_base_revc_2xaem/v8a
- fvp_base_revc_2xaemv8a/fvp_base_revc_2xaemv8a/smp
→ fvp_base_revc_2xaem/v8a/smp
- fvp_base_revc_2xaemv8a/fvp_base_revc_2xaemv8a/smp/ns
→ fvp_base_revc_2xaem/v8a/smp/ns
This ensures existing build commands and documentation continue to work
with deprecation warnings while transitioning to the new board structure.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Create unified board configuration to replace verbose board naming
with shorter hierarchical structure. This board works with the new
unified fvp_aem SOC series and supports the v8a architecture variant.
This enables board targets like:
- fvp_base_revc_2xaem/v8a (basic ARMv8-A)
- fvp_base_revc_2xaem/v8a/smp (ARMv8-A SMP)
- fvp_base_revc_2xaem/v8a/smp/ns (ARMv8-A SMP non-secure)
This structure replaces the existing overly verbose board designations
with a cleaner, more maintainable organization and provides a foundation
for adding v9a variants.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Reorganize fvp_aemv8a SOC into unified fvp_aem series with a v8a
architecture variants to enable cleaner board target naming. This also
sets the stage for upcoming ARMv9-A support.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This adds necessary configuration files to build with SMP and no trusted
firmware. Given PSCI is not available, CPU power management uses the FVP
power controller directly. This simplifies debugging, and builds faster
too!
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add a new PM CPU ops driver for Arm Fixed Virtual Platform (FVP) that
enables bare metal SMP support without Arm Trusted Firmware (ATF).
The driver provides CPU power-on and system reset operations by directly
interfacing with FVP's power controller (PWRC) and V2M system registers.
The implementation includes RVBAR_EL3 configuration to redirect
secondary CPU reset vectors to Zephyr's image header, enabling
proper SMP initialization without firmware assistance.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add initial support for the Waveshare RP2350-Zero, a low-cost,
high-performance Pico-like development board based on the Raspberry
Pi RP2350A microcontroller.
This commit introduces the board definition, devicetree files, pin
control configuration, Kconfig options, and board documentation.
The RP2350-Zero’s Arm and RISC-V cores are supported with this
port. Basic peripherals (GPIO, UART, I2C) are configured and
tested. Verified by building and running the Zephyr "hello_world"
sample on the RP2350-Zero / RP2350-One boards, and manually testing
the GPIO, I2C, PIO, and RGB LED.
Signed-off-by: Stephano Cetola <stephanoc@gmail.com>
Adds overlays to enable test runs for DMA on the following tests:
-tests/drivers/dma/chan_blen_transfer
-tests/drivers/dma/loop_transfer
Signed-off-by: John Batch <john.batch@infineon.com>
Adds USE_INFINEON_LEGACY_HAL kconfig option to the PSOC6, CYW920829, and
xmc7200 series SOCs. These devices have not transitioned to newer HAL
based drivers yet.
Signed-off-by: John Batch <john.batch@infineon.com>
Updates DMA includes from the modules needed for DMA PDL based driver
implementation.
Cleans up cmake to use only USE_INFINEON_DMA Kconfig option to select
dma files from PDL/HAL.
Signed-off-by: John Batch <john.batch@infineon.com>
Some FlexCAN devices have enhanced bit timing registers (EPRS ENCBT EDCBT)
with extended timing configuration ranges and different behavior compared
to standard bit timing registers.
This change adds proper support for these enhanced registers, utilize full
bit timing capabilities.
Key differences for enhanced bit timing registers:
- Extended timing ranges with larger maximum values for sjw, phase_seg1,
phase_seg2, and prescaler fields
- No propagation segment configuration support, so prop_seg must be 0
- prop_seg value is used directly without the typical 'minus 1' adjustment
The implementation adds conditional compilation based on the
`FSL_FEATURE_FLEXCAN_HAS_ENHANCED_BIT_TIMING_REG` feature flag.
For Enhanced registers, use extended timing limits and prop_seg directly.
Test this commit on mimxrt1180_evk/mimxrt1189/cm33 drivers.can.timing
test case, and enable `TEST_ALL_BITRATES` Kconfig symbol.
Signed-off-by: William Tang <william.tang@nxp.com>
File groups inherit file patterns from their parent area. A file will only
match a file group if it first matches the parent area's patterns, and then
also matches the file group's own patterns. This allows file groups to
further filter and subdivide files that are already covered by the area.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This new section allows defining a group of files in an area and makes
it possible to assign collaborators to the file group being defined.
The purpose of this new section is to allow fine tuning who is added as
reviewer when files change in a group. It is especially useful in large
areas with hundreds of files, for example platform areas.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
A low-load period that is too short (1ms) will cause
the average load to remain almost unchanged. Increase
it to 100ms.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Enable p-state driver for nxp mcxn, currently tested
on frdm-mcxn236 but should be easily extendable to
other mcxn boards.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Use the primary clock source FRO12M as the clock source for
CLKOUT. Compared with the secondary clock source(main clock,
the primary clock source is more stable and will not cause
timing problems of camera PCLK, HSYNC and VSYNC due to
unexpected changes.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Depending on the IP's `IC_TX_CMD_BLOCK_DEFAULT` parameter, we
might have to clear the `TX_CMD_BLOCK` bit on init so that
Controller mode works.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
This driver had a lot of regressions introduced by commits that were
clearly mixing up what values had units of bytes and what values had
units of words. Fix the issues in the DMA path of the driver.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The asserts are hard to debug and unrecoverable, they just say kernel
panicked but difficult to realize where and why, it's better to return
an error and log message clearly from spi driver.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
It is not illegal to provide an RX len with no buffer.
It just means the controller should clock out that many
words but not store them in memory. So remove the assert
and just avoid null dereference.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Refactor this function to return an error code, instead of assert.
Put the data into a pointed argument instead.
Refactor other functions to make sure to
propogate this error all the way up the call stack.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
DNESP32S3B is a development board from Alientek, featuring a compatible
ESP32-S3-WROOM-1-N16R8 module and rich set of on-board peripherals,
providing an out-of-the-box development experience for AIoT applications.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
- Enables Digital mode for both input and output GPIO
pins, in gpio_mcux_lpc_configure().
- Fixes#99255
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Add support for stacktrace in dummy thread which is used to run
the early system initialization code before the kernel switches
to the main thread.
On RISC-V, the dummy thread will be running temporarily on the
interrupt stack, but currently we do not initialize the stack
info for the dummy thread, hence check the address against the
interrupt stack.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Since these helper functions are read-only, mark the `thread`
arg as `const` so that we can pass const thread to it without
triggering warnings.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Use a local accumulator (`cfg`) to build the pin configuration and commit
it to `*pincfg` only once. This keeps intermediate values in registers,
reduces RAM write traffic.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This simulated board has been there for more than 5 months.
The real board (nrf54lm20dk) is properly supported and in the market.
So there is no need to have this warning anymore.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Commit updates maximum OOB authentication size from 8 bytes
till 32 bytes according to specification errata ES-27446.
Since previous OOB API does not allow to expose OOB values
with such width the new API has been introduced.
The previous API was deprecated and hidden under
BT_MESH_PROV_OOB_API_LEGACY option and left for backward
compatibility with existing code base.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Commit removes legacy dependancy on Host crypto.
Additionally, it adapts advertiser stack size if
provisioner feature has been enabled (tested with
mesh_shell and thread analyzer).
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Commit set zero to not used part of authentication array
to prevent garbage from the previous provisioning using.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Commit improves oob size checking to catch wrong size
as early as possible and prevents zero size.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Zephyr automatically sets the persisted flag for VCS if the volume is
changed after the service is registered. As some of these PTS tests
require a set volume with the flag cleared, the initial volume needs to
be set before registering VCS.
Signed-off-by: Frode van der Meeren <frode.vandermeeren@nordicsemi.no>
I'm working at Nordic Semiconductor in a team that is developing the
Serial Modem application for nRF91 and I have spend significant amount
of time for studying the CMUX protocol to implement the power saving
mechanism for it and submitted it here.
I therefore have quite a good understanding of the Zephyr's modem
subsystem.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
After trying out a few different approaches, I think having separate
nodes for each bank in devicetree and having a GPIO proxy node for the
controller is the best solution right now.
To be more specific, GPIO proxy solution still allows for bank level
GPIO toggling. The linux kernel GPIO davinci driver is currently limited
to single pin operations. This might not be a problem in Linux, but I
feel like embedded systems would prefer having support for bank level
operations.
This also does not pose a problem for the future implementation of
interrupts due to that fact that the interrupt router is separate device
and will require a separate driver. In fact, the GPIO interrupt router
is shared between main_gpio0 and main_gpio1.
This patch also reverts the previous bank offset related work on GPIO
davinci driver.
The patch has been tested on PocketBeagle 2.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Allow user to use the new sys_getopt API via the old non-Posix
compliant getopt API. This is a temporary solution and the shim
will be deprecated and eventually removed at some point.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Summary:
As Zephyr getopt is not really compatible with Posix getopt, rename
Zephyr getopt to sys_getopt.
Background:
Zephyr getopt module was introduced in #31356 to be used by the shell.
Zephyr's getopt is not the standard one. It has multiple APIs which make
it more suited for a system like Zephyr where different components may
want to use it for different purposes. Including APIs to init it,
get and set its internal state etc.
Several Zephyr modules (shell, net, wifi, ztest) use this getopt with
these special APIs. The getopt module is bundled in the POSIX
compatibility API subsystem (CONFIG_POSIX_C_LIB_EXT).
Problem description:
As it is not the standard getopt(), no C library can possibly provide
a Zephyr compatible version (even if such C library were to provide a
standard getopt()). As it is bundled in Zephyr's POSIX API in
CONFIG_POSIX_C_LIB_EXT), multiple components that depend on it are
selecting CONFIG_POSIX_C_LIB_EXT. Zephyr core components should not
depend on the POSIX API in this way.
Changes done in this commit:
Rename the getopt*() APIs to sys_getopt*() and move them into a module
under lib/utils with its own Kconfig option to enable it.
Zephyr's users are changed to use this new component.
The POSIX subsystem can continue providing getopt() by calling the new
sys_getopt() and in that way retain backwards compatibility for external
users.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This is a follow-up to @keith-zephyr’s note that SMF is looking for a
new maintainer:
https://github.com/zephyrproject-rtos/zephyr/pull/97943#issuecomment-3439589314
I am proposing this shortly after getting collaborator only
because there is an active search and I am already working in SMF
(source-level changes, SMF-related RFCs, and improving the
sibling-transition path to make the common transition at least
~30% faster). If there were no open need, I would have waited longer
before proposing this.
Signed-off-by: Vladislav Kulikov <vlad_kulikov_c@pm.me>
Modify the timeout from 10ms to 100us. The reason for this
is that the UART can only hold 4 octets at a time, which
cases events larger than 4 octets to require multiple
timeout before the entire event can be sent.
This solution is mostly a workaround and has the purpose
of increasing the performance and help prevent the tests
from failing due to the low speed caused by this. A
proper solution would likely be to switch to the async UART
API instead.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The ISO buffers defaults to 1, but since there are
risks that the ISO RX events cannot be sent to
the upper tester via UART before the next RX,
the RX is increased. This also allows to better
support cases where the ISO interval is larger than
the SDU interval.
The ISO TX buffers are similarly increase to help
prevent cases where a TX isn't scheduled.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add missing `full_name` entries for MAX32657EVKIT and MAX32658EVKIT
in their respective board.yml files.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
nRF91 Serial Modem application does not anymore start PPP automatically.
Update initialization script to request it.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Gives access to all log output format flag configurations
for shell backend.
shell log backend doesn't use log_backend_std_get_flags()
and it's debateable if it should, so give it its own fullly
configurable format set for maximum backend bandwidth control
Signed-off-by: Nicholas Lowell <Nicholas.Lowell@lexmark.com>
This removes a function that created a new mutex and conditional variable
and used memcpy() to compare them with ones in a given fdtable entry.
Since those struct members are initialized statically, this test doesn't
serve much of a purpose anymore. Moreover, padding bytes inside structs
are technically not required to be zero, so these memcpy() calls caused
SonarQube to complain.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
The file descriptor table is used in every area that expects to work on
files through descriptor indices. It can only be operated on through
functions whose names indicate a relationship with ZVFS (`zvfs_*fd*`).
The integer file descriptor mechanism shouldn't be separate from ZVFS.
This will make cooperation between different file access APIs much
simpler. This commit also makes preparations for the fdtable becoming
optional.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
This commit moves all operations on single files into ZVFS and makes the
POSIX subsystem call into ZVFS to perform them. It was necessary to define
a `struct zvfs_stat` to avoid a dependency cycle. Functions used
internally for file i/o operations are publicised since they won't require
any changes between various subsystems. This allows ZVFS to actually
fulfill its purpose of facilitating cooperation of different file APIs.
Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
- Add command for setting the set size
- Add command for setting the SIRK
- Allows the following tests to pass:
- CSIS/SR/CN/BV-01-C
- CSIS/SR/CN/BV-02-C
- CSIS/SR/CN/BV-03-C
- CSIS/SR/CN/BV-04-C
Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
- When a bonded device is reconnected, check flags for pending
notifications for:
- Lock
- SIRK
- Size
Previously only lock was checked
Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
Add helper functions for querying the internal fields of
`struct net_buf_pool` when `CONFIG_NET_BUF_POOL_USAGE` is enabled.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Switch the Xilinx AXI I2C device driver to use the DEVICE_MMIO_...
macros instead of directly using the physical base address from the
device tree. This allows the driver to work on SoCs with an MMU,
such as the Zynq-7000.
Signed-off-by: Simon Maurer <mail@maurer.systems>
Take on the maintainership of the Display area that have
been unmaintained for some time now.
This will allow me to be in the right position to push
for much needed reworks & improvements in this area.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
We have both been active contributors in this area for some time.
Considering the current maintainers are not very active and not always
responsive, step up to help better maintain this area.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Fixes checking for board folders that have moved by checking if
the BOARD_DIR variable is already set (i.e. loaded from cache)
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes an issue with an unused function being defined if
CONFIG_DEVICE_DEINIT_SUPPORT was disabled
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes an issue with an unused function being defined if
CONFIG_DEVICE_DEINIT_SUPPORT was disabled
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes an issue with an unused function being defined if
CONFIG_DEVICE_DEINIT_SUPPORT was disabled
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Use an override-able 'default' for CONFIG_STM32_ENABLE_DEBUG_SLEEP_STOP
rather than forcefully 'select'ing the symbol when CONFIG_DEBUG=y, as
there are situations where one might want CONFIG_DEBUG=y without inhibiting
low-power mode entry.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add missing newline found by dts-linter. The missing newline is failing
CI for any change that modifies nrf54h20.dtsi.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Running unit tests on macOS or Windows is currently not supported due to
fundamental differences in the architectures. Added a note in the
"Quick start - Unit testing" section about this restriction.
Signed-off-by: Martin Lampacher <martin.lampacher@gmail.com>
COPY and INFO are different names for the same Output Section Type,
but the latter is easier to understand in the context we are using it.
Replace COPY with INFO in the LLEXT linker script snippet.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Move DTS overlay files that modify test configuration
from boards sub-directory to the main application directory.
There is no 'i2c_speed_fast' board.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Add reqired empty line as indicated by the compliance check.
Add License header.
Add information about GPIO loopbacks used by the test.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Add DTS overlay required to pass the test.
Test filter is meet for nrf54l15 NS platform.
However, test fails due to missing node configuration.
Fix the counter test on nrf54l15dk/nrf54l15/cpuapp/ns platform.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Overlay files that modify test configuration shall be stored
in the main application directory.
There is no board with f.e. '1mhz' name.
Move test overlays from boards sub-direcotry to the main
application directory.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Sort alphabetically supported features on
- nrf54l15dk/nrf54l15/cpuapp,
- nrf54l15dk/nrf54l15/cpuapp/ns,
platforms.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Add overlays required to run the gpio_loopback test on
nrf54l15dk/nrf54l15/cpuapp/ns platform.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
drivers.uart.async_api filter is meet on nrf54l15 NS platform.
However, overlay file is needed to configure uart peripheral.
Add overlay required to pass uart_async_api test.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
This change introduces sai disable at the end of stream or
in an event of an error. It disables SD, FS and SCK.
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
prj.conf:
enable logging
add log buffer size and debug options and comment them
main.c:
show gain value at runtime as a starting
use ADC calibration before conversion
README.rst:
update with sample gain prints
Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
make functional mode required
add functional modes description with circuit examples
Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
Add devicetree and configuration for the touch controller on
STM32U5G9J-DK1 and st_lcd_dsi_mb1835 shield.
Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
When CONFIG_UDC_DRIVER_HIGH_SPEED_SUPPORT_ENABLED is disabled, force
configure ehci controller to work as FS.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Make sure we test coap client/server, MQTT SN, telnet and
logging network backend when testing all network options.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Compliance checker complains
TYPO_SPELLING: 'in in' may be misspelled - perhaps 'is in'?
for code like this
static struct net_sockaddr_in in_addr_my = {
so change the variable to ipv4_addr_my. Similar change is
done for IPv6 variables for consistency.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
We need certain network related Posix header files so that the
network tests using Posix symbols compiles ok.
Previously the Posix symbols were introduced by network stack
automatically, but that is no longer the case.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
We need certain network related Posix header files so that the
network sample compiles ok. Previously the Posix symbols were
introduced by network stack automatically even if user had not
enabled Posix, but that is no longer the case.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Use namespaced network symbols in order to avoid circular dependency
between Posix and network subsystems.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Do not include Posix header files inside network stack as we should
not depend on Posix symbols in net stack.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Rename network symbols i.e., add net_, NET_ or ZSOCK_ prefixes
to those network symbols that can be found in Posix or libc.
This way we can avoid circular dependency issues.
Add also a compatibility header file that allows user to continue
use various network APIs without adding either net_, NET_ or ZSOCK_
prefixes.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Move the architecture-specific (but implementation dependent!) code which
performs entry in poweroff state (Shutdown/Standby without retention) to
a common implementation shared by all STM32 SoC series. This is a first
step and could be further refined at a later time; eventually, a unified
z_sys_poweroff() implementation may even be possible.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The blinky_pwm test was not available for the nucleo_u385rg_q board.
Added the board overlay to the blinky_pwm sample.
Signed-off-by: Richard Skriwanek <richy@fnc.at>
Counters API test were not available for the nucleo_u385rg_q board.
Added the nucleo_u385rg_q board overlay to the
counter_basic_api test.
Signed-off-by: Richard Skriwanek <richy@fnc.at>
PWM API test were not available for the nucleo_u385rg_q board.
Added the nucleo_u385rg_q board overlay to the pwm_api test.
Signed-off-by: Richard Skriwanek <richy@fnc.at>
The nucleo_u385rg_q board had no pwm-led defined.
Added the relevant led and timer definitions.
Additionally the pwm and counter are added
to supported functions.
Signed-off-by: Richard Skriwanek <richy@fnc.at>
A change was introduced in how stm32 timers clocks are defined
to have multiple clock definitions.
This change was not handled in the stm32u3 series driver
(which had no timers defined in the dts at all).
This fix ports the required code to the stm32u3 mcu.
Signed-off-by: Richard Skriwanek <richy@fnc.at>
Use the "zephyr-keep-sorted-start/stop" comment to have CI check
the alphabetical order of includes, to help reducing the chance
of conflicts while contributing drivers.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Correct build instruction targeting Cortex-M4 build in ST boards
where a 'm4' variant is needed to build a Zephyr application for the
Cortex-M4 core.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
There is an issue that the SCO connect cannot be un-referenced by HFP
HF when the SCO connection is broken if the SCO connect is not created
by HFP HF.
Register SCO connect change callback. And un-reference the SCO connect
in SCO disconnected callback.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
In current implementation, the HF with old version cannot be
supported properly.
Such as, if the AG is version 0.96, the AT command `AT+BRSF` will not
be sent. It causes the AG cannot know the features of HF.
Compatible old version with the following changes,
Discover the HF SDP record to get the profile version and HF features.
If the SDP discovery is failed, break the RFCOMM DLC connection.
If the AG version is v0.96, update the HF features according to the
discovered HF features.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
In current implementation, the AG with old version cannot be
supported properly.
Such as, if the AG is version 0.96, the AT command `AT+BRSF` should
not be sent.
And if the AG is no newer than version 1.5, the `Codec Negotiation`
should be unsupported.
Compatible old version with the following changes,
Discover the AG SDP record to get the profile version and AG
features. If the SDP discovery is failed, break the RFCOMM DLC
connection.
If the AG version is v0.96, do not send AT command `AT+BRSF`.
Create SCO connection directly if the codec negotiation feature is
unsupported on both side in the function `bt_hfp_hf_audio_connect()`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add Kconfig `BT_AVRCP_TG_COVER_ART` to enable the target cover art
feature.
Add Kconfig `BT_AVRCP_CT_COVER_ART_GET_IMAGE_PROPERTIES` to enable
the controller cover art get image properties feature.
Add Kconfig `BT_AVRCP_CT_COVER_ART_GET_IMAGE` to enable the
controller cover art get image feature.
Add Kconfig `BT_AVRCP_CT_COVER_ART_GET_LINKED_THUMBNAIL` to enable
the controller cover art get linked thumbnail feature.
Add functions `bt_avrcp_cover_art_ct_cb_register()` and
`bt_avrcp_cover_art_tg_cb_register()` to register the callback.
Add function `bt_avrcp_cover_art_ct_l2cap_connect()` to create the
L2CAP connection for OBEX transport.
Add functions `bt_avrcp_cover_art_ct_l2cap_disconnect()` and
`bt_avrcp_cover_art_tg_l2cap_disconnect()` to disconnect the L2CAP
connection.
Add functions to send OBEX request/response, including connect,
disconnect, abort, get_image_properties, get_image, and
get_linked_thumbnail.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This particular test-case requires bttester to respond with an OOB
procedure SIRK only error. To enable this response, the BTP command to
set SIRK mode has been extended with a new selection.
Signed-off-by: Frode van der Meeren <frode.vandermeeren@nordicsemi.no>
As stated, removed the unnecessary CONFIG_SYS_HEAP_AUTO=y from
both defconigs, since it is enabled per default for this board.
Signed-off-by: Benjamin Klaric <benjamin.klaric01@gmail.com>
Changed the generic global flag_audio_received flag to
exist for each stream. This will help verify that each
stream, if configured for RX, receives the expected
data.
One test started failing due to this, so that was disabled
until a fix is in place in the controller.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit implements a new unit test suite to validate the
integration of Device Tree memory attributes (`zephyr,memory-attr`)
with the RISC-V Physical Memory Protection (PMP) hardware.
The test suite includes:
1. **`test_pmp_devicetree_memattr_config`**: Verifies that the PMP
Control and Status Registers (CSRs) are programmed correctly based
on the memory regions defined with `zephyr,memory-attr` in the
Device Tree. It iterates through the active PMP entries and
asserts a match against the expected DT-defined regions.
2. **`test_riscv_mprv_mpp_config`**: Checks the initial state of the
Machine Privilege Register Virtualization (MPRV) bit and Machine
Previous Privilege (MPP) field in the `mstatus` CSR to ensure PMP
is configured for correct privilege level switching during boot.
3. **`test_dt_pmp_perm_conversion`**: Validates the
`DT_MEM_RISCV_TO_PMP_PERM` macro to ensure the conversion from
Device Tree memory attribute flags to RISC-V PMP permission bits
(R/W/X) is correct.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
The logic to decode PMP addressing modes (**TOR**, **NA4**, **NAPOT**) into
physical start and end addresses was previously embedded in
`print_pmp_entries()`.
Extract this calculation into a new static helper function,
`pmp_decode_region()`, to significantly improve the readability and
modularity of the PMP debug printing code.
The new helper function is fully self-contained and exposes a defined API
for the PMP address decoding logic. This enables **direct reuse** in
**unit tests** (e.g., using **Ztest**) to verify the core address
calculation accuracy for all PMP modes and boundary conditions, independent
of the main PMP initialization or logging path.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
The Physical Memory Protection (PMP) initialization is updated to support
custom entries defined in the Device Tree (DT) using the `zephyr,memattr`
property, contingent on `CONFIG_MEM_ATTR` being enabled. A new function,
`set_pmp_mem_attr()`, iterates over DT-defined regions and programs PMP
entries in `z_riscv_pmp_init()`, allowing for early, flexible, and
hardware-specific R/W/X protection for critical memory areas. DT-based
entries are also installed in `z_riscv_pmp_kernelmode_prepare()` for
thread-specific configuration. The logic for the temporary PMP "catch-all"
entry is adjusted to account for new DT entries. Furthermore, the PMP
domain resync logic now masks user partition permissions against DT-defined
region permissions, preventing privilege escalation. `CONFIG_RISCV_PMP` is
updated to select `PMP_KERNEL_MODE_DYNAMIC` if `MEM_ATTR`. Finally, the
`pmp_cfg` array in `z_riscv_pmp_init()` is initialized to zero to prevent
writing uninitialized stack data to unused PMP entries.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
When CONFIG_SMP is enabled, per-CPU IRQ stack guards are added. To prevent
unintended TOR (Top of Range) entry sharing, the PMP address entry
preceding each guard region in `pmp_addr` is marked with -1L.
The previously used index to access `pmp_addr` could become stale, as
additional PMP entries may be allocated after its initial calculation
but before the SMP loop for IRQ guards.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Split global PMP state variables (index and last address) into
mode-specific counterparts to correctly track the end of global PMP
ranges for both M-mode (kernel) and U-mode (userspace).
This ensures correct per-thread PMP initialization when configuring
mode-specific dynamic PMP entries.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Introduce `CONFIG_PMP_KERNEL_MODE_DYNAMIC` to enable dynamic
configuration and activation of Machine mode PMP entries. This allows
PMP settings to be managed efficiently during transitions between
kernel and thread contexts.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Rename the `z_riscv_pmp_stackguard_*` functions to
`z_riscv_pmp_kernelmode_*`. This change better reflects that
these functions are used for general kernel mode PMP configuration,
not strictly limited to stack guard purposes.
Call sites in fatal.c, isr.S, and switch.S have been updated accordingly.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
When using `zephyr,itcm` on a imx95 based board the linkage may fail due
to the absence of a defined ITCM region. This issue can be resolved by
specifying the ITCM region using `zephyr,memory-region`.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Zephyr default configuration for SYS_CLOCK_TICKS_PER_SEC
is 10000.
For smartbond this value was changed to frequency of lp_clk.
For XTAL32K SYS_CLOCK_TICKS_PER_SEC would increase to 32768
that would equal SYS_CLOCK_HW_CYCLES_PER_SEC.
One would expect SYS_CLOCK_TICKS_PER_SEC to be less then
HW clock cycles.
This restores default value for SYS_CLOCK_TICKS_PER_SEC
and changes it to 5000 only when rcx is used (that runs at
around 15kHz) and keeping it at 10000 would result in
big rounding errors.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg.xr@bp.renesas.com>
Add option to enable NMI delivery on boot for SMRNMI hardware.
Changes:
- Add CONFIG_RISCV_SMRNMI_ENABLE_NMI_DELIVERY Kconfig option
- Define SMRNMI CSRs in arch/riscv/include/csr.h
- Set NMIE bit during boot to enable NMI delivery
SMRNMI hardware generates but doesn't deliver NMIs when NMIE=0 (default).
This causes twister test failures and prevents handling of critical
hardware events like watchdog NMIs and ECC errors.
Setting NMIE=1 enables NMI delivery, but note that this implementation
only sets the enable bit - it does not provide full SMRNMI support
(no mnret instruction handling, no RNMI handlers). Users must implement
proper RNMI handlers in SoC-specific code to avoid undefined behavior.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
Explicitly disable the SECURE_UART TFM define when
`CONFIG_TFM_LOG_LEVEL_SILENCE=y`. The secure UART is only enabled by
default on nRF platforms to match the current TF-M defaults.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add an option to preserve the EDK folder, instead of deleting it after
creating the archive. This can simplify test scripting which can now
avoid immediately uncompressing the archive when compiling an
extension.
If this option is enabled, default to the much faster `.tar.Z` archive
format, since the compression ratio of the archive is not important.
Signed-off-by: Jordan Yates <jordan@embeint.com>
DTR signal on UART extends the power saving by allowing host
to indicate the remote end that the UART is not in active state.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add S2RAM (Suspend-to-RAM) support for i.MX943 M7_0/M7_1 cores.
When entering suspend mode, the CPU mix is powered off to save
power consumption while preserving RAM data.
Implementation follows S2RAM suspend/resume workflow:
- Save CPU context (NVIC and SCB registers)
- Configure resume vector for S2RAM detection
- Suspend to RAM preserving stack and heap context
- Enter CPU suspend mode with mix poweroff
- Resume via reset_handler -> S2RAM detection -> context restore
Core registers are lost during poweroff but RAM data is preserved.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Update power state configuration for i.MX943 M7_0 and M7_1 cores
to use suspend-to-ram instead of standby to properly support
the newly implemented S2RAM (Suspend-to-RAM) functionality.
Changes:
- M7_0: standby -> suspend-to-ram
- M7_1: standby -> suspend-to-ram
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
This header was deprecated in d881e794ba
for the 4.2 release
in favour of posix_arch_console.h
Let's remove it now.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This driver was renamed in
078fef4ab5
And with it the old kconfig option was deprecated for 4.2.
Let's remove this option now
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
When both `SB_CONFIG_MCUBOOT_MODE_RAM_LOAD` and `SB_CONFIG_BOOT_ENCRYPTION`
are enabled, MCUBoot loads an encrypted image from flash, decrypts it,
and then executes it from RAM.
Previously, the unencrypted image was being flashed. This caused a boot
failure because MCUBoot would attempt to decrypt an unencrypted image.
This commit ensures the encrypted image is flashed when this
configuration is active, allowing the system to boot correctly.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
In current implementation, the default indicator value cannot be set
when building the SLC. And it causes the incorrect indicator value is
notified by AG.
Add a callback `get_indicator_value` to get the default indicator
value from the application.
Add shell command `indicator_value` to set the default indicator
value. The set indicator value will be passed to HFP AG when callback
`get_indicator_value` is notified.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Update the custom vector table to have timer2_isr that
is used for kernel system timer.
While test passes test immediate crashes afterwards due to
missing handler for non-SysTick interrupt.
Now custom interrupt table has additional interrupt handler
to prevent crash.
timer2_isr is no longer static that should not result in
any conflict.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg.xr@bp.renesas.com>
Set Log Level to Info when the HTTP socket reports ENETDOWN,
instead of logging an error each time the network is down.
Signed-off-by: Joel Schaller <joel.schaller16@gmail.com>
The workaround for missing the almost-empty interrupt when TX of very small
payloads needs to also be applied for the UART on MAX32655, so default on
that workaround symbol on that target.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
In this commit, a new callback for NAT64 messages is added.
This is done to avoid passing the received message to rx queue of
external network interface.
As cidr is set from host's IPV4 address, this packet would have been
dropped when parsed, as source address was the same with the host
address and packet was not marked as loopback.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
This commit enables IPV4 messages exchange between interfaces by adding
NAT64 support at platform level.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Remove collaborators in OpenThread area that haven't been active for
months. Also unify the collaborator list in "Networking: OpenThread" and
"West project: openthread" areas.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The MCP2515 driver can be configured with 1, 2, or 3 transmit
buffers via the `MCP2515_TX_CNT` constant.
The interrupt handler checks for transmit complete interrupts for
`TXB1` and `TXB2`. However, the code for these checks was not guarded
by preprocessor conditionals. This meant the code would be compiled
even if the driver was configured to use only one transmit buffer
(`MCP2515_TX_CNT=1`), which is the default.
This change adds the appropriate `#if MCP2515_TX_CNT > 1` and
`#if MCP2515_TX_CNT > 2` guards around the interrupt handling logic
for the second and third transmit buffers, respectively. This ensures
that the code is only included when the corresponding buffers are
actually configured, improving code clarity and preventing compilation
of unused logic.
Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
Pass 'encoding="utf-8"' to all 'subprocess.run()' calls.
This treats the captured stdout and stderr streams as text rather than
byte sequences.
Example without this patch:
west patch apply --roll-back
ERROR: b'error: patch failed: examples/csp_server_client.py:32\n
error: examples/csp_server_client.py: patch does not apply\n'
FATAL ERROR: failed to apply patch libcsp/test.patch
Example with this patch:
west patch apply --roll-back
ERROR: error: patch failed: examples/csp_server_client.py:32
error: examples/csp_server_client.py: patch does not apply
FATAL ERROR: failed to apply patch libcsp/test.patch
Signed-off-by: Mirai SHINJO <oss@mshinjo.com>
Pass 'capture_output=True' to the 'subprocess.run()' call in the 'apply()'
method.
This ensures that stdout and stderr are captured, so 'proc.stderr'
is not 'None' when 'self.err()' is called on a failed process.
Example without this patch:
west patch apply --roll-back
error: patch failed: examples/csp_server_client.py:32
error: examples/csp_server_client.py: patch does not apply
ERROR: None
FATAL ERROR: failed to apply patch libcsp/test.patch
Example with this patch:
west patch apply --roll-back
ERROR: b'error: patch failed: examples/csp_server_client.py:32\n
error: examples/csp_server_client.py: patch does not apply\n'
FATAL ERROR: failed to apply patch libcsp/test.patch
Signed-off-by: Mirai SHINJO <oss@mshinjo.com>
Adds logic to shift out the first edge if the initial three edges do not
match a leading burst, improving noise resilience
in the IR input signal processing.
Signed-off-by: Atakan Demirtaş <atakan_demirtas@outlook.com>
Add many loose files to existing areas
Add new area for release with release related files, like VERSION and
such.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Header for Xen event channel API (events.h) previously contain
incorrect Doxygen-style annotations. Also, some functions had not
it at all.
Add proper description for all functions and fix style to make
documentation consistent.
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Previously clear_event_channel() function, that is a part of Xen event
channel API was missing in events.h header.
Add function declaration and documentation description for to let users
add it to external drivers.
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Xen event channel notification may fail during hypervisor handling,
so it will be good for user to have a possibility to check results.
Previous implementation ignored hypervisor return code, now it will be
passed to caller.
Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Adjusting CONFIG_SYS_CLOCK_TICKS_PER_SEC as core is to slow too run
the test with the default system clock frequency.
Signed-off-by: Paweł Pelikan <pawel.pelikan@nordicsemi.no>
Add stress test that randomly starts and aborts multiple timers
from various contexts. Test checks if timers do not expire prematurely.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Speed up execution of the interrupt handler and sys_clock_set_timeout().
Sys_clock_set_timeout() can be called in two scenarios: from previous
timeout expiration handler or freely. If the former case fast path
can be used since CC value in the GRTC register just expired and it
can be used as a reference for CCADD setting. This is only a single
register write so it's much faster. In the latter a longer procedure
is applied which also happens in two variants. If value which is
set in CC is further in the future (e.g. K_FOREVER was set before) then
CC can be safely overwritten with a new value without a risk of
triggering unexpected COMPARE event. If value in CC is earlier than
the new CC value (if earlier timeout was aborted) then there is a
risk of COMPARE event happening while it is being overwritten.
That case requires long and safer procedure of setting CC.
Update hal_nordic with changes in the nrfx_grtc driver which are
needed for nrf_grtc_timer changes.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Simple formatting via ruff on dictionary logging scripts.
No manual editing was done on the scripts.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When system was configured to use smartbond_timer with
tick-based kernel, timer interrupt could fire only
once and then time would not advance.
Now when tick-based kernel is chosen timer2_isr()
schedules that it should be fired at next tick.
Timer comparator calculation code was extracted
from existing sys_clock_set_timeout() function
without change so it can be used for tick-less
and tick-based kernel.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg.xr@bp.renesas.com>
The can_nrf.c device driver used DEVICE_DT_INST_DEFINE instead of
CAN_DEVICE_DT_INST_DEFINE, which means we are missing initialization
of some CAN structures, namely STATS.
Update driver to use CAN_DEVICE_DT_INST_DEFINE()
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add board file for nrf5340_audio_dk_nrf5340_cpuapp identical
to the ones for nrf5340dk_nrf5340_cpuapp
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When clock accuracy is 1KHz or lower, udp_upload rate has
much lower accuracy. eg. 20M rate has 60M actual throughput.
It's because any packet_duration less than 1000us will be
treated as 1 tick. In this case rate cannot control throughput.
Add clock compensate when time clock is lower than 1KHz to fix it.
In every 10 ticks or longer delta time, calculate packets sent
actual number and expected number, and then compensate ticks.
And add compensate ticks to delay ticks count.
If we cannot compensate a minus ticks as delay cannot be negative,
add it to next compensate period.
If compensate sum ticks is lower than -1000, it means current rate
is higher than low level capability. So no need to compensate
in remaining traffic.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
The functions of timestamp callback were implemented under
CONFIG_NET_PKT_TIMESTAMP_THREAD, but were clarified under
CONFIG_NET_PKT_TIMESTAMP.
The clarification in header file may misunderstand users,
because enabling CONFIG_NET_PKT_TIMESTAMP is not enough
to use these functions.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Kconfig makes sure the NET_PKT_TIMESTAMP_STACK_SIZE with default value
1024 when NET_PKT_TIMESTAMP_THREAD is enabled.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
The ESP32-CAM board does not connect the SD card detect pin, so the
SDHC0_CD_GPIO21 pinmux configuration has been removed. This commit also
updates the status LED to use active-low for correct operation.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Add devicetree properties `lcnt-offset` and `hcnt-offset` to allow
board-specific tuning of SCL high/low count timing on RTS5912.
Signed-off-by: Elmo Lan <elmo_lan@realtek.com>
speed up mmc init, when sdmmc is also
used. as sdmmc has to fail for that and
can take some long time.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
During transition to HWMv2 this workaround was added, which should
instead be in SOF and not in Zephyr, as CORE_COUNT is a SOF Kconfig.
Remove this and instead set the CORE_COUNT in SOF to the
MP_MAX_NUM_CPUS.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Nothing in Zephyr uses SOF, it is the other way round, SOF uses
Zephyr, creating a cyclic dependency in some cases making it difficult
to apply changes to areas used by SOF upstream.
Part of #91061
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Change the OpenOCD configuration file that mention pontential connection
issues with a reference to the documentation where a dedicated section
was recently added.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
This change aims to address a compatibility issue with recent OpenOCD
pre-release and what is planned in OpenOCD v1.0.0 planned end of 2025.
OpenOCD commit 34ec5536c0ba ("stlink: deprecate HLA support") [1] was
merged in December 2024 after release tag 0.12.0 and before coming
release v1.0.0. It deprecates the legacy HLA driver interface (also
called transport) in favor to the generic DAP interface that is
supported by ST-Link firmware v2.1 and later.
Since the referred commit, OpenOCD config script must source a new
config file (interface/stlink-hla.cfg) in order to select hla_swd
transport. This change breaks many ST-Link based OpenOCD config files
of Zephyr. Alternatively, already existing interface/stlink-dap.cfg
can be used with dapdirect_swd interface to use direct DAP/SWD interface.
To overcome the issue and support older and newer OpenOCD releases,
change the OpenCOD configuration files for non-ST boards that use
ST-Link to interface target debug and/or flash programming support.
Use the already existing are still maintained interface/stlink-dap.cfg
config script file together with dapdirect_swd transport interface.
One may potentially face connection issues if using both a recent
OpenOCD firmware and using a ST-Link adapter that embeds a ST-Link
firmware v1.x. This may happen with old ST-Link adapter devices.
ST-Link firmware v1.0 do not support DAP direct SWD interface. In such
a case, either upgrade the ST-Link firmware (refer to STM32CubeProgrammer
guide), or revert the change made here to explicitly use hla_swd
transport based on stlink-hla.cfg.
Link: 34ec5536c0/ [1]
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add a section about the old legacy HLA interface being deprecated in
OpenOCD and give some hint on how to accommodate if one faces a
communication issue with an old ST-Link adapter.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
LFCLK is always enabled, there is no way to gate this clock. The
codeblock that was shielded by this check simply changes LFCLK from
LFOSC to LFXT, for which the existing check for an enable LFXT DT node
is sufficient.
Signed-off-by: Philipp Miedl <phmi@bang-olufsen.dk>
Remove the HSCLK DT node to unify the configuration of MCLK and
simplify the configuration. MCLK is now directly routed to either
* LFCLK
* SYSOSC
* SYSPLL
* HFCLK
without any intermediate nodes.
Signed-off-by: Philipp Miedl <phmi@bang-olufsen.dk>
Remove the node syspll2x refering to the output of SYSPLL CLK2X.
SYSPLLCLK2X is controlled via the clk-div2x parameter of the SYSPLL
DT node and only CLK2X or CLK0 can be activated. So there is no need
for an additional node, as routing of downstream clocks from SYSPLL
CLK0/CLK2X are defined by which of the two is active.
Signed-off-by: Philipp Miedl <phmi@bang-olufsen.dk>
According to the TI MSPM0 reference manual MDIV must not be set if
SYSOSC is not configured to 4MHz. To make use of this setting, it is
necessary to enable configuring the SYSOSC clock of either 32MHz
(default) or 4MHz with the clock-frequency parameter of the
sysosc node.
If the SYSOSC is configured to run at 4MHz, then the MCLK divider
setting is applied.
Signed-off-by: Philipp Miedl <phmi@bang-olufsen.dk>
To conform with the TI mspm0 datasheet and reference manual, rename the
pll node to syspll. To harmonize, also rename references to the non-
existing node syspll0 to syspll.
Signed-off-by: Philipp Miedl <phmi@bang-olufsen.dk>
This change fixes and issue where negative temperatures wrap and
return 250C when the sensor gets below zero. The implementation is
pulled from Boschs official BMP5_SensorAPI and has been tested to
work down to -40
Signed-off-by: Maxmillion McLaughlin <max@sorcerer.earth>
The ls0xx series requires continuous VCOM inversion to prevent panel
damage from DC bias, this adds driver support for doing so over SPI
(without EXTCOMIN), and adds corresponding devicetree properties.
Co-authored-by: Nick Winans <nick@winans.codes>
Signed-off-by: Eden Uhde <eden@rainbowtree.house>
Add bus idle wait after clock rate query to ensure AHB transactions
complete before device configuration. This prevents XSPI_SetDeviceConfig
from failing due to ongoing AHB access detection in XIP environments.
The issue occurs because clock_control_get_rate() triggers AHB
transactions that complete asynchronously, causings subsequent device
configuration to fail due to its bus status checking.
Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
The QSPI delayed data sampling (SSHIFT) is enabled by default. This
feature is configurable in both XSPI and OSPI drivers. Align with
these drivers and make the feature configurable for QSPI too.
Signed-off-by: Adam Zotow <azo@trackunit.com>
With ssht-enable property introduced in STM32 QSPI driver the delayed
data sampling (SSHIFT) got disabled for both dual and non-dual flash
configurations. Set ssht-enable property for dual flash boards
to reenable delayed data sampling.
Signed-off-by: Adam Zotow <azo@trackunit.com>
Cleanup indentation in STM32 GPIO controllers device definition
macros. Replace some uses of COND_CODE_1() with IF_ENABLED() that
is bit more explicit.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Clean indentation in STM32N6_AXISRAM_INIT() local macro to better
highlight what the macro does. To make it more readable, add a
STM32N6_AXISRAM_MAYBE_INIT() helper macro and use IF_ENABLED()
instead of COND_CODE_0().
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Use STM32_CLOCK_INFO(), STM32_DT_INST_CLOCK_INFO(),
STM32_CLOCK_INFO_BY_NAME() and STM32_DT_INST_CLOCK_INFO_BY_NAME()
helper macros in STM32 drivers.
Using these macros ensure the clock division factor is properly
populated according to DT information. Prior these changes some
drivers only got the bus and bits position information and missed
the clock division information which is fine only when this division
factor information is 0.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add helper macros to get clock information from the devicetree:
STM32_DT_INST_CLOCK_INFO_BY_INDEX(), STM32_DT_INST_CLOCK_INFO(),
STM32_CLOCK_INFO_BY_NAME() and STM32_DT_INST_CLOCK_INFO_BY_NAME().
Using these macros or the existing STM32_CLOCK_INFO(), STM32_DT_CLOCKS()
and STM32_DT_INST_CLOCKS() macros ensure clock consumer gets all the
required STM32 clock information that are abstracted by the
STM32 clock drivers resources.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add a bit of documentation for the existing STM32_CLOCK_INFO()
STM32_DT_CLOCKS().
While at it, fix indentation of STM32_CLOCK_INFO() macro.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
I initially added the GEN_UICR options to the gen_uicr image's Kconfig
tree only to not pollute the main tree.
But there is a lot of useful help text in the GEN_UICR option's
Kconfig file that I would like users to be able to read/reference from
the docs.
To not increase the complexity of the Kconfig doc generator, we add
the GEN_UICR options to the main tree and have them all be disabled
for builds other than the gen_uicr image.
Being in the main tree has the added benefit of being recognzied by
the compliance checker.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The readlines_until method is part of the testing framework
(pytest harness) and should not print a full stack trace
when the expected line isn't found. It should also raise
an AssertionError instead of a TwisterHarnessTimeoutException,
allowing users to know that a test failed because the expected
condition did not happen.
Signed-off-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
- Add I2C driver for Microchip SERCOM g1.
- Add and update Kconfig files to support the driver.
- Update CMakeLists.txt to include the new driver.
Signed-off-by: Fabin V Martin <Fabinv.Martin@microchip.com>
- Removed cpurad_uicr and cpuapp_uicr nodes and added uicr node
at address 0xfff8000 for nRF9280.
- Add bicr node defined in same node as uicr but at offset 800.
- Add tdd_peripherals node.
Signed-off-by: Aymen LAOUINI <aymen.laouini@nordicsemi.no>
- nRF9280 memory_map_iron is missing periphconf_partition, added this
partition to mram11 at address 0xe60a000.
- Add secure_storage_partition at 0xe60c000 to memory map. This
partition is devided in two: cpuapp_crypto_partition and
cpuapp_its_partition, both are 4KB. Those partitions are used
by gen_uicr.py script to generate the UICR file.
Signed-off-by: Aymen LAOUINI <aymen.laouini@nordicsemi.no>
- Activate the UICR file generation and PeriphConf for nRF92 application.
- Add condition in reg dt check file to use the correct uicr node name
for nRF92X.
- Generation of preriphconf entries filters on device names to match
the first 5 characters to nrf92 or the 6 first characters to nrf54h,
this information is also used to determine the device SOC_SERIES
to be either SOC_SERIES_NRF54HX or SOC_SERIES_NRF92X allowing possible
extension of usage. Still in case of an unknown device of a certain
family it will use existing configuration while generating
periphconf entries.
Signed-off-by: Aymen LAOUINI <aymen.laouini@nordicsemi.no>
Stress test is executed on CPUs with slow clock (16MHz). Handling of test
data in UART_RX_RDY event is optimized to reduce time spent in the
interrupt context. Since payload is always a decrementing sequence, fixed
array is used to compare memory which allows to use standard memcmp
instead of byte by byte comparison.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add timer property to the uart device under test.
Add zephyr,pm-device-runtime-auto to the uart device under test.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Extend test with a mode where HWFC is off and receiver is providing
buffers on time. In that case receiver should be able to continuously
receive data without losing any byte (even without HWFC). Additionally,
TX data is chopped to verify that receiver does not loose bytes when
new TX data collides with detected RX timeout.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add reporting about the test progress. Test lasts few seconds and
progress report helps to see if test stuck or how it is progressing.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add mode to be used on UARTE with frame timeout which is using a bounce
buffers and TIMER to count bytes. This mode shall be used to reliably
receive data without HWFC as frame timeout approach is not 100% reliable
because it can loose or corrupt a byte when new byte arrives after
frame timeout is detected but before it is fully handled. This mode is
similar to the one enabled with CONFIG_UART_x_NRF_HW_ASYNC but
additional bounce buffers are used and UARTE is receiving data to
internal buffers and copies data to the user buffer. Legacy apporach
cannot be used because in new SoC DMA attempts to copy data in words
so when byte is received it stays in the DMA internal buffer until
4 bytes are received or end of transfer happens then internal DMA
buffer is flushed.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Rearrange code to prepare for upcoming extension that adds special
receive mode.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Timer property indicates which TIMER instance should be used for
byte counting. If timer property is present then given instance
is using TIMER to count received bytes.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This patch is to fix the following building issue:
include/zephyr/rtio/rtio.h:1773:51: error: 'rtio' undeclared
(first use in this function)
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
As future nRF54L SoCs may differ in terms of content,
general SOC_NRF54L_CPUAPP_COMMON symbol needs to cover
less symbols. These will be selected by specific SoC based
on support.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Add support for Segger J-Link debug probes connected to MIPI20 connector
on the boards nucleo_h7s3l8 and stm32h7s78_dk.
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
Use the series-agnostic STM32 LL headers from the STM32Cube HAL module
instead of series-specific ones in STM32 SoC-specific code. Also remove
inclusion of `stm32XXxx.h` in a few files which already include `soc.h`
who is tasked with doing this inclusion.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Use the series-agnostic STM32 LL headers from the STM32Cube HAL module
instead of series-specific ones in this sample.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Use the series-agnostic STM32 LL headers from the STM32Cube HAL module
instead of series-specific ones in STM32 drivers.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Use the series-agnostic STM32 LL headers from the STM32Cube HAL module
instead of series-specific ones in board-specific code of these platforms.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
I2C Fast-Plus mode (1 MHz) is limited by the source clock.
For example, with a 15 MHz I2C source clock, the max I2C frequency is
~625 kHz. To support higher I2C frequencies, the APBx source clock must
be increased. This commit adds the timing parameters for I2C operation
at higher APBx clocks.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Commit 451afdbaaf ("dsp: utils: slim down includes") removed the
inclusion of dsp/dsp.h from dsp/utils.h.
Update the tests to explicitly include dsp/dsp.h.
Signed-off-by: Emil Dahl Juhl <emil@s16s.ai>
The dsp/utils.h header itself only uses dsp/types.h and doesn't need the
entire dsp/dsp.h.
This also facilitates using the dsp/utils.h in builds that don't enable a
dsp backend at all which can be convenient for sensor drivers where the
q31_t dsp type is used.
Signed-off-by: Emil Dahl Juhl <emil@s16s.ai>
subsys/bluetooth/host/classic/shell/avrcp.c:407:3: error: label followed
by a declaration is a C23 extension [-Werror,-Wc23-extensions]
407 | uint64_t identifier;
| ^
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
For the uncompleted BIP request, the following BIP request function
should be same with the previous.
Keep the first request function type, and check it with the following
request function type.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The response function should be consistent with the function of
request when server responses the request of client.
Check whether the BIP function in the server response function is
consistent with the client request.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add command `reg` to register the BIP responder SDP record.
Add command `set_caps`, `set_features`, and `set_functions` to set the
supported capabilities, features, and functions for BIP responder.
Add command `discover` to discovery the BIP responder SDP record. And
parse the response data to get the supported features and functions.
Add command `set_feats_funcs` to set the discovered supported features
and functions.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add function `bt_bip_set_supported_capabilities()` to set the
supported caps of responder.
Add function `bt_bip_set_supported_features()` to set the supported
features of responder.
Add function `bt_bip_set_supported_functions()` to set the supported
functions of responder.
Check the supported features of responder when sending OBEX connect
request on initiator side.
Check the supported functions of responder when sending OBEX get/put
request on initiator side.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add commands for transport over RFCOMM, including `register-rfcomm`,
`connect-rfcomm`, and `disconnect-rfcomm`.
Add commands for transport over L2CAP, including `register-l2cap`,
`connect-l2cap`, and `disconnect-l2cap`.
Add command `alloc-buf` and `release-buf` to allocate and release TX
buffer.
Add command set `add-header` to add the OBEX headers to allocated TX
buffer.
Add command set `client` to send BIP client requests with allocated
TX buffer.
Add command set `server` to send BIP responses with allocated TX
buffer.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add functions to manage BIP transport connect and disconnect both for
l2cap and rfcomm.
Add functions to register and unregister primary and secondary OBEX
servers.
Add functions to send OBEX connect/disconnect request and response.
Add functions to send OBEX get/put request and response with different
type defined by BT_BIP_HDR_TYPE_*.
Add functions to send abort request and response.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The OBEX packet cannot be parsed properly if the action ID header is
included in the packet.
It is caused by the value type issue of the action ID. The action ID
type should be `uint8_t` instead of `uint32_t`.
Fix the issue by change action ID value type from `uint32_t` to
`uint8_t`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The function `bt_obex_has_header()` is used to check whether the
specific header is in the buffer.
It is required by upper layer to check the header from the receiving
buffer.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The `bt_obex_string_is_valid()` is used to check whether the sending
or receiving UTF-16 string is valid or not.
Expose function "bt_obex_string_is_valid()" to support external
checking of UTF-16 strings.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
A new function bt_obex_add_header_body_or_end_body() is added to help
to add the body/end body header. When the tail room of the buffer is
more than the passed body room, and the total length of buffer is not
more than the mopl if the body has been added, the header end body
will be added. Or, the header body will be added.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Replace 'if (ret)' with 'if (ret < 0)' in the Microchip T1S PHY driver.
This change follows the legacy coding style commonly used in Zephyr
drivers, where error conditions are checked explicitly against negative
values. The affected functions do not return positive values, so this
modification does not change functionality. No functional change intended.
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
Configure the link status in the Link Status Control register for
LAN8670/1/2 Rev.D0 PHYs, depending on whether PLCA or CSMA/CD mode
is enabled. When PLCA is enabled, the link status reflects the PLCA
status. When PLCA is disabled (CSMA/CD mode), the PHY does not support
autonegotiation, so the link status is forced active by setting
the LINK_STATUS_SEMAPHORE bit.
The link status control is configured:
- During PHY initialization, for default CSMA/CD mode.
- Whenever PLCA configuration is updated.
This ensures correct link reporting and consistent behavior for
LAN867x Rev.D0 devices.
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
Add support for the LAN8670/1/2 Rev.D0 10BASE-T1S PHYs from Microchip.
The new Rev.D0 silicon requires a specific set of initialization
settings to be configured for optimal performance and compliance with
OPEN Alliance specifications, as described in Microchip Application Note
AN1699 (Revision G, DS60001699G – October 2025).
https://www.microchip.com/en-us/application-notes/an1699
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
This commit adds a new Kconfig option NET_LINK_ADDR_CUSTOM_LENGTH
that allows to set custom link layer address length if your link layer
technology is not supported directly. If this option is set to a value
greater than 0, that value is used as link layer address length.
Signed-off-by: Jani Hirsimäki <jani.hirsimaki@nordicsemi.no>
The NET_MGMT_EVENT_INFO_DEFAULT_DATA_SIZE is used to set the default
size of the data field in the net_mgmt_event_info structure. This
change allows the user to configure the size of the data field
according to their needs.
Signed-off-by: Jani Hirsimäki <jani.hirsimaki@nordicsemi.no>
Follow the convention used elsewhere, e.g. in the sensor API, to allow
users to define their own channel identifiers. This is useful when a
driver's channels don't fit into the predefined set.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
This PR adds a new sample application demonstrating bidirectional UART
communication between console and cellular modem using the Zephyr modem
subsystem.
Purpose
- Interactive AT command interface for modem testing
- Transparent bridge for firmware updates via XMODEM
- Reference implementation of uart_pipe + modem_pipe integration
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Upgrades clock from 48MHz to 120MHz
Configure CPU clock using FDPLL, sourced from XOSC to achieve 120Mhz.
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
Add bindings for dfll, fdpll, gclk generator, mclk cpu, osc32k, rtc clock
and xosc for the pic32cx_sg series.
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
Adds the clock dts nodes and minimal set of binding parameters for using
clock_control driver. It is compatible with same5xd5x series clock.
Hence using the same driver.
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
Add pulses-per-round property.
The driver only measures one pulse and uses pulses-per-round in RPM
calculation.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
If the outgoing call is not alerted, support the case to terminate the
call when receiving the AT command `AT+CHUP`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add kConfig `BT_HFP_AG_CODEC_MSBC` and `BT_HFP_AG_CODEC_LC3_SWB` for
AG to configure the optional Codec IDs.
If the kConfig `BT_HFP_AG_CODEC_MSBC` is enabled, set the feature
`WBS` bit in SDP record.
If the kConfig `BT_HFP_AG_CODEC_LC3_SWB` is enabled, set the feature
`Super WBS` bit in SDP record.
And check the selected Codec ID if it is supported when creating the
SCO connection.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
According to the HFP V1.9, the SDP feature bit `WBS` should be set if
the mBSC Codec is supported. And the SDP feature bit `Super WBS`
should be set if the LC3-SWB Codec is supported.
Set SDP feature bit `WBS` if the kConfig `BT_HFP_HF_CODEC_MSBC` is
enabled.
Set SDP feature bit `Super WBS` if the kConfig
`BT_HFP_AG_CODEC_LC3_SWB` is enabled.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
In current implementation, the values are fixed for the field
`Max_Latency` and `Retransmission_Effort` of HCI command
`HCI_Setup_Synchronous_Connection` and
`HCI_Accept_Synchronous_Connection_Request`
It cannot work properly with these fixed value. It is better to
set it with default value. And it is determined by the controller.
Set the field `Max_Latency` and `Retransmission_Effort` of HCI
command `HCI_Setup_Synchronous_Connection` and
`HCI_Accept_Synchronous_Connection_Request` with default value.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add a filed `active_codec_id` to `struct bt_hfp_hf` to keep the
current codec ID. The default value is `BT_HFP_HF_CODEC_CVSD` when
creating the SLC.
Add a filed `neg_codec_id` to `struct bt_hfp_hf` to flag the
negotiated codec ID. When the AT+BCS command is executed without
error, update the `active_codec_id` with `neg_codec_id`.
Pass the properly voice setting with the `active_codec_id` in
function `bt_hfp_hf_sco_accept()`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
In current implementation, the voice setting of SCO is fixed value
`BT_VOICE_CVSD_16BIT`. It is not aligned with the negotiated codec
id of the HFP.
Add a filed `voice_setting` to `struct bt_sco_chan` that the voice
setting can be configured by upper layer when providing the sco
channel `struct bt_sco_chan`.
Use the `voice_setting` to setup SCO or accept SCO.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add macro `BT_HCI_VOICE_SETTINGS` to assemble the voice_setting
Add macro `BT_HCI_VOICE_SETTING_*_PREP` to set the fields for
voice_setting.
Add macro `BT_HCI_VOICE_SETTING_*_GET` to get the value of the
field from the voice_setting.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
There is a corner case that the AT command `AT+BTRH?` is received
before processing the ongoing calls after the SLC established. In
this case the invalid response and hold status will be notified,
because the ongoing calls are not processed.
The ongoing calls should be processed as early as possible after the
SLC established.
Support the case by processing the ongoing calls in the context of
SLC established callback.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add board overlay file for sam_e54_xpro to enable comparator
test cases to run on this board.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
Add a device tree overlay to enable the MIPI-DBI bus on the M5Stack
CoreS3-SE.
The overlay removes SPIM2_MISO_GPIO35 from the pinctrl so that the MISO pin
can be used as the LCD_DC signal.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
Add a device tree overlay to enable the MIPI-DBI bus on the M5Stack
CoreS3-SE.
The overlay removes SPIM2_MISO_GPIO35 from the pinctrl so that the MISO pin
can be used as the LCD_DC signal.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
Add a device tree overlay to enable the MIPI-DBI bus on the M5Stack
CoreS3-SE.
The overlay removes SPIM2_MISO_GPIO35 from the pinctrl so that the MISO pin
can be used as the LCD_DC signal.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
Add a device tree overlay to enable the MIPI-DBI bus on the M5Stack
CoreS3-SE.
The overlay removes SPIM2_MISO_GPIO35 from the pinctrl so that the MISO pin
can be used as the LCD_DC signal.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
Add a device tree overlay to enable the MIPI-DBI bus on the M5Stack
CoreS3-SE.
The overlay removes SPIM2_MISO_GPIO35 from the pinctrl so that the MISO pin
can be used as the LCD_DC signal.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
Add a device tree overlay to enable the MIPI-DBI bus on the M5Stack
CoreS3-SE.
The overlay removes SPIM2_MISO_GPIO35 from the pinctrl so that the MISO pin
can be used as the LCD_DC signal.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
The M5Stack CoreS3 and CoreS3-SE are equipped with an ILI9342C SPI LCD
controller. This commit adds the corresponding DTS nodes for it.
Since the display backlight is powered by the AXP2101 regulator, the
regulator driver is enabled by default, and the initialization priorities
of the mipi_dbi and display drivers have been adjusted accordingly.
Note: On the CoreS3-SE, the TF card slot and the ILI9342C display share the
same SPI bus, and the display repurposes the MISO pin as the LCD_DC signal.
In this case, the `mipi_dbi` DTS node is disabled by default. To enable it,
overlay the configuration to remove `SPIM2_MISO_GPIO35` from the pinctrl.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
The U-blox F9P driver uses the GNSS_RTK_DATA_CALLBACK_DEFINE macro to
register a callback for when RTK data is available. This is an issue when
multiple instances of the F9P are available and RTK is enabled since this
macro leads to a naming collision. The following compilation error is
reported:
error: redefinition of '_gnss_rtk_data_callback__f9p_rtk_data_cb'
This is because GNSS_RTK_DATA_CALLBACK_DEFINE only uses `_callback` to
identify the callback being registered. As a fix, use the recently
introduced GNSS_DT_RTK_DATA_CALLBACK_DEFINE instead, which takes into
account the `_node_id` while naming the callback.
Signed-off-by: Pedro André <pedro@sentrytechnologies.ai>
The current GNSS_DATA_CALLBACK_DEFINE, GNSS_SATELLITES_CALLBACK_DEFINE and
GNSS_RTK_DATA_CALLBACK_DEFINE macros only utilize `_callback` when naming
the respective callback. This means that if the same callback function is
used more than once, there will be naming conflicts.
In order to allow the same callback function to be used several times for
specific gnss devices, introduce GNSS_DT_DATA_CALLBACK_DEFINE,
GNSS_DT_SATELLITES_CALLBACK_DEFINE and GNSS_DT_RTK_DATA_CALLBACK_DEFINE
macros that take a device tree node identifier instead of a device
reference. This makes it possible to name the callback using both
`_node_id` and `_callback`. Such will uniquely identify any combination of
gnss device and callback.
Signed-off-by: Pedro André <pedro@sentrytechnologies.ai>
It shouldn't be needed to execute UDP sockets tests in a fixed order
(currently enforced by embedding the test number into the test case
name). In fact, this was only needed, as two test cases worked as
prerequisites for other tests, that should've been done in the setup()
function though.
Therefore, consolidate the two test cases which pre-configured the test
interface into a proper setup() function executed before the test
suite, and get rid of the confusing test case numbering.
There also was a race in TX time test due to incorrect mutex use, so fix
that by using semaphore instead.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Rebinding of UDP sockets works just fine and there's really no reason to
disallow it. Keep the restriction for stream sockets only (as our TCP
implementation doesn't support rebinding).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add the node for on board EEPROM devices. Only the basic compatible
functions implemented. EUI-48 Node Address not added.
Add eeprom to the support list of the board.
Signed-off-by: Tony Han <tony.han@microchip.com>
xt-clang complains about the clock ratio difference is unsigned
when being fed to abs(), though GCC does not. So type cast that
to signed integer before feeding to abs(). Clock ratio could be
big enough to overflow signed 32-bit integer. So we first cast
it to be a signed 64-bit integer before substraction.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The eSCO S4 settings feature should be enabled for CVSD Coding. It is
suggested by the HFP specification.
Set the eSCO S4 Settings Supported bit if the Secure connection is
supported by controller.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
In current implementation, the return value of `BT_FEAT_TEST()` is not
a boolean type. However, the macro `BT_FEAT_TEST()` is used as a type
with a return type value of boolean.
Change the return type of `BT_FEAT_TEST()` to boolean type to make it
easy to use.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Replace direct conn->type comparisons with connection type helper
functions in SMP module. This includes:
- Update copyright headers to include Xiaomi Corporation
- Replace conn->type == BT_CONN_TYPE_LE with bt_conn_is_le(conn)
- Replace conn->type == BT_CONN_TYPE_BR with bt_conn_is_br(conn)
- Replace bt_conn_is_type(conn, BT_CONN_TYPE_LE | BT_CONN_TYPE_BR)
with !bt_conn_is_br(conn) && !bt_conn_is_le(conn) for clearer logic
- Replace IS_ENABLED(CONFIG_BT_CLASSIC) && (conn->type == BT_CONN_TYPE_BR)
with bt_conn_is_br(conn) for simplified condition
This change completes the connection type helper refactoring across
the Bluetooth host stack, improving code consistency and readability.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
Replace direct conn->type comparisons with connection type helper
functions in L2CAP module. This includes:
- Update copyright headers to include Xiaomi Corporation
- Replace IS_ENABLED(CONFIG_BT_CLASSIC) && conn->type == BT_CONN_TYPE_BR
with bt_conn_is_br(conn) for cleaner code
- Replace conn->type != BT_CONN_TYPE_LE with !bt_conn_is_le(conn)
- Replace chan->conn->type == BT_CONN_TYPE_BR with
bt_conn_is_br(chan->conn)
This change improves code readability and maintains consistency
with the connection type helper refactoring across the Bluetooth
host stack.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
Replace direct conn->type comparisons with connection type helper
functions in HCI core module. This includes:
- Update copyright headers to include Xiaomi Corporation
- Replace conn->type != BT_CONN_TYPE_LE with !bt_conn_is_le(conn)
- Replace conn->type == BT_CONN_TYPE_SCO with bt_conn_is_sco(conn)
- Replace conn->type == BT_CONN_TYPE_BR with bt_conn_is_br(conn)
- Replace conn->type == BT_CONN_TYPE_LE with bt_conn_is_le(conn)
This change improves code consistency and maintains the same
refactoring pattern applied across the Bluetooth host stack.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
Check if the received AT command `ATD` is valid. When the semicolon is
missing, return the error.
Remove the semicolon from the received valid data and notify received
number or memory location value.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Only voice calls are supported by HFP specification. And the
semicolon character shall be added when the voice call is originated.
Add the semicolon character to force the ATD command to end with
semicolon character.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This driver was renamed in
ab7a6de5bb
while the old kconfig options and dts binding were deprecated for 4.2
Let's remove them now.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In order to avoid duplication of logic in runners, allow subclasses
of ZephyrBinaryRunner to set self.dry_run so that they can then reuse
the logic in core.py to log instead of execute.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Move the argparse.add_argument() call to the abstract base class and
augment the RunnerCaps class with a dry_run parameter.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add a helper function to query how old the data in a channel is. Output
is converted to milliseconds as `k_ticks` objects cannot be compared
directly.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add scmi_cpu_info_get API to query CPU information via
NXP SCMI CPU domain protocol.
Retrieves run mode, sleep mode, and reset vector addresses
for the specified CPU ID using CPU_INFO_GET command.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Add scmi_cpu_reset_vector API for NXP SCMI CPU domain protocol.
This API allows setting CPU reset vector addresses using the
CPU_RESET_VECTOR_SET command. The vector address must point to
the initial address of the vector table
Supports 64-bit addresses and boot/start/resume vector flags.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
actual_length needs to be set also for the OUT transfers. Assume that
requested length was transferred when there are no errors.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Clean indentation in I2S_DMA_CHANNEL_INIT(), I2S_STM32_INIT() macros
of STM32 I2S driver, and SAI_DMA_CHANNEL_INIT() and I2S_STM32_SAI_INIT()
macros of STM32 I2S/SAI driver.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Replace uses of UTIL_AND() with IF_ENABLED() that is far more
readable when initializing or not a structure instance.
No functional change.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Having variable declarations after labels causes build failures with
Clang/LLVM:
subsys/bluetooth/host/classic/avrcp.c:1269:2: error: label followed by a
declaration is a C23 extension [-Werror,-Wc23-extensions]
1269 | uint8_t failed_evt = 0;
| ^
/subsys/bluetooth/host/classic/avrcp.c:3809:3: error: label followed by a
declaration is a C23 extension [-Werror,-Wc23-extensions]
3809 | uint64_t identifier = sys_get_be64(data->identifier);
| ^
Fix these by moving the declarations to the top of the function in the
first case and add braces for the second.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
currently h_bridge_stepper driver is directly placed in drivers/stepper
and step_dir folder contains only gpio specific functionalities. This
commit reorganizes the h_bridge_stepper in gpio_stepper folder to organize
drivers and libs based on functionality.
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
tmc51xx has already been placed in its dedicated folder, however,
tmc50xx is not. use absolute path for including tmc_rampgem_template
Kconfig.
Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Adds function for app to obtain page table usage statistics,
allowing fine tuning of numbers of L1 and L2 page table
array.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When adding new memory domains, we need to start from kernel
page tables by duplicating them. However, there is no need to
duplicate all in-use page tables as some memory regions remain
unchanged. Fror example, hardware register region where only
kernel has access does not need to be duplicated across all
memory domains. The same L2 table can be used among them.
This changes the L2 page table allocation to be copy-on-write
where we only need to duplicate a L2 table if changes need to
be made on it.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
If the page tables are not cached, there is no need to do any
cache ops to flush or invalidate the data in cache. So skip them
if the page tables are not cached. Saves a few CPU cycles.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
In l2_page_table_unmap(), invalidating TLBs should be limited to
the address and not the whole auto-refill TLBs. Also fix a bug
where the EXEC bit should be determined from the L2 PTE and not
the L1 PTE.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Some macros for the page tables array are local to the file so
there is no need to prefix them with XTENSA_. Simplify by
removing the XTENSA_ prefix, and clairfy if needed.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Almost all page table entry (PTE) related macros are only used
in one source file. These macros are considered the internal
working of MMU. There is no need to expose them in header file
for other to reference. So move them into the source file where
it is only place they are used. Bonus is that we can shorten
the macro names as they are now local to the file. Makes it
easier to read, and few keystrokes to input.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This skips the redirection of backup attributes and ring via
some SW field macros, and use the PTE bits directly. Should
make it easier to decode what's going on.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The fields in macro should be done with both shift and mask
values to make it clear. So amend some macros so that
the presentation are unified for them.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Adds snippets-text-sections.ld to linker scripts. So that
the mem_map test can run on qemu_xtensa/dc233c/mmu.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Ensure that the P-states defined in devicetree for the CPU frequency
scaling on-demand policy are in decreasing order of load thresholds.
This is important because the on-demand policy relies on this order
to select the appropriate P-state based on current CPU load.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Validate P-states in devicetree in build time. If no
P-states are defined, a build error will be raised.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
In current on_demand policy, if it doesn't find a P-state
with a threshold lower than the current load, it will fail
to switch state. For example, if load went from 100% -> 0%
suddenly as the chip would get stuck in a "turbo mode"
meanwhile its load is low.
This commit add fallback mechanism for on-demand policy,
that is if no P-state matches (i.e., the load is below all
thresholds), the policy will fall back to the P-state with
the lowest load_threshold (typically the lowest performance
state).
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
If a phone was made during the previous SLC, AG cannot properly
process the redial request sent by HF after reconnecting.
Add a callback `redial` to get the last dial number from the upper
layer when `AT+BLDN` command is received.
If the callback is not provided or the error is returned after the
callback returned, send error response to the HF.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This commit enables configuration and integration of LCT counter by
including relevant source and kconfig files.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Introduce register structures and macros for the long countdown timer to
support counter functionality in npcx and npck series.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
- BeaglePlay has external load capacitors for the 48 MHz crystal. The
reason for this is described in Radio_01 here [0]. So we should
disable the internal capacitors.
- I have tested connection between play and bcf with the new play
settings. For anyone wanting to replicate it, I have used greybus
loopback protocol [1]. Here is my script:
```
echo 50 > /sys/class/gb_loopback/gb_loopback0/iteration_max
echo 2 > /sys/class/gb_loopback/gb_loopback0/type
sleep 10
cat /sys/class/gb_loopback/gb_loopback0/latency_avg
```
- Results:
- Before change: 89545.880000 microsec
- After change: 87822.620000 microsec
- Basically, no regression.
[0]: https://www.ti.com/lit/er/swrz109a/swrz109a.pdf?ts=1761755410798
[1]: https://github.com/zephyrproject-rtos/zephyr/issues/98259
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Update m333x.dtsi to include spi configuration.
Also fixed warning of not correctly formatted clk-pclkdiv.
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
In cb53e40ff9
the uart_native_posix driver was renamed to uart_native_pty while
deprecating the old kconfig options and bidning for the 4.2 release.
Let's remove them now.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This driver was renamed in
4338122248
while the old kconfig options and dts binding were deprecated for 4.2
Let's remove them now.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
STM32MP135F_DK board embeds a LCD screen with touchscreen driven by I2C5.
GT911 touchscreen already have driver support in Zephyr so just add
necessary nodes here.
Signed-off-by: Erwan SZYMANSKI <erwan.szymanski@st.com>
- Allows the tester to match on either ID or addr
- Previously required that both needed to match, but Auto-PTS is sending
the wrong address
Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
The old native_posix ethernet was renamed to native_tap in
78f800642a
and its old kconfig options deprecated at the time (in 4.2)
Let's remove them now.
Note in this commit we move the defaults into their right place.
Defaults were set in the deprecated options so we could both
have the defaults and allow users to keep using the old options.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The kconfig option NATIVE_POSIX_SLOWDOWN_TO_REAL_TIME was deprecated
in bd42df2662 for the 4.2 release.
Let's remove it now.
Users should be using NATIVE_SIM_SLOWDOWN_TO_REAL_TIME instead.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
1. This commit adds support for the cd-gpios property
to the dts binding for the sdhc_spi driver.
2. The _init function is updated to initialize the GPIO
pin if it is found.
3. The _get _card_present function is updated to check
the GPIO pin state if the pin has been initialized.
Signed-off-by: Siddhant Modi <siddhant.modi@gmail.com>
Add instructions for verifying the authentication server’s certificate
domain using exact domain match and domain suffix match options.
Signed-off-by: Triveni Danda <triveni.danda@nordicsemi.no>
Add support to handle domain match and suffix match parameters
for proper server certification validation.
Signed-off-by: Triveni Danda <triveni.danda@nordicsemi.no>
Improve erase efficiency by using a hybrid approach that combines block
and sector erase operations.
The new implementation:
- Erases unaligned sectors at the start until block-aligned
- Erases whole blocks in the middle protion
- Erases remaining sectors at the end.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Update documentation for using multiple serial ports
with Twister's --devise-serial option.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Use --device-serial command line option to specify multiple serial
ports. Split test into two separate test functions.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Extend twister's device serial handling to support multiple serial ports
for pytest-based tests. This enables testing scenarios that require
communication with multiple UART interfaces on the same device.
This enhancement enables comprehensive testing of multi-UART devices
while maintaining backward compatibility with single serial setups.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Settings configuration is removed in the
zephyr/samples/net/openthread/shell/prj-ot-host.conf file.
No more used.
Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
This commit add 1K for the hardware parameters (at the end of the flash)
and reduces the storage to 111k. It is used, first, to store the MAC
address.
Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
This commit add 1K for the hardware parameters (at the end of the
flash) and reduces the storage to 15k. It is used, first, to store
the MAC address.
Signed-off-by: Xavier Razavet <xavier.razavet@nxp.com>
Instead of relying non-standard compiler behavior, define
encode and decode functions for all CMUX command structures.
Final command is encoded into a shared buffer, because it is
always copied directly to TX ringbuffer.
Added also functions to validate commands.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
- Add multi-instance support to the APDS9306 ambient light sensor driver
- Replace global worker item with instance-specific worker item
Closes#97893
Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
This patch adds support for the DOIT ESP32 DevKit V1, an entry-level
development board based on the ESP32-WROOM-32.
Main features:
- ESP32-WROOM-32 module (4 MB Flash, 520 KB SRAM)
- Dual-core Xtensa LX6 processor up to 240 MHz
- 802.11b/g/n Wi-Fi and Bluetooth v4.2 BR/EDR + BLE
- CP2102 USB-to-UART bridge
- Onboard blue LED connected to GPIO2
- All GPIO pins exposed on 2x15 pin headers
The board has been tested with the following Zephyr samples:
- samples/basic/blinky
- samples/hello_world
Signed-off-by: Siratul Islam <sirat4757@gmail.com>
When CDC ACM instance gets enabled and there is some data in TX FIFO,
the TX FIFO work will not be triggered if no UART API is used. And if TX
FIFO was full before CDC ACM instance get enabled, TX work will never be
triggered. To fix it TX FIFO should always be drained when CDC ACM gets
enabled.
Signed-off-by: Alexandre Boeglin <alexandre.boeglin@qorvo.com>
add sai3_2 and edma4_2 node for use with i2s_mcux_sai driver
Signed-off-by: Yanan Yang <yanan.yang@nxp.com>
Fix the indent format issue.
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Add sai3_2 and edma4_2 dts node for use with i2s_mcux_sai driver.
Signed-off-by: Yanan Yang <yanan.yang@nxp.com>
Fix indent format issue.
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Change to use device model MMIO mapping APIs.
Signed-off-by: Yanan Yang <yanan.yang@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Fix CI failures: Clean unused code
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
The burst length should be initialized with 'word_size_bits'.
Signed-off-by: Yanan Yang <yanan.yang@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
add SAI clock support for i.MX9 platform
Signed-off-by: Yanan Yang <yanan.yang@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Fix CI failure: LEADING_SPACE: please, no spaces at the start of a line
Split code format fixing into a new patch
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Fix wrong case when Flash was called "data" and SRAM was called "code".
Rename Flash to "code" and SRAM to "data".
Signed-off-by: Yuriy Vynnychek <Yuriy.Vynnychek-EE@infineon.com>
Add support for the RISC-V Smcsrind extension, which provides
indirect access to CSRs through the MISELECT and MIREG registers.
Changes:
- Added CONFIG_RISCV_ISA_EXT_SMCSRIND Kconfig option
- Implemented 4 helper functions for indirect CSR access:
* icsr_read/write - basic access
* icsr_read_set/clear - bit manipulation
- Defined 7 CSR registers (MISELECT, MIREG, MIREG2-6)
This is a CSR-only extension that does not require any compiler
support or march flags. The helper functions compile to standard
CSR instructions and work with any toolchain that supports Zicsr.
Primary use case: RISC-V AIA (Advanced Interrupt Architecture)
uses indirect CSRs to access IMSIC (Incoming MSI Controller)
registers.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
The driver currently provides no way to use Dual IO Read and Single IO
for the rest of the commands currently, and would erroneously use
Single IO PP command in Dual IO mode. This PR fixes and adds
support for that.
Signed-off-by: Utsav Munendra <utsavm@meta.com>
Remove the Boolean tracking of MSPI IO mode as we can now rely on
tracking the entire dev config applied to the MSPI device, multiple
of which will exist in later commits.
Signed-off-by: Utsav Munendra <utsavm@meta.com>
Also in preparation for allowing control command frequency to be
different from the read/write frequency and initialization frequency.
Signed-off-by: Utsav Munendra <utsavm@meta.com>
Instead of just tracking in a bool whether the MSPI device is in
Standard MSPI vs. QPI/OPI config, track the entire MSPI config which was
last applied. This makes it easier later to track more than two configs
to apply based on the next command to transceive.
Signed-off-by: Utsav Munendra <utsavm@meta.com>
Adds a new test suite to verify the behavior of `riscv_pmp_clear_all()`.
These tests ensure that the function correctly clears all unlocked PMP
entries while preserving any entries that are locked.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Introduce the new function `riscv_pmp_clear_all()` to reset the Physical
Memory Protection (PMP) configuration.
This function iterates through all configured PMP slots. For each entry,
it writes 0x0 to the entry's 8-bit configuration register. This action
attempts to clear all fields, including the Address Matching Mode (A) bits
(setting the region type to OFF), the permission bits (R, W, X), and
the Lock (L) bit.
According to the RISC-V specification, any writes to the configuration
or address registers of a locked PMP entry are ignored. Thus, locked
entries will remain unchanged, while all non-locked entries will be
effectively disabled and their permissions cleared.
The function ensures it operates in Machine mode with MSTATUS.MPRV = 0
and MSTATUS.MPP = M-mode before modifying any PMP Control and Status
Registers (CSRs).
This provides a mechanism to clear all non-locked PMP regions,
returning them to a default disabled state. The function declaration is
exposed in the `include/zephyr/arch/riscv/pmp.h` header file, making it
available for inclusion and use by external modules.
It is recommended for firmware to call this function before transitioning
from a Read-Only (RO) stage to a Read-Write (RW) stage. This ensures
that any PMP settings established during the RO phase, which might no
longer be appropriate, are cleared, providing a clean and secure base
PMP configuration for the RW firmware.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Adds retained_mem api to espressif deep_sleep sample and enables it for the
following platforms:
- esp32_devkitm/esp32/procpu
- esp32c3_devkitm
- esp32c6_devkitc/esp32c6/hpcore
- esp32h2_devkitm
- esp32s2_devkitc
- esp32s3_devkitm/esp32s3/procpu
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
Enables retained_mem api test using RTC RAM for the following platforms:
- esp32_devkitc/esp32/procpu
- esp32c3_devkitm
- esp32c6_devkitc/esp32c6/hpcore
- esp32h2_devkitm
- esp32s2_devkitc
- esp32s3_devkitm/esp32s3/procpu
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
Adds separate memory regions for rtc ram memory areas and reworks linker
scripts to make use of their starting addresses and lengths
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
Add configuration for the VSYS target regulation voltage.
Explicitly specify the threshold at which charging will resume, instead
of deriving it from the combination of two devicetree properties which
have no compile-time validation.
Simplify the process of initialising the chip by precomputing the
register values and explicitly writing the whole register, instead of
updating multiple fields individually.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Instead of text in the description that specifies the valid values,
add the `enum` property so values are validated at compile time.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Rename the bq25180 implementation and files to the more generic bq2518x.
This charger family contains the bq25180, bq25186, bq25188 and the
standalone (non-I2C) bq25185.
The register maps are practically identical, so the driver should be
re-used.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Adds a test that checks that the network message cache differentiates
between PDUs with the same SRC and SEQ but different NetKey Index.
Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
Improve the network message cache to be aware of network keys to
prevent false duplicate detection across different subnets. This
ensures that messages with the same source address and sequence
number but from different network keys are not incorrectly
identified as duplicates, as it can happen in certain cases.
See ES-26350.
Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
Add full support for all remaining AVRCP vendor-dependent PDUs on both
Controller (CT) and Target (TG), including APIs, callbacks, and shell
commands for testing.
Signed-off-by: Make Shi <make.shi@nxp.com>
Implement support for AVRCP Player app Settings PDUs on both CT/TG
- Added APIs for sending and handling commands like LIST_ATTRS,
LIST_VALS, GET_CURR_VAL, SET_VAL, and related text/inform PDUs.
- Added callbacks for TG request handling and CT response processing.
- Add shell commands for Player app Settings commands testing.
Signed-off-by: Make Shi <make.shi@nxp.com>
This patch adds AVRCP notification event handling for both CT and
TG roles. Also add Shell command support for testing notification
registration and responses.
Signed-off-by: Make Shi <make.shi@nxp.com>
This patch introduces support for AVRCP vendor-dependent commands and
responses, including full handling of fragmented messages.
- Adds fragmentation and reassembly logic for AVRCP vendor-dependent
- Introduces TX queue management using delayed work for TG
- Adds support for GetCapabilities PDUs
- Add new Kconfig for vendor-dependent with fragmentation support
Signed-off-by: Make Shi <make.shi@nxp.com>
Remove unnecessary checking for net_buf_tailroom(buf) < chunk_size
before sending data in avctp_tx_processor.
Signed-off-by: Make Shi <make.shi@nxp.com>
The STM32MP135F-DK board embeds 2 ethernets. Enable the ethernet1
in RMII mode with associated PHY.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Signed-off-by: Arif Balik <arifbalik@outlook.com>
Add the support of the stm32mp13 ethernet:
- Adapt to HAL API
- Add support of a memory region in DT for descriptor and buffers
- Add support of PHY with/without crystal 50MHz
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Signed-off-by: Arif Balik <arifbalik@outlook.com>
The typedef ETH_TxPacketConfigTypeDef is used consistently in the driver.
However, some instances of ETH_TxPacketConfig have not yet been replaced.
On the STM32MP13 series, the ETH_TxPacketConfig typedef is no longer
defined. This cleanup ensures compatibility and consistency.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Enable dynamic configuration of region mapping with a 1:1
virtual-to-physical address mapping.
This configuration is aligned with the static declaration of the
MMU table using MMU_REGION_FLAT_ENTRY macro.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
The GPIO_MCP230XX config currently depends on the I2C config. This means
that the board/SoC must enable the I2C config to support MCP23xxx devices.
Inverting this dependency allows declaring GPIO_MCP230XX directly in the
board/SoC defconfig without explicitly enabling I2C.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Suggested-by Fin Maaß <f.maass@vogl-electronic.com>
Add basic support of the LAN8742 RMII phy. The driver is inspired
from the phy_mii generic driver, with the support of a GPIO reset.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Introduce stm32mp13 bindings to support the ethernet peripherals.
The "memory-regions" property is used to reference non cacheable memory
for the ETH DMA.
The "st,ext-phyclk" property aligned Linux binding is used to specify
the PHY clock for RMII.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
- MSPM0L110x series SOC contain 2 UARTS. So add UART1.
- While all MSPM0L series SOC contain at least 2 UARTs, the address for
UART1 seems to be different in L222x and L122x (0x4010A000).
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Release the PM constraint at the end of the context in which it was
requested (`transceive`), instead of in a semi-related function
(`finalize_spi_transaction`) which is also called by other API functions
(`spi_release`). Asynchronous usage is released in the transaction
complete callback.
Signed-off-by: Jordan Yates <jordan@embeint.com>
This commit adds the implementation for the display_set_orientation API
to the ST7796S display driver.
Currently, the driver lacks support for changing the display orientation
at runtime. This change implements the API to allow for hardware-based
rotation using the MADCTL register.
The implementation was tested on an `rd_rw612_bga` board with a 320x480
display using the ST7796S controller. The API now correctly handles
rotations to 0, 90, 180, and 270 degrees by configuring the MY, MX, and
MV bits of the MADCTL register.
Signed-off-by: Nilesh Vyas <nileshvyas1112@gmail.com>
Users can choose blackmagicprobe to flash or debug the device,
without needing to set up ST’s customized OpenOCD.
Signed-off-by: MA Junyi <mjysci@live.com>
Add test support for sdhc driver on Renesas ek_ra8m1 and
ek_ra8p1 board:
- tests/drivers/disk/disk_access
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Add sample support for sdhc driver on Renesas ek_ra8m1 and
ek_ra8p1 board:
- samples/subsys/fs/fs_sample
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Update supported spi and sdhc tag for integration_platforms for
spi and disk test: ek_ra8m1, ek_ra8p1 cm85
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
Add test support using SDMMC card on Renesas RA boards
Add Renesas RA board support for these tests:
- tests/drivers/disk/disk_access
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Add test support using SDMMC card on Renesas RA boards
Add Renesas RA board support for these tests:
- tests/drivers/sdhc
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
driver using SDMMC card on Renesas RA boards
Add Renesas RA board support for these samples:
- samples/subsys/fs/fs_sample
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Add Renesas RA board support for these tests:
- tests/drivers/spi/spi_loopback
- tests/drivers/spi/spi_controller_peripheral
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
for Renesas RA family
Add SPI device node to support SCI B SPI driver on Renesas RA SoCs:
- ra8x1.dtsi
- ra8x2.dtsi
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
When SPI spec is reconfigured, avoid reallocating another sm and properly
free the loaded sm programs before attempting to load new programs.
Fix#94416.
Signed-off-by: Terry Geng <terry@terriex.com>
TI MSPM0 has a TRNG module to generate truly random bits. Add a support
for TI MSPM0 TRNG module.
Signed-off-by: Sanjay Vallimanalan <sanjay@linumiz.com>
Enabled intel LPSS DMA interface using dw common to support
usage of internal DMA in LPSS SPI to transfer and
receive data.
Signed-off-by: Bindu S <bindu.s@intel.com>
There's a dual CAN interfce (J17) on sama7g54-ek board.
pin 1~5 siginal: CAN0_H, CAN0_L, GND, CAN1_H, CAN1_L.
The two CAN transceivers are controlled by PIOC15 and PIOC16 GPIOs.
Add CAN to the support list.
Signed-off-by: Tony Han <tony.han@microchip.com>
Update the driver (supporting samx7x SOCs) to support sama7g5 MCAN.
Differences lists bellow:
| samx7x MCAN | sama7g5 MCAN |
----------|---------------------------------|----------------------------|
CAN core | the same | the same |
clock | peripheral clock with a divider | generic & peripheral clock |
Msg RAM | address configured by CCFG_CAN0 | in SRAM, configured by SFR |
Signed-off-by: Tony Han <tony.han@microchip.com>
When the MCAN is activated in the DT, configure it's register region
with strong ordered, read and write access.
As CANx accesses the lower or upper 64K SRAM is selected by bits in
register 'SFR_CAN_SRAM_SEL', also configure SRAM and SFR region with
strong ordered, read and write access.
Signed-off-by: Tony Han <tony.han@microchip.com>
Support for the Silabs EFM32TG-STK3300 Starter Kit.
Board features:
* EFM32TG840F32 MCU with 32 kB flash and 4 kB RAM
* Advanced Energy Monitoring
* Real-time, accurate energy and power profiling
* Light, LC and touch sensors
* 8 x 20 LCD
* SEGGER J-Link debugger
Signed-off-by: Lukas Woodtli <woodtli.lukas@gmail.com>
* ARM Cortex-M3 processor
* Up to 32 kB Flash and 4 kB RAM memory
* Energy efficient and autonomous peripherals
* Ultra low power Energy Modes
* Fast wake-up
Signed-off-by: Lukas Woodtli <woodtli.lukas@gmail.com>
'GMAC_QUEUE_NUM' is a value of 'num-queues' for the first GMAC
instance getting from the device tree. It is used directly or
indirectly (by GMAC_PRIORITY_QUEUE_NUM) for defining and
initializing 'struct eth_sam_dev_data' with a value from Kconfig
(GMAC_ACTIVE_PRIORITY_QUEUE_NUM).
As there will be a big change for applying the corresponding
num-queues for each GMAC 'struct eth_sam_dev_data', here just
keep it as is. Adding the BUITD_ASSERT to make sure the array
queue_list[] is large enough for all GMAC instances.
Signed-off-by: Tony Han <tony.han@microchip.com>
Add variable 'random_mac_addr' for 'zephyr,random-mac-address' from
device tree. Update generate_mac() to get random MAC address for each
GAMC interface with the 'zephyr,random-mac-address' property.
Signed-off-by: Tony Han <tony.han@microchip.com>
Deprecate the 'ETH_SAM_GMAC_MAC_I2C_EEPROM' for the 'mac-eeprom' option,
Limite it to be used when there's only one activated GMAC instance.
Signed-off-by: Tony Han <tony.han@microchip.com>
As jumbo frame size is not supported by the networking subsystem, only
max_frame_size 1518 and 1536 can be used. The Frame size 1536 would
allow for packets with a vlan tag, so enable GMAC_NCFGR_MAXFS when
NET_VLAN is configured.
Signed-off-by: Tony Han <tony.han@microchip.com>
To allow every interface be initialized properly when there are more than
one instance, remove the static variable "init_done" which is used to make
the initialize procedure only be done once.
Signed-off-by: Tony Han <tony.han@microchip.com>
Add variable "ref_clk_source" to get and set the source for the GMAC
reference clock from DT for different GMAC instances.
Signed-off-by: Tony Han <tony.han@microchip.com>
Add variable "phy_conn_type" to get and use the phy_connection_type from
DT for different GMAC instances.
Update the judgement on phy_connection_type for multi instances support.
Signed-off-by: Tony Han <tony.han@microchip.com>
Change the driver from support 1 instance to support multi instances.
Changes includes:
- irq_config()
- config & data definitions
- ETH_NET_DEVICE_DT_INST_DEFINE
- PTP content / init / DEVICE_DEFINE
Limitations:
- generate_mac() to be updated for supporting multi instances.
- the configurations in Kconfig.sam_gmac are used for all instances.
Signed-off-by: Tony Han <tony.han@microchip.com>
Changes includes:
- add the variable for num_queues to eth_sam_dev_cfg
- update LOG with dev->name to distinguish different instances
Signed-off-by: Tony Han <tony.han@microchip.com>
The lists optimized includes:
- RX descriptors list
- TX descriptors list
- RX buffer accounting list
- TX buffer accounting list
- TX frames accounting list
Signed-off-by: Tony Han <tony.han@microchip.com>
The LoRaWAN subsystem does not require 2KiB of system workqueue,
testing on nrf54l15 flpr (RISCV) CPU (with custom cryptography code)
shows it uses about 700 bytes of the system workqueue, therefore it
is assumed that the real requirement for 2KiB is the software
cryptography features, not the LoRaWAN stack itself, and the
cryptography parts of LoRaWAN can be replaced with alternatives
that do not need this high of a memory requirement, so the
requirement has been moved to the specific Kconfig for software
cryptography instead
Signed-off-by: Jamie McCrae <spam@helper3000.net>
ARMv8-M and newer ARC MPUs use base/limit addressing with 32-byte
granularity and do not require power-of-two sizing. Only ARMv7-M
and older ARC MPUs have this restriction.
Check CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT (set for ARMv7-M,
older ARC) instead of CONFIG_ARM_MPU to avoid wasting memory on
ARMv8-M systems.
Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
This moves the switching stress test into its own group simply
to signify that there is a group for stress testing. And also
rename torture to stress.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When ARM CONFIG_BUILTIN_STACK_GUARD=y, it expects that the privileged
stack has a higher memory address than that of the normal user stack.
However, dynamically allocated stacks had the other way round:
privileged stack had a lower memory address.
This was probably not caught before because relevant tests, such as
`kernel.threads.dynamic_thread.stack.pool.alloc.user` run with no
hardware stack protection. If one were to test it on HW that has stack
protection, such as frdm_mcxn947 with CONFIG_HW_STACK_PROTECTION=y, they
would see it failing.
This patch naively assumes that ARC and RISC-V PMP will be happy with
the shuffling of user and privileged stack positions.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
On platforms where `Z_LIBC_PARTITION_EXISTS` is true - such as Cortex-M
- it is necessary to add this partition to the memory domains of
userspace extensions, otherwise they get memory faults.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Adjust driver so that pinctrl property is not required in device
tree. Remove card init functions from driver init, as set_io()
function is meant to power cycle the card (if pin is used) and
initialize card clock and bit width. If card is not inserted
while driver init runs, init() will fail unreasonably, so
card init should take place at set_io() calls.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
For ESP32 devices, not all boards are required to configure pinctrl
for signals like Chip Detect (CD) and Write Protect (WP). Remove
pinctrl property as mandatory.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
There is a couple test cases which for whatever reason does not work on
certain platform drivers, and they are being hardcoded to be skipped in
the test if using those drivers. This decision was made a long time ago,
and I do not have great insight into why, but regardless, the proper way
to skip a ztest case is to call the proper ztest skip API instead of
just returning, because it should be marked as skipped, not passed.
Also, the problem for these couple drivers is clearly the cases where rx
is bigger than tx, so add the same skip for the other new case where rx
is bigger than tx, the same_buf_cmd case.
After analyzing the DSPI driver a bit, I have a suspicion that this is
just a software driver limitation, that could be overcome to function
properly, and not a hardware limitation. But this commit is just to skip
the test properly that is already being skipped, not fix the underlying
issues with these drivers.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
When OpenThread iface is brought up `ot ifconfig up` there are several
modules that will attempt to open a platform socket and perform bind
and bind to netif operation.
Since now, `sockfd_upd` structure was initialized after the backbone
interface announced connectivity, but this implies that OpenThread
interface will always be brought up only after this event, which is not
true, or imposed.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
This commit makes two key improvements to the DeviceHandler:
1. Pass TWISTER_PLATFORM environment variable to serial PTY scripts
- Enables serial PTY scripts to access platform-specific configuration
- The platform name is now available via TWISTER_PLATFORM env variable
- Allows board-specific serial port and baudrate configuration in
external serial forwarding scripts
2. Reorder pre-script execution before serial PTY initialization
- Moved pre-script execution before serial PTY setup to avoid conflicts
- Prevents race conditions when pre-script performs board power cycling
or reset operations that might interfere with active serial
connections
These changes enable more flexible hardware testing scenarios where:
- Serial configuration can be automatically selected based on board type
- Board initialization (power cycling, FPGA programming) completes
before establishing serial connections
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
Allow symbols to be placed in custom groups, which can be included or
excluded from the build with a common Kconfig symbol.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Group exported symbols together by subsystem/library. Groups can then
be enabled or disabled together through the existance of a Kconfig
symbol named `CONFIG_LLEXT_EXPORT_SYMBOL_GROUP_{GROUP_NAME}`.
All symbols declared with the standard `EXPORT_SYMBOL` and
`EXPORT_SYMBOL_NAMED` macros fall into the `DEFAULT` group.
Signed-off-by: Jordan Yates <jordan@embeint.com>
DEFAULT
DEFAULT
WAIT_FOR calls `expr` after it has evaluated to true.
Store `expr` in a variable and return it instead to prevent the additional
`expr` call.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
The test is expected to run on single cpu so set max number of cpus to 1
so that it doesn't fail smp targets like fvp_baser_aemv8r in ci.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
LLEXT-related sections should only be added to the linker script when the
associated CONFIG_LLEXT is enabled. This has been done by checking for this
Kconfig symbol in every linker file, but this creates a lot of boilerplate
for no good reason.
Use the much simpler solution: move the check inside the common linker file
and remove existing "#ifdef CONFIG_LLEXT" checks in all linker files.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Interrupts would only be unlocked when resuming from suspend-to-idle.
Even though other states *should* never be entered, make sure interrupts
are unlocked anyways to conform with the expectations of the PM framework.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Adds JLink runner configuration for both Cortex-M7 and Cortex-M4 cores
on the Arduino Portenta H7.
Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
When remote peer have closed the PPP link normally, the
PPP stack on Zephyr side switches back to ESTABLISH phase
to be ready for next handshake.
When calling net_if_down() on the interface, it should not
try to initiate LCP link termination, but instead go directly
to DEAD phase.
See https://datatracker.ietf.org/doc/html/rfc1661#section-3.2
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add a MATRIX_CODE macro to extract the key code from a key value created
in DT with MATRIX_KEY. This can be handy for code other than input_keymap.c
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The h2ram is an independent 4KB section. With default settings of
CONFIG_ESPI_PERIPHERAL_HOST_CMD_PARAM_PORT_NUM and
CONFIG_ESPI_PERIPHERAL_ACPI_SHM_REGION_PORT_NUM,
There is a 2KB gap that is unused. This change was made to make
unused gap can be reused by other modules to reduce overall RAM
usage.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Enhanced the shim driver to raise Wi-Fi management events
when starting or stopping SoftAP, specifically in cases
where CONFIG_WIFI_NM_HOSTAPD_AP is disabled.
Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
Will throw an error showing what the issue with the VERSION file
is if a required field is missing
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
APPLICATION_SOURCE_DIR is image specific and the value inside sysbuild
points to sysbuild itself.
This gives wrong results when a sample uses
`zephyr_get(APPLICATION_SOURCE_DIR)` as it will fetch the sysbuild value
and not its own value.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
- We want to add the ASE ID to a stream as early as possible
to make sure the events coming from BTTester to Auto-PTS
contains the correct information.
- Previously the events that came before stream_configured
would contain ASE ID 0, regardless of actual value.
Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
The code today relied on ATOMIC_OPERATIONS_BUILTIN being the default
option if the other alternatives (_C and _ARCH) were not enabled.
Instead, explicitly check for it to avoid confusion when browsing the
code and to ensure that the user can always match a particular Kconfig
option with the #ifdeffery in the header file.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The ATOMIC_OPERATIONS_* Kconfig option is not a choice, so it does not
have a default. However, the file that determines which actual atomic
operations backend will be used does default to
ATOMIC_OPERATIONS_BUILTIN:
3e537db71e/include/zephyr/sys/atomic.h (L26-L41)
Since we want to ensure that all SoCs intentionally select the atomic
operations backend they want to use, select it at the SoC level for all
SoCs, as well as for the Cortex-M arch when the Armv8-M baseline profile
is selected.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Main changes since v2.7
* Phy-device v2.1 API introduced
* Phy updated to use internally this v2.1 API, so channel and modem IF
are updated accordingly
Note: Like before, bsim remains fully backwards compatible
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Avoid polluting every build that includes this Kconfig with EXT2
logging config unless the ext2 filesystem is actually enabled.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Make sure assertion is true before dereferencing chan->iso. In extreme
case compiler could skip assert check (asume it is always false) if address
was already dereferenced.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Zero size buffer pipes are not currently supported if memory is
not coherent between CPUs (CONFIG_KERNEL_COHERENCE=y) due to
possibility of buffers being in incoherent memory. So skip
the zero size test for now.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add a new test configuration to verify power domain functionality with
ISR safe power management enabled. The test conditionally applies
PM_DEVICE_ISR_SAFE flags to test devices based on the new
CONFIG_TEST_PM_DEVICE_ISR_SAFE configuration option.
Enhance existing test assertions to verify the PD_CLAIMED flag is
properly set when devices claim power domains and cleared when they
release them, ensuring correct power domain reference counting in
both regular and ISR safe contexts.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Fix the power domain claiming condition which was inverted, causing
domains to be claimed when they were already claimed instead of when
they weren't. Add null check for power domain before accessing its
properties to prevent potential null pointer dereference. Also ensure
the PD_CLAIMED flag is properly cleared when putting the power domain.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Fixed regression related to adc reference and adjusted to be
compatible with NXP K and MCX series.
Signed-off-by: Vinicius Carvalho <carvalho-vinicius@outlook.com>
Remove C code overrides of RX buffer counts and sizes when the TX path
is disabled. Move the reduced resource requirements into the Kconfig
default values. Default RX buffer sizes are not changed by the commit.
Fixes#92356
Signed-off-by: Jordan Yates <jordan@embeint.com>
Use the newly created CONFIG_CSPRNG_NEEDED to simplify the enablement of
CSPRNG for the PSA Crypto Core.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Its goal is to use it as the "connection point" between what the hardware
support and what the application needs. All the application/module/subsys
need to do is to set this new Kconfig and then check the "return" value
on CONFIG_CSPRNG_ENABLED: if the latter is set then the entropy driver was
enabled; if not something is preventing the driver from being used.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The initial goal of CONFIG_CSPRNG_AVAILABLE was to declare that there was
an entropy node declared in the DT so that if CONFIG_ENTROPY_GENERATOR
was enabled, then the corresponding driver could be enabled.
This works in most of the cases, but not all. A counter example is the
"entropy_bt_hci" driver which is only enabled if CONFIG_BT_HCI_HOST is also
enabled. This means that in a build where the BT stack is not enabled
that driver won't be enabled even if the DT node is still present.
An example of this are the nrf5340[dk|bsim] boards.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Fix start/stop driver API implementation. OT stack expects these
functions to only put IEEE802.15.4 in sleep mode and back in RX
mode when calling start. Fixes ifconfig down/up cycling as well
as nodes staying in leader role and not forming a network.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
No need to use Posix eventfd API in core network code as zvfs_eventfd
is compatible with it and we can now avoid using Posix headers
unnecessarily.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This requirements file can be confusing and will only get stale over
time. Drop it since these dependencies are actually captured in
scripts/requirements-run-test.txt
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
There is a race condition in this method of CS behavior verification,
where multiple CS signal transitions can happen during one interrupt
processing, thereby only getting one callback and marking the trigger
count as being less than what is accurate. At least we can account for
most real situations where this happens by also looking at the CS pin
logic level and comparing to how it started, to potentially realize that
there was another edge that happened when it either should or shouldn't
have happened.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Use zu% format for size_t type.
Use d% format for int type.
Use u% format for uint32_t type.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Signed-off-by: Jony Zhang <jony.zhang@nxp.com>
Depending on the ring buffer configuration, users may encounter
the "size too big" assertion in runtime. Let's enable the
RING_BUFFER_LARGE when we know that it is required.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Make the runtime assertion message more obvious on why it's
failing.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
The UART device used by the backend needs to be gotten before use,
and put after. In limited cases, device drivers call
pm_device_runtime_get() as part of the call to uart_rx_enable(),
this is not the case for polling, nor interrupt driven API calls
for most if not all drivers, nor is that expected.
Implement pm_device_runtime calls in shell uart backend similar to
the logging uart backend to support all uart drivers in all
configurations.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Update hal_adi revision to get HAL fix commits. One of the fix commits
addresses an issue where the MAX32650 system clock frequency value was
not set correctly, which could lead to improper operation of
time-dependent functions.
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Removes checks for HWMv1 as the code for HWMv1 was removed from
Zephyr some time ago and these checks are not needed
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
HWMv2 was introduced in v3.7, and HWMv1 support was removed in v4.2
so this script is no longer needed
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
As midi2 is provided by networking subsystem it should not
depend on any features provided by Posix. Convert Posix poll
API calls to zsock poll ones. There is no functionality changes,
only naming changes.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Fix how Doxygen special commands \retval & \return are used in doc text.
\retval: Starts a description for a function's return value with name
<return value>, which needs to be attached and to not be a word that is
part of the sentence, and each return val should have its own \retval.
Otherwise \retval is replaced with \return.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Fix how Doxygen special commands \retval & \return are used in doc text.
\retval: Starts a description for a function's return value with name
<return value>, which needs to be attached and to not be a word that is
part of the sentence, and each return val should have its own \retval.
Otherwise \retval is replaced with \return.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Fix how Doxygen special commands \retval & \return are used in doc text.
\retval: Starts a description for a function's return value with name
<return value>, which needs to be attached and to not a word that is
part of the sentence, and each return val should have its own \retval.
Otherwise \retval is replaced with \return.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Fix how Doxygen special commands \retval & \return are used in doc text.
\retval: Starts a description for a function's return value with name
<return value>, which needs to be attached and to not a word that is
part of the sentence, and each return val should have its own \retval.
Otherwise \retval is replaced with \return.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Fix how Doxygen special commands \retval & \return are used in doc text.
\retval: Starts a description for a function's return value with name
<return value>, which needs to be attached and to not be a word that is
part of the sentence, and each return val should have its own \retval.
Otherwise \retval is replaced with \return.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Fix how Doxygen special commands \retval & \return are used in doc text.
\retval: Starts a description for a function's return value with name
<return value>, which needs to be attached and to not be a word that is
part of the sentence, and each return val should have its own \retval.
Otherwise \retval is replaced with \return.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Fix how Doxygen special commands \retval & \return are used in doc text.
\retval: Starts a description for a function's return value with name
<return value>, which needs to be attached and to not be a word that is
part of the sentence, and each return val should have its own \retval.
Otherwise \retval is replaced with \return.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
DISK_DRIVER_SDMMC is already by default y,
if it is enabled in the dt, so we shouldn't overwrite
that.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
MDIO will be enabled by default by the ethernet phy, when
needed, we don't need to enable it explicitly in the defconfig files.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add v4.3.0 to the list of supported releases.
Since v4.1.0 is becoming EOL, bump TOC ranges to no longer list v4.1.0
and add (draft) v4.4.0.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The files in the LICENSES directory are for the reuse tool, and not the
licenses of the Zephyr repository itself.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Generated objects.inv would not contain e.g. "zephyr:board" entry on
incremental builds, making it impossible to use Intersphinx on other
projects when rebuilding the Zephyr docset.
It can be verified by inspecting inventory like this:
```python
from sphinx.util.inventory import InventoryFile
InventoryFile.loads(open("objects.inv", "rb").read(), uri="")
inv.data.keys()
```
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
i.MX95 M7 supports multi-level interrupt.
Current ram_context_for_isr test does not cover multi-level interrupt.
So exclude i.MX95 M7.
Signed-off-by: Qiang Zhao <qiang.zhao@nxp.com>
- **Fix session mutex handling:** Ensure the `mtls_sessions_lock` is
always released in `mtls_get_unused_session_index` on failure
to prevent deadlocks.
- **Protect `in_use` flag:** Added mutex protection when setting
`in_use = false` in free functions.
- **Cleanup on setup failure:** Added calls to `mbedtls_*_free()`
in `mtls_session_setup()` when key initialization fails.
- **Free logic fix:** Corrected `if/else` structure in
`mtls_session_free()` to ensure the correct context is freed.
Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
Remove erroneous calculation of `apkt->pkt->out_len` in
`mtls_ccm_decrypt_auth` and `mtls_gcm_decrypt_auth`.
The output length should be handled by the caller or the
AEAD decryption process itself.
Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
Corrected the RFC2131 section reference in DHCPv4 comments and help text.
The random delay before sending the initial DHCPDISCOVER message is
defined in Section 4.4.1 of RFC2131, not in 4.1.1 as previously stated.
Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
In rare occasions iface and TCP mutexes could cause a deadlock. As
notifying the interface readiness takes place just before the iface
mutex is released, it should be not harm to release it just before the
TCP is notified about interface going down to avoid the deadlock.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The current approach was buggy, for example the TCP context could be
unrefed twice in case of forced close. Or in case of a race, when the
application closed the socket first, the TCP context wouldn't be
dereferenced at all.
Calling the tcp_conn_close() unconditionally in case of forced close
solves all those issues.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
A listening TCP context has no active connection therefore it has no a
second ref from the TCP stack. Thereby, when shutting down connections
when interface goes down, net_tcp_put() should not be called on a
listening socket to release the ref on the TCP stack behalf.
Instead, report the error via the registered accept_cb callback no
notify the application about the error, which should then close the
socket and release the associated TCP context.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Remove the note about time_t being 64-bit in Zephyr, since that is
generally not accurate and depends on the configuration of the C library.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Documentation has been added for the instrumentation subsystem, link to
it in the Zephyr 4.3 release highlights instead of code sample.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add documentation for the instrumentation subsystem as this was missing
from the initial contribution.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The added stm32-adc properties in c21cdd8569 ("dts: bindings: adc:
stm32: add new properties to simplify the driver") were missing from adc2
within the stm32n6.dtsi.
Since adc1 and adc2 are almost identical, just copy the missing properties
from adc1 which was fixed up as part of 5f0c63ea35 ("dts: arm: st: fill
out adc nodes with the new properties").
This fixes compilation when using adc2:
```
devicetree error: 'st,adc-internal-regulator' is marked as required in
'properties:' in [...]/zephyr/dts/bindings/adc/st,stm32n6-adc.yaml, but
does not appear in <Node /soc/adc@50022100 in
[...]/zephyr/dts/arm/st/n6/stm32n6.dtsi:456>
```
Signed-off-by: Emil Dahl Juhl <emil@s16s.ai>
Update manifest to align the copy of Mbed TLS header files which lives
in the TF-M repository to what's in Mbed TLS release v3.6.5.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Add a few useful commands and information when running the
BT Tester with native_sim, either with or without the
Zephyr controller.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Consecutive resource instance name should be encoded regardless of
whether timestamp is present or not.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
To ensure that code compiles error (and warning) free, add a build-all
testsuite for smbus drivers.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The smbus driver initialization priority was previously set to
`KERNEL_INIT_PRIORITY_DEFAULT` (which is 40). However, the default init
priority of devices is typically `KERNEL_INIT_PRIORITY_DEVICE` (which is
50).
Since the stm32 smbus driver uses a reference to the underlying i2c
device, and since this driver was not being built in CI, this led to the
discovery that the smbus driver was initialized too early.
```shell
ERROR: Device initialization priority validation failed, the sequence of \
initialization calls does not match the devicetree dependencies.
ERROR: /smbus1 <smbus_stm32_init> is initialized before its dependency \
/soc/i2c@40005400 <i2c_stm32_init> (POST_KERNEL+1 < POST_KERNEL+4)
```
By setting the initialization priority to `KERNEL_INIT_PRIORITY_DEVICE`,
both smbus1 and i2c1 have their priorities evaluated in the same group,
and it becomes possible to determine relative priorities via phandle
dependency.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add ARCH_HAS_STACKWALK as a dependency to the stack unwind test to avoid
running it on 64bit Cortex-R platforms, which do not implement the
arch_stack_walk() api.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
The commit 125d0daaa1 added 'loc' to the sym.ranges tuples and fixed
kconfiglib.py but guiconfig.py is left untouched. This make menuconfig to
die with:
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.13/tkinter/__init__.py", line 2077, in __call__
return self.func(*args)
~~~~~~~~~^^^^^^^
File ".../scripts/kconfig/guiconfig.py", line 917, in _tree_double_click
return _tree_enter(event)
File ".../scripts/kconfig/guiconfig.py", line 942, in _tree_enter
_change_node(node, tree.winfo_toplevel())
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../scripts/kconfig/guiconfig.py", line 1125, in _change_node
s = _set_val_dialog(node, parent)
File ".../scripts/kconfig/guiconfig.py", line 1219, in _set_val_dialog
range_info = _range_info(sym)
File ".../scripts/kconfig/guiconfig.py", line 1339, in _range_info
for low, high, cond in sym.ranges:
^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 3)
This commit ignores the last element in the tuples.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
The commit 125d0daaa1 added 'loc' to the sym.ranges tuples and fixed
kconfiglib.py but menuconfig.py is left untouched. This make menuconfig to
die with:
Traceback (most recent call last):
File ".../scripts/kconfig/menuconfig.py", line 3284, in <module>
_main()
~~~~~^^
File ".../scripts/kconfig/menuconfig.py", line 663, in _main
menuconfig(standard_kconfig(__doc__))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../scripts/kconfig/menuconfig.py", line 732, in menuconfig
print(curses.wrapper(_menuconfig))
~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/lib/python3.13/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File ".../scripts/kconfig/menuconfig.py", line 872, in _menuconfig
_change_node(sel_node)
~~~~~~~~~~~~^^^^^^^^^^
File ".../scripts/kconfig/menuconfig.py", line 1586, in _change_node
s, _range_info(sc))
~~~~~~~~~~~^^^^
File ".../scripts/kconfig/menuconfig.py", line 3119, in _range_info
for low, high, cond in sym.ranges:
^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 3)
This commit ignores the last element in the tuples.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
- Add Iulia Prodan as she is already a maintainer of the OpenAMP module.
- Add myself as I am maintainer of the openAMP project.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-11-10 09:57:55 -05:00
7122 changed files with 188987 additions and 62380 deletions
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.