Move z_shell_backend_rx_buffer_flush() before state_set() in
shell_start() to prevent a race condition where incoming shell
commands could be lost.
Previously, the sequence was:
1. state_set() - prints the prompt
2. z_shell_backend_rx_buffer_flush() - flushes RX buffer
If the shell thread was preempted after printing the prompt,
the host could see the prompt and send commands. When the
thread resumed, z_shell_backend_rx_buffer_flush() would discard
those commands.
By flushing the RX buffer before printing the prompt, any
commands received after the prompt is visible will not be
affected by the flush operation.
Fixes#99674
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
This commit removes the OPENTHREAD_REFERENCE_DEVICE flag for NXP RW612
samples, as these are not meant to be included in a test setup.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
- Fixes an inconsistency in the board list
of the MCUx-VSCode extension. No functional change.
- Adjusts names in yaml files to follow the currently used approach
"NXP <board_name> [(cpu)] [(type)]".
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
The function was casting a char* help pointer to struct shell_cmd_help*
and reading its 4-byte magic field. When the help string was shorter
than 4 bytes, this caused a read past the end of the buffer.
The fix replaces the struct cast with a byte-by-byte comparison of the
magic number.
Fixeszephyrproject-rtos/zephyr#102598
Co-authored-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The DTB file was previously listed as bcm2712-rpi-5.dtb, which was
inaccurate, as the hyperlink referenced the `bcm2712-rpi-5-b.dtb`
file. To ensure documentation precision and avoid potential
confusion, update the file name to the correct
`bcm2712-rpi-5-b.dtb`.
Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
The ARM cores in BCM2712 are incapable of running the kernel in 32-bit
mode. The option `arm_64bit=1` is unnecessary and can be confusing, as
Raspberry Pi 5 runs in 64-bit mode by default.
Removed the `arm_64bit=1` configuration from documentation for Raspberry
Pi 5 (BCM2712).
Signed-off-by: Svitlana Drozd <svitlana_drozd@epam.com>
In order to compile the demo application for a secure MQTT connection,
several networking API functions are used, which is properly defined by
some of the POSIX libraries already integrated onto Zephyr project. By
adding the missing libraries, compilation to the reference board
adi_eval_adin1110ebz passes.
As a minor change, reordered the sequence of included libraries to be
in alphabetical order.
Fixes#102372.
Signed-off-by: Cesar Santos <dev.cmsantos@gmail.com>
The new node is called "npu_cache".
This way a possibility is offered to choose - thru an overlay - if to
enable the NPU cache or not.
This new node has a dependency with node "npu", so the NPU cache's
status is taken into account only in case node "npu" has status "okay".
Default status value of "npu_cache" is "okay"
(i.e. enable the NPU cache).
Signed-off-by: Wolfgang Betz <wolfgang.betz@st.com>
Add a model of LDREX/STREX/CLREX, that although simple may be correct
enough to cover the needs of SW using these instructions.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Actually, the parameter is the number of bytes to read, not the number
of double words.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
The parsing of the number of bytes to read in the read command was being
done in hexadecimal, causing unexpected behavior.
Now the number can be interpreted in decimal or hexadecimal if prefixed
with 0x.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
This patch runs clang-format on the shell_flash_test.c file
before the real patch gets applied, otherwise the changes
would be hard to read.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
This patch runs clang-format on the flash_shell.c file before the
real patch gets applied, otherwise the changes would be hard to
read.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
Fix spelling and wording issues in comments for phytec
phyboard_atlas xip FlexSPI NOR configuration headers.
No functional change.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Remove inclusion of files already included by the arch linker script from
the SoC-specific linker script.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
STM32MP1 series used a custom SOC_LINKER_SCRIPT, but all it did was
include the main Cortex-M script, unnecessarily re-include headers already
included by the main script(!) and add a custom section.
Get rid of the custom SOC_LINKER_SCRIPT but keep the custom section by
moving it to a linker script snippet file, added to the build system using
CMake directives.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Fix the panel pixel format enum in the X-NUCLEO-GFX01M2 shield overlay
by using PANEL_PIXEL_FORMAT_RGB_565 as defined in panel dt-bindings.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Fix Devicetree compilation errors caused by incorrect enum macro
names used in DTS overlay files.
Replace LSM6DSV16X_DT_ODR_AT_120Hz with the correct Devicetree enum
LSM6DSVXXX_DT_ODR_AT_120Hz in the stream_drdy sample boards overlay.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
This option already depends on BT_PER_ADV_RSP being enabled, so we should
have a more reasonable default for it. This way e.g. the existing PAwR
sample app should work without additional changes.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
During configuration the base->ICR1 or base->ICR2 register is written
without an IRQ lock. This can result in unwanted side-effects if the status
bit isn't cleared, or the edge select still needs to be updated.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Check the return value of adxl372_set_op_mode() in
adxl372_submit_stream() and abort on error.
Fix CID: 516239
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Add a 'U' suffix to the interrupt status mask passed to
lan9250_write_sys_reg() to make the constant explicitly unsigned.
This avoids signed/unsigned ambiguity and addresses a SonarQube
static analysis warning.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The lan9250_thread() function declares a local variable that may be
used without being initialized, triggering a -Wmaybe-uninitialized
warning when building with -Werror.
Initialize the variable at declaration to ensure deterministic
behavior and avoid build failures.
No functional change intended.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Several LAN9250 helper functions ignored return values from register
access and wait routines, potentially hiding SPI or timeout
failures.
Propagate error codes from read/write/wait helpers throughout the
driver so failures are detected and handled by callers.
This improves robustness and makes error conditions visible during
initialization, PHY access, RX/TX paths, and MAC configuration.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Do direct resource path comparison on all registered resources before
falling back to fnmatch() so that exact path matches get always
preference.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add a test case verifying that if there's a static resource defined
which overlaps a FS resource pointing to a directory, it takes
preference on exact URI match.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Release camera frame immediately after video encoding.
Doing so, the frame could be reused by camera for next capture
without waiting for the end of network transmission.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Fix missing input buffer encoder dequeue, this was corrupting camera
device fifo because of same buffer queued into two different fifo.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Set multiline on pixel pipes to 128 lines to limit slave IP hardware
handshakes and so reduce the number of interrupts received by slave IP.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Log number of interrupts, including fuse interrupts at each
key frame and at the end of encoding.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Fix wait of hardware encoding completion by using
interrupt signaling instead of polling on irq status.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Introduce the missing flag to compile code with Zbkb extension,
which has already been supported by the GCC 12 in current SDK.
Signed-off-by: Andy Lin <andylinpersonal@gmail.com>
This adds optional clock control support to the spi_dw driver. The
support currently assumes that the clock control binding uses clkid for
the clock cell name.
Signed-off-by: Łukasz Kędziora <lkedziora@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Andreas Weissel <andreas.weissel@synaptics.com>
The ethernet DMA driver code was causing the silent dropping of packets
with length 125, 126 and 127. The root cause of the problem is that the
DMA engine performs an extra four bytes transfer corresponding to the
Receive Status Word. For those particular packet lengths, the previous
code incorrectly calculated the last fragment size.
The new code avoids that pitfall by decrementing the total frame size as
the fragments are being collected, while avoiding the creation of an
extra fragment on the extracted network packet.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
Make USBD_HWINFO_DEVID_LENGTH prompt optional so that the code compiles
even if HWINFO is disabled.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Both cases use a large static buffer, we can optimize here and use a
single mutex-protected buffer for both.
sendmsg() test case needed adjustments, as it was also testing a buffer
overflow scenario. This can only be properly tested however if CID
feature is disabled, as otherwise the common helper buffer size is
increased for the CID use case, preventing the overflow from taking
place.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
For options that return the handshake status, make sure they work in
multi-client DTLS server case, by returning the status for the session
that completed handshake most recently. For TLS and DTLS client cases
that should make no difference, as there should only be one session per
context.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
With support for multiple client sessions for DTLS server socket, the
session timeout can no longer rely on built-in mbed TLS timing out
mechanism, as this only works for the session that is currently active.
Background sessions would never time out if the client just went silent.
Therefore, allocate a per-session timestamp, that keeps track of the
last activity on the session. Then, whenever poll() or recv() is called
loop over all sessions to identify those that timed and should be
released.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case a client address changes, but a session uses Connection ID
extension, the server should verify if the packet belongs to any of the
established sessions based on the CID value.
Therefore, before attempting to allocate a new session in such case,
loop over sessions and try to match the packet to one of the existing
sessions based on CID. In case of success, update the corresponding peer
address.
If no session is found based on CID, only then try to allocate a new
one.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case of errors on an active session (in most cases peer closing the
session), the session should be freed. Note, that as mbed TLS needs some
session context to work with, the last session on a socket is not freed,
but only reset instead.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
For TX, the DTLS server needs to check the peer address before passing
the packet to mbed TLS. In case the peer address doesn't match the
active session, it needs to switch sessions.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Refactor RX side for DTLS server to allow session switching when a
datagram from a peer that does not match current session. The server
needs to loop over established sessions, and in case no session is
found allocate a new one.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Split DTLS BIO RX functions for client and server case, given the
functionality will differ heavily. DTLS server needs to peek packet
before passing it to mbed TLS to allow to switch DTLS sessions in case
peer address doesn't match.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Separate TLS session context from the TLS socket context so that a
single DTLS server socket can support multiple client sessions.
Other socket types will only have a single session per TLS socket.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Transition markers ("----") require blank lines before and after, so
this ensures that is always the case.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Mark unused pinctrl and wuc nodes in it8xxx2 with /omit-if-no-ref/,
so that they are omitted from the final devicetree when not referenced.
After this change, test: "west build -p always -b it8xxx2_evb" shows a
reduction in devicetree size:
Before:
build/zephyr/zephyr.dts 164,449 bytes
build/zephyr/include/generated/zephyr/devicetree_generated.h
3,125,359 bytes
After:
build/zephyr/zephyr.dts 124,108 bytes
build/zephyr/include/generated/zephyr/devicetree_generated.h
1,892,313 bytes
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
This commit prefixes pre-generated nodes with
`/omit-if-no-ref/` to keep the generated devicetree
C headers minimal.
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Reference audio clock frequencies are supposed to be integer multiplies
of sampling frequency (44100 * 256 = 11289600, 48000 * 256 = 12288000)
and not some arbitrary numbers.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Upgrade wifi driver version to r53.p2.
Support static ipv4 address connection for STA interface.
Improved throughput value for SDIO case.
Support event based FW dump for IW61x.
Fix several bugs.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
dai_dmic_probe() and dai_dmic_probe_wrapper() never reports errors
and always returns 0.
The error check at the call site is therefore dead code.
Make functions void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Modbus is failing to turn on RX when using serial ASYNC mode. This
causes modbus to never receive inbound requests, leaving it inoperable.
Additionally, modbus also enables RX when in client mode, leading to
issues when running as a client. These have been fixed by enabling rx
only when serial init is successful and modbus is in server mode during
initialisation.
Signed-off-by: Ryan Wiebe <ryan.wiebe@analog.com>
We've to ensure nothing blocks the watchdog init on startup,
otherwise we'll get into bootloop. Hence increase the piority.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Under RTIO SPI behaves differently and thus FS26 didn't work and
would reset the board. This changes to add 8-bit transfer support
and doesn't lock the irq anymore since the SPI driver got changed.
Which would yield an assertion, best it ensure feed callee priority
is high enough.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
SYSTEM_WORKQUEUE_STACK_SIZE KConfig is setting to 1024 in case of
BT_TX_PROCESSOR_THREAD is enabled, else 2048.
BT_TX_PROCESSOR_STACK_SIZE KConfig is setting to 2048 in case of
BT_TX_PROCESSOR_THREAD is enabled.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Add explicit clock configuration and enable calls during driver
initialization. The driver now attempts to configure the clock
subsystem before enabling it.
Note: -ENOSYS is temporarily ignored as not all clock control
drivers currently implement the configure API. This handling
should be removed once all clock drivers support configure.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
EVDMA register access has been cleaned up to remove redundant macros.
EVDMA_PLAIN_DATA enum has also been added of value 0x3F which previously
had been assumed to be a masking of all the other values but isn't, it's
its own distinct value. Other enums still exist for future use.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
Correct the minimum MTU calculation for GOEP over L2CAP to account
for the L2CAP I-frame overhead.
- Update BT_BUF_ACL_RX_SIZE default from 264 to 265 bytes for GOEP
- Update BT_GOEP_L2CAP_MTU minimum range from 259 to 265 bytes
- Add detailed comment explaining L2CAP I-frame field length (6 bytes):
* 4 bytes for extended control field
* 2 bytes for FCS field
The previous calculation only accounted for the L2CAP header (4 bytes)
but missed the 6-byte L2CAP I-frame overhead (extended control field
and FCS), resulting in an incorrect minimum of 264 bytes instead
of the correct 265 bytes. And it causes the minimum MTU of L2CAP
to be incorrectly set to 254. The MTU cannot meet the minimum
requirement of GOEP MOPL.
The correct calculation for GOEP over L2CAP is:
255 bytes (GOEP minimum MTU) + 4 bytes (L2CAP header) + 6 bytes
(L2CAP I-frame) = 265 bytes total.
Set the default value of CONFIG_BT_BUF_ACL_RX_SIZE to 265 if GOEP is
enabled.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Enable wdt_basic_api watchdog only for cm7. For cr52,
because the SoC set the cores in Thumb mode after reset,
so a debugger is always needed to switch the core to Arm
state before loading zephyr application.
wdt_basic_reset_none test can be enabled for both.
Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
Only enable watchdog sample for cm7. For cr52, because the
SoC set the cores in Thumb mode after reset, so a debugger
is always needed to switch the core to Arm state before
loading zephyr application.
Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
- add SDHC driver code to support both SDMMC and SDIO fucntion
- add SDHC dts node and Kconfig
- add clock configuration for SDHC
Signed-off-by: Kevin Chan <kevin.chan3@infineon.com>
Due to multiple customer requests we are deprecating the MEC5 HAL.
Customers prefer all code to be in the main Zephyr tree. They do
not want a dependency on an outside SoC HAL. These changes remove
the MEC5_HAL select from MEC165xB, MEC174x, and MEC175x. The SoC
code calling the HAL for debug configuration was replaced with
a small amount of code common to all SoC's. We also moved all
the common header includes into a common SoC header to prevent
changing multiple files if new common headers are added.
Note: the in-tree drivers: kernel timer, GPIO, PINCTRL, and UART
are all non-HAL.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
In sensor_shell_stream.c, cmd_sensor_stream() checks for valid trigger
types, but it is missing SENSOR_TRIG_TIMER option.
Signed-off-by: Brandon Edmonds <bedmonds91@gmail.com>
The K_TIMEOUT_SUM() macro is intended as a means to add two
k_timeout_t values together. This may be useful for a developer
applying an exponential backoff algorithm.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
- Add SPI 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: Mohamed Azhar <mohamed.azhar@microchip.com>
Modifies sample application to use error callback mechanism added to
haptics API instead of device-specific API extension.
Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
Modifies the CS40L5x driver to use the error callback mechanism
added to the haptics API instead of a device-specific API
extension.
Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
Haptics devices provide protection features to prevent damage during
operation. Adds an error callback mechanism to the haptics API to
enable haptics device drivers to raise these conditions to the
application layer. Enumerates a subset of errors that are common
to modern haptics devices across major vendors.
Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
This patch just formats the uart_xmc4xxx.c file before the real
patch, otherwise the changes would be hard to read.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
The current PMS7003 sensor driver in Zephyr only supports reading the
basic PM1.0, PM2.5, and PM10 concentration values.
This update extends the driver to support additional data provided by the
PMS7003 sensor, including:
- Standard particle concentration values (CF=1) for PM1.0, PM2.5, and PM10
- Particle counts for particles greater than or equal to 0.3 µm, 0.5 µm,
1.0 µm, 2.5 µm, 5.0 µm, and 10.0 µm per 0.1 liter of air
Adding support for these readings allows applications to access more
detailed particulate data, improving the sensor’s usability in air quality
monitoring and analysis scenarios.
Signed-off-by: Hanan Arshad <hananarshad619@gmail.com>
When the USB Bus is reset, the USBD stack will disable and re-enable
all Classes. If this occurs while streaming audio with UAC2, the
terminals remain active when re-enabled, yet the endpoints have
yet to be enabled (resulting in -ENODEV logspam). This change
disables all active terminals when the class is disabled.
Signed-off-by: Victor Brzeski <vbrzeski@gmail.com>
Add test and sample overlays for CY8CKIT-041S-MAX board:
- GPIO basic API test using P1.2 and P1.3 pins
- Button sample using P11.5 with pull-up configuration
Signed-off-by: Braeden Lane <Braeden.Lane@infineon.com>
Add support for Infineon CY8CKIT-041S-MAX development kit
based on CY8C4149AZI-S598 (PSoC 4100S Max).
Board features:
- 100-pin TQFP PSOC 4100S Max MCU (384KB Flash, 32KB SRAM)
- User LED and button
- KitProg3 for programming/debugging
- Common dtsi structure for peripheral configuration
Signed-off-by: Braeden Lane <Braeden.Lane@infineon.com>
Add clock control and UART support for PSOC 4 family:
- Clock control drivers with PSOC 4 compatibility
- PSOC4xx clock source bindings and definitions
- HF clock divider configuration support
- UART FIFO trigger level configuration for PSOC 4100S Max
series with 8-deep FIFO (RX trigger=7, TX trigger=0)
Signed-off-by: Braeden Lane <Braeden.Lane@infineon.com>
Add devicetree support for PSOC 4100S Max series including:
- Base SoC dtsi with GPIO, UART, HSIOM peripherals
- 100-TQFP package dtsi for pin multiplexing
- CY8C4149AZI-S598 MPN-specific devicetree include
- Updated compatible strings for PSOC 4 support
- Clock structure with clk_hf and clk_pump nodes
- Simplified peripheral clock naming (peri_clk_div)
- PSOC4xx clock source definitions and bindings
Signed-off-by: Braeden Lane <Braeden.Lane@infineon.com>
Add initial support for the PSOC 4100S Max series, starting
with the CY8C4149AZI-S598 (100-TQFP package) used on the
CY8CKIT-041S-MAX development board.
The infrastructure supports adding additional part numbers
in the future as needed.
Signed-off-by: Braeden Lane <Braeden.Lane@infineon.com>
Add early len check, remove use of strcpy, strncpy and
strncmp.
Co-authored-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix truncation detection after strncpy, as strlen cannot be
used if the src was truncated due to insufficient size of
dst.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Rework settings implementation for not reusing the OS
snprintk implementation with CONFIG_PRINTK=n and to return
error if path buffer is insufficient.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Rework settings implementation for not reusing the OS
snprintk implementation with CONFIG_PRINTK=n.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Update settings implementation for not reusing the OS
snprintk implementation with CONFIG_PRINTK=n.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
- Add a new test configuration file enabling RTC calibration and alarm
features for the nucleo_u385rg_q board
- Add the nucleo_u385rg_q device tree overlay defining the RTC alias
Signed-off-by: Antoine Pradoux <antoine.pradoux@st.com>
- Activate the RTC node in the device tree by enabling its clocks and
setting its status to okay
- Add 'rtc' to the supported features in the board YAML configuration
Signed-off-by: Antoine Pradoux <antoine.pradoux@st.com>
Extend RTC driver to handle STM32U3 series specifics:
- Include STM32U3X in condition where RTC Alarm event is not routed to EXTI
- Use LL_RCC_RTC_ClockEnable call for STM32U3 instead of LL_RCC_EnableRTC
- Adapt counter_stm32_rtc driver for STM32U3 clock and EXTI handling
Signed-off-by: Antoine Pradoux <antoine.pradoux@st.com>
- Add the rtc node for the stm32u3
- This enables RTC support for STM32U3 platforms once enabled
Signed-off-by: Antoine Pradoux <antoine.pradoux@st.com>
Change the toolchain version resolution order to check for
board-specific TOOLCHAIN_VER_${NORMALIZED_BOARD_TARGET} first,
falling back to the generic TOOLCHAIN_VER if not defined.
Now if we want to use various boards lots of them uses same version
but fewer ones differ. We won't have to define TOOLCHAIN_VER for
every board.
Signed-off-by: Anil Ozrenk <anil.ozrenk@analog.com>
The JEDEC ID for the Winbond W25Q64JV flash on the MCX NX4X EVK board
was incorrectly specified as [ef 40 17]. According to the W25Q64JV
datasheet, the correct JEDEC ID is [ef 60 17], where:
- ef: Winbond manufacturer ID
- 60: Memory type (W25Q series)
- 17: Capacity (64 Mbit)
Update the jedec-id property to match the actual flash device.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
The JESD216_DW15_QER_VAL_S2B1v5 case had incorrect status register
read/write logic. It was reading only SR2 but writing both SR1 and SR2,
which could corrupt SR1 if not read first.
Merge the S2B1v5 case with S2B1v1/v4 cases since they all set bit 1 of
SR2. Update the common path to properly handle both single-byte (SR2 only)
and two-byte (SR1+SR2) read/write operations by:
- Reading SR1 first when rd_size is 2, saving it temporarily
- Reading SR2 using the scratch command
- Combining both bytes with SR2 in the upper byte when needed
- Writing the combined value with the QE bit set
Remove the now-redundant S2B1v5-specific case and simplify the LUT
sequence to read SR2 directly instead of reading SR1 first.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
The remain_on_channel callback triggers cookie_event, which checks
pending_remain_on_channel before giving drv_resp_sem. Previously,
pending_remain_on_channel was set after calling
dev_ops->remain_on_channel, causing drv_resp_sem to timeout.
Move the pending_remain_on_channel assignment before invoking
dev_ops->remain_on_channel to ensure proper synchronization.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Remove local Tx buffer allocated in the
bt_hci_stm32wba_send() function.
Get Event buffer resource to store data returned
by lower layer and provide it to Host in case of
Tx packet is an HCI Command type.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
- There was a mistake with the CM33 core. It does
not have ITCM/DTCM. Only the CM55 core does.
- Also enabled ITCM/DTCM in the cm55 board file.
Signed-off-by: Bill Waters <bill.waters@infineon.com>
Document that TLS version passed to a zsock_socket() function is no
longer ignored and is now enforced as the minimum TLS version for the
TLS session.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Document explicitly that the TLS version passed in the protocol
parameter matters and specifies the minimum TLS version to use for the
socket.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Enforce the minimum TLS version on mbed TLS, based on the protocol
version provided by the application when creating socket. This ensures
that when application creates a TLS 1.3 socket, mbed TLS won't downgrade
the session to TLS 1.2 for instance.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When uart_rx_disable is called, or rx gets otherwise disabled,
UART_RX_DISABLED event should be emitted.
Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
Lukasz Fundakowski is a python expert with an interest in
testing frameworks and coding standards. He is a valuable
reviewer with attention to details. He had a major impact on
design and implementation of the pytest plugin for twister.
Signed-off-by: Maciej Perkowski <maciej.perkowski@nordicsemi.no>
Microchip MEC1653B has 416KB of SRAM. ARM ICCM SRAM is 356KB
starting at 0xC0000. ARM DCCM SRAM is 64KB starting at 0x118000.
Chip DTS file had incorrect ICCM starting address.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
uart_bcm2711_poll_in() incorrectly returned the received byte
instead of writing it to the provided buffer.
Update the implementation to store the character in *c and
return 0 on success, matching the UART poll_in API.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
In pm_system_suspend there is a possible invalid type promotion
in sys_clock_set_timeout(MAX(0, ticks - exit_latency_ticks), true);
ticks is int32_t and exit_latency_ticks is uint32_t consequently
ticks is promoted to uint32_t resulting in a possible underflow and
setting a wrong value in sys_clock_set_timeout().
Fixes#100005
Coverity CID: 535628
Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
Fixes an issue whereby a variant of the slot 1 image is built...
which would occupy the same slot that the test is building for,
therefore disable using the new experimental variant image Kconfig
in this configuration
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This is technically a workaround for a limitation in the Pygments DTS
lexer causing the highlighting to break when rendering this example
in the documentation, but this is also an excuse to plug the label that
is used in the official auxdisplay sample.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The plus signs in version strings need to be escaped with double
backslashes when used in regex patterns for the test harness.
This ensures proper pattern matching during test execution.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Instead of reading calibration data (device-unique, but never changing!)
as part of each conversion, perform the read once and cache the value.
This notably avoids frequently an ICACHE disable/enable cycle on STM32H5,
which is a somewhat slow operation.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Using a union enables accessing the calibration data using member names
instead of an array index, which makes the code more readable.
As long as the layout of struct { T m1; ... T mN; } and array A[N] is the
same (implementation-specific?), usage of the union type as done should
be Standard-compliant: accessing through either member of the union will
use an lvalue with compatible type to the same underlying object, which
is one of the allowed aliasing situations listed in §6.5.7 of N1548.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Various fields were stored in the instance data despite being initialized
at compile-time to a constant value.
Move these fields to the instance configuration instead.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The raw "12" constant was used in a place where the "CAL_RES" define should
have been used instead.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Provide some information on how to find the command that is used for
generating the UICR hex file so that its easier for users to
know what command to use.
Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
In NVS, allocation table entries (ATEs) are written backwards within
each sector. Under delete-only or delete-heavy workloads, a sector may
contain only delete ATEs, causing the ATE write pointer to approach the
sector boundary.
Without an explicit boundary check, ATE writes may occur at offset 0 of
the current sector, allowing the write pointer to underflow into the
previous sector and corrupt unrelated data or metadata.
Fix this by disallowing ATE writes when the write pointer is at the
sector boundary. This ensures that ATE writes remain confined to the
current sector and prevents pointer underflow across sectors.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Introduce Kconfig option to enfore LLL prepare at margin
irrespective of whether there is an overlapping state/role.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use PPI/DPPI to start s/w switch timer to reduce current
consumption.
Explicitly starting the s/w switch timer at prepare meant
current being consumed in the prepare margin duration. Use
of PPI/DPPI ensure s/w switch timer is start when event
timer is started after the prepare margin.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix the missing use of remainder value in the sync_offset_us
calculations. Also, Periodic Sync reception is relative to
Peripheral event hence ticks_anchor does not require the
ticker margin and event jitter to be subtracted.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
When no trigger was chosen case statement fell through to
default which causes the return code to -ENOTSUPP
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Local variables are initialized but always overwritten before being
read or return.
Drop the redundant initialization.
No functional change intended.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
litex_clk_dts_clkouts_read() never reports errors and always returns
0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
On STM32N6x SoCs, secrets and persistent information such as Ethernet
MAC addresses are stored in the BSEC OTP fuses. Therefore, default enable
OTP support if NET_L2_ETHERNET and NVMEM are enabled so that the MAC
address can be read from the BSEC OTP fuses through the NVMEM API.
Use the "mac_address0" NVMEM cell to be able to read the ethernet MAC
address from the OTP fuses.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
The STM32N6 has a BSEC peripheral for the OTP management, add it to the
SoC device tree file. Moreover, there are 4 OTP words dedicated for
Ethernet MAC addresses, describe them in the NVMEM layout.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
This new API handles if the MAC address should be fetched from NVMEM,
is static or be randomly generated. Use it so that the driver can
fetch the MAC address from the OTP fuses, when possible.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Introduce the Boot and SECurity(BSEC) control driver. The BSEC
peripheral manages the accesses to an embedded one time
programmable(OTP) array of fuses. Those fuses are used to store
on-chip, non-volatile data like boot and security parameters (e.g:
secret keys, non-volatile counters, etc...).
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
This is the version of the tool that Zephyr infrastructure uses,
and the configuration needs to be adjusted accordingly.
Setting *_ALIASES variables is not necessary anymore.
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Add notes about changes in flash_map's Kconfig for what concerns the
crypto libraries used for integrity check.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Since now there is a single backend for crypto, i.e. the PSA Crypto API
one, it's better to rename corresponding test case and related
configuration file so that instead of mentioning "psa" they mention
"integrity-check".
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Following the removal of legacy Mbed TLS crypto for SHA-256 in the
subsys, this commit updates the related sample. "overlay-mbedtls.conf" is
removed as no more necessary and the corresponding test case is removed
from "testcase.yaml". "overlay-psa.conf" is updated removing unnecessary
Kconfig selections.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Remove Kconfig and code related to legacy Mbed TLS crypto for SHA-256.
This was used for the integrity check functionality as alternative to
PSA Crypto API. This support was already deprecated and now it's removed
in order to prepare for the next Mbed TLS 4.0 release where legacy crypto
won't be available anymore.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Remove the NPU power domain enabling inside ethos_u code due to it
has already been done by soc_reset_hooks()
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Remove power domain on for GLCDC controller inside driver code
due to it has already been done by soc_reset_hooks()
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Remove the root clock control early initialization because it has
already been done in the soc_reset_hooks()
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
This commit updates the source files for Renesas RA initialization:
- The SoC reset/init now uses generic hooks from the
"soc/renesas/ra/common" instead of SoC-specific initialization hooks.
- Add soc_reset_hooks() to perform the early reset code.
- Battery-backup domain initialization has been removed from
soc_early_init() and reallocated to soc_reset_hooks().
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
The DSA tag protocol driver should be native for packet
tagging and untagging. There is possibility other vendors/IPs
use it. So, just defined DSA tag structures in header file
instead of using hal header file.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Renamed DSA_NXP_NETC_GCL_LEN to DSA_NXP_IMX_NETC_GCL_LEN for
naming consistency, and wrapped it in DSA_DRIVERS condition.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Moved dsa_tag.h to include folder as common header file.
And we will support iterable section for vendor dsa tag
protocol drivers registering.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
ierb_init() never reports an error and cannot fail in practice.
Returning an int led to a dead error.
Convert ierb_init() to a void function, drop the unused return value
checks, and provide a no-op implementation for SoCs that do not
require IERB initialization.
This simplifies the control flow and removes an unnecessary error
condition.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Handle the return value of am_hal_adc_power_control() during ADC
initialization.
The previous code overwrote the return value before it was checked,
which could silently ignore failures when powering on the ADC.
Fix this by validating the return code and propagating an error if
the operation fails.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Upgrades the thread user_options to 16 bits from an 8-bit value to
provide more space for future values.
Also, as the size of this field has changed, the values for the
existing architecture specific thread options have also shifted
from the upper end of the old 8-bit field, to the upper end of
the new 16-bit field.
Fixes#101034
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
1. When the timeout is K_NO_WAIT, the thread should not be added
to the wait queue as that would otherwise cause to the thread
to wait until the next tick (which is not a no-wait situation).
2. Threads that were added to the wait queue AND did not receive
a signal before timing out should not lock the supplied mutex.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
If there are not enough free L2 tables to map all predefined
memory regions at boot, halt the system in case assertion is
not enabled. Without all the needed memory regions mapped,
it is very unlikely that anything will run properly.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Adds some debug logs when we are allocating page tables.
This provides a more visible way of seeing whether
we need to have more free tables.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add an assertions to halt the system if L2 table allocation
fails when we need to duplicate an existing L2 table, as it is
a must-have and must-success operation.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add support for the Infineon PSoC4 family to the infineon watchdog driver.
PSoC4 specific ILO frequency and tick period definitions.
Initialization and configuration logic specific to PSoC4.
Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Enable the watchdog0 node and add an alias for it on the
CY8CPROTO-041TP board.
Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Add the watchdog controller node to the PSoC4 SoC definition.
Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Add error code parameter to all A2DP shell error messages to provide
more detailed diagnostic information when operations fail. This applies
to configure, establish, release, start, suspend, delay report, and
abort response handlers.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Replace bt_shell_print() calls with bt_shell_error() for all error
conditions and failure cases in the A2DP shell implementation to
properly distinguish error messages from informational output.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Replace all shell_print() and shell_error() calls with bt_shell_print()
and bt_shell_error() respectively to use the common Bluetooth shell
printing functions throughout the A2DP shell implementation.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
add abort req and rsp callbacks, improve register_ep cmd to support delay
report, check buf tailroom for sending media, add get_conn cmd to test
bt_a2dp_get_conn.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Currently, I2C transfer implementation does not have a mutex to
prevent multiple users from sending data at the same time, this could
lead to devices malfunction due to mixing I2C transaction data.
This patch adds mutex into transfer implementation to allow only one
user to send data at the time.
Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
Add device Self Test procedure. It is required to enable the
per device self-test DT property as well as the LSM6DSV16X_SELF_TEST
configuration.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The backoff timeout calculation in z_log_msg_claim_oldest() was
incorrectly using K_TICK macro. Changed to K_CYC to properly convert
cycle-based timing differences to kernel timeouts for accurate backoff
in multi-domain message processing.
Signed-off-by: Supper Thomas <78900636@qq.com>
INA3221 performs measurements sequentially for all enabled channels (see
datasheet chapter 7.3.1), but the driver was not accounting for this
when calculating the wait time. Additionally, when measuring both bus
and shunt voltages, conversion times should be summed rather than taking
greater value.
Fix by counting enabled channels and multiplying them with per-channel
conversion time. For combined measurement, sum both conversion times
instead of using MAX().
Signed-off-by: Karol Werner <karol@ppkt.eu>
Added a `supported` flag to battery status query so if the
charger does not support the query (returns -ENOTSUP) the
command still returns any other supported queries and
doesn't error out without reporting anything. Any other
errors than -ENOTSUP still cause the request to return
immediately, as was the case before the changes. Tested
on nordic npm 13xx.
Signed-off-by: Jimmy Johnson <catch22@fastmail.net>
Add clock configuration step before UART initialization to ensure
proper clock setup. The clock is first disabled, then configured
if supported by the clock controller.
If clock configuration is not supported (ENOTSUP/ENOSYS), the driver
continues with default settings. Other errors are treated as failures
and propagated to the caller.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
As per Zephyr guidelines re: inclusive language, the term
"master" is replaced with "primary".
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The existing documentation link pointed to a non-existent page.
Update the link to use the current documentation URL.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
One might see this compile error depending on what order the
POSIX headers are included
include/zephyr/net/net_compat.h:143: error: "IFNAMSIZ" redefined
.../zephyr/include/zephyr/net/net_compat.h:143:
error: "IFNAMSIZ" redefined [-Werror]
143 | #define IFNAMSIZ NET_IFNAMSIZ
|
In file included from ...
.../zephyr/include/zephyr/posix/net/if.h:16:
note: this is the location of the previous definition
16 | #define IFNAMSIZ IF_NAMESIZE
|
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The SenML-JSON specification mentions base64-encoded data with the
URL-safe alphabet and padding omitted.
For sending data, zephyr used normal base64 with padding. Change the
base64 data to use the URL-safe format without padding when sending opaque
data via SenML-JSON.
Fixes#102390
Signed-off-by: Jeroen Broersen <jeroen.broersen@wioniq.com>
There was a Kconfig option defined to limit the number of additional DNS
queries sent for aliases received in CNAME records (to avoid potential
query loops), however it was not implemented. This commit implements the
feature - the resolver will now only send up to
CONFIG_DNS_RESOLVER_ADDITIONAL_QUERIES follow-up queries after
receiving CNAME record with an alias w/o any IP addresses.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case CNAME record is received with no IP addresses, DNS resolver will
attempt to re-send the query for the name indicated by the CNAME record.
The logic for scheduling the new query was inconsistent though:
dispatcher_cb() assumes that it'll reuse the query context with the same
query id, while dns_read() cancelled the query, which shouldn't really
happen, as that would cause an error to be reported to the application
via callback.
Fix that by skipping the query cancel in case of DNS_EAI_AGAIN result.
The query context will be properly reused then, and freed either when
reply for another query arrives, or the query times out.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Don't report CNAME records via application callback (as it used to be
done). They don't carry any data in the info struct and are only used
internally to redirect DNS queries.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Disable HW acceleration to fix CI failures caused by -Werror triggered
by prototype mismatches in the crypto accelerator path between TF-M and
Mbed TLS.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
TF-M documentation states that code sharing on Musca-B1 is only
supported with software crypto and requires crypto hardware acceleration
to be disabled. So, force CRYPTO_HW_ACCELERATOR=OFF for the Musca-B1
non-secure TF-M build to match this requirement.
This also fixes CI failures caused by -Werror triggered by prototype
mismatches in the crypto accelerator path between TF-M and Mbed TLS.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Flash layout of musca_b1 and musca_s1 is updated as recommended by
mcuboot. This also fixes the below cmake build failures reported in
Zephyr ci.
```
CMake Error at
zephyrproject/zephyr/cmake/modules/extensions.cmake:3877
(message):
required nodelabel not found: slot0_partition
Call Stack (most recent call first):
zephyrproject/zephyr/modules/trusted-firmware-m/CMakeLists.txt:489
(dt_nodelabel)
```
Note that the flash address of musca_b1 board is fixed from 0x0A07_0000
to 0x0A08_0000 as this was missed after the layout was changed in TF-M
in e1570bd143ef4843a531b57f77f0c2814b075dd9
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Added ifdef guard (CONFIG_GETOPT_LONG) around the functions in
getopt_shim.c that requires getopt_long implementation.
Signed-off-by: Magne Værnes <magne.varnes@nordicsemi.no>
When frame_clk_freq is set to 0, the I2S API specifies that the
stream should transition to NOT_READY state (i.e., unconfigure).
In this case, other config fields like mem_slab and block_size
are not used by the driver.
Skip the mem_slab and block_size validation in the syscall handler
when frame_clk_freq is 0 to match the driver behavior and avoid
rejecting valid unconfigure requests due to uninitialized fields.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Initialize the i2s_config struct to zero before use in the
test_i2s_state_not_ready_neg test case.
When frame_clk_freq is set to 0 to unconfigure a stream, other
fields in the struct were left uninitialized. On platforms with
userspace support, the syscall handler validates block_size against
the mem_slab block size before calling the driver.
Uninitialized garbage values could cause this validation to
fail unexpectedly.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add clock_control_configure() call during initialization to properly
configure the LPSPI clock. The implementation gracefully handles
platforms that don't support clock configuration by checking for
-ENOTSUP and -ENOSYS return codes and continuing with default
settings. Real configuration errors are logged and propagated.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Convert the DUT class from a traditional class to a dataclass to enable
proper serialization and support for future multi-device testing with
pytest-harness.
Key changes:
- Migrated DUT class to use `dataclass` decorator with proper type hints
- Renamed `baud` property to `serial_baud` for consistency
- Updated hardware map schema to support both `baud` (legacy) and
`serial_baud` fields for backward compatibility
- Updated tests
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
The ina2xx channel get helpers assume that channel descriptors are
valid when the driver exposes a given sensor channel.
Checking for NULL channel pointers after they are already
dereferenced does not provide any real safety and can hide
configuration errors.
Drop the late NULL checks and rely on the driver contract that
supported channels must be properly defined.
No functional change intended.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The INA2xx fetch path assumes valid channel descriptors for all
supported sensor channels.
NULL checks performed after channel data is accessed are ineffective
and misleading, as invalid channel definitions indicate a
configuration error rather than a runtime condition.
Remove the redundant checks and keep the channel handling consistent
with the driver expectations.
No functional change intended.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Select KERNEL_NO_LTO only when LTO is enabled. This ensures proper
handling when kernel code is placed in RAM.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Some SoCs require kernel code to be placed in RAM, which makes
link-time optimization (LTO) unsuitable for these files.
Disabling LTO allows the affected code to be linked as separate
objects and placed in specific memory regions.
Running kernel code from RAM can improve execution performance,
especially for timing-critical routines or context switch paths.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Do not add this folder to the include path when this component is not
enabled. As that creates noise and slows down builds.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In case DPP reconfiguration test, if the dpp_akm has psk,
it will set WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_PSK_SHA256 |
WPA_KEY_MGMT_FT_PSK to key_mgmt, then wifi status shows
security as "Unknown".
Signed-off-by: Gang Li <gang.li_1@nxp.com>
Change to use DT_HAS_NXP_SIM_UUID_ENABLED/DT_HAS_NXP_RCM_HWINFO_ENABLED
as the dependency condition for HWINFO_MCUX_SIM/HWINFO_MCUX_RCM to
enable the driver when the nxp,sim-uuid/nxp,rcm-hwinfo compatible
is present in the devicetree.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Add vendor-specific compatible strings to RCM and SIM nodes:
- "nxp,rcm-hwinfo" for Reset Control Module (hwinfo-reset functionality)
- "nxp,sim-uuid" for System Integration Module (hwinfo-UUID functionality)
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
These DTS uses absolute GPIO numbers for some
pins where relative pin numbers are required.
This causes crash on booth when these pins
are enabled. Follow on PR to #101857.
Signed-off-by: Peter Hoddie <peter@moddable.com>
When removing TOOLCHAIN_DISABLE_CLANG_WARNING, building the
settings.mgmt test with clang fails with:
tests/subsys/mgmt/mcumgr/settings_mgmt/src/main.c:87:22: error:
variable 'test_response_read_data_start' is not needed and will not be
emitted [-Werror,-Wunneeded-internal-declaration]
87 | static const uint8_t test_response_read_data_start[5] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/subsys/mgmt/mcumgr/settings_mgmt/src/main.c:91:22: error:
variable 'test_response_read_data_end' is not needed and will not be
emitted [-Werror,-Wunneeded-internal-declaration]
91 | static const uint8_t test_response_read_data_end[1] = {
Add additional asserts to use these variables in the test.
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Warning as error was:
.../drivers/display/display_rm67162.c: In function ‘rm67162_write_fb’:
.../drivers/display/display_rm67162.c:383:9: error: ‘wlen’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
383 | return wlen;
| ^~~~
cc1: all warnings being treated as errors
Signed-off-by: Stephan Linz <linz@li-pro.net>
The original implementation used a single global parameter structure for
GATT operations, preventing concurrent operations on different bearers. By
introducing a per-bearer context pool, each bearer can maintain its own
operation state, enabling simultaneous GATT operations.
Signed-off-by: Evgenii Kosenko <Evgenii.Kosenko@silabs.com>
Modify the description format of all SCMI-related bindings such that the
SCMI/SHMEM acronym is spelled out in between parentheses and not the other
way around. This will make the generated documentation more compact.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Update board YAML files to use 'pinctrl' instead of 'pin_ctrl'
in the supported features list for consistency with Zephyr
naming conventions.
Affected boards:
- cy8cproto_041tp
- kit_pse84_ai
- kit_pse84_eval
Signed-off-by: Braeden Lane <Braeden.Lane@infineon.com>
The debug code for dumping resolved addresses was modifying the addrinfo
res pointer (effectively setting it to NULL), causing crash later in the
sample. Fix this, by using a temporary pointer copy for iterating over
resolved addresses.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Sort ble radio feature properties alphabetically according to
the coding standard.
Certain features on xg22 and xg28 depend on the specific SoC
selected, move the properties from the generic .dtsi file to
the SoC specific one.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Propagate the HAL error otherwise it may return success even
when it fails causing invalid entropy and compromising security.
Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
With -Hccm, the linker automatically moves stuff in RODATA
section into DATA section. Our current kobject related
scripts cannot accommodate this, resulting in space not
being reserved correctly. So for now, disable -Hccm
compiler option if userspace is enabled.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
As the board now supports TF-M with bl2, spport
from sample.tfm_ipc.no_bl2 is removed and
added in sample.tfm_ipc test.
Signed-off-by: Waqar Tahir <waqar.tahir@nxp.com>
- Updated partitions in non-secure device tree
files as tfm now supports Bl2.
- Flash_base address updated for ns-app as
tfm apps are now using bl2 by default.
Signed-off-by: Waqar Tahir <waqar.tahir@nxp.com>
Add new APIs to set operating mode 11n, 11ac and 11ax for SoftAP.
Currently, the 11n, 11ac and 11ax are enabled by default. Theses APIs
can be used to configure operating modes enable/disable for SoftAP.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Preserve EXCCAUSE and EXCVADDR values on entry to _Level1Vector.
Restore EXCCAUSE when exiting TLB miss exception handling in the double
exception handler.
During first-level exception handling, a LoadStoreTLBMissException may
occur during the initial register dump to BSA. It modifies EXCCAUSE and
EXCVADDR registers before they are saved in BSA. Therefore, these values
must be captured as early as possible.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Remove saving EXCCAUSE register in BSA through the _Level1Vector handler.
These value are later overwritten by the ODD_REG_SAVE macro called by
EXCINT_HANDLER, so saving it here is pointless.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
The negative flash write and fill tests assumed that unaligned
offsets are always invalid.
This is not true for flash drivers reporting a write_block_size of
1, where all offsets and sizes are naturally aligned.
Condition the unaligned offset and size tests on the actual
write_block_size reported by the driver to avoid false failures and
ensure the tests follow the flash API contract.
No functional change for drivers with write_block_size > 1.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Currently the PHY for 2.5G SGMII is not enabled, so could only use 100M
PHY for two switch ports on the board.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Changes CONFIG_MCUMGR_TRANSPORT_UART from selecting
CONFIG_UART_MCUMGR to instead of depending upon it, as it should
never have selected a driver Kconfig and instead always depended
upon it, and is needed for supporting different UART transports
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Document the board rename from ek_ra8t2/r7ka8t2lfecac/cm85 to
ek_ra8t2/r7ka8t2lflcac/cm85 in the Zephyr v4.4.0 migration guide.
Signed-off-by: Khai Cao <khai.cao.xk@renesas.com>
Sometimes, the size of a message coming from a target is not known in
advance. In those cases, we must rely on the T-bit to get the end of
message, which is signaled as the `COMPLETE` bit of `MSTATUS`.
This patch verifies the COMPLETE bit before starting to wait for data,
and if set, simply returns what was read so far.
As a bonus, this simplifies the handling of IBI bytes: no need to rely
on timeouts, if it's reading from IBI, etc.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Return value for `mcux_i3c_do_one_xfer` was being lost due reuse
of `ret` variable. Use another variable for timeout check.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
The previous implementation incorrectly calculated the source pointer
advancement when pitch differs from width. The calculation was using
`total_bytes_sent` which accumulated across iterations, leading to
incorrect pointer arithmetic.
Replace `total_bytes_sent` with `line_each_sent` to track lines written
per iteration. Simplify the pointer advancement by:
- Calculating complete lines written from bytes_written
- Advancing by full pitch-sized lines
- Adding any remaining partial line bytes
This fixes the source pointer calculation when the buffer pitch is
greater than the display width.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
In commit 1f9e39752a ("drivers: watchdog: wdog32: add delay before
init") a reference to k_msleep was added to
drivers/watchdog/wdt_mcux_wdog32.c without including the necessary
header. At least for the board frdm_mcxw71/mcxw716c, this causes a
compile failure in this file as soon as CONFIG_WATCHDOG is enabled.
Add the missing include to zephyr/kernel.h to fix the issue.
Signed-off-by: Matthias Blankertz <matthias.blankertz@inovex.de>
The I2C bus of the lpi2c1 I2C controller is connected to the Arduino
Shield header on the usual pins. Label it with "arduino_i2c" in the
board device tree so that the frdm_mcxw71 board can be used with I2C
shields.
Signed-off-by: Matthias Blankertz <matthias.blankertz@inovex.de>
Remove oob-gpios property from nxp_m2_1xk_wifi_bt.overlay. There is no
binding for this property at bindings\wifi\nxp,wifi.yaml. Therefore,
builds using this shield will fail.
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
Add board-specific configuration and overlay files for
running DAC API tests on the SAM E54 Xplained Pro board.
- Add sam_e54_xpro.conf
- Add sam_e54_xpro.overlay
- Update DAC API test to support the board
Signed-off-by: farsin NASAR V A <farsin.nasarva@microchip.com>
Add DAC pinctrl definitions and update the board metadata
to list DAC as a supported feature on the SAM E54 Xplained Pro board.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
Due to the hardware limitation, the time between the CPU wake-up IRQ fire
(IRQ 23) and the next call of LL_RADIO_TIMER_SetCPUWakeupTime should not
be less than 16 MTU (Machine Time Unit), i.e. approximately 30us.
otherwise, the next CPU wake-up doesn't happen unless the timer wraps.
Lock IRQs while sys_clock_set_timeout is being executed.
Remove HAL_RADIO_TIMER_WakeUpCallback and it will be implemented
differently in the future.
Remove HAL_RADIO_TIMER_TimeoutCallback as it is not needed anymore.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
Change the initialization priority. According to the documentation, kernel
services should not be used during device configuration with PRE_KERNEL_1.
In "entropy_stm32_rng_init", there is "start_pool_filling" which calls
"k_work_schedule". Moreover, "k_work_schedule" requires system timer which
is initialized within PRE_KERNEL_2. Therefore, the SoC gets stuck.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
Enable automatic runtime power management for all LPI2C instances
to support interrupt-driven when suspend and resume device
by scmi firmware interface.
On i.MX943 with System Manager firmware, clock operations require
SCMI communication which needs interrupts. The system-managed PM
approach locks interrupts during device suspend/resume, preventing
SCMI from completing.
Although lpi2c mcux driver have enabled pm runtime in driver init,
set lpi2c auto runtime in dts to record this issue that only
device runtime can be supported now.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Add PM device support for the LPI2C peripheral.
Implement PM device callback to gate and ungate the device clock
during suspend and resume. No attach register save and restore as
it's preserved by hardware
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
The condition `!spi_context_rx_buf_on(ctx) && spi_context_rx_on(ctx)`
only returns early when RX is active with a NOP buffer.
However, when `rx_len == 0`, `spi_context_rx_on(ctx)` returns false,
causing the early return to be skipped.
This leaves `ctx->rx_buf` (which can be NULL) to be dereferenced.
Since `lpspi_handle_rx_irq()` already guarantees `spi_context_rx_on(ctx)`
is true before calling this function, only check
`!spi_context_rx_buf_on(ctx)` to safely handle NOP buffers.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Refactor `lpspi_rx_buf_write_words()` to compute `words_read` upfront
using `MIN(rx_len, max_read)`, simplifying control flow and making
the read limit explicit without changing behavior.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Allows a mixture of IRQ-enabled and IRQ-disabled nodes.
Enabled nodes are identified by the presence or absence of
the interrupt-names property.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Add explicit clock configuration and enable calls during driver
initialization.
Note: -ENOSYS is temporarily ignored as not all clock control
drivers currently implement the configure API. This handling
should be removed once all clock drivers support configure.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Add clock_control_configure() call during initialization to properly
configure the TPM clock. The driver now attempts to configure the
clock and handles cases where configuration is not supported by the
platform (-ENOTSUP/-ENOSYS) by continuing with default settings.
Real configuration errors are logged and cause initialization to fail.
Note: -ENOSYS is temporarily ignored as not all clock control
drivers currently implement the configure API. This handling
should be removed once all clock drivers support configure.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Add edersondisouza as a collaborator to PMCI - it should've been done
when edersondisouza was added as libmctp West module collaborator, but
it was missed.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
It is important to include license and terms of use information
in the documentation for external modules. This helps users
understand their rights and obligations when using these modules
within the Zephyr project.
Signed-off-by: Gillian Minnehan <gillian.minnehan@nordicsemi.no>
When building the bluetooth.general.tester_le_audio test with clang and
-Winitializer-overrides, it warns:
subsys/bluetooth/audio/mpl.c:318:2: error: initializer overrides prior
initialization of this subobject [-Werror,-Winitializer-overrides]
318 | .add_group = NULL,
| ^~~~~~~~~~~~~~~~~
subsys/bluetooth/audio/mpl.c:317:15: note: previous initialization is here
317 | .add_track = NULL,
| ^~~~
Remove redundant initializer for add_group which overlaps with add_track
in an anonymous union.
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
When building with clang we get the following warning when building the
sample.net.midi2.host_auth_user test:
samples/net/midi2/src/main.c:122:54: error: initializer element is not a
compile-time constant
122 | NETMIDI2_EP_DEFINE_WITH_USERS(midi_server, ump_ep_dt.name, NULL, 0,
| ~~~~~~~~~~^~~~
include/zephyr/net/midi2.h:99:12: note: expanded from macro
'NETMIDI2_EP_DEFINE_WITH_USERS'
99 | .name = (_ep_name), \
| ^~~~~~~~
Instead of using ump_ep_dt.name for initialization, we use the
equivalent expression that UMP_ENDPOINT_DT_SPEC_GET(DT_NODELABEL(midi2))
initializes the ".name" member with.
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Use SHELL_HELP macro for help strings to ensure consistency across
various shell modules and save quite a bit of flash.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The return value of gpio_pin_set_dt() and
gpio_pin_interrupt_configure_dt() was not stored before being
checked, causing the error condition to always evaluate to false.
Store the return value and properly handle potential GPIO errors
during PHY reset.
No functional change intended.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The ls0xx driver VCOM inversion thread has a hardcoded priority of 3,
while in some applications this may be considered lower priority than
time sensitive tasks, maintaining close to an even polarity balance is
best, but this change allows developers to determine the approach.
Signed-off-by: Eden Uhde <eden@rainbowtree.house>
Use docname instead of source from get_source_and_line() because
source can be a relative path to an included file (e.g., .rst.inc),
while docname is always the main document being processed.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fix dead links by replacing them to normal strings. This is in
preparation for a fix in zephyr_file role link check that will make the
checks more strict and fail on these even if they hadn't been flagged
until now.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
TwisterEnv already parses west modules during initialization, but TestPlan
was parsing them again via zephyr_module.parse_modules(), duplicating work.
Store the parsed module objects on TwisterEnv (self.modules) and have
TestPlan derive its module name list from env.modules instead. This drops
the redundant parse in TestPlan by removing handle_modules() and its call
site.
Each call to parse_modules() takes around 250-300ms on my end.
Update twister unit tests
Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
For devices like MCXE247, the FTM peripheral instance
has multiple interrupts. In this patch, add FTM_CONFIG_FUNC
macro to support single or multiple interrupts based on irq
number.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Support usb for NXP frdm_mcxa1366 and frdm_mcxa266 board.
Test it using samples/subsys/usb/console and tests/drivers/udc
Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
Added arduino_header node labels to FRDM-MCXA366,FRDM-MCXA346 and
FRDM-MCXA266 device tree board definition, allowing compatible
shield boards to be used. Also extend the board YAML file with
related support tags arduino_gpio.
Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
Add the TMA525B touch controller driver to the input build_all test.
This includes:
- Device tree overlay entry for the TMA525B device
- Test configuration enabling interrupt mode
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
Adds the zc143ac72mipi shield configuration for the mimxrt700_evk
platform to the LVGL demos sample test platforms.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
Move MIPI_DSI_MCUX_2L_SWAP16 and LV_COLOR_16_SWAP configuration from
the shield's Kconfig.defconfig to board-specific configuration files.
This allows for better board-level customization and removes the
conditional logic from the shield defaults.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
- Add support for the TMA525B touch controller to the
zc143ac72mipi shield
- Add Kconfig.defconfig with LVGL configuration defaults
- Update board specific configuration
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
This commit adds support for the Parade Tech TMA525B capacitive touch
controller. The driver supports both interrupt-driven and polling modes,
and can handle up to 4 simultaneous touch points.
Key features:
- I2C communication interface
- Multi-touch support (up to 4 touch points)
- Interrupt mode with GPIO callback support
- Polling mode with timer
- Power management support with PM notifier
- Reset and power control via GPIO
- Touch event tracking (down, contact, up)
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
- The RX Message Descriptor in CANXL on newer SoC such as
the S32K5 supports receiving both classic and FD frames,
so enable the RX FIFO only for S32ZE SoC.
- The CANXL bare-metal driver has significant changes, the
current codebase for S32ZE need to be guarded and modified
to support newer SoC
- Expand the peripheral region to 1G to include the CANXL
area.
Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
Add support for named clocks in the WDOG32 driver to properly handle
different clock sources. The driver now uses clock-names property to
identify which clock source is being used, based on the clk-source
property.
This change enables proper clock configuration and control for platforms
where the clock frequency is not statically defined in the device tree.
The driver will now configure and enable the appropriate clock during
initialization.
Updated all affected device tree files to include the clock-names
property aligned with their clk-source configuration.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
cy8ckit_062_wifi_bt board requires NMI handler to point to
the prefefined address 0x0000000D in order to correctly run
system calls. This can be achieved by specifying the runtime
nmi configuration and hardcoding the address in soc.c.
With the introduction of this change the system calls can
correctly be executed correctly thus resolving open
issue #99642 .
Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
Use a single os.scandir() pass per board directory to load twister.yaml
and collect legacy *.yaml files, replacing Path checks and globbing.
On my end this reduces execution time by ~50ms on Ubuntu 24.04 and
eliminates ~80k Python function calls.
Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
The post-script was being called multiple times and during the
initialization phase when it should only run after the reader
thread has started and the device testing is complete.
Fixes#102386
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Replace zephyr_compile_definitions_ifdef with
zephyr_library_compile_definitions_ifdef to avoid setting options globally.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Fix pm_policy_event_register() and pm_policy_event_update signatures
when CONFIG_PM is disabled.
Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
While the tty_* api already has functions
to set the rx and the tx timeout, the console_*
api didn't had one.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
use k_timeout_t internally, that way
the timeout has only to be calculated, when setting it and not
every time when it is used.
Also use the ys_timepoint* api instead of
counting the ms.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Use a proper branch instead of an assert to check if the device
is ready. It can potentialy lead to improper random
value that can compromise security.
Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
When Ethernet management is not enabled, the respective calls should
also be compiled out. In case there are no callers the toolchain will
remove this, hence it worked till date.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
When using shell the users input raw header as big-endian, so, add
support for both formats for the magic number.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This helps in benchamrking raw socket (packet socket) performance in the
lines of UDP/TCP.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
When sysbuild is enabled globally and running west build with a
selected test scenario, the sysbuild setting was being overwritten
with False when sysbuild was not explicitly set in the test YAML file.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Split DMA status error from busy state handling. Use LOG_DBG for
busy state and LOG_ERR for status query failures. Return -EBUSY
as required by async UART API when transfer is in progress.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
`edma_reload_loop` doesn't take into account the DMA possible channel
gap. This is an issue for S32K3 series leading to system crashes when
higher DMA channels are used.
Signed-off-by: Razvan Heghedus <razvan.heghedus@protonmail.com>
Fix spelling and wording issues in comments across NXP board FlexSPI
NOR configuration headers.
No functional change.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
This test has been changed in d7a8f29ce7 to drop all the steps that
were running on the other platforms, change it to just instantiate the
Linux instance and drop the conditional.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Move the multicore middleware to the new mcux-sdk-ng integration from
hal_nxp, instead of using the legacy integration method.
This will allow for easier integration of future releases.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Adds names to these libraries to prevent using auto-generated
names of the paths, which can be longer than the maximum supported
length on the current version of gcc for windows
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes various issues in the Kconfigs including not properly having
abbreviations in the correct case, line lengths, duplicating other
Kconfigs, etc.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds a new on the newly introduced sysbuild variant image feature
and a new slot1-partition snippet
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds details about the ``ExternalZephyrVariantProject_Add`` sysbuild
function which has been newly added, that allows for creating
variant images
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds a test which checks that the sysbuild slot1 variant image is
generated, and ensures that it boots properly when both images are
present or when only the second image is present
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds a new experimental Kconfig option to sysbuild which allows
generating a variant image to use with MCUboot in direct-xip mode.
It also includes base sysbuild infrastructure for creating
additional variant images in future (including out-of-tree),
whereby they use the base configuration of an existing image but
modify it, without creating the default zephyr extra targets for
images (e.g. menuconfig) to prevent changing configuration that
should not be changed.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds a snippet which sets the chosen code partition to
slot1_partition, which can be used with things like MCUboot
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This fixes the issue where --list-tests and --test-tree commands
showed duplicated testsuite IDs in the output,
simplifies testcase name handling in harness and runner modules.
Removed feature to extend behaviour of --no-detailed-test-id to shorten
test case names - feature was introduced in #82302.
This makes the twister output more predictable and the codebase easier
to maintain.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
The default SMP board variant runs SMP Zephyr on four A55 Cores, it
could be changed by disabling some CPU core nodes in dts and change
CONFIG_MP_MAX_NUM_CPUS accordingly.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Seemingly partitions (fixed-partitions) have no properties when
the edt file is loaded, work around this issue by outputting
compatibles for nodes that have them but have no properties, also
fixes some other outputs for misc. devices
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Initialize mclk_control_base,
mclk_pin_mask, mclk_pin_offset as 0
and skip mclk settings when
there is no property pinmuxes.
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Add board specific configuration and overlay for enabling the
st_b_cams_omv_mb1683 shield on the stm32h7s78_dk board.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Describe the camera related pins of the 30pins connectors of the
stm32h7s78 as well as DCMIPP pin assignments for the stm32h7s78
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
On this board the chip select is connected to GPIO E10
and must be controlled via GPIO since SPI4 CS is accessible
via either E4 or E11 which are both already used by other
functions on this board.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The STM32H7RS series embeds a parallel interface based DCMIPP
block allowing to capture data from sensors and store them into
memory.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Only st,stm32-dcmipp is described and only st,stm32n6-dcmipp
was used within the driver to decide if CSI / PIXEL_PIPES
are available. Instead of this, look at HAL provided macros
to know if the selected soc has the functionalities or not.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
This change accommodates support for next-generation
soc(it51600).
Tested with:
west build -p always -b it51xxx_evb/it51526aw samples/hello_world/
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Add invisible RENESAS_PN config to reflect the SoC hardware
information and provide input for hal_renesas
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
Create infrastructure for shared USB common code on STM32 family, and move
the Power Controller configuration logic to common code. This removes some
midly unrelated code from the UDC driver while enabling reuse by a future
UHC driver implementation for STM32.
While at it, clean up the migrated code.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
-Change base register for TCPWM to 0x40200000
which controls the entire IP block.
- enabling/disabling counters and handling
global interrupts.
Signed-off-by: Deepika R <deepika@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
- Add an overlay to enable TCPWM Counter sample.
- Contains configurations for Counter and Clock
Signed-off-by: Deepika R <deepika@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Add implementation of the Infineon PSoC4 TCPWM-based counter driver.
- Provides basic counter operations
including start, stop, read, and set alarm.
- Supports configuration and initialization through Device Tree.
- Enables alarm callback handling for
precise time-based event generation.
Signed-off-by: Deepika R <deepika@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
- Decouple interrupt settings from gpio drivers, making them configured
and handled independently by tint and ext_irq drivers.
- Remove device-specific hardware definitions in gpio_renesas_rz.h and
take advantage of pinctrl data type and dtsi for certain series.
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
- Replaced the previous struct layout with a union
type. This change exposes all register fields that were hidden
for pinctrl, but now they are useful for gpio to reuse.
- Remove `_t` suffix from struct tag to avoid duplication with
typedef alias.
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Remove required tag from `req` and `reg-names` as the pinctrl node is
changed into a dummy node to avoid cycle in devicetree between irq,
gpio and pinctrl so these properties are not required for Renesas
RZ/A,G,V series.
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Added `#irq-cells` to `renesas,rz-ext-irq` nodes to reflect the update
of `renesas,rz-ext-irq` binding.
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Added a condition to check trigger type as high-level detection is not
supported by Renesas RZ external interrupt.
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Enable power management using LPTMR0 as the idle timer.
- Set zephyr,cortex-m-idle-timer to lptmr0
- Remove redundant stop state DTS overrides
- Add power_mgmt_soc test configuration and overlay
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Implement power management with IDLE, STOP, PSTOP1, and PSTOP2 modes.
- Add power state definitions with timing parameters
- Implement pm_state_set() with proper SLEEPDEEP handling
- Add XIP-safe WFI execution from RAM
- Enable SMC driver and power mode protection
- Remove forced timer Kconfig defaults
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Deprecate the CONFIG_XOPEN_STREAMS Kconfig option in favour of
CONFIG_XSI_STREAMS, which matches the naming conventions of other XSI
Kconfig options and the actual Option Group name in the specification.
Please use CONFIG_XSI_STREAMS instead.
Note: this option was originally deprecated prior to 4.3.
Signed-off-by: Chris Friedt <chris@fr4.co>
CONFIG_XOPEN_STREAMS does not follow the pattern of other XSI Option
Groups, where the Option Group name is not the same as the feature
test macro that indicates it is supported by the implementation.
Deprecate CONFIG_XOPEN_STREAMS and rename it to CONFIG_XSI_STREAMS.
For more information, please see
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/\
V1_chap02.html#tag_02_01_05_09
Signed-off-by: Chris Friedt <chris@fr4.co>
Fix issue with re-registering CSIS where it relied on
a stack allocated value during the service unregistering
and reset. To fix this properly, and to allow for further
optimization, the register function was refactored to dynamically
create the service, rather than relying on a static allocation
and dynamically remove unwanted characteristics.
Additionally this new approach also allow us to rely on
IS_ENABLED and remove some #if defined, as well as reducing
both ROM and RAM memory usage.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
In current implementation, the Classic L2CAP server list will be
cleared when the function `bt_enable()` called. It causes the
registered Classic L2CAP servers are unregistered. However, the
higher-ups were completely unaware of this behavior. It causes the
Classic L2CAP server cannot work after executing the sequence
`bt_enable()`, `bt_disable()`, and `bt_enable()`. Also this behavior
is inconsistent with LE L2CAP server.
Remove the initialization of Classic L2CAP server list from function
`bt_l2cap_br_init()` to fix the issue.
Make Bluetooth Classic profile initialization functions idempotent
by adding static initialized flags to prevent re-initialization.
Change return type from int to void since errors are now logged
but not propagated.
Changes include:
- Add initialized flag to prevent multiple initialization
- Change return type to void for init functions
- Mark err variables as __maybe_unused where appropriate
- Improve error logging with error codes
- Handle -EEXIST and -EALREADY errors for re-registration
- Initialize connection pools before checking initialized flag
in AVRCP to support re-initialization scenarios
- Remove unnecessary sys_slist_init in bt_l2cap_br_init
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Fix incorrect error code formatting in Bluetooth BR/EDR shell commands.
Error codes are already negative values, so remove the redundant negation
when printing error messages. Also update PSM registration message to
print the PSM value in hexadecimal format for consistency.
Changes:
- Remove negation of error codes in shell_error() calls
- Change PSM format specifier from %u to %04x for hex display
- Affects l2cap_disconnect, l2cap_send, l2cap_credits, l2cap_echo_reg,
l2cap_echo_unreg, l2cap_echo_req, and l2cap_echo_rsp commands
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Adds a new property which outputs the absolute address of a dts
device (if it is available) which will take the parent nodes into
consideration without a user having to manually trawl through
devices (which is error prone depending upon how they are layered)
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
- Adds pic32cx_sg41_cult.overlay for wdt test projects.
- Adds pic32cx_sg41_cult platform allow in testcase.yaml.
- Adds wdt board specific configuration in main.c
Signed-off-by: Farsin Nasar V A <farsin.nasarva@microchip.com>
- Adds the overlay file for pic32cx_sg61_cult board for supporting
watchdog sample application
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
- Add watchdog tag in the board yaml file section to allow
CI run watchdog tests on this board.
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
- Adds the overlay file for pic32cx_sg41_cult board for supporting
watchdog sample application
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
- Add watchdog tag in the board yaml file section to allow
CI run watchdog tests on this board.
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
Adds a flag `cfg_flags` to the `bt_keys` struct and a version field
`cfg_version` in order to be able to detect configuration changes
between firmware updates. This is needed because the `bt_keys` struct
has fields which are compiled in depending on which Kconfig options are
enabled, enabling the possibility of stored data being intepreted
wrongly if the struct changes.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Register Space Cubics on-board computer platforms in MAINTAINERS.yml.
Mark the area as maintained, set yashi as maintainer, and scope it to
boards/sc/. Add a short description for the platform group.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
This is to start the process of fixing the issue of the SoC series
not matching the value in the soc.yml file, which is needed to
support future build system features for automatically creating
SoC Kconfigs by the build system.
This also fixes some oddities with how the Kconfigs were set out,
which included duplicated Kconfigs and duplicate selections and
having them in the wrong (or differing) files, to actually follow
how HWMv2 should define these Kconfigs.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
While the tx processor thread is needed to prevent deadlocks and is as
such always enabled, its stack size may be adjusted based on need.
What is needed is dependent on which features are enabled in the
zephyr host as well as other project configurations impacting the
zephyr host.
Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
Add a dependency for UTF8 for LE Audio. Since (nearly?) all
string in LE Audio are UTF8 and that the stack wants to be
able to check and validate strings coming both from remove
deviecs and from the application, it will depend on the utf8
API that is guarded by CONFIG_UTF8.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fixes the Kconfig name of this so that it matches the value from
soc.yml, this has not been deprecated because this SoC is a virtual
SoC used only with the boards in zephyr meaning it should not cause
any breakage of out-of-tree boards
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes the Kconfig name of this so that it matches the value from
soc.yml, this has not been deprecated because this SoC is a virtual
SoC used only with the boards in zephyr meaning it should not cause
any breakage of out-of-tree boards
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes the Kconfig name of this so that it matches the value from
soc.yml, this has not been deprecated because this SoC is a virtual
SoC used only with the boards in zephyr meaning it should not cause
any breakage of out-of-tree boards
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes the Kconfig name of this so that it matches the value from
soc.yml, this has not been deprecated because this SoC is a virtual
SoC used only with the 2 boards in zephyr meaning it should not
cause any breakage of out-of-tree boards
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
It is not recommended to disable the tx processor thread as otherwise
deadlocks may occur, but it has been observed that some boards and
configurations may have too little RAM to accommodate the TX processor
thread stack.
As such BT_TX_PROCESSOR_THREAD gets a prompt.
Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
In pm_device_runtime_get, when resume fails after the domain as claimed,
the flag PM_DEVICE_FLAG_PD_CLAIMED is not cleared (but the domain is
released). This leaves this flag in a consistent state and in a further
resume this device won't resume its domain leading to bigger problems.
Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
Enable and configure essential peripherals that are typically required
for meaningful use of the XIAO nRF54L15 board, especially for wireless
and sensing applications:
- Configure HFXO with internal load capacitors (16 pF) for better
RF performance/stability
- Enable IEEE 802.15.4 radio support
- Enable temperature sensor
- Enable radio core
- Enable NFCT (NFC tag)
- Enable clock controller
These changes make the board usable out-of-the-box for Bluetooth LE,
Thread, Matter, NFC and basic temperature monitoring use cases.
Signed-off-by: Jingxing Lai <starsphere@foxmail.com>
phy_tja11xx_get_link_state() always returns 0, making callers' error
checks ineffective.
Remove the unused return variable and drop the dead conditional in
invoke_link_cb() to silence static analysis warnings and simplify
the code.
No functional change.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Fix a spelling mistake in the board openocd cfg file for arduino
boards.
No functional change.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
It seems there is currently no impact except a warning displayed when
building: "unit address and first address in 'reg' (0x40113000) don't
match for /soc/peripheral@50000000/opamp@113000"
Signed-off-by: Joel Guittet <joelguittet@gmail.com>
coap_client_schedule_poll() never reports errors and always returns
0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Handle both multicast packets and promiscuous mode in the driver. This
will allow the lan9250 to be added to a bridge as well as process
multicast packets being received.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
Update the NXP HAL with a change where PWM_Setup can return an error value
instead of asserting.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
The bus recovery implementation did not reset the I2C block. If
a glitch on the bus looks like a start condition, the I2C block
will be stuck forever waiting for the associated stop. This adds
reset to the I2C block to address this type of error.
Signed-off-by: Tim Knodel <tbk@google.com>
Alarms are not supported due to RTC interrupt not triggered
in Run mode erratum.
Delete the overlay since RTC node already defined in the
board dts.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Usage or not of the input subsystem is an application decision hence
boards or shields defconfig should not force it, even if there might
be a touchpanel available on the board.
This commit remove enabling of CONFIG_INPUT in ST shields / boards.
This shouldn't have impact on in-tree application since LVGL samples
already enable CONFIG_INPUT.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Always enable the CONFIG_INPUT in the project since it is trying
to use inputs, and let inside the application figure out if there
is really an input device available or not to either simply
draw a label or a button with a label.
This also allow avoid need to have board specific conf file just
to enable CONFIG_INPUT as well has allow to use shields which
embed touchpanels.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
CONFIG_INPUT=y is already part of the demos sample prj.conf file so
it is not necessary to have it enabled in the st25dv_mb1283_disco
board specific conf file.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
This commit adds cache handling for Hifi4 core on RT600.
Enable CACHE_MANAGEMENT and HAS_DCACHE.
This is required for proper data coherency when the DSP shares memory
with other cores (e.g., Cortex-M33) or DMA peripherals.
With this change, applications can now use sys_cache_data_flush_range()
and sys_cache_data_invd_range() to ensure cache coherency in shared
memory scenarios.
Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
For STM32F446, F469, F479 and F7x, add the clk48 node in the dtsi.
This allows configuring the clock source of the CLK48 clock.
It is necessary to add it for the SDIO peripheral that can have either
SYSCLK or CLK48 as clock source.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
On STM32F446, F469, F479 and on STM32F7x, the CK48M mux can have either
PLL Q or PLLSAI P as input. Adds the support for the PLLSAI P input in
the driver.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Move get_ck48_frequency function outside of the #if STM32_PLL_ENABLED
because it should be usable even if the main PLL is not used. The mux
can indeed be used with PLLI2S.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
With the new PLL bindings, fixes a few board dts and overlays
that are missing some properties.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This commit updates the STM32Fx clock driver to add complete support for
all PLLs for all SoCs.
Supports all outputs and additional divisors:
- PLL-DIV-R
- PLLI2S-P
- PLLI2S-DIV-Q
- PLLI2S-DIV-R
Adds global checks to make sure that all:
- All PLLs share the same source clocks
- All PLLs share the same M-Divisor (on applicable SoCs)
- Both div-X and div-divX are defined (on applicable SoCs)
Functions get_plli2s_source and get_plli2ssrc_frequency are added to make
sure that PLLI2S can be used even if PLL is not defined.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add some missing clock sources and reorganize them to class the PLL outputs
together for STM32F4 and F7.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
For all STM32F2, F4 and F7, use the new binding instead of the various ones
previously defined.
For F411 and F446, this removes the need to define the PLLI2S since it is
already included in F401.
For F7, this commit also adds the PLLI2S that was missing.
Also update post-div-x properties for some boards and overlays.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
STM32F2, F4 and F7 have up to 3 PLLs: PLL, PLLI2S and PLLSAI. These PLLs
are very similar, the principal differences are which outputs are available
for which PLL of each SoC.
Instead of having a large number of files to describe all the possible
very similar variants, use one single binding to rule them all.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
The Pico SDK expects a transfer count (items), not a byte count. The
driver incorrectly passed the byte size, causing buffer overflows on
16-bit and 32-bit transfers.Fix this by storing the transfer width in
the channel configuration and dividing the block size by that width
to calculate the correct transfer count.
Fixes#99435
Signed-off-by: Ashirwad Paswan <ashi06712@gmail.com>
Moving the reset of ltpim hw ip at the beginning of
sys_clock_driver_init to improve the reliability of lptim hw
configuration sequence.
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
Add ewm dts node for mimxrt1170.
Enable ewm clock for frdm_mcxe247.
Enable wdog for frdm_mcxe247 and frdm_ke15z.
Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
Set the background color to 0xFF (white) in case of ARGB_8888
framebuffer format so that it is same for all formats except
AL88 and MONO.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Switch SDL buffers from SDL_PIXELFORMAT_ARGB8888 to
SDL_PIXELFORMAT_BGRA32. BGRA32 is platform endianness independent
description, defined as below:
Byte 0 Byte 1 Byte 2 Byte 3
7......0 15.....8 23....16 31....24
Bbbbbbbb Gggggggg Rrrrrrrr Aaaaaaaa
The driver is then updated in order to ensure that all buffers,
given via a PIXEL_FORMAT_ described format are properly converted
into the SDL_PIXELFORMAT_BGRA32. At the same time endianness
conversion code is also added in order to avoid taking assumption
that the running platform is little-endian and ensure that data
are properly read as expected.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The RGB888 colors generated leads to having
byte0 - R
byte1 - G
byte2 - B
while the RGB888 is usually described as B - G - R
going from byte0 to byte2.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The format currently expected by devices and sample display
application for BGR_565 is actually RGB_565 format with bytes
swapped (not B / R swapped). That is:
PIXEL_FORMAT_RGB_565:
* @code{.unparsed}
* 7......0 15.....8
* | gggBbbbb RrrrrGgg | ...
* @endcode
current PIXEL_FORMAT_BGR_565:
* @code{.unparsed}
* 7......0 15.....8
* | RrrrrGgg gggBbbbb | ...
* @endcode
This is explained in both st7796s display driver but also is
what is generated by the sample display application. As a video
format (ex: V4L2), such format is not mentioned as BGR (for
which R and B are swapped) but RGB_565X.
Within the whole Zephyr tree, rename the curremt BGR_565 format
into RGB_565X in order to emphasis that this is a byte swapped
format rather than a B/G component swapped format.
This also correct the description of the format in display.h
file, which wasn't correct based on what was being used by
display driver or sample display app.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
This commit adds the MikroE MCP251xFD Click shields under the same
assignees as other of the CAN driver based shields.
Signed-off-by: Stephan Linz <linz@li-pro.net>
The documentation now contains an introductory section covering
the possible variants of this shield. Furthermore, the existing
documentation for the MikroElektronika MCP2518FD click shield
has been enhanced with additional WEB references and the missing
picture.
Signed-off-by: Stephan Linz <linz@li-pro.net>
MikroElektronica offers various click shields, all based on the MCP251xFD
chip family. These include, for example, the MCP2517FD and MCP251863. All
of these chips are software compatible, meaning they can be used with the
same driver.
This preparation makes it possible to introduce additional click shields,
each with their own name. These do not differ in terms of functionality
and handling, so a separate directory for each additional "similar"
module is not necessary. Only an additional DTS overlay and documentation
need to be added.
In addition, missing copyright strings have been added or their labeling
has been adapted to the current guidelines.
Signed-off-by: Stephan Linz <linz@li-pro.net>
cmd_blob_target() always returned 0 even when the target list was
full, making error checks at call sites unreachable.
Return a proper error code when no more targets can be added so
callers can correctly detect and handle the failure.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Update the HW models module to:
4d11a73d62bf999205f16de21a0ef675501f5b21
Including the following:
4d11a73 makefile: Check for more types of build warnings
e53f8db hal: Disable unused-parameter warning when building hal files
5dfba9f RADIO: Avoid 2 shadow redefinition warnings
4a4f979 nrf_hack: Avoid a shadowed redefinition warning
4b9e63b misc: Fix a couple of signedness comparison warnings
d46094f CRACEN: Fix an unused parameter warning
1cf2b04 CLOCK: Fix prototype and one warning
2dab612 nrf_clock: Select header based on symbol instead of platform
0b45a30 54 CRACEN: Make it clear that fallthrough is intentional
7945bf8 GRTC: Add PASTCC model
0a997e5 nrf_hack: Trivial refactoring to remove duplicate code
f328e9b cmake: Add build defines to nrfx library
3824f9c hal: nrf_common: Add repl. for nrf_address_{bus,slave}_get()
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This workflow used to host the "empty" description check and had to
rerun on PR title edit, but that has been moved to into the (faster) dnm
workflow in db18e4c507. Drop the "edited" trigger from this one as it's
not needed anymore.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
On the it51xxx soc, the psa/its twister test was failing because
there is no storage partition defined. This change ensures the
flash erase function in the psa/its test only runs if fixed
partition labeled 'storage_partition' exists.
Tested with:
- west twister -p it51xxx_evb/it51526aw \
-s secure_storage.psa.its.secure_storage.custom.both
- west twister -p it51xxx_evb/it51526aw \
-s secure_storage.psa.its.secure_storage.custom.store
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
This renames the dtsi files in the dts/vendor/nordic
to include the cpuapp in the filename.
At the same time it updates the inclusion of these files
to include the vendor in the path because the same filenames
exists in both:
dts/vendor/nordic
dts/arm/nordic
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
Rename all dtsi files for Nordic boards for non secure builds
to have a _ prefix before "ns" to increase readiblity.
At the same time, change the path to include the arm
folder in order to be able to differentiate with the
vendor folder which has similar files.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
Refactor the SRAM partitioning for TF-M builds for the Nordic
nRF54L devices. Instead of using the reserved-memory node this
just partitions the normal SRAM node. This aligns the design with
the rest of the Nordic devices.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
Update the memory layout of nrf54l10 for TF-M builds so that
it does not reserve any memory for FLPR since it is not supported
with TF-M.
This affects both the SRAM and the RRAM partitioning.
I moved the SRAM partitioning to the nrf54l10_ns_partition.dtsi
and removed it from individual board files so it can be updated
for all the platforms in one place.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
Update the memory layout of nrf54lm20a for TF-M builds so that
it does not reserve any memory for FLPR since it is not supported
with TF-M.
This affects both the SRAM and the RRAM partitioning.
I moved the SRAM partitioning to the nrf54lm20a_ns_partition.dtsi
and removed it from individual board files so it can be updated
for all the platforms in one place.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
Update the memory layout of nrf54l15 for TF-M builds so that
it does not reserve any memory for FLPR since it is not supported
with TF-M.
This affects both the SRAM and the RRAM partitioning.
To do that I refactored the dts files, specifically:
1) I created new files for the _ns targets since they have
different available RRAM/SRAM sizes now.
2) I moved the SRAM partitioning to the nrf54l15_ns_partition.dtsi
and removed it from individual board files so it can be updated
for all the platforms in one place.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
Update the memory layout of the Nordic nRF54L devices to avoid
reserving volatile and non-volatile memory for FLPR since it is
not yet supported with TF-M.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
If a second UART was not configured in the hardware map, then skip
the testcase instead of failing.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Commit removes selection secure storage for tfm
crypto provider. The secure storage is under
the secure image management. Non-secure image
is not required in the secure storage subsystem.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Fixes using a dt function which suffered from firstly trying to
take the value from a variable that isn't defined, and which if is
ignored, was entirely invalid due to supplying a chosen node, not
a path as the dt function explicitly requires
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fix formatting of the __ASSERT message in
mcux_ctimer_pwm_get_cycles_per_sec to properly concatenate the
string across multiple lines.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add zephyr,entropy and sets to TRNG0. This is needed by
the random subsys when using entropy device.
Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
entropy_gd32_recover() had not return type defined causing the
following issue when building:
drivers/entropy/entropy_gd32.c:61:8: error: return type defaults to
'int' [-Werror=implicit-int]
Fix it and change the function to void since it was returning a
constant 0 that is never checked or used.
Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
Fixes Kconfig naming to be properly set as required by HWMv2, to
allow for future build system features to work
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes a wrongly added SoC feature which should not have been
accepted in the original way it was added, by correctly adding a
Kconfig to select an optional build configuration for this SoC
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
process_advertise() never reports errors and always returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
process_search() never reports errors and always returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Read the idle timer counter value after getting interrupt status and
top value to ensure more accurate timing measurements when exiting
low-power mode.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Clear pending SysTick interrupt before entering low-power mode when
CONFIG_CORTEX_M_SYSTICK_RESET_BY_LPM is enabled. A pending interrupt
can inhibit LPM entry or cause immediate wakeup. This is safe since
cycle_count was already updated.
Also improve RESET_BY_LPM Kconfig help text.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Add documentation for the setpath flags parameter by defining a new
enum bt_obex_setpath_flags that describes the available flags:
- BT_OBEX_SETPATH_FLAG_BACKUP: backup a level before applying name
- BT_OBEX_SETPATH_FLAG_NO_CREATE: don't create folder if it doesn't exist
Update the documentation for bt_obex_setpath() and the setpath callback
in bt_obex_server_ops to reference the new enum, improving clarity for
users of the OBEX setpath operation.
Signed-off-by: Can Wang <can.wang@nxp.com>
The function obex_transport_disconn() was always returning -EINVAL
regardless of the actual error code returned by the transport
disconnect operation.
Fix this by returning the actual error code from the transport
disconnect call instead of the hardcoded -EINVAL value.
Signed-off-by: Can Wang <can.wang@nxp.com>
According to OBEX Version 1.5, section 2.2.9, it is legal to send a
zero-length End-of-Body header when object body data is generated on
the fly and the end cannot be anticipated.
Update parameter validation in bt_obex_add_header_body_or_end_body()
and bt_obex_add_header_end_body() to allow NULL body pointer when
length is zero, while still rejecting NULL body with non-zero length.
This enables proper support for zero-length End-of-Body headers as
specified in the OBEX specification.
Signed-off-by: Can Wang <can.wang@nxp.com>
Add a new helper function bt_obex_has_app_param() to check whether
a specific application parameter tag exists in the OBEX buffer.
The function uses the existing bt_obex_get_header_app_param() to
retrieve the application parameters, then parses them using
bt_obex_tlv_parse() with a callback to search for the specified tag ID.
This simplifies checking for the presence of application parameters
without needing to manually parse the TLV structure.
Signed-off-by: Can Wang <can.wang@nxp.com>
Move the descriptor storage into the per-instance data structure rather
than being global, as they should not be shared between instances.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
The way the driver was storing IRQ numbers for later use in the various
locking modes was not correct, causing the wrong IRQs to potentially be
disabled/enabled in some modes. Refactor the way this is done to be
cleaner, and also the way the different locking modes are implemented in
order to ensure that all modes receive compile test coverage.
Also, ensure that the IRQ for the RX or TX channel is always disabled
during the execution of the corresponding ISR, to prevent it from being
preempted by itself if the DMA core raises another interrupt during the
ISR execution.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
This driver has a config option
DMA_XILINX_AXI_DMA_DISABLE_CACHE_WHEN_ACCESSING_SG_DESCRIPTORS to allow
it to be used on platforms where DMA memory access is not automatically
cache coherent. However, fully disabling the dcache when accessing DMA
buffers/descriptors is not necessary and is potentially problematic.
This can be handled more selectively by doing explicit cache invalidate
and/or flush operations on the buffers involved as required.
Note that this does introduce a requirement that RX DMA buffers provided
to the driver are cache line aligned, as otherwise the required cache
invalidate operation could potentially corrupt unrelated data. This is
explicitly checked when a DMA RX operation is started.
Tested on Cortex-R5 with data cache enabled.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
The driver previously had a timer to periodically check for completed
TX/RX transfers in case an interrupt notification was missed. With
previous changes to the driver to avoid lost interrupt wakeups, this
workaround should no longer be required, so remove it.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Fix some issues in the driver's DMA interrupt handling:
-Ensure that interrupts are cleared prior to handling interrupt events,
so that events raised during interrupt processing will cause the
hardware to raise a new interrupt
-Ensure that we do not overwrite existing DMA descriptors which are
incomplete (such as by trying to execute more transfers than there are
slots in the descriptor ring)
-Ensure that error events reported by the DMA engine are reported
-Rename some of the variables to track pending and completed ring
locations for better clarity
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Doing a reset of the DMA engine during the dma_configure operation is
problematic when using the DMA core in combination with the Xilinx AXI
Ethernet core, since the DMA core's reset signals are normally
propagated into the Ethernet core. This means that after the Ethernet
core initializes and starts a DMA operation for the first time, the DMA
core is reset, wiping out all of the register settings that the Ethernet
core has made.
To avoid this, move the DMA core reset and other initialization which
only needs to be done once into the init function, so this is done
during initial driver load and not deferred until later.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Instead of using a packed structure to define the register map, just
create an enum for the registers and use that to refer to them. This
avoids the need for repeatedly disabling GCC warnings for taking the
address of packed structure members.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
The DMA_XILINX_AXI_DMA_DISABLE_CACHE_WHEN_ACCESSING_SG_DESCRIPTORS
option is not meaningful to enable unless the platform/configuration
actually supports the corresponding cache maintenance operations. Add
dependencies accordingly.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
When building for ARMv9-A platforms with CONFIG_ARM64_SVE disabled,
compilers still emit SVE instructions because ARMv9-A includes SVE
by default in the architecture specification.
Add explicit +nosve flag to -march when CONFIG_ARMV9_A=y but
CONFIG_ARM64_SVE=n to prevent SVE instruction emission. This ensures
the compiler respects the SVE configuration and only emits SVE
instructions when explicitly enabled.
Applied to both GCC and Clang/LLVM toolchains.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
There's a standardized way to set a public Bluetooth address in the
core, and this hardware has a vendor specific command to do just that.
Tell the core we support the operation and implement the command. This
allows applications to set a MAC by calling bt_id_create() prior to
bt_enable().
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
If the vendor driver knows how to set a public MAC, it can select
CONFIG_BT_HCI_SET_PUBLIC_ADDR and set the address in this argument,
allowing applications to set a public address with bt_id_create().
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Without this, the parent CMake and the sub-processes may use different
Python environment.
Co-authored-by: Torsten Tejlmand Rasmussen <torsten.rasmussen@nordicsemi.no>
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Introduce bt_le_per_adv_sync_cb_unregister to allow
unregistering of the periodic sync callbacks.
Signed-off-by: Antoni Duda <antoni.duda@programmer.net>
- Remove ztest_test_skip in sub testcase because it will skip all
following code in the testcase.
- Print sub testcase name at the case begining.
- Wrap bad window and wait mode test with macros.
- For nxp,cop, need disable it when the testcase ends.
Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
Add an overlay and conf file for the phyBOARD-Atlas. Those
files are copies from NXP's RT1176 board, because the phyBOARD-Atlas
is using the same MCU.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Add initial support for PHYTEC phyBOARD-Atlas i.MX RT1170 based on the
PHYTEC phyCORE-i.MX RT1170 SOM. SOM uses dual-core NXP i.MX RT1170 SoC
as a basis, with Cortex-M7 core running at 1 GHz and Cortex-M4 core at
400 MHz.
Supported features:
* Accelerometer
* Audio codec
* CAN
* DAC
* EEPROM
* Ethernet
* External display
* I2C
* RS-232
* SD-Card
* SPI
* UART
* USB
Signed-off-by: John Ma <jma@phytec.com>
Signed-off-by: Florijan Plohl <florijan.plohl@norik.com>
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Add phyCORE-1170 SOM dtsi for streamlined inclusion on carrier
boards and uses a dual-core NXP i.MX RT1170 SoC as a basis.
Signed-off-by: Florijan Plohl <florijan.plohl@norik.com>
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
mctp_i3c_controller_start() contains a conditional check on a return
code that is never updated, making the error handling path
unreachable.
Remove the dead code to avoid misleading logic and make the current
controller startup behavior explicit.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The Versal RPU uses Arm Cortex-R5F cores, which implement VFPv3-D16
(single and double precision with 16 double-word registers):.
Select VFP_DP_D16 to describe the available VFP configuration for this SoC.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
set_sensor_state() never reports errors and always returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
init_sensor() never reports errors and always returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
When MOPL exceeds MTU, adjust it to match MTU instead of sending the
error code. 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: Can Wang <can.wang@nxp.com>
Added a note to the USB CDC_ACM building scenario.
The note reminds the user to connect to the correct USB port
when programming. NCSIDB-1733.
Signed-off-by: Grzegorz Ferenc <Grzegorz.Ferenc@nordicsemi.no>
clock_control_bl60x_set_root_clock_dividers() never reports errors
and always returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
clock_control_bl70x_set_root_clock_dividers() never reports errors
and always returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
CAR characteristic read process was incomplete, CAR status was not
actually stored.
Added a new BTP_GAP_EV_PEER_CAR_RECEIVED to tester. This is to
prevent disconnect events before IUT successfully reads CAR from
central.
Updated start_directed_advertising() so that if the central has
no CAR support we must not send directed advertisements. IUT
might enter another connectable mode according to specification,
thus IUT starts sending connectable undirected advertisements with
resovable address.
Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
commit bf61a47887 ("drivers: sdhc: imx_usdhc: extend reset timeout
duration") extended the timeout from 100 iterations to 1000 iterations
for the USDHC_Reset() call in imx_usdhc_reset() but not in the other
places it's called. I have observed a "usdhc: Failed to reset command
line" error from imx_usdhc_error_recovery() on an i.MX RT1061, which
goes away if I extend the timeout. Do so there and also at other call
sites for good measure.
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Factorize STM32 interface clocks configuration in a single array.
This change eases later integration of other SoCs with different
clocks names while the driver only has to enable (possibly disable)
the clocks on a single sequence.
Suggested-by: Fin Maaß <f.maass@vogl-electronic.com>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Remove helper macro used to transition from MAC clocks defined
by the MAC node to definition in the controller (parent) node.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Move the ethernet controller clocks from mac node to controller node.
This change simplifies how clocks are gathered and handled in STM32
ethernet drivers.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Prepare move of STM23 ethernet MAC clocks to the controller node (parent
node). For sake of simplicity, define a filed for all possible clocks in
struct eth_stm32_hal_dev_cfg, a later change will replace the whole
with a single STM32 clock instance (struct stm32_pclken) array pointer.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Update STM32 ethernet driver to use STM32_DT_INST_CLOCK_INFO_BY_NAME()
helper macro to always get all clock information, not only the bus ID
and bit position.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add board overlay file for pic32cx_sg41_cult to enable comparator
test cases to run on this board.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
Add a new sleep-mode-enable property for the Cirque Pinnacle input driver,
to enable the sleep-mode for those peripherals, which will go into a lower
power state after 5 seconds with no fingers detected.
Signed-off-by: Peter Johanson <peter@peterjohanson.com>
Don't rely on power-on-reset for the connected device, issue a software
reset on init to be sure we're reset before continuing.
Signed-off-by: Peter Johanson <peter@peterjohanson.com>
The System clock was changed to LPFLL by commit 68937acbb8.
Updated the clock source and frequency description in board documentation.
Regarding boards: frdm_ke15z, frdm_ke17z, frdm_ke17z512
Signed-off-by: Chay Guo <changyi.guo@nxp.com>
Configure the reference buffers when using external reference voltage for a
channel. For the internal reference the datasheet[1] recommends that the
buffers are disabled and for external references they should be disabled if
REFPx/REFNx is close to AVDD/AVSS. After reset the positive reference
buffer is enabled and the negative is disabled. The default values
correspond to the example circuit for a two-wire and four-wire PT100 RTD
measurement with low-side reference.[2][3]
The values configured by the driver are maybe a little opinionated, but the
current behaviour is kept to avoid surprises for people that are happy with
the drivers defaults.
The change applies to both ads11xs0x and ads124xs0x series.
Link: [1]: https://www.ti.com/lit/ds/symlink/ads124s08.pdf
Link: [2]: https://www.ti.com/lit/an/sbaa329b/sbaa329b.pdf
Link: [3]: https://www.ti.com/lit/an/sbaa336b/sbaa336b.pdf
Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
Add boolean properties to control whether the reference voltage buffers are
enabled or not. After reset the positive reference buffer is enabled and
the negative is disabled.
Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
The following examples build and work as expected:
> west build -p -b framework_ledmatrix samples/basic/button
> west build -p -b framework_ledmatrix samples/basic/minimal
> west build -p -b framework_ledmatrix samples/subsys/usb/console
> west build -p -b framework_ledmatrix samples/subsys/usb/cdc_acm
> west build -p -b framework_ledmatrix samples/subsys/input/input_dump
Signed-off-by: Daniel Schaefer <dhs@frame.work>
Implement PWM input capture functionality for the NXP SCTimer
driver with support for both pulse width and period measurement
in single-shot and continuous modes.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add input-channels and inputmux-connections properties to the
nxp,sctimer-pwm device tree binding to support SCTimer input
capture configuration.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
1.Add mcux_sctimer_pwm_update_polarity() function to properly
reconfigure PWM output polarity when duty cycle is updated.
2.Update Match Reload Value register when Match register is
set.
3.Stop timer before update to prevent bus error
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add device tree overlay to enable PWM API testing on the frdm_mcxa153
board using ctimer0. The overlay configures:
- PWM test alias pointing to ctimer0
- Pin P2_12 (J2_12) as PWM output
- ctimer0 in PWM mode with prescaler set to 1
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
The prescaler divides the clock by (prescaler + 1), not by the prescaler
value directly. Update the calculation to correctly account for this.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Clarify that the prescaler value divides the clock by (prescaler + 1),
not by the prescaler value directly. This helps users understand the
actual clock division behavior.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add device tree overlay for PWM loopback testing on the
MIMXRT1180EVK board using FlexPWM1 module.
Configuration includes:
- Pin configuration for PWM output (gpio_ad_00/J69-3) and input
capture (gpio_ad_06/J70-1) using FlexPWM1 channels
- PWM loopback test node with output on channel 0 and input on
channel 2
- Input filter settings with minimal count and period for testing
- Physical connection requirement between J69-3 and J70-1
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add support for PWM input capture functionality to the NXP MCUX PWM
driver. This enables measurement of pulse width and period of external
PWM signals.
Key features added:
- PWM capture configuration and control APIs
- Interrupt-driven capture with overflow handling
- Support for both pulse width and period measurement
- Configurable input filtering
- Support for continuous and one-shot capture modes
The implementation uses FlexPWM channel X as the dedicated input
capture channel, while channels 0 and 1 remain available for PWM
output. Capture functionality is conditionally compiled based on
CONFIG_PWM_CAPTURE configuration option.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add device tree binding properties for PWM input capture filtering
functionality to the NXP i.MX PWM driver binding.
New properties added:
- input-filter-count: Configure number of consecutive samples
required before accepting input transitions
- input-filter-period: Set sampling period in IPBus clock cycles
for input capture filtering
These properties enable configuration of input filtering to reduce
noise and improve signal integrity for PWM capture operations.
Setting filter period to 0 bypasses the input filter entirely.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
In PWM_SetupPwm implementation, there is a check:
temp = pwmClock / pwmFreq_Hz;
assert(temp <= 0xFFFFU);
Currently pwmFreq_Hz is 1, makes assert failed with
high frequency pwmClock. Since VALx values is set
directly for edge aligned PWM, the pwmFreq_Hz here is
a dummy value, set pwmFreq_Hz equal to pwmClock
frequency to pass assert check.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Adding support for running Zephyr OS as a guest virtual machine
in the QNX Hypervisor environment.
This change introduces a new board configuration for ARM64-based
QNX Hypervisor VM.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
The STMicroelectronics ST87M01 modem is an ultra-compact low-power
NB-IoT industrial module.
The ST87M01 is a high-performance, fully programmable, ultra-compact,
and low-power LTE Cat NB2 NB-IoT industrial module series,
offering comprehensive worldwide band coverage and advanced
security features.
Supporting a wide range of IoT protocols, the ST87M01 module includes
PDU SMS services and internet protocols such as TCP/IP, TLS/DTLS, CoAP,
LwM2M, MQTT, and HTTP/HTTPS, enabling versatile connectivity and
application scenarios.
This driver introduces support for AT commands to query modem
information and socket offloading for TCP/UDP transfers.
Signed-off-by: Isabelle OGER <isabelle.oger@st.com>
Add workaround for MCUXSDK FTFX driver when FTFx_DRIVER_IS_FLASH_RESIDENT
is enabled.
The SDK places the run command function in data section which
is not executable when Zephyr configures memory permissions.
Implement a RAM function to replace the FTFX driver's run command function
Fixes: #98560
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
Fix a spelling mistake in the board name description for ADI
evaluation boards.
No functional change.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Specific fixes include:
- Add missing space after period in the disk space warning.
- Fix mismatched quotes in the --install-base example (usage of `...').
- Removed a typo double quote in the installation description.
This addresses the CLI help message issues reported.
Fixes#95609
Signed-off-by: Malon Tian <a3205153416@gmail.com>
Instead of processing loopback packets from the TX thread directly,
queue them for further processing by RX thread (if possible), just as
regular packets. It's now possible as the information regarding the
packet is a loopback one or not is stored directly in the net_pkt
structure.
This allows to avoid unexpected stack consumption increases if packets
are sent for loopback destinations.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
If CONFIG_SDMMC_STM32_CLOCK_CHECK=y but the SDMMC node lacked domain clock,
the driver would perform an out-of-bounds access to priv->pclken[1] and
provide garbage as the "subsystem" in the call to clock_control_get_rate().
Detect this situation and error out with an explicit message instead to
prevent UB and help users.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
STM32H5, STM32L5, STM32U5, and STM32WBAX series MCUs have external
ICACHE/DCACHE with a cache line size of 16 bytes. The previous
configuration incorrectly set the cache line size to 32 bytes (the
default cache line size for Cortex-M cores).
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Removed revision from the MIMXRT1170-EVK documentation title,
to be consistent with all other MIMXRT boards.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Use NRF_DT_INST_IRQ_ macros which support building with and without
SW ISR table for all nordic socs.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Use NRF_DT_INST_IRQ_ macros which support building with and without
SW ISR table for all nordic socs.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Use NRF_DT_INST_IRQ_ macros which support building with and without
SW ISR table for all nordic socs.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Introduce the NRF_DT_IRQ_DIRECT_DEFINE and NRF_DT_IRQ_CONNECT macros
which reduce provide a common way for nordic drivers to adapt to the
presence of the SW ISR table which is commonly excluded as it is not
required for nordic socs. Also adds device driver inst variants of
the macros.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
- Fixes NXP FRDM names in yaml files.
- The '-' was missed for some NXP FRDM boards.
- It caused an inconsistent board list in MCUx-VSCode extension.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Add tests to ensure 'west build' arguments are correctly forwarded to
CMake in the correct order.
Signed-off-by: Thorsten Klein <thorsten.klein@bshg.com>
Support cmake options specified via argument --cmake-opt, in order to
avoid `--` in alias commands.
Signed-off-by: Thorsten Klein <thorsten.klein@bshg.com>
Enable the full range of CAN timing tests on the NXP FRDM-MCXA366,
FRDM-MCXA346 and FRDM-MCXA266 boards.
Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
Add myself as a collaborator for the Display drivers subsystem.
I have been actively contributing to display driver implementations
and will continue developing and reviewing patches.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
Add myslef as a collaborator for the MIPI DBI and MIPI DSI subsystems.
I have been actively contributing to MIPI DBI/DSI implementations
and will continue developing and reviewing patches.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
Document the scope changes for NXP compile flags that were
moved from global to local scope in PR #100252. Applications
that depended on these flags being globally available may need
to be updated.
The following flags have been moved to use
zephyr_library_compile_definitions():
- BOARD_FLASH_SIZE: moved to SoC layer CMake for RT10xx and RT11xx
- XIP_BOOT_HEADER_ENABLE: scoped to boards CMake or SoC layer as needed
- BOOT_HEADER_ENABLE: scoped to boards CMake, removed from RW61x boards
- XIP_BOOT_HEADER_DCD_ENABLE: scoped to boards CMake or SoC layer as needed
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
'BOOT_HEADER_ENABLE' is not used in RW61x build tree,
so should remove it from RW61x board CMakeLists.txt.
Note: if out-of-tree files still need to use this flag,
please add it in your own CMakeLists.txt.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. This commit converts the 'XIP_BOOT_HEADER_DCD_ENABLE' preprocessor
define to Kconfig options across NXP i.MX RTxxxx evaluation boards.
The changes enable flexible boot header configuration through the
Kconfig build system instead of compile-time defines, improving
configurability and maintainability.
2. Now 'XIP_BOOT_HEADER_DCD_ENABLE' flag is only used in
hal_nxp/rtxxxx/fsl_flexspi_nor_boot.h which is included by soc.c,
therefore, this flag should be passed in the rtxxxx/SoC layer CMake
using zephyr_library_compile_definitions(). and can be removed from
each board CMakeLists.txt.
Note: if out-of-tree files still need to use this flag, please add
it in your own CMakeLists.txt.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. This commit converts the 'BOOT_HEADER_ENABLE' preprocessor
define to Kconfig options across NXP i.MX RTxxx evaluation boards.
The changes enable flexible boot header configuration through the
Kconfig build system instead of compile-time defines, improving
configurability and maintainability.
2. Now this flag is not used in Zephyr tree, so removed
'zephyr_compile_definitions(BOOT_HEADER_ENABLE=1)' from the
CMakeLists.txt files of the following boards:
- mimxrt595_evk
- mimxrt685_evk
- mimxrt700_evk
Note: for out-of-tree projects that still require this flag,
users can define it in their own CMakeLists.txt or prj.conf files.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. This commit converts the 'XIP_BOOT_HEADER_ENABLE' preprocessor
define to Kconfig options across NXP i.MX RTxxxx evaluation boards.
The changes enable flexible boot header configuration through the
Kconfig build system instead of compile-time defines, improving
configurability and maintainability.
2. Now 'XIP_BOOT_HEADER_ENABLE' flag is only used in
hal_nxp/rt11xx/fsl_flexspi_nor_boot.h which is included by soc.c,
therefore, this flag should be passed in the rt11xx/SoC layer CMake
using zephyr_library_compile_definitions(). and can be removed from
each board CMakeLists.txt.
Note: if out-of-tree files still need to use this flag, please add
it in your own CMakeLists.txt.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
For RT10xx and RT11xx, flag 'BOARD_FLASH_SIZE' is only used
in hal_nxp fsl_flexspi_nor_boot.h which is included by soc.c,
therefore, this flag should be passed in the SoC layer CMake
using zephyr_library_compile_definitions() to limit its scope.
Normally, 'BOARD_FLASH_SIZE' should not be used elsewhere.
If an out-of-tree user uses this flag elsewhere, please define
the flag yourself.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Flag 'BOARD_FLASH_SIZE' is not used for RTxxx, so remove it
from mimxrt595_evk, mimxrt685_evk, and mimxrt700_evk board
CMakeLists.txt files.
Normally, 'BOARD_FLASH_SIZE' should not be used elsewhere.
If an out-of-tree user uses this flag elsewhere, please define
the flag yourself.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Create a dedicated Zephyr library for the imxrt11xx and
imxrt10xx SoC in CMakeLists.txt and move soc.c into it
(zephyr_library() + zephyr_library_sources(soc.c)).
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
nxp_ewm_install_timeout() accesses cfg fields before checking for
NULL, making the later NULL check ineffective.
Remove the redundant check.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Create a section for the OTP subsystem. NVMEM is referenced in the test
category as the OTP subsystem is tested using the NVMEM API.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Add an OTP memory emulator node to the board native_sim board device
tree file.
Additions of a node to the native sim device tree shifts the device
index, hence making the check_init_priorities test fail. Update the
index in the reference data of the test.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
In order to make some basic tests on the OTP API, add an OTP memory
emulator driver. It implements the .program() and .read() APIs.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
OTP drivers are the interface to One Time Programmable memory, which
is NVMEM. Add the interface with the OTP API to the NVMEM one.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Introduce a new OTP subsystem to be able to interact with One Time
Programmable(OTP) memory. For now, add basic read()/program() APIs.
Program() API is default disabled due to its sensitivity.
File drivers/otp.h is inspired by drivers/eeprom.h as the basic
features are similar.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Add stub implementations for all remaining smtc_modem_hal functions
required by LoRa Basics Modem. These functions are not yet implemented
but provide the necessary symbols for linking.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Add the initial smtc_modem_hal implementation for Zephyr that provides the
hardware abstraction layer required by LoRa Basics Modem.
To fully port the LoRa Basic Modem library to Zephyr we need to port and
adapt three parts (see [0]):
1. Radio Driver HAL
2. RAL BSP
3. LoRa Basics Modem HAL
Right now the Radio Driver HAL and the RAL BSP are correctly implemented by
the lbm_sx126x drivers, this patchset is taking care of the initial work of
porting and adapting also the LoRa Basics Modem HAL.
The LBM library provides a porting tool [1] that (quoting from [2]) "[...]
provides a automatic suite of tests that will help user ensures that lora
basics modem mcu and radio HAL functions are implemented in a good way
(SPI, radio_irq, time, timer, random, radio config, sleep and low power)"
This patchset is taking care of making the porting tool a first class test
suite for Zephyr implementing the needed HAL functions.
[0] https://github.com/Lora-net/SWL2001/blob/master/lbm_lib/PORTING_GUIDE.md
[1] https://github.com/Lora-net/SWL2001/blob/master/lbm_examples/main_examples/main_porting_tests.c
[2] https://github.com/Lora-net/SWL2001/blob/master/lbm_examples/README.md
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
A set of preliminary (but harmless) changes to prepare for adding the HAL
implementation.
- Rename CMake variables for clarity and consistency, adding an 'LBM_LIB_'
prefix when the path is a library / module path.
- Change zephyr_library_include_directories to zephyr_include_directories
for the RAL/RALF includes, since these headers may be needed outside the
library itself.
- Make lbm_common.h available to code outside the driver directory.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
To add support for LTR553, we will migrate device-tree
properties to new ones and mark the old ones as deprecated.
We will also refactor variable names accordingly.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
The LTR329 is a functional subset of the LTR55X series,
lacking the proximity sensor functionality.
To maintain symbol consistency, we will use LTR55X as the base name.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Enable WDOG4 for A55 on imx943_evk board. It could be verified by
building application by:
west build -p always -b imx943_evk/mimx94398/a55 samples/drivers/watchdog
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
This is a workaround to fix a bug that failed
to access registers of display irqsteer when
display mix is in power off state.
- Display irqsteer is in display mix, need to
power on display mix firstly.
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Some NXP SAR ADC variants don't implement the MCR[ADCLKSEL] field.
Add conditional compilation guards to define compatibility macros
that evaluate to 0 when ADCLKSEL is not available, allowing the
driver to compile across different NXP SoCs.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Move and rename the region Kconfig symbols from LORAMAC_REGION_* to
LORAWAN_REGION_* to make them backend-agnostic.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Move the LoRaWAN emulator from the loramac-node backend directory to its
own directory because the emulator currently still depends on loramac-node
for some types and functions.
Once these dependencies are removed in a follow-up, the emulator can become
a fully standalone backend.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Remove loramac-node specific references (LORAMAC_NVM_NOTIFY_FLAG_*)
from the NVM interface documentation, making it suitable for any
LoRaWAN backend implementation.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Refactor the LoRaWAN subsystem to support multiple backends by moving
the loramac-node specific implementation into a dedicated subdirectory.
This change prepares the subsystem for adding lora-basics-modem support
as an alternative backend.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Move west sdk documentation to the Zephyr-specific west commands page
and clarify listing, interactive install behavior, and toolchain
selection.
Signed-off-by: Ritesh Kudkelwar <ritesh.kumar0793@gmail.com>
Modify Microchip mec_assy6941 boards to use the new, common
UART driver. We also added chose "zephyr,shell-uart" to all
MEC boards allowing building of the "echo_bot" sample application.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
We updates all the UART hardware nodes for all MEC parts with
properties used by the new, common UART driver.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
We modified the Microchip MEC UART driver to be HAL
independent and be usuable on all MEC SoCs. The only
hardware difference is an extra register in the MEC174x/5x
family providing TX FIFO full and current byte count.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
Mention that the NXP FlexCAN devicetree property "clk-source" now
automatically selects between named input clocks.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add proper support for the 1-bit CAN protocol engine clock multiplexer
present in some NXP FlexCAN instances.
Both possible input clocks are now represented as named clocks in the
devicetree nodes ("clksrc0" and "clksrc1") and the existing devicetree
property "clk-source" now selects the correct clock in addition to setting
the multiplexer bit (CLKSRC) in the FlexCAN CTRL1 register.
Fixes: #94517
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Make the clk-source property of the NXP FlexCAN devicetree nodes optional
as not all FlexCAN instances have an internal clock multiplexer.
Remove the clk-source property from the SoCs where the internal clock
multiplexer is not present, limit the values this property can be assigned,
and default the clock selection bit to 0 in the driver.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
add stm32h573i_dk to the list of excluded platforms for
test_upgrade_ble scenario since it's not supported.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
vq_teardown() never reports errors and always returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The has_arg_concat check checks for ## and UTIL_CAT, but is missing
the CONCAT macro. This is causing spurious occurances of
MACRO_WITH_FLOW_CONTROL warnings for functions defined with macros
if they use the CONCAT() macro (its like UTIL_CAT but supports up
to 10 concatenations).
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The explicit, and internal, _CONCAT_\d macros are used in a few
files instead of the public CONCAT() macro which automatically
expands to the correct _CONCAT_\d macro based on number of args
passed to it. Update files to use CONCAT().
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The AM62L evaluation module (TMDS62LEVM) is designed for low-cost and
performance optimized AM62L family of application processors. More
information here:
https://www.ti.com/tool/TMDS62LEVM
Add base board support here.
Signed-off-by: Andrew Davis <afd@ti.com>
The TI AM62L is a low-power ARM Cortex-A53 based SoC with display for
IOT, HMI and general purpose applications. More information here:
https://www.ti.com/product/AM62L
Add initial SoC and DTS support here.
Signed-off-by: Andrew Davis <afd@ti.com>
Renames the UDP DTLS Kconfig fragment file, due to wrongly using an
underscore instead of a dash like the other Kconfig fragments, and
also documents how to use it in the readme
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Only install arm, riscv and x86 toolchains for the twister blackbox
workflow, save some space.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Fix incorrect LED polarity definitions for the SiWx917 DK.
The user LEDs on the SiWx917 DK are wired as active-low according
to the board schematic, but were previously defined as
GPIO_ACTIVE_HIGH. Update the devicetree LED gpio definitions to
GPIO_ACTIVE_LOW so LED behavior matches the hardware and sample
applications behave as expected.
Signed-off-by: Christopher Hofmeister <chofmeister@gopresto.com>
Found when building with clang with -Winitializer-overrides:
drivers/gpio/gpio_max14906.c:495:29: error: initializer overrides prior
initialization of this subobject [-Werror,-Winitializer-overrides]
495 | DT_INST_FOREACH_STATUS_OKAY(GPIO_MAX14906_DEVICE)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Updated pins for the gpio basic tests for cy8cproto_063_ble to pins not
used by other tests so that a single board can be wired for all tests
without overlaps.
Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
- The vendor of the hexiwear board is mikroe (not nxp)
https://www.mikroe.com/hexiwear.
- Move the board files from 'nxp' to 'mikroe'.
- Delete hexiwear from the nxp maintained board list.
- Update paths in the documentation.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
So far using recvfrom() and send() from two different threads was not
possible, since thread attempting send() was blocked by the thread
executing recvfrom(). All other APIs were also blocking each other, while
it was not necessary. One example use case in Zephyr tree is MCUMGR SMP
over UDP implementation, which resuled in communication timeouts.
Release socket lock while actively polling, so other APIs executed from
other threads can safely progress. Do this using k_condvar_wait() API with
socket mutex, so that mutex is safely released and reaquired during wait.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
When ESP32 operates in AP-only mode the network interface is
initialized with the STA MAC address, but the Wi-Fi hardware operates
with the AP MAC address (typically STA MAC + 1).
Some Wi-Fi clients correctly address frames to the AP MAC, causing them
to be dropped by the ethernet L2 layer with "Dropping frame, not for me"
because the interface link address doesn't match.
Fix this by updating the interface link address to the AP MAC when
enabling AP mode, and restoring the STA MAC when disabling AP mode.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Move the connectivity framework to the new mcux-sdk-ng integration from
hal_nxp, instead of using the legacy integration method.
This will allow for easier integration of future releases.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Rework the button sample to use the input subsystem for the button and
LED subsystem for the LED. This is a better representation of how a
button and LED should be controlled in Zephyr.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Section names may contain paths to files with special characters.
For example, a valid file path might contain '@'. Then using
CONFIG_CODE_DATA_RELOCATION to relocate section, macro
__in_section_unique() will generate section name like this:
KEEP(*file.c.obj(.noinit.WEST_TOPDIR/path_with@char/file.c.0))
Such section names cannot be processed by ld because '@'
is a special character for ld.
This fix wraps section names in double quotes to escape
special characters for ld.
Signed-off-by: Nikita Divakov <grommerin@gmail.com>
Macros __in_section_unique() and __in_section_unique_named() use
___in_section with __FILE__ argument to create a unique section name.
Since __FILE__ is a string, calling Z_STRINGIFY(__FILE__) in
___in_section() causes double quotes in __FILE__ value to be masked.
This prevents ld from matching section names output by this script.
For example, when using CONFIG_CODE_DATA_RELOCATION to relocate
a noinit section, __in_section_unique() generates the following
section name:
KEEP(*file.c.obj(.noinit."WEST_TOPDIR/path/file.c".symbol))
Besides, __FILE__ is used to create unique sections in two macros,
so why not unify this approach.
This fix adds ___in_section_unique() macro, which substitutes __FILE__
string into section name without additional stringification. Thus,
resulting section is correctly matched by ld.
Signed-off-by: Nikita Divakov <grommerin@gmail.com>
This patch adds a new Kconfig option that allows read-only data sections
without relocations to be mapped directly (remain in flash) instead of
being copied to RAM during extension loading. This helps extensions that
have large constant data, such as certificates, lookup tables etc.. to
save saving significant RAM, especially with MPU is enabled.
This feature requires the extension to place rodata sections without
relocations in LLEXT_RODATA_NO_RELOC section.
Note that we chose to disable this optimization when MMU or USERSPACE is
enabled because the NO_RELOC section may not be aligned to the MPU/MMU
requirements on some architectures. If we leave it in place, llext will
attempt to create an MPU region for it using a misaligned address, and
if we allow it to be copied to RAM, it defeats the purpose of this feature.
Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
Fix issue where changing an existing syscall API does not result in
regeneration of syscalls. This causes a build break on incremental
builds. The issue comes from an incorrect assumption that file
modifications result in updates to folder timestamps on Linux. The fix
is to use the same mechanism Windows is using to track file changes,
making explicit deps on header files that have syscalls.
Signed-off-by: Mark Inderhees <markind@meta.com>
Change init procedure of regulator_fixed and regulator_gpio to not rely
on reading the state of the enable pin as it might not be available.
Initialize the enable pin to the appropriate state based on the
REGULATOR_INIT_ENABLED flag.
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
Since input buffer may not always be connected when a GPIO is configured
as an OUTPUT, setting its state based on what is returned by
gpio_pin_get_dt can lead to faulty behavior. Remove this check as
redundant.
Fixes#93012
Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
Increase the maximum allowed repeat count for flash speed tests from
10 to 10000. This allows for more accurate measurements over
longer test durations.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
lwm2m_setup() never reports errors and always returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
This commit fixes an issue reported by LLVM Clang compiler
when building with -Wunaligned-access:
```
bluetooth/hci_types.h:4044:2: error: field within
'struct bt_hci_le_cs_step_data_mode_1'
is less aligned than 'union bt_hci_le_cs_step_data_mode_1::
(include/zephyr/bluetooth/hci_types.h:4044:2)' and is usually due to
'struct bt_hci_le_cs_step_data_mode_1' being packed, which can lead
to unaligned accesses [-Werror,-Wunaligned-access]
```
and similar issues for other CS-specific types containing
unions
Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
Update hal_nordic to get a fix in the definition of
nrf_cache_data_unit_validity_check()
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The pin mapping documented for I2C0 and I2C1 did not match actual
pinctrl definitions. Update the documentation to reflect correct pins
and add missing SPI and RGB LED mappings.
Signed-off-by: Karol Werner <karol@ppkt.eu>
- add some necessary static parameter for pit instances
- Enable counter_basic_api case by using pit0 instance
- Test counter_basic_api passed
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
correct flash_config.c file for different flash varient
fix spelling error across board files
update boards/deprecated.cmake to help older release support
Signed-off-by: Tarang Patel <tarang3399.patel@gmail.com>
In order to comply to NIST SP800-90B, the STM32 RNG should set its
registers as documented in Application Note AN4230 (Rev12, Table 3) [1].
To that effect, some values have been modified to match the table, and some
have been added.
For STM32H7R/S and WBA, configure the RNG as per configuration C of the
Reference Manual since the NSCR register is not available yet (internal
issues 221082 and 221083).
[1]: https://www.st.com/resource/en/application_note/dm00073853.pdf
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Set the content of the noise source control register if the corresponding
property is set in device tree.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
STM32L4 was using different LL functions from the other series.
With the latest HAL update, the usual functions are now defined, so
the L4-specific code can now be removed.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Some STM32 series need to configure the RNG source noise control register
for NIST SP800-90B compliance.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Remove the explicit setting of `CONFIG_HEAP_MEM_POOL_SIZE` from NSOS
samples, letting the build system construct the heap size from Kconfig
options.
Signed-off-by: Jordan Yates <jordan@embeint.com>
DNS queries using native posix can return multiple results. Add a
relatively large default to pre-empt failures due to the query being
too successful.
Extra RAM usage can be ignored since NSOS sockets can only exist on
native posix, which has essentially infinite RAM.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Fix inconsistencies in the QBV (IEEE 802.1Qbv Time-Aware Shaper) shell
command documentation and help messages:
1. Add missing "net qbv" command documentation to net_shell.rst
2. Correct command examples in help text - add missing "net" prefix
to "qbv set_gc" commands
3. Fix command usage descriptions for set_config and set_gc to match
actual command names
This ensures users see correct command syntax in both documentation
and interactive help.
Signed-off-by: Qiang Zhao <qiang.zhao@nxp.com>
mbox_msg::data is a const pointer, but ipm_callback_t expects a
volatile void * payload. Passing the mailbox payload through the
IPM callback was triggering compiler warnings about discarded
qualifiers.
Convert the mailbox payload pointer to the IPM callback payload
type via a uintptr_t round-trip to avoid -Wdiscarded-qualifiers
or -Wcast-qual noise without changing the runtime behavior.
fix:https://github.com/zephyrproject-rtos/zephyr/issues/102057
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
When building with clang it warns about self-assignment in the
bluetooth.classic.sdp_s test:
tests/bluetooth/classic/sdp_s/src/sdp_server.c:258:5: error: explicitly
assigning value of variable of type 'const struct shell *' to itself
[-Werror,-Wself-assign]
258 | sh = sh;
| ~~ ^ ~~
tests/bluetooth/classic/sdp_s/src/sdp_server.c:277:5: error: explicitly
assigning value of variable of type 'const struct shell *' to itself
[-Werror,-Wself-assign]
277 | sh = sh;
| ~~ ^ ~~
tests/bluetooth/classic/sdp_s/src/sdp_server.c:290:5: error: explicitly
assigning value of variable of type 'const struct shell *' to itself
[-Werror,-Wself-assign]
290 | sh = sh;
| ~~ ^ ~~
tests/bluetooth/classic/sdp_s/src/sdp_server.c:368:5: error: explicitly
assigning value of variable of type 'const struct shell *' to itself
[-Werror,-Wself-assign]
368 | sh = sh;
| ~~ ^ ~~
4 errors generated.
The "sh" variable is used later in the functions.
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
When building with clang it warns about self-assignment in these tests:
* net.icmpv6
* net.shell
* net.arp
* net.tcp
* net.ip_addr
* net.6lo
* net.icmpv4
* net.udp
Example:
error: explicitly assigning value of variable of type
'struct net_udp_context *' to itself [-Werror,-Wself-assign]
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Since the latest hal_renesas has updated the I2C Controller config
to build the IIC Controller source. Without this update, many
current PRs on mainstream which has the update for hal_renesas
revision will fail.
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
numaker_usbd_ep_fifo_copy_to_user() never reports errors and always
returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
numaker_usbd_ep_fifo_copy_from_user() never reports errors and
always returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Avoid calling vcp_vol_ctlr_discover_complete() with a NULL
controller pointer when lookup fails during AICS discovery.
The vcp_vol_ctlr_discover_complete() helper dereferences the
controller unconditionally, which could otherwise lead to a NULL
pointer dereference.
Fix by returning early if the controller lookup fails.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Avoid calling micp_mic_ctlr_discover_complete() with a NULL
controller pointer when lookup fails during AICS discovery.
The micp_mic_ctlr_discover_complete() helper dereferences the
controller unconditionally, which could otherwise lead to a NULL
pointer dereference.
Fix by returning early if the controller lookup fails.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Enable TRNG node and select it as zephyr,entropy for the API test.
Configure CK48M source via RCU DT properties.
Signed-off-by: Aleksandr Senin <al@meshium.net>
Add DT properties to select CK48M source for GD32 RCU.
Apply CK48M source selection during early SoC init.
Signed-off-by: Aleksandr Senin <al@meshium.net>
Make global variables static in the HFP AG sample to improve
encapsulation and avoid potential symbol conflicts.
Change the following variables from global to static scope:
- hfp_ag
- hfp_ag_call
- discover_work
- call_connect_work
- call_disconnect_work
- call_remote_ringing_work
- call_remote_accept_work
These variables are only used within main.c and do not need to be
externally visible.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add PCM and CODEC support for voice streaming in the HFP AG sample.
Implement PCM interface to handle voice data transmission between the
Bluetooth controller and the application using I2S driver.
Implement CODEC interface to handle voice playback and capture using
I2S and audio codec drivers.
Add bidirectional voice streaming: capture voice from CODEC and
transmit through PCM when SCO connection is established, and receive
voice from PCM and playback through CODEC.
Initialize PCM and CODEC interfaces based on the SCO air mode (CVSD or
mSBC) when SCO connection is established.
Add codec negotiation callbacks to support codec selection.
Enable codec negotiation and mSBC codec support for mimxrt1170_evk
board.
Add configuration options for audio transfer interval, buffer counts,
and thread priorities for both PCM and CODEC RX threads.
Update documentation with voice streaming topology diagram and running
instructions.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add the MAX31331 RTC device to the build_all RTC test suite. This ensures
it compiles on all supported platforms without requiring actual hardware.
Signed-off-by: Francis Roi Manabat <francisroi.manabat@analog.com>
Add MAX31331 RTC driver, an ultra-low-power real-time clock (RTC)
that provides timekeeping with
extremely low current consumption (65 nA).
Signed-off-by: Francis Roi Manabat <francisroi.manabat@analog.com>
Added documentation for doc/releases/migration-guide-4.4.rst
in reference with the changes on ili9xxx and ili9341
controllers
Signed-off-by: Nicolas Moreno <niko722795@gmail.com>
Replaced display-controller.yaml with lcd-controller.yaml
Deleted pixel format property, replacing it with the
property on lcd-controller.yaml. Replace ILI9XXX RGB macro
with PANEL RGB macro. Also, added condition to verify pixel
format is RGB565, BRG565 or RGB888, otherwise it will show error
Replaced <zephyr/dt-bindings/display/ili9xxx.h> with
<zephyr/dt-bindings/display/panel.h> and
ILI9XXX_PIXEL with PANEL_PIXEL in some Devicetrees
and files that contained both elements. Fixed some
script sintax. Deleted drivers/display/display_ili9xxx.c
Signed-off-by: Nicolas Moreno <niko722795@gmail.com>
ILI9341 is not deploying correctly the display sample.
The screen looks mirrored vertically and the color
doesn't match with the sequence expected. To fix it,
change the Memory Access Control configuration data.
Signed-off-by: Nicolas Moreno <niko722795@gmail.com>
Add Doxygen guidelines to help maintain code documentation consistency
across the project in particular for constructs or commands that are Zephyr
specific, such as properly documenting API symbols that are gated by
Kconfig.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Espressif RISC-V chips (ESP32-C3, ESP32-C6, etc.) with PMP enabled
use dynamic PMP mode (CONFIG_PMP_NO_LOCK_GLOBAL). In this mode,
null pointer dereference to address 0 causes a bus hang instead
of generating a clean exception, since address 0 is outside any
valid memory region and there's no PMP entry protecting it.
Use k_panic() instead, which reliably triggers the coredump path
on all Espressif chips.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The Twister netif:eth was missing on the STM32F207ZG board,
and hence it was not built against net tests/samples
Additionally,sort the supported peripherals in alphabetical order.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
If peer lowered its receive window and advertised zero-window length,
TCP stack would pause the retransmission timer until non-empty window is
advertised again. This however could trigger an assertion, that verified
that the retransmission timer is running whenever there is data to
transmit. Add an exception to the assertion for the zero-window case.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add _openocd_cmd() helper method to reduce code duplication when
building openocd command lists. Consolidate do_flash, do_flash_elf,
and do_flash_bin into a single do_flash method using match statement
on image_type parameter.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Configure ESP32 boards to use OpenOCD for flashing with BIN files.
The --flash-address argument is combined with its value to avoid
YAML parsing issues where hex values like 0x0 are parsed as integers.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add --use-bin and --flash-address arguments to allow flashing BIN
files at a specific address. This is needed for targets like ESP32
where HEX files contain virtual addresses (due to MMU mapping)
rather than physical flash addresses.
The new do_flash_bin() method uses the load command with the BIN
file path and flash address, similar to how ELF flashing works.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Enable HCI_NXP_SET_CAL_DATA and HCI_NXP_SET_CAL_DATA_ANNEX100 by
default for NW612 and IW416 modules to ensure proper calibration
during HCI initialization.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Repalce the native_posix by native_sim in tests and reformat platform
list to allow twister to correct recognize the platforms.
Fixes#101300
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Initial porting of nRF7120 to zephyr requires support for a number of
tests that are run as part of the CI. This commit adds the support.
Signed-off-by: Robert Robinson <robert.robinson@nordicsemi.no>
This commit adds initial support for non secure nRF7120 targets in
zephyr.
There are important limitations, such as:
- The hardware Crypto accelerator is not supported and thus the non
secure target is NOT secure for production applications in upstream
Zephyr.
- The BL2 is not supported, so no DFU is supported with this support
Signed-off-by: Robert Robinson <robert.robinson@nordicsemi.no>
Rename nRF7120PDK to nRF7120DK to align with upstream zephyr
Align to nrf4.0
Add tfm_platform_user_memory_ranges.h files
Signed-off-by: Robert Robinson <robert.robinson@nordicsemi.no>
Generate an rst document with an `Examples` section
from the sample nodes written in the examples of the
binding.
Signed-off-by: James Roy <rruuaanng@outlook.com>
Introduce a `language` parameter in `to_code_block()` for syntax
highlighting support (default: None).
Signed-off-by: James Roy <rruuaanng@outlook.com>
When qer is S2B1v1 or S2B1v4, reading Status Register
1 and Status Register 2 requires different opcodes,
and writing Status Register 1/2 requires two bytes in a
single write. Add the Read Status Register 2 command
sequence to the LUT used by the quad-enable function,
and ensure the write operation sends two bytes (SR1|SR2)
when setting the QE bit.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Update EDMA device tree nodes for NXP MCXE31B platforms to align
with the unified EDMA driver implementation.
Signed-off-by: Qiang Zhang <qiang.zhang_6@nxp.com>
The DMA_MCUX_EDMA_V5 configuration option has been removed and replaced
with DMA_MCUX_EDMA_V4, as both versions share the same register layout
and can use the same driver implementation.
Key changes:
- Remove CONFIG_DMA_MCUX_EDMA_V5 Kconfig option
- Replace DMA_MCUX_EDMA_V5 conditionals with DMA_MCUX_EDMA_V4
- Remove DMAx_Type typedef, use DMA_Type directly
- Update EDMA_HW_TCD macros for V4 to use HAL-provided accessor macros
- Add DMA_MCUX_EDMA_DMAMUX Kconfig option to control DMAMUX support
based on device tree property
- Update device tree binding to add has-dmamux property
- Update HAL driver selection to use DMA_MCUX_EDMA_DMAMUX instead of
DMA_MCUX_EDMA for DMAMUX component
- Add SOC_SERIES_MCXE31X to DMA_MCUX_TEST_SLOT_START configuration
- Calculate DMA_TCD_ALIGN_SIZE from edma_tcd_t structure size
Signed-off-by: Qiang Zhang <qiang.zhang_6@nxp.com>
Add support for boards to specify flash_before in their board YAML files,
which is then used by pytest and shell harnesses. This is needed for
Synopsys ARC development boards (hsdk, hsdk/arc_hsdk/2cores, hsdk4xd
and iotdk) where the USB serial port disconnects during flashing.
Signed-off-by: Mohamed Moawad <moawad@synopsys.com>
The ARC IoT SoC (used on iotdk board) has a hardware limitation where
entering CPU sleep mode causes some peripherals (e.g., UART) to lose
power, preventing the board from waking up via peripheral interrupts.
Add a configurable custom CPU idle option (CONFIG_ARC_IOT_CUSTOM_CPU_IDLE)
that enables interrupts without executing the sleep instruction. This
allows the system to remain responsive while keeping peripherals powered.
The option defaults to disabled (n) to preserve normal CPU sleep behavior
for most use cases. Tests that require continuous UART operation during
idle (pytest/shell harnesses) can enable it via platform-specific
extra_configs.
This approach allows timer-based idle to work correctly by default while
providing a workaround for tests that need UART retention.
Signed-off-by: Mohamed Moawad <moawad@synopsys.com>
As described in RFC5227 ch. 2.1.1 ARP Probes are broadcasted.
ARP requests not being broadcasted should not be detected as
ARP Probes.
Signed-off-by: Andreas Huber <andreas.huber@sautergroup.com>
Make sure that if the connection is closed but we still received
a SYN packet, we do not try to access already closed connection.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
When building for several cores of the same system it can be hard to
identify which build is currently running.
This addition helps disambiguate the logs.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
The domain name was always set to NULL. This adds a Kconfig
that will enable setting the domain name and sets the domain
name if the config is enabled.
Signed-off-by: Tim Knodel <tbk@google.com>
A new error code FS_MGMT_ERR_FILE_CLOSE_FAILED is returned when
closing a file fails. This is done on write or close operations - read
operations remain unchecked.
Signed-off-by: Samuel Kleiser <s.kleiser@vega.com>
The SSI core requires special handling of packets that are supposed
to contain only data (no instruction and data phases):
- for TX packets, the first data frame needs to be sent as the address
(the instruction and address cannot be both set to zero length for TX,
otherwise the transfer will not be performed correctly)
- for RX packets, a dummy write to the data register (DR) is needed to
start the transfer.
Implement the above in the function that starts a packet transfer.
Rename also the `packet_frames` variable there to `data_frames` to avoid
confusion.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
FIFO handling functions in the driver are supplied with a `packet`
parameter that is in fact not used anymore. Remove it to simplify
matters.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Some flash negative tests were validating multiple error conditions
in a single API call, such as combining unaligned offsets with
oversized operations.
This makes it unclear which condition is actually being tested and
can lead to fragile tests if drivers change the order of validation.
Split these cases so that each call checks a single expected error
condition, improving test clarity and robustness.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Correct set_frmival in order to avoid having un-optimized
frmival selection due to rounded values.
Computation has been done in usec, leading to incorrect
frmival selection due to value being rounded internally.
As an example, code was selecting 1/60 from sensor then 4 time
frame drop by DCMI instead of selecting directly 1/15 from
sensor.
Use msec instead to hide those rounding issue and avoid
as well 64bit variables.
This also put the first video_frmival_nsec outside of the
loop to avoid having to do the processing everytime.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Current version as a fix for something that is currently causing
problems in CI and dependabot is failing too, update this one manually
for now.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Update MAINTAINERS.yml to reflect the reorganization of Bluetooth
Classic documentation into subdirectories. Replace specific file
references with directory paths to cover all files within the
classic/ subdirectories for both shell and API documentation.
Changes include:
- Replace specific a2dp.rst file reference with classic/ directory
in Bluetooth Classic section
- Add doc/connectivity/bluetooth/api/classic/ to Bluetooth Classic
- Add doc/connectivity/bluetooth/api/classic/ to Bluetooth Host
- Replace specific a2dp.rst with classic/ directory in Bluetooth Host
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Reorganize Bluetooth Classic API documentation by moving existing files
(SDP, RFCOMM, A2DP, HFP) into a new `classic/` subdirectory and adding
new documentation files for L2CAP BR/EDR, AVRCP, GOEP, and BIP.
Changes include:
- Move existing Classic API docs to subdirectory `classic/`
- Add new L2CAP BR/EDR documentation
- Add AVRCP, GOEP, and BIP API reference documentation
- Update HFP documentation to include both HFP Unit and HFP-AG sections
- Update index.rst to reflect new directory structure
- Add Doxygen group documentation to AVRCP header
- Update AVRCP Cover Art to be a subgroup of AVRCP
- Fix L2CAP BR/EDR Doxygen group name and description
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
drivers: sensor: bosch: bma4xx: Update RTIO callbacks with result argument
Commit bc8d66d538 introduced
a result argument to some RTIO callback handlers.
Update for the BMA4XX sensor.
Signed-off-by: Matin Lotfaliei <matinlotfali@gmail.com>
Avoid accessing request fields before validating input arguments in
coap_client_req().
The request path length is now checked only after validating the
request pointer, preventing a potential NULL pointer dereference.
No functional change intended.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Add a new API to look up a memory region's index using its DeviceTree
node name. This allows callers to identify specific regions within the
internal regions array.
Includes unit tests for successful lookups and error handling for
non-existent names.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Some tests depend on the ram board property to determine whether or not
to run, like LLEXT tests. Set the ram property for this board.
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
Some tests depend on the ram board property to determine whether or not
to run, like LLEXT tests. Set the ram property for this board.
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
Ensure pointers are validated before dereferencing them in
set_arbitrate_interval() and set_interval().
This avoids accessing sensor or connection fields prior to
validation and makes the code safe even when assertions are
disabled.
No functional change intended.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Rename the lora_basics_modem backend directory to lora-basics-modem
for consistency with the module naming convention.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Rename drivers/lora/loramac_node to drivers/lora/loramac-node to align
with the module naming convention (modules/loramac-node).
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Multiple individual Kconfig files for NXP clock control drivers are
consolidated into a single Kconfig.nxp file. This improves
maintainability by grouping all NXP-related clock control
configurations in one location.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
This DTS uses absolute GPIO numbers for pins on
gpio1 rather than relative pin numbers. This causes
an abort on boot when led1, neopixel_pwr, or mipi_dbi
is enabled.
Signed-off-by: Peter Hoddie <peter@moddable.com>
npcx_i3c_do_ccc() dereferences the device pointer before checking it
against NULL, making the defensive check ineffective.
Remove the redundant check.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
- Add an overlay to enable mpu6050 sensor sample.
- Contains configurations for I2C bus and Clock
Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
- Add an overlay to enable bme280 sensor sample.
- Contains configurations for I2C bus and Clock
Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
De-initialize the SCB when switching between I2C master
and slave modes
Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
- Add pin control definitions with proper open-drain drive mode
for SCL/SDA in cy8cproto_041tp-pinctrl.dtsi.
- Add I2C node and clock configuration to cy8cproto_041tp.dts.
Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Include package-level I/O mapping for I2C pins
in psoc4100tp.64-tqfp.dtsi
Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Implement I2C configure() handling in the driver
to apply speed settings and default hardware options.
Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
boards: vicharak: shrike_lite: Add full name to the board.yml
Add the missing `full_name` field for the shrike_lite board added in
3f3b528997
Signed-off-by: Matin Lotfaliei <matinlotfali@gmail.com>
Verify that the EEPROM is large enough to hold the test write buffer
before executing the test.
This makes the test assumptions explicit and avoids unused variable
in API test.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Trim the sdk list down to arm and riscv64, should be good enough for
testing the buildsystem and saves some disk space.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Remove the unused variable tid_int and lock. Also, match the other drivers
by dropping the back reference to the device structure and just pass
in the dev for the thread and dereference the context from there.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
This is a leftover from the past that is no more required and that should
be removed in order to prepare for the next Mbed TLS release.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The group display names don't work with dnf5.
As displaynames can depend on the locale and are not unique
dnf5 only supports the group identifiers.
Distributions with dnf4 like RHEL<=10, Fedora<41, and CentOS stream
shouldn't have any issues with the group id, but have not been tested.
Alternatives considered: use the @-sytax for groups introduced in dnf5,
but using the group command makes it more clear that package groups are
installed.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Add include/zephyr/bluetooth/sbc.h and subsys/bluetooth/lib/sbc.c to
the libsbc module maintainer entry to ensure proper coverage of SBC
codec related files.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Use PSA Crypto API for SHA-1 computation instead of legacy Mbed TLS crypto.
The latter is going to be removed soon.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Remove optional use of legacy Mbed TLS crypto in favor of the already
existing PSA Crypto API alternative. This is required in order to jump
to the next version of Mbed TLS (i.e. 4.0) where all this legacy crypto
support is no more available.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
If we have more than one IP on an interface we should choose the IP
corresponding to the same network as the target IP.
Signed-off-by: Andreas Huber <andreas.huber@sautergroup.com>
The k_timer API requires CONFIG_SYS_CLOCK_EXISTS to be enabled,
as timer.c is only compiled when this config is set. Guard the
timer-based k_sleep() implementation and fall back to the previous
busy-wait approach when no system clock exists.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The reg property on the NPU node indicated a base address of 0x580C0000 and
size of 4 KiB, neither of which are correct (in fact, this base address is
the one of the OTGPHYC2).
Set the reg property to the correct values: the NPU instance is mapped at
0x580E0000 and occupies 128 KiB of address space.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add test for PMP_SOC_REGION_DEFINE macro that allows SoCs to define
custom PMP regions via iterable sections.
The test verifies:
- Regions defined with PMP_SOC_REGION_DEFINE are programmed into PMP
registers during z_riscv_pmp_init()
- SoC regions are placed in global PMP slots (first half of entries)
- STRUCT_SECTION_FOREACH correctly iterates over defined regions
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add linker script support for CONFIG_USERSPACE:
- MPU alignment macros for PMP granularity
- User stacks section in noinit area
- Application shared memory partitions
- Kernel object sections (text, rom, data, priv-stacks)
- ROM region size symbol for PMP configuration
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add device tree node for ESP32-C6 SoC ROM at 0x40000000.
This 320KB ROM contains libc and utility functions used by
the application. PMP protection is configured separately
via PMP_SOC_REGION_DEFINE in pmp_regions.c.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add infrastructure for SoCs to define additional PMP regions
that need protection beyond the standard ROM region. This uses
iterable sections to collect region definitions at link time.
The PMP_SOC_REGION_DEFINE macro allows SoCs to register memory
regions with specific permissions. These regions become global
PMP entries shared between M-mode and U-mode.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
llext aligns and rounds up memory regions to satisfy MPU requirements,
which can waste significant memory by relocating read-only regions,
with power-of-two alignment on some architectures. However, these
MPU-aligned regions are never actually used by the MPU unless
userspace (CONFIG_USERSPACE) is enabled.
Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
rework litex gpio driver.
It is now also supported to change direction.
now uses the reg names to detect if what modes the gpio
controller supports.
use the reg names directly from litex.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
add test for DT_ANY_INST_REG_HAS_NAME_STATUS_OKAY
and DT_ALL_INST_REG_HAS_NAME_STATUS_OKAY macros.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
add DT_ANY_INST_REG_HAS_NAME_STATUS_OKAY
and DT_ALL_INST_REG_HAS_NAME_STATUS_OKAY
to check if any instance has a register with a specific
name.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add PWM shell command for getting the number of cycles per second for a
given PWM controller/channel.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
As reported in #101190, running adc_sequence sample on stm32f103c8 with 8
ADC channels causes all subsequent conversions after the first to be one
channel shifted. This is because writing to CR2 with ADON=1 and no other
changes triggers a conversion (which is why the bug happens on all
but the first sequence). Adding this check will ensure that CR2 is only
written when the DMA bit changes.
Signed-off-by: Benedek Kupper <kupper.benedek@gmail.com>
This commit provides information regarding building and executing stress
tests for LAN8651 based 10BASE T1S ethernet connection.
The LAN8651 is connected to nucleo_g474re board.
Signed-off-by: Lukasz Majewski <lukma@nabladev.com>
This commit provides device tree description of the LAN8651 T1S
device to work with echo_server sample program.
Signed-off-by: Lukasz Majewski <lukma@nabladev.com>
This commit provides device tree description of the LAN8651
T1S device to work with zperf performance test program.
Signed-off-by: Lukasz Majewski <lukma@nabladev.com>
Add ethernet driver compatibles to the migration guide that have support
for MAC address configuration.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Replace file references with compatibles, for users to refer to the
migration guide if it has any impact on out-of-tree boards.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Follow coding guidelines rule 78:
A full expression containing an increment (++) or decrement (–) operator
should have no other potential side effects other than that caused by the
increment or decrement operator
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Upcoming MDK will make nrf52 errata check functions exist only for
nRF52 and therefore the code will no longer compile for nRF5340. Replace
nrf52 errata checks with new NRF_ERRATA_DYNAMIC_CHECK().
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Fix regression introduced in commit ddaeb13 which removed the
'buffer' function parameter from the dynamic endpoint callback
function signature but did not update the http_server sample
accordingly.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Fix a typo in several filesystem sample board overlay files where
'parition' was used instead of 'partition'.
This is a spelling-only change with no functional impact.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The mdns_responder sample has a simple TCP echo server running, however
the accept() function errors were ignored, making the server defunct in
case server socket started to report errors (for example when network
went down).
Update the sample to restart the echo server in case of accept() errors
to make the sample more reliable.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
If the underlying listening TCP context reported an error, it's no
longer usable, therefore accept() call for such a socket should report
an error as well, otherwise it may block indefinitely.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case network interface goes down, all underlying TCP contexts are
being dereferenced, however they are not released until application
dereferences them as well (i.e. closed the socket). If the application
does not do so however timely, and network interface goes down again,
the TCP context would still be present on the active contexts list and
could've been dereferenced for the second time.
Fix this by checking the context state before dereferencing it on the
stack behalf. Non-listening TCP context are being set to CLOSED state
upon dereferencing. For the listening contexts, the TCP context has
only one ref from the application side, so use the `accept_cb` pointer
value as an indicator that the accept callback, indicating an error,
has already been called for the context.
Additionally, add a mutex lock when releasing listening context on
network down even, to avoid potential races with yet unprocessed
incoming packets.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
75ef6392 removed the only call to coap_client_init_request() where
reconstruct==true. All remaining calls have reconstruct==false.
This commit removes the parameter.
Signed-off-by: Sam Friedman <sam@golioth.io>
Remove unused IW612 part.
update IW610 FW version to 5.p86
update RW612 FW version to 6.p50
update IW61x FW version to p27.8
update IW416 FW version to p153.8
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Make a in-kernel copy of 'cfg' parameter before passing the struct
to kernel z_impl_dai_config_set() implementation. This ensures
user-space will not have access to the object when kernel part
of the syscall is running.
Also add separate handling for the case where bespoke configuration
object is NULL. While no current driver works without a bespoke
configuration, this is not forbidden in the API and the generic syscall
handler should not assume a bespoke object is passed.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
dai_ssp_get_properties() can return NULL if there are no properties
defined for the device. Handle this case correctly in ssp driver's
dai_ssp_get_properties_copy() by returning -ENOENT in this case.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Handle the case if driver is not implementing get_properties_copy().
Document the behaviour and add a note that the method is optional and
users need to be handle the case that not all drivers will have this
method defined.
Also add documentation on error codes. Drivers should use -ENOENT if
no properties are defined for the device. This matches behaviour of
dai_get_properties() returning NULL if there are no properties.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The lfclk is required for bluetooth, so enable it by default for the
radio core. Applications are only affected if they enable
CLOCK_CONTROL, in which case either only the lfclk or all clocks are
enabled, so enabling lfclk alone is the lowest common denominator.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Replace some manually-defined DT_COMPAT_<> Kconfig macro variables with
their automatically generated counterparts. In most cases, this is
straightforward as the manually defined macro is named identically to the
one generated by the build system.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Adds a check that snippets are correctly applied to named boards
with the correct board revision
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
For non-STA mode the vif level authorized flag is unused, simply allow
all group traffic and for unicast traffic check respective peer status.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Test automation framework fails if there are any error prints, and we
had seen issues with networking that sends packets to the driver before
the assocation is up (either not checking dormant status or in a window
where dormant status is being updated).
Add a workaround to suppress the print till the issue root cause is
fixed.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Fix pointer dereferencing by accessing the pointer only
after initialization, preventing fault exceptions.
Signed-off-by: Triveni Danda <triveni.danda@nordicsemi.no>
Add an identifier to P2P scan request. RPU can use this to
differentiate it from regular scan requests and suppress
11b rates.
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Add cookie event callbacks to track RoC and cancel-RoC
requests and its responses from firmware.
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Add per-peer authorized parameter. Port authorization command
from supplicant will set this flag and will be used by driver
to allow or nor allow data traffic.
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
We now support a single MbedTLS shim for hostap, so, this extra check is
not needed, we can always use DH5 groups from Mbedtls.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Increase required heap and stack size for P2P. More stack was required
during WPS negotiation.
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
For frames like Probe Requests, there is no match criterion.
Re-arrange the checks to support registering of frames without
providing any matching info.
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
For frames sent down by supplicant in station mode, inform RPU
to allow off-channel transmission. This is needed for sending
P2P probe responses.
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Use `ssids` instead of `filter_ssids` to set the SSID in probe
requests. `filter_ssids` are to filter scan results to include
only the specified SSIDs.
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Align with native_simulator's upstream main
215ee859eee5e49dc09eda8f17a956ee7318caf2
Which includes:
215ee85: native timer_model: Fix printf format specifier warnings w
debug logs
Signed-off-by: Nakul Chauhan <nakulchauhan111@gmail.com>
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The can_nrf driver uses defines from soc.h which happened to be
included by some other header when building for cpuapp, but not
when building for cpuflpr. Include soc.h explicitly.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The hfxo and lfxo should only be enabled for the cpuapp and cpurad
as these cores are the only ones which have access to the clock.
Leaving it enabled will break cpuppr and cpuflpr builds if
CONFIG_CLOCK_CONTROL is enabled as the drivers are not compatible.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
rtc_ds3231_alarm_set_callback() takes an unsigned alarm id, making
the negative value check impossible.
The id < 0 condition is therefore dead code and can never be true.
Remove it and keep only the upper bound check.
No functional change intended.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Preemptable and preemptible are both commonly used spellings. Infineon
had chosen preemptable as the spelling and lead to CI failures when
using struct members in the PDL. Removing the check in Zephyr allows
for flexibility in spellings of this word.
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
Hardware map file generation should at least get you part way now with
Infineon boards with the Cypress derived KitProg3.
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
- Update clk-source to 1 for all flexcan instances because
we need to use sysclk as PE clock source and reduce customer's
confused when configuring flexcan clock
If user use a fast external osc and want to choose another choice,
user can change it in overlay files
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Document the breaking change in the NXP i.MX GPT counter driver that
introduces a devicetree "run-mode" property and changes the default
from hardcoded free-run to restart mode.
Out-of-tree boards must add `run-mode = "free-run";` to their GPT
devicetree nodes to preserve previous behavior.
This change aligns GPT configuration with the LPTMR driver, providing
consistency across NXP counter drivers in using devicetree properties
for hardware behavior control.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Add a "run-mode" devicetree property to the NXP i.MX GPT counter
driver to control counter behavior on compare events.
The property supports two modes:
- "restart": Counter resets to 0 when reaching Compare Channel 1 value
- "free-run": Counter continues counting without reset
This change makes the GPT run mode configurable per device instance
instead of being hardcoded. The driver now derives the enableFreeRun
setting from devicetree, defaulting to "restart" mode.
This update aligns the GPT driver configuration approach with the
NXP LPTMR counter driver, which also uses devicetree properties
for runtime behavior configuration.
This provides consistency across NXP counter drivers in how hardware
behavior is controlled through devicetree.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Add "can dump <device>" subcommand for dumping all CAN RX frames of a given
CAN controller.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
xt-clang seems to generate some memory access patterns which
result in the simulator accessing incorrect memory and/or
messing with cached TLB entries when spinlock validation
is enabled. Not exactly sure what's going on here due to
the core of the simulator is built on top of pre-built
binaries provided by the toolchain without any sources so
debugging would be nearly impossible. But at least we have
an easy workaround by disabling spin lock validation.
Fixes#100885
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Although we have the three layers, SWDP driver API, DAP stack, and USB
backend, to implement a debug probe, there is no way for the user to
instantiate the DAP context, which would allow it to be used with
different backends or to change the configuration at runtime.
The Debug Access Port (DAP) is an implementation of the ARM Debug
Interface (ADI) that is typically integrated into SoC.
With all three layers, we implement a link to the DAP on the SoC.
Let's call it Zephyr DAP Link and use the dap_link prefix. There is also
a MBED DAPLink project that implements similar functionality, but using
a different name would likely cause more confusion.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Move the LUT to convert from simplified format to request packet
expected by the target, and the helper to calculate parity bits to
common header, so that they could be used by other drivers.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Although the DAP subsystem is the only user in the tree, yet, we may have
other subsystems, libraries, or simple samples that could use this API
in the future.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Added arduino_serial and arduino_header node labels to EK-RA4L1 device
tree board definition, allowing compatible shield boards to be used.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
If a second UART was not configured in the hardware map, then skip
the testcase instead of failing.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
add me to the i2c collaborators, that we are going to
have at least 2 reviewers for that area.
I wrote the drivers/i2c/i2c_litex_litei2c.c driver and
the acording i2c core https://github.com/litex-hub/litei2c
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
print_voltage() always returned success even when sensor operations
failed, making the error check in main() dead code.
Return the actual error codes so failures are correctly propagated
to the caller.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
ETHERNET_CONFIG_TYPE_FILTER is not supported
in the set_config, therefore remove
ETHERNET_HW_FILTERING from the
ethernet_hw_caps of this driver.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
the enum ethernet_config_type for the
multicast filter is ETHERNET_CONFIG_TYPE_FILTER.
ETHERNET_HW_FILTERING is only the according
ethernet_hw_caps.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Set extended advertising setting in ipm_stm32wb.c with
stm32wb_set_stack_options function call for the BLE stack
Options flags initialization according to the
zephyr Kconfig options.
Signed-off-by: Eric Mechin <eric.mechin@st.com>
Add CRD40L50 board support to the CS40L5x sample application and update
documentation accordingly.
Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
Add support for the Cirrus Logic CRD40L50 demonstration board, which
features a CS40L5x haptics driver, AT25 SPI flash memory, status LEDs,
and a push button.
Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
Co-authored-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
intel_sha_set_resume_length_dw1() never reports errors
and always returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
intel_sha_set_ctl_enable() never reports errors
and always returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Change at_get_raw_string() return type from 'char *' to 'const char *'
to match at_get_string() and improve const-correctness. This function
returns read-only AT command response data that should not be modified.
- Update at_get_raw_string() signature in at.h and at.c
- Update return statement cast from 'char *' to 'const char *'
- Update local variables in hfp_hf.c to use 'const char *':
* bvra_handle: 'id' variable
* chld_handle: 'value' variable
* cnum_handle: 'alpha' and 'speed' variables
- Mark unused 'alpha' and 'speed' in cnum_handle with __maybe_unused
- Change NULL check style from '!id' to 'id == NULL' for consistency
This completes the const-correctness improvements started in the
previous commit for HFP HF AT command string handling.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add documentation for the Edge Impulse SDK Zephyr module to the external
modules section, including:
- Module overview describing the Edge Impulse ML development platform
- Integration instructions with west.yml manifest configuration
- West extension commands (ei-build, ei-deploy) for model deployment
- License information (BSD-3-Clause-Clear)
- References to official Edge Impulse documentation and tutorials
The Edge Impulse SDK module enables machine learning inference on Zephyr
devices by packaging the Edge Impulse SDK as a reusable Zephyr module
with west integration for streamlined ML model deployment workflows.
Signed-off-by: Eoin Jordan <eoin@edgeimpulse.com>
Remove CONFIG_BT_CTLR_ADVANCED_FEATURES from prj.conf. This option
only controls visibility of advanced features in menuconfig and is
not required by the sample. It also depends on BT_LL_SW_SPLIT which
is not available on all platforms (e.g., ESP32 uses a closed-source
controller blob).
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Set default values for BLE HCI buffer configuration that match
the ESP32 controller requirements:
- BT_BUF_ACL_RX_COUNT=24: Match controller's ACL buffer count
- BT_BUF_EVT_RX_COUNT=30: Match controller's event buffer count
Enable BT HCI node in device tree for all ESP32 SoCs that
support BLE.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Implement VS HCI commands for ESP32 BLE controllers:
- Read/Write TX power level with per-handle support
- Read version info (platform, variant, firmware version)
- Read supported commands and features
- Read static addresses from eFuse (C2/C6/H2)
- Read build info (controller version string)
For original ESP32, use the legacy esp_ble_tx_power_set/get API.
For newer variants (ESP32-S3, ESP32-C2, ESP32-C3, ESP32-C6, ESP32-H2),
use the enhanced API that supports per-connection power control.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add Espressif platform and variant IDs to hci_vs.h for ESP32 family
SoCs (ESP32, ESP32-S3, ESP32-C2, ESP32-C3, ESP32-C6, ESP32-H2).
Add Espressif Systems to vs_hw_platform() and vs_hw_variant()
functions in hci_core.c for proper vendor identification.
Use CONFIG_SOC_FAMILY guards in vs_hw_variant() to reduce flash
usage by only compiling variant strings for the active SoC family.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The target event handler i2c_mcux_target_transfer_cb() had a too high
cognitive complexity. Create a function for each event type to reduce
the complexity score.
Signed-off-by: Maximilian Werner <maximilian.werner96@gmail.com>
Add i2c target support to the i2c_mcux driver.
Add the frdm_mcxc242 board to i2c_target_api tests.
Signed-off-by: Maximilian Werner <maximilian.werner96@gmail.com>
Protect scmi_send_message_polling() with channel mutex to prevent
concurrent access with interrupt-driven transfers.
Without this fix, PM subsystem could send polling-mode messages
while an interrupt-mode transfer was in progress, corrupting the
shared channel state.
Fixes hang on i.MX943 during I2C initialization when PM attempted
to send power state notifications concurrently.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Enables hardware RX timestamping for the STM32 FDCAN driver by
leveraging the M_CAN timestamping interface.
Introduces a new `timestamp-counter` property in the device tree binding.
If `CONFIG_CAN_RX_TIMESTAMP` is enabled and this property is defined,
the driver configures the M_CAN Timestamp Select to use the
external timestamp counter value.
This allows linking a Zephyr Counter device to the FDCAN instance to
provide precise packet timing.
Signed-off-by: Igor Knippenberg <knippenberg@filics.eu>
Fix validation of AD length handling in the Bluetooth shell.
Reject zero-length AD fields before subtracting the AD type size.
The previous implementation compared an unsigned length
against zero after subtraction, making the error path
unreachable.
Signed-off-by: Om Srivastava <srivastavaom97714@gmail.com>
Document the OpenOCD version required for Zephyr thread
awareness and how to use CONFIG_DEBUG_THREAD_INFO.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
ESP32 OpenOCD uses $_TARGETNAME_0 instead of $_TARGETNAME.
Set the correct target handle to enable RTOS awareness.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Change ESP_RTOS from none to Zephyr in all ESP32 board
openocd.cfg files to enable thread awareness during debug.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Remove the --no-init flag to fix west debugserver on boards
with built-in USB JTAG (ESP32-C6, ESP32-H2).
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
1. Fixes an issue in UMAC where valid P2P devices were filtered
during a connect scan due to strict SSID length matching.
2. P2P NOA Bug Fix.
3. Linker issue fix in Raw modes.
4. LMAC BIMG offset change.
5. RPU Version update from 1.2.14.6 to 1.2.14.7.
6. Display scan fix for WPA3 HNP and H2E.
Signed-off-by: Karun Kumar Eagalapati <karun.kumar@nordicsemi.no>
stm32h7rsxx bumps to STM32CubeH7RS version 1.3.0.
stm32l4xx bumps to STM32CubeL4 version 1.18.2.
stm32l5xx bumps to STM32CubeL5 version 1.6.0.
stm32n6xx bumps to STM32CubeN6 version 1.3.0.
Update dma_stm32.h to sync with HAL new function prototype for
LL_DMA_IsActiveFlag_HT*() functions that now expect a const pointer
on STM32L4X series. While at it, also update the STM32MP13X series
that expects the same prototypes.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
I2C controller on rpi_pico2 boards were getting misconfigured due to
`CONFIG_I2C_DW_CLOCK_SPEED` not getting set properly. This change fixes
the value for this Kconfig symbol to the correct clock speed (clk_peri)
that is used by I2C controller.
Signed-off-by: Dev Joshi <devbhave@qti.qualcomm.com>
Some libraries like libcoap make use of mbedtls_version_get_number
which is enabled by MBEDTLS_VERSION_C.
We add a config option to be able to selectively enable it.
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
This commit adds the MikroE CAN FD 6 Click shield under the same
assignees as other of the CAN driver based shields.
Signed-off-by: Stephan Linz <linz@li-pro.net>
Add shield definition for the MikroElektronika CAN FD 6 Click shield,
an mikroBUS compatible evaluation module for the TI TCAN4x5x CAN
controller series.
Signed-off-by: Stephan Linz <linz@li-pro.net>
Add support for High-g data in FIFO. The HG data wiil be marked in
FIFO with LSM6DSV80X_XL_HG_TAG.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
This driver is currently only supporting the polling-mode read_and_decode
APIs (both blocking and non-blocking).
The driver implements a chip_api structure which has to be used to
provide device specific callbacks. The only lsm6dsvxxx family device
currently supported is lsm6dsv320x.
More information about LSM6DSV16X:
https://www.st.com/resource/en/datasheet/lsm6dsv320x.pdf
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The Device Tree property names that are common to lsm6dsv16x and
lsm6dsv32x drivers are now prefixed with LSM6DSVXXX_ (and not
LSM6DSV16X_) just for the sake of clarity.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
drivers/sensor/adi/max30210/max30210_trigger.c:144:3: error: label followed
by a declaration is a C23 extension [-Werror,-Wc23-extensions]
144 | uint8_t temp_hi_setup[2];
| ^
drivers/sensor/adi/max30210/max30210_trigger.c:175:3: error: label followed
by a declaration is a C23 extension [-Werror,-Wc23-extensions]
175 | uint8_t temp_inc_fast_thresh;
| ^
drivers/sensor/adi/max30210/max30210_trigger.c:196:3: error: label followed
by a declaration is a C23 extension [-Werror,-Wc23-extensions]
196 | uint8_t temp_dec_fast_thresh;
| ^
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add -Wno-unique_unit_address_if_enabled for all boards,
as bflb SoCs contains a lot of overlapping peripheral nodes.
Signed-off-by: Camille BAUD <mail@massdriver.space>
Remove whitespace between parentheses and value. This seems to be the only
place in tree where such a pattern is found, and it violates the rules of
the Devicetree linter executed by CI.
Replace ARM-specific MPU attributes with their plain variant, also removing
the unnecessary parentheses in the process.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Remove unnecessary parentheses and switch to the plain variant of the
RAM_NOCACHE "attribute".
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The documentation currently indicates that Cortex-M0 and Cortex-M1 have
programmable fault priorities which is not true. Fix this error.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Added additional LEDs and an alias so that examples such
basic/threads will build/run on this board.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
Added pwm-led0 alias so that basic/blinky_pwm and basic/fade_led
samples can be built/run on the ek_ra6m4.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
For clarity and compactness, use
`spi_context_max_continuous_chunk()` instead of open-coding
the same tx/rx length selection logic.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
There is a corner case that the ACL_Data_Packet_Length is less than
the MPS of the L2CAP BR channel connection. Then the partial data
will be sent and the remaining data will be sent in sequence in the
function `l2cap_br_data_pull()`. The issue occurs when sending the
continuing fragment HCI ACL packet, due to the reference counting of
sending buffer is 0. Therefore, the application will be asserted in
the function `send_buf()`.
Fix the issue by managing the reference count of the sending buffer.
Use the function `net_buf_ref()` to increment the reference count of
the sending buffer.
If the sending buffer is the last fragment, use `net_buf_unref()` to
decrement the reference count of the sending buffer to ensure that
the send buffer can be properly released when the data is sent out.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Device continued receiving multicast data after leaving IGMP group
because the driver did not configure the SiWx917 firmware to stop
filtering for the multicast MAC address.
Register a Zephyr multicast monitor callback (net_if_mcast_mon_register)
that calls sl_wifi_configure_multicast_filter() to add or remove
multicast MAC filters in the firmware when groups are joined or left.
Signed-off-by: Devika Raju <Devika.Raju@silabs.com>
- Adds sam_e54_xpro.overlay files for wdt test projects.
- Adds sam_e54_xpro platform allow in testcase.yaml.
- Adds wdt board specific configuration in main.c
Signed-off-by: farsin NASAR V A <farsin.nasarva@microchip.com>
- Updates the board yaml file with watchdog entry for enabling CI
to include watchdog for testing
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
- Adds devicetree node of watchdog in same5xd5x family
- Adds the binding yaml for g1 driver of watchdog
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
The radio driver updates the filters but never submit
the new ones to the radio core.
The filters was only applied later thanks, probably during
a channel selection that was happening often.
Update the driver stop RX operation and restart it using
the new filters.
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
When using OpenThread, set_channel operation may be called often
with the same channel number.
Everytime, even if the channel has not changed, the driver stop all
the radio operations, restart the synthesizer and then restart RX
operations.
This behavior prevents OpenThread joiner to work correcly.
This updates the driver to only stop radio operations if this is really
required.
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
Add Support for MAX30210, a low-power,
high-accuracy digital temperature sensor
operating from a 1.7 V to 2.0 V supply.
Signed-off-by: Francis Roi Manabat <francisroi.manabat@analog.com>
Adds support for generated merged hex file output, one hex file
per unique board target. This feature can be enabled with
SB_CONFIG_MERGED_HEX_FILES
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add docs (wiring, build etc.) for the stm32n6570_dk board with the
st_b_cams_imx_mb1854 camera shield (based on an IMX335).
Signed-off-by: Anton Puppe <anton-noel-flynn.puppe@zeiss.com>
Add Kconfig option VIDEO_SHELL_AND_CAPTURE to allow the capture to run
even if the video shell is enabled. Also, add delta time between frames
to log output. This enables testing of on-the-fly framerate changes.
Signed-off-by: Anton Puppe <anton-noel-flynn.puppe@zeiss.com>
Adds support for video_set_frmival for the IMX335 sensor driver.
The available framerates depend on whether the binning mode is enabled.
Currently, 25Hz and 30Hz are always available and 50Hz/60Hz only with
binning.
Signed-off-by: Anton Puppe <anton-noel-flynn.puppe@zeiss.com>
Adds support for switching the sensor resolution between all-pixel scan
(2592x1944) and 2x2 binning (1296x972). This reduces the bandwidth
and processing power requirements for applications that do not need the
full resolution. It also paves the way for higher frame rates.
Note that while the imx335 driver now supports dynamic resolution
changes, some downstream components may not. The binning mode is enabled
automatically if the correct format is selected.
Signed-off-by: Anton Puppe <anton-noel-flynn.puppe@zeiss.com>
When the response has been sent completely to the client, the server
reports the new `HTTP_SERVER_TRANSACTION_COMPLETE` status. Together with
the existing `HTTP_SERVER_TRANSACTION_ABORTED` status, the application
can now also for successful completions of requests clean up any
resources allocated for handling the request.
This especially allows to dynamically allocate the response buffer
passed to the server in the request callback and free it when the
request is done.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Rename enum http_data_status to enum http_transaction_status
to better reflect its purpose, which is to indicate the status of the
overall HTTP transaction, not just data transfer.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add a build-only scenario that enables UART runtime configure and
builds on selected GD32 boards to ensure the driver compiles.
Signed-off-by: Aleksandr Senin <al@meshium.net>
Add uart_configure()/uart_config_get() support to usart_gd32.
Store runtime config in driver data and init it from DT defaults.
Signed-off-by: Aleksandr Senin <al@meshium.net>
Enable servo port GP12. Add commented-out entries for the other ports,
as is done for the other overlay files.
Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
Make Zephyr 4.4 release engineers maintainers of release notes and
migration guide for the time being.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fix build failures when compiling for 64-bit native_sim,
and add native_sim/native/64 to the platform allow list for
the coap client tests.
Signed-off-by: Sam Friedman <sam@golioth.io>
Properly report size info for the ADXL362 decoder for streaming data
properly from that sensor.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
Some mailbox backends may deliver notifications without an associated
data payload. This can occur when the mailbox is used as a signal-only
mechanism, where struct mbox_msg is NULL, data is NULL, or size is zero.
The IPM mailbox callback currently assumes a valid data payload and
unconditionally dereferences data->data, which can lead to a NULL
pointer dereference for such mailbox implementations.
Update the IPM mailbox callback to tolerate empty mailbox messages and
invoke the IPM callback with a NULL payload pointer when no data is
present. This preserves notification semantics while preventing
runtime faults.
Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
When the transfer timeout and driver set user abort,
we need go recovery flow to make sure bus recovery and reg recovery.
Signed-off-by: Elmo Lan <elmo_lan@realtek.com>
The csr_*() macros and Smcsrind indirect CSR access helpers in csr.h
are C-only constructs using GNU C statement expressions, but csr.h is
also included from assembly sources when building with -D_ASMLANGUAGE.
Guard all C-only macros and functions so they are not seen by the
assembler, leaving only the numeric CSR definitions in the common
(ASM+C) section.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
When support for old "Library model" was removed, support for the new
Secure Function (SFN) model - the FF-M 1.1 spec that succeded the "Library
model" - wasn't implemented. This patch adds it.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Adds RAM tags to select Intel ADSP platforms with the
primary goal of getting LLEXT subsys tests to run.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Add a Kconfig option for the test to put extensions in .text.
This is useful for platforms for which the linker places .data
in memory unsuitable for instruction execution, such as
Intel ADSP's uncached memory.
The theoretical alternative to support Intel ADSP is to add a
platform-specific INSTR_FETCHABLE macro and platform-specific
heap definition (placing the heap into .rodata) into llext so
that the llext loader can copy text into an executable heap, but
per a comment at llext_link's llext_link_plt, Xtensa llext's PLT
linking is not valid when not performed inline in the ELF buffer.
This is because it uses offsets from the text in the ELF buffer
and assumes the text section's position relative to the other
sections has not changed during loading. If one or more sections,
particularly text, are loaded onto the heap, the relocation
addresses calculated by the linker will not land in the correct
memory region.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Adds board overlays for Intel ADSP platforms to use
CONFIG_LLEXT_TYPE_ELF_RELOCATABLE instead of SHAREDLIB
as xt-clang cannot link shared libs for Xtensa, exports
symbols used by Intel ADSP with Xtensa toolchain, and
adds XTENSA MPU / MMU to "no memory protection" config file.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
Consolidate lower and upper bounds checking of `filter_id`
at `can_mcan_remove_rx_filter` function entry to avoid checking
upper bounds while holding the mutex.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Refactor IRQ handler to set status variable in each branch and invoke
the callback once at the end, reducing code duplication.
Add null check for `dma_callback` in dma_stm32u5.c to match with
dma_stm32.c pattern.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Refactor IRQ handler to set status variable in each branch and invoke
the callback once at the end, reducing code duplication.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
The data is updated by both local domains (cpuapp/cpuapp) and
IronSide SE (cpusec), so disable caching to avoid coherency issues.
Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
The TRNG needs to be enabled at boards level by default for tests. It will
not actually be used unless the ENTROPY_GENERATOR subsystem is enabled.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
"/chosen/zephyr,entropy" is already set at root DTSI level, and the RNG is
already enabled at board DTS level.
Remove the now unneeded overlays for these boards.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
All series set the "zephyr,entropy" chosen to the internal TRNG by default
inside their root DTSI except STM32N6 and STM32WB0.
Align these two series with others by declaring "/chosen/zephyr,entropy" in
their root DTSI as well.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
This configure MPU region over OTP area like ID region.
OTP can be directly read and need to use flash HAL API for writing.
Signed-off-by: Gaétan Froissard <gaetan.froissard@marshmallow.kids>
Fixes this define leaking into all application source files when
the feature is not even enabled
Co-authored-by: Chris Friedt <cfriedt@tenstorrent.com>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The extra_conf_files arg in testcase.yaml was being improperly
assigned to the CONF_FILE CMake arg, which caused
configuration_files.cmake to ignore soc and board Kconfig overlays.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
This patch updates the intel_adsp smoke tests to use the new host IPC
backend data model and APIs.
The host IPC smoke test now treats messages as a fixed two-word uint32_t
payload instead of using struct intel_adsp_ipc_msg and the
INTEL_ADSP_IPC_CB_* message types. The receive callback validates the
payload length and pointer, checks the header/payload values against the
expected RETURN_MSG_* constants, and sets msg_flag on receipt. The
test-specific intel_adsp_ipc_send_message() and
intel_adsp_ipc_send_message_sync() helpers are rewritten to send a
two-word payload via ipc_service_send(), and the synchronous helper
waits on the backend semaphore only when the send succeeds. A dedicated
done callback is registered via intel_adsp_ipc_set_done_handler() to
drive done_flag, and intel_adsp_ipc_complete() now completes RX by
calling ipc_service_release_rx_buffer() and asserting on failure.
Completion polling is aligned with the backend by using
ipc_service_get_tx_buffer_size().
The clock calibration smoke test is adapted in the same way. It now
includes the ipc_service and intel_adsp host IPC backend headers when
using the new interface, interprets incoming data as a two-word uint32_t
payload, validates the length and pointer, and stores the returned
timestamp from the extended payload word into the endpoint private data.
The rest of the test flow, including endpoint registration, timestamp
requests and clock rate checks, remains unchanged but runs on top of the
new IPC backend representation.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This patch refreshes the documentation in the Intel Audio DSP host IPC
service backend to match the current data model and backend API
contracts.
The updated comments clarify that ipc_ept_cfg::priv must point to
intel_adsp_ipc_ept_priv_data so that the backend can carry state between
the ISR and the application callbacks. They also describe that both the
send and receive paths operate on a fixed two-word uint32_t IPC payload
(header and extended payload) rather than a generic byte buffer, and
that len must always be sizeof(uint32_t) * 2.
The documentation for intel_adsp_ipc_send() is rewritten to explain the
expected payload format, the length and NULL checks performed by the
backend, and how the function programs the IPC registers while relying
on ipc_send_message() for BUSY and TX acknowledgment handling. The
parameter semantics and error returns are aligned with the generic
ipc_service send() hook contract to make the backend behaviour easier to
understand and reuse.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Rework the Intel Audio DSP host IPC service backend to use the generic
ipc_service data/len conventions and the new critical send and buffer
management APIs.
Replace the backend-specific intel_adsp_ipc_msg and related enums with a
simple two-word payload passed through the standard ipc_service_send()
and ipc_service_send_critical() interfaces, and adapt the ISR and
receive callback to operate on this representation.
Use ipc_service_get_tx_buffer_size() as a readiness check for the host
channel and provide hold_rx_buffer() / release_rx_buffer()
implementations so ipc_service_release_rx_buffer() can be used to signal
when the channel becomes available again.
Wire the emergency send path through send_critical() to route urgent
messages via the backend's emergency fast path while keeping the normal
IPC flow unchanged.
Move the synchronous IPC wait logic out of the Intel Audio DSP host IPC
backend and into the common intel_adsp_ipc helper used by tests.
Update intel_adsp_ipc_send_message_sync() to both send the IPC message
through ipc_service_send() and wait on the backend semaphore, and remove
the now redundant ipc_send_message_sync() helper from the host IPC
backend.
Document that intel_adsp_ipc_send_message_sync() is a test-only helper,
not used by SOF firmware, and that it is a candidate for future removal
or for replacement by an explicit synchronous send primitive in the
generic IPC service API or in application code.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Add ipc_service_send_critical() as a dedicated API for sending critical
high-priority messages over an IPC endpoint.
Introduce an optional send_critical() callback in struct
ipc_service_backend so backends can implement a special fast path that
bypasses normal state and busy checks for critical notifications such as
crash reports or fatal errors.
The ipc_service_send_critical() wrapper mirrors ipc_service_send() on
the service side and delegates the actual behavior to the
backend-specific send_critical() implementation.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
The pointer to the clock device can be const, as it does never change at
runtime. This moves the const struct device *clock from data to config
struct and initializes it inside the init macro. The __uart_stm32_get_clock
function is no longer needed and removed.
Signed-off-by: Thomas Decker <decker@jb-lighting.de>
When initially introduced, the property was kept optional in an attempt
to not risk disrupting downstream users by introducing a required property
they wouldn't necessarily care about. In practice, this is causing
boards contributed upstream to sometimes miss this propery which is
important for boards to show up nicely in the boards catalog, and it is
therefore being made required.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
5 years ago LiteX switched to 32 bit csr data width,
while the option is still available in litex, it doesn't really
work there, even if it can be build, the bios f.e. won't boot.
already described in https://github.com/enjoy-digital/litex/issues/1062
So it is currently only here for designs, that are older than
5 years and for fpgas, where also the fpga bitstream can be updated
it is time to remove the support and require the users, when they wan't
to update zephyr, that they also have to update their fpga bitstream.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The sector erase tests previously asserted for a specific -EINVAL return
code when attempting to erase past the end of the disk. This is too strict
for drivers that report a generic I/O error (-EIO) in such situations,
e.g. the STM32 SDMMC driver, which maps HAL failures to -EIO without
inspecting the precise root cause.
We can also note that the same logic was used in test_sector_write() and
test_sector_read().
This change avoids spurious test failures with targets that legitimately
return non-zero errors other than -EINVAL.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
RTT need to use RAM which is not cacheable as RTT does not support
data cache. Using cpuapp TCM RAM memory section for RTT.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The dt binding file requires the reset pin to be configured
as `GPIO_ACTIVE_LOW`, but the driver uses the
logic of `GPIO_ACTIVE_HIGH`.
Therefore, modify the logic in the driver and add a
migration guide.
Signed-off-by: Yunjie Ye <yun_small@163.com>
Remove empty files from the Raspberry Pi 4 Model B board
directory. These files does not contain any configuration
or build logic.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
The error code returned when nrfx_pdm_start() fails is supposed to
be propagated to the caller.
This was broken by commit 16b9f60, which overwrote the original
error with the result of release_clock(), potentially returning
success even though the PDM start failed.
Restore the correct error propagation.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
After commit 02770ad963 ("debug: EXCEPTION_STACK_TRACE should depend
on arch Kconfigs"), the ARM64_EXCEPTION_STACK_TRACE isn't used any more,
remove it.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Add detailed documentation for the HL78xx auto-baudrate feature,
including:
- auto_baudrate_detailed_readme.md: full description, use cases,
configuration options, and troubleshooting
- auto_baudrate_quick_reference.md: concise reference for presets, Kconfig
options, and supported baud rates
Covers:
- Feature overview and implementation details
- Supported baud rates and Kconfig options
- State machine integration
- Troubleshooting guidance
- Performance and optimization tips
- Integration examples
This improves usability and provides a quick reference for developers
working with the HL78xx modem in Zephyr projects.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Enable HL78XX modem auto-baudrate detection and switching in the sample
application. Set 921600 bps as the target baudrate with fallback options
(9600, 115200, 57600, 38400, 19200). Also read and log the current baudrate
from the modem during startup.
This helps verify and debug communication speed mismatches between the
modem and the device UART.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
The sample previously always queried RSRP, which is not valid when the
HL78xx operates in GSM mode. Use RSSI when GSM RAT is active and RSRP
for other RATs. Update the log output and rename the variable for
clarity.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Add support for handling AirVantage WDSI indications in the sample
application. FOTA update progress, download requests, and completion
events are processed and coordinated using a new semaphore. The sample
can restart its connection workflow after a successful firmware update.
Additional updates include:
- add serial number retrieval and logging
- add fota_complete_rerun semaphore and status tracking
- simplify debug logging in event listener and OK handler
- reorganize main loop to support FOTA-triggered reruns
This aligns the sample with the modem driver's expanded AirVantage and
WDSI support.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
The sample no longer requires the POSIX API layer, so the
CONFIG_POSIX_API option is removed from prj.conf. The code is updated to
use the native zsock_* APIs instead of the POSIX getaddrinfo(),
inet_ntop(), and freeaddrinfo() variants.
This aligns the sample with Zephyr’s preferred socket API and avoids
pulling in unnecessary POSIX compatibility layers.
No functional behavior is changed.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Reorganize the sample configuration files for clarity and easier
maintenance. This introduces grouped sections with descriptive comments
and improves consistency between prj.conf and the verbose-logging
overlay.
Main updates:
* Add structured headers for system, UART, networking, modem, RAT,
AirVantage, shell, and logging settings
* Expand verbose overlay with clearer purpose, build notes, and grouped
modem logging options
* Improve readability by aligning comments and collecting related
options
* No functional behavior is changed; this is a documentation and
structure improvement
These changes make the sample configuration easier to understand and
simplify future maintenance.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
This adds an optional auto-baudrate mechanism that improves robustness
when the modem boots with an unknown or changed UART speed.
Key additions:
* New Kconfig option MODEM_HL78XX_AUTO_BAUDRATE and related settings:
- selectable target baud rate
- detection baudrate list
- detection timeout and retry count
- option to persist AT+IPR updates
- option to start diagnostics or boot directly with auto-baud logic
* UART status tracking added to hl78xx_data, including current and target
baud rates
* New HL78XX_MODEM_INFO_CURRENT_BAUD_RATE info field
* New MODEM_HL78XX_STATE_SET_BAUDRATE state with detection and switching
logic
* Chat, init, and diagnostic handlers updated to route failures into the
auto-baudrate logic when enabled
* New helpers: hl78xx_get_uart_config(), hl78xx_try_baudrate(),
hl78xx_detect_current_baudrate(), hl78xx_switch_baudrate()
* Startup delay increased when auto-baudrate-at-boot is enabled
These changes allow the driver to recover from unexpected modem UART rate
changes and keep the UART configuration synchronized with the modem.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Add MODEM_HL78XX_EVENT_AT_CMD_TIMEOUT event to distinguish chat scripts
timeouts from other script failures. The chat callback now maps
MODEM_CHAT_SCRIPT_RESULT_TIMEOUT to this new event.
Update state handlers so AT command timeouts trigger the init fail
diagnostic script during startup, and fall back to the power-on pulse in
the init-fail state, similar to existing timeout handling.
This improves error classification and enables more accurate recovery
logic for long-running or stalled AT command exchanges.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Extend modem_dynamic_cmd_send() with a response_timeout parameter to allow
callers to specify the overall script timeout per command. The previously
hardcoded 1000 ms timeout is removed (set to 0 in params) and the script
timeout is now driven by the passed-in value.
Update all internal call sites to provide MDM_CMD_TIMEOUT (in seconds) and
increase the default command timeout from 10 s to 40 s. Several chat
scripts and configuration paths are updated accordingly.
This improves reliability for long-running HL78xx operations and ensures
consistent timeout handling across sockets, RAT/band configuration, APN
setup, PDP activation, AirVantage DM session control, and TLS/TCP/UDP
socket management.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Extend socket-related chat match tables to handle generic "ERROR" responses
for both CONNECT and +KUDP_IND URCs, improving detection of failed socket
creation and connection attempts.
While updating match handling, unify all modem commands to use the standard
OK match set by adding hl78xx_get_ok_match_size(). All remaining users of
the former sockets-specific OK match are switched to the unified helpers.
Additionally, all dynamic command send paths now provide an explicit match
count and use MDM_CMD_TIMEOUT instead of the previous hard-coded `1` for
script timeout, improving consistency and reliability across:
* RAT configuration
* band configuration
* APN setup
* GSM PDP activation
* AirVantage DM session control
* socket send and TLS configuration paths
This brings all command execution onto the same match/timeout model and
ensures ERROR responses are handled correctly during socket operations.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Avoid overwriting cached input state while ISR-deferred work is pending.
Previously, port_get_raw() updated pins_state.input via
update_input_regs(), which could corrupt previous_state used for
transition detection.
Fix by reading input registers directly without updating the global cache.
Signed-off-by: Woobin Song <woobin.song@assaabloy.com>
Add Ethernet configuration for mac and mdio nodes in
stm32h78_dk-common.dtsi.
Disable mac node in .overlay files for tests/drivers/memc/ram
since ethernet drivers that get enabled by it consume sram1
node and thus fail the test.
Update the .yaml files to include Ethernet tag and
update documentation to explain Ethernet usage.
Signed-off-by: Benjamin Klaric <benjamin.klaric01@gmail.com>
Instead of performing a linear search to determine if a given
thread is running on another CPU, or if it is marked as being
preempted by a metaIRQ on any CPU do this in O(1) time.
On SMP systems, Zephyr already tracks the CPU on which a thread
executes (or lasted executed). This information is leveraged to
do the search in O(1) time.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
The current implementation of k_sleep(), when multi-threading
is disabled, busy waits using k_busy_wait() until the sleep timeout
has expired.
This patch aims to improve power efficiency of k_sleep() for
single-threaded applications by starting a timer (k_timer) and idling
the CPU until the timer interrupt wakes it up, thus avoiding
busy-looping.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
In z_vrfy_k_poll, there is a memory access check
K_SYSCALL_MEMORY_WRITE which is wrapped in a spinlock, the same
spinlock used in z_handle_obj_poll_events which is called from
k_sem_give() for example.
The K_SYSCALL_MEMORY_WRITE() macro conditionally calls LOG_ERR()
which may call the UART console, which may call an API like
k_sem_give(). This will cause a deadlock since the locked spinlock
will be relocked, and a recursive lock if SPINLOCK_VALIDATE and
ASSERTS are enabled as the validation will fail, causing a LOG_ERR,
causing a k_sem_give() causing a relock... until stack overflows.
To solve the issue, only protect the copy of events to events_copy
with the spinlock, the content of events is not actually checked, and
bound is not shared, so there is no need to do this validation in a
critical section. The contents of events is shared so that must be
copied in atomically.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Reneamed photograph of Renesas US159 DA14531EVZ board to match
convention documented in the Board Porting Guide (resolving issue
with old image not appearing in list of supported boards on Zephyr
website).
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
Disable all interrupts when the VIM interrupt controller is initialized so
that it doesn't encounter any stray interrupts that were not enabled on
Zephyr.
Signed-off-by: Amneesh Singh <amneesh@ti.com>
BIT_MASK(32) cannot do (1 << 32) - 1 without causing integer overflow.
Hence, for these macros BIT64_MASK(32) is required.
Additionally, remove the unnecessary (and presently unused) macros for the
register space. All of these can be reliably derived from the present
register masks.
Signed-off-by: Amneesh Singh <amneesh@ti.com>
Fix macro parameter typo (##inst → ##index) in CAN_RENESAS_RA_INIT
to ensure unique IRQ configure function names per instance.
Signed-off-by: Khai Cao <khai.cao.xk@renesas.com>
Add MCUX_OS_TIMER configuration with CPU_FREQ-based default selection.
Update CORTEX_M_SYSTICK to be disabled when either LPTMR or OSTIMER
is selected as the system timer, ensuring only one timer is active.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The MCXN236 can use ostimer as the kernel timer.
We enable it in the dts, and which specific timer
to use as the system timer can be controlled through
Kconfig option based on application requirements.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add initial board support for the Xunlong Orange Pi Zero,
single-board computer based on the Allwinner H2+/H3 SoC.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Add initial support for the Allwinner H3 SoC, commonly
found in development boards like the Orange Pi series.
This commit introduces the intial SoC support files:
- Basic Kconfig configuration and SoC definition
- MMU region setup for memory management
- SoC-specific headers and device tree source include
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Enable support for configuring and enabling the external timestamp counter
of the NXP LPC MCAN.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add support for configuring and enabling the internal timestamp counter of
the Bosch M_CAN IP core.
Frontend drivers can overwrite this configuration for using a SoC-specific,
external timestamp counter.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Clear the hold flag during the final data interrupt; otherwise the
Transfer Complete interrupt is never asserted.
Signed-off-by: Simon Maurer <mail@maurer.systems>
Switch the Cadence I2C device driver over to the use of the
DEVICE_MMIO_... macros instead of just using the physical base
address from the device tree.
Signed-off-by: Simon Maurer <mail@maurer.systems>
Tune quantum parameter for selected kernel tests
targeting mpfs_icicle platform.
Those tests require higher fidelity of the virtual
time flow which is achievable on multi-core platforms
in Renode by reducing the quantum.
Increase time resolution to 10us (default is 100us).
It is a maximum drift of the virtual time between
simulated processors in SMP configuration.
Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
The device is not able to place the entropy into stack or heap allocated
buffers. This uses a bounce buffer to be able to use any buffer with
virtio entropy.
Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
This disables the kconfigs to build the reset vector and crt1
startup code from the architecture layer as ACE has its own
rom_entry() as entry point.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When an eventfd is closed, while we are blocked in a read() call, the
close() call should succeed and read should return error.
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
k_condvar_broadcast does not error. It returns the number of
woken threads on success. We should not assert any value.
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
When eventfd is used through read(2) and write(2), the mutex is
already locked from the fdtable implementation. So we remove the
usage of the mutex from the zvfs_eventfd_*_op functions, as it is
already managed by fdtable.
However, when zvfs_eventfd_{read,write} are used, no fdtable layer
is used and we shuld call the _op function with the mutex locked
(the same behavior as with fdtable), so these functions should
manage the mutex. We add it there.
Fixes#99234
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
The eventfd API should work with the standard POSIX read/write
functions with the same behavior as the non-standard
eventfd_read/write API.
We add the tests for these interfaces.
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
The default SDHC 'power-delay-ms' is 500 ms, which is unnecessarily long
and causes the boot time to increase by over 5 seconds on H7 boards with
the Murata Wi-Fi card (GIGA R1, Nicla Vision, Portenta H7).
Shortening this delay to 50 ms greatly improves boot time while keeping
compatibility with the controller spec.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Add missing TOOLCHAIN_WARNING_* definitions for the IAR toolchain:
- subsys/testsuite/include/zephyr/test_toolchain.h
- subsys/testsuite/include/zephyr/test_toolchain/iar.h
Signed-off-by: Thinh Le Cong <thinh.le.xr@bp.renesas.com>
IAR compiler may emit Error[Go004]: Could not inline function
when handling functions marked as always_inline or inline=forced,
especially in complex kernel code
Signed-off-by: Thinh Le Cong <thinh.le.xr@bp.renesas.com>
Add a minimal implementation of test_asm_inline_other.h to support
non-GNUC toolchains (e.g. IAR) during kernel benchmark tests
Signed-off-by: Thinh Le Cong <thinh.le.xr@bp.renesas.com>
Fix IAR compiler error Pe1153 caused by mismatched alias type between
_kernel_openocd_offsets and _kernel_thread_info_offsets.
The alias now uses [] to match the array type. No functional change.
Signed-off-by: Thinh Le Cong <thinh.le.xr@bp.renesas.com>
The commit c42c8a4da4 (do not invalidate bet at end of loop")
correctly restored the best erase type (bet) selection logic
based on SFDP/JESD216 erase types.
However, this caused a regression
in Octal OPI mode: when bet != NULL, the driver started using bet->cmd
(a standard SPI 1-byte opcode) directly, which is not valid in OPI mode
where the controller expects OPI opcodes (2-byte OCMD).
When bet != NULL:
- In OPI mode, ignore bet->cmd and use the OPI sector erase
opcode SPI_NOR_OCMD_SE.
- In SPI/QPI modes, keep using bet->cmd as intended.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Per RFC9112 (REF #1), HTTP/1.1 server is expected to be backward
compatible with HTTP1.0 request. Mainly HTTP/1.0 does
not support
1) Transfer Encoding : chunked
2) KeepAlives
So, this change will identify the HTTP protocol
version in the request and respond accordingly.
REF#
1) https://httpwg.org/specs/rfc9112.html
Tested:
1) Verified that HTTP/1.1 requests are served as usual
i.e. with chunked transfer encoding and the connection
is a Keep Alive connection
Query exits after 10s, indicating that the client connection to
the HTTP server is a Keep Alive.
```
time printf "GET /telem HTTP/1.1\r\nHost: 192.0.3.11\r\n\r\n" |
nc 192.0.3.11 80
real 0m10.185s <- Indicates connection was kept active for 10s
user 0m0.023s
sys 0m0.023s
```
`Transfer Encoding : chunked` header and chunked encoding
metadata (chunk size hex bytes, crlf, termination byte 0)
are present in the response.
```
HTTP/1.1 200 OK
Transfer-Encoding: chunked <- Chunked encoding header
Content-Type: text/html
3e8 <- Chunk size hex bytes
:
/health/secondsdevice_ae:9a:22:48:0f:70"seconds0
+
/health/locatedevice_ae:9a:22:48:0f:70"0
/
/network/mac-addressdevice_ae:9a:22:48:0f:70"
.
.
.
3e8 <- Chunk size hex byte
_PLUS_rawdevice_ae:9a:22:48:0f:70"0
6
/dev/ISHARE_CBU_MINUS_rawdevice_ae:9a:22:48:0f:70"0
.
.
.
/dev/part_iddevice_ae:9a:22:48:0f:70"0���������
,
/dev/part_typedevice_ae:9a:22:48:0f:70"0
7
/dev/part_telemetry_disabledevice_ae:9a:22:48:0f:70"0
0 <- Termination Byte 0
```
2) Verfied that HTTP/1.0 requests are served with
response without chunked transfer encoding and the
connection is closed immediately.
Query exits immediately indicating the connection is closed immediately
```
time printf "GET /telem HTTP/1.0\r\nHost: 192.0.3.11\r\n\r\n" |
nc 192.0.3.11 80
real 0m0.186s <- Indicates connection was terminated immediately.
user 0m0.018s
sys 0m0.030s
```
`Transfer Encoding : chunked` header and chunked encoding
metadata (chunk size hex bytes, crlf) not present in the
response
```
HTTP/1.1 200 OK
Content-Type: text/html
:
/health/uptimedevice_ae:9a:22:48:0f:70"seconds0
+
/health/locatedevice_ae:9a:22:48:0f:70"0
/
/network/mac-addressdevice_ae:9a:22:48:0f:70"
.
.
.
3
/dev/part_iddevice_ae:9a:22:48:0f:70"0���������
,
/dev/part_typedevice_ae:9a:22:48:0f:70"0
7
/dev/can_telemetry_disabledevice_ae:9a:22:48:0f:70"0
```
Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
Commit adds `bt_mesh_` prefix to `struct app_key`
to make it compatible with other internal API.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Commit adds option description to keep keys in sync
between mesh core and cdb implementations.
Option changes default behavior so it should be added to
the release notes.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Commit disables key synchronization for mesh provisioner sample
to not refactor it according to key synchronization implementation.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Commit adds bsim tests those check key synchronization
between core implementation and cdb. Tests check both
network and application key synchronization.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
bsim persistent test does not require cdb subnetwork update
for not primary network keys anymore.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Commit adds functionality that synchronizes network and
application keys between mesh core and cdb.
Additionally, subnetwork bridge bsim tests were fixed since
cdb cannot allocate subnetwork if it exists.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Event about application key changes has been refactored.
Event provides access to the corresponding applicarion key
structure instead just key indexes.
The related code has been moved from mesh.h to app_keys.h.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
eswifi_off_enable_dhcp() ignored the return value of eswifi_at_cmd()
and always reported success, making the error check at the call site
always false.
Return the command result to properly propagate failures.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Add migration guide documentation about the impact of the new
st,adc-resolutions property.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Some internal _CONCAT* macros were used throughout the file. Replace them
with the simple CONCAT macro.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Now that the STM32 ADC resolution property do not use special macros
anymore, these include files can be removed.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Remove old resolutions property from the st,stm32-adc binding and from all
ADC nodes of all STM32 dtsi since it is no longer used.
Also remove some now unnecessary includes from the dtsi.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Rework the way to set the STM32 ADC resolution.
Instead of using special macros in device tree, supported resolutions are
now simply listed as an array.
From this array, the driver defines two tables. The first contains the same
values as the array, the second contains the LL macros for each resolution.
When setting the resolution, the driver checks the value with the first
table, then sets it with the second table.
The two tables are defined for each enabled ADC instance so there are no
conflicts if different ADC have different resolutions.
For STM32H7, this changes the internal values used for 14 and 12-bit
resolutions, from 0b101/110 to 0b001/010 respectively, i.e. it uses the
so-called "legacy" resolutions instead of the "power-optimized" ones.
Note that AN5354 indicates: "The optimized modes have better power
consumption figures. The standard modes have better parameters, but
power consumption is not optimized and is comparable to 16-bit mode."
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Add a new st,adc-resolutions property for STM32 ADC. This property takes
a simple array of the supported resolutions. Goal is to replace to previous
resolutions property.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
The esp_data pointer is no longer used after removing the premature
_sock_connect() call. Drop the unused variable.
_sock_connect() call was removed by c368c33.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Fix typos in property descriptions in the NRFS SWEXT power domain
binding.
No functional change.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Align Kconfig USE_STDC_LSM6DS3TR with hal_st
Fixes zephyrproject-rtos/zephyr#53546
See also hal_st PR #22
Signed-off-by: Douglas Holtsinger <doug.holtsinger@gmail.com>
This code was deprecated and removed from the documentation many
releases ago, remove the feature from the code
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add the config to support that warning message time
interval can be set.
We also find that printing all the warning messages
takes about 50ms on Chromebook. Therefore, we increase
the default time to 100ms to leave some time for EC to run
non-print instructions.
Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
__eswifi_listen() ignored errors from eswifi_at_cmd() and always
reported success, leaving the local error variable unused.
Return an error when setting the listen backlog fails and avoid
marking the socket as a server in that case.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Adds bindings for communicating with the MCTP protocol over I3C with IBI
for signaling.
Notably I3C currently requires devices on the bus be struct device's the
way the Nuvoton driver is written and the API is written. So we create a
little glue driver (mctp_i3c_endpoint) to allow us to later bind a aptly
named mctp_i3c_controller MCTP binding.
On the target side the only usable driver for target mode is Nuvoton's.
Nuvoton's driver only implements the optional buffer read/write
callbacks rather than the read/write byte at a time callbacks. This is
actually probably for the better but it does mean this binding requires
those optional target mode functions.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
so that time-consuming I/O takes place in the background. This is
especially important when writing to multiple long LED strips.
This commit mostly mirrors what was done in the pl022 driver and the
rpi_pico_pio_spi driver, including the needed DT configuration. DMA will be
used if `CONFIG_DMA` is enabled and proper `tx` channel is defined in the
DT.
The DT overlay I used when testing:
```
&pio0 {
status = "okay";
pio-ws2812 {
compatible = "worldsemi,ws2812-rpi_pico-pio";
status = "okay";
pinctrl-0 = <&ws2812_pio0_default>;
pinctrl-names = "default";
bit-waveform = <3>, <3>, <4>;
/* This device has no tx channel configured so DMA will NOT
* be used. */
ws2812_1: ws2812_1 {
status = "okay";
gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
chain-length = <1>;
color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>;
reset-delay = <280>;
frequency = <800000>;
};
/* This device has proper tx channel configured so DMA will
* be used. */
ws2812_2: ws2812_2 {
status = "okay";
gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
chain-length = <64>;
color-mapping = <LED_COLOR_ID_RED
LED_COLOR_ID_GREEN
LED_COLOR_ID_BLUE>;
reset-delay = <280>;
frequency = <800000>;
dmas = <&dma 1 0 0>;
/* DMA slot will be
* determined by the driver so what's in here
* doesn't matter. */
dma-names = "tx";
};
};
};
&dma {
status = "okay";
};
```
Signed-off-by: Terry Geng <terry@terriex.com>
to guarantee two updates to ws2812 happen not faster than the required
reset time of ws2812. Using `k_usleep` forces a context switching, which
might be unnecessary if two time between update calls are not as frequent
as the reset time (which should be the most of the case anyways).
Signed-off-by: Terry Geng <terry@terriex.com>
Add a board overlay for the qemu_cortex_a9 board to build the
Synopsys DesignWare MAC driver for MMU platforms.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Add a test case to build the Synopsys DesignWare MAC driver for STM32H7
series SoCs. This drivers is an alternative to the existing ETH_STM32_HAL
driver. As such both drivers cannot be enabled at the same time.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
DWMAC driver was no longer selectable for stm32h7
series because of CONFIG_ETH_DWMAC dependency on
DT_HAS_SNPS_DESIGNWARE_ETHERNET_MMU_ENABLED, which
is only used for MMU based platforms.
Restructure Kconfig to have user-selectable options
for the platform-specific DWMAC drivers and select
the common DWMAC driver accordingly. This way
platform-specific dependencies can be tracked on
these options, simplifying the logic.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Introduces a GPIO driver that provides generic interfaces
for both interrupt-driven inputs and controllable outputs.
Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
- Add LED0 and SW0 support to CY8CPROTO-041TP board
- This enables applications to use led0 and sw0 through
standard Zephyr subsystems without additional board-specific
configuration.
Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Refactor the CY8CPROTO-041TP board definition by extracting common
configurations into \`cy8cproto_041tp_common.dtsi\`. This improves
reusability and structure.
Additionally, refactored the nodes accordingly and configure necessary
system clocks:
- Configure 16-bit peripheral dividers.
- Enable clock paths.
Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Update the Infineon clock control drivers to support PSoC4 and
enhance error handling.
- Add support for ILO, WCO, and EXT clocks in fixed clock driver.
- Update fixed factor clock driver to handle PSoC4 specific HF
clock source setting and add error checking.
- Update peripheral clock driver to support fractional dividers
- Improve error handling across all updated drivers.
Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Update the system clock device tree definitions for the Infineon
PSoC4100TP series.
Refactor the peripheral divider nodes in `system_clocks.dtsi` to
align with the hardware specifications. This includes renaming nodes
and updating group associations for correct clock configuration.
Update `infineon,peri-div.yaml` binding to support the changes.
Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Update all Infineon PSoC4100TP device tree nodes to use current
binding naming convention by removing the 'cat1-' prefix
Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Add clock source definitions for the Infineon PSoC4 series.
This introduces the \`ifx_clock_source_psoc4xx.h\` header with
HFCLK divider macros and integrates it into the board clock
source selection.
Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Reintroduce the assert on put_idx being within the limit in can_mcan_send()
but move it to just after the value was determined and add a comment on its
purpose.
With the current code, this will never get triggered due to the tx_sem
being acquired before (meaning a free TX slot was acquired).
Avoid assigning a signed initial literal to an unassigned type.
Fixes: 8dc4dea112
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The idle enter was being traced but idle exit was not.
This change adds the missing call to sys_trace_idle_exit()
to the idle exit path for the it51xxx and it8xxx2 SoCs.
Signed-off-by: Rob Barnes <robbarnes@google.com>
RSR handling is already implemented in pl011_err_check(), which is the
appropriate place to detect, and report receive error conditions.
This also aligns poll_in() behavior with pl011_fifo_read(), which reads
and delivers characters without returning RSR status to the caller.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Make Domain's class constructor accept python object to avoid redundant
YAML serialize and unserialize which may introduce potential yaml type
errors.
Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
Add input validation to single-pin GPIO APIs (e.g., gpio_pin_configure)
and emulator-specific helpers to return -EINVAL for invalid pins. This
ensures tests correctly fail when targeting non-existent pins.
For standard port-wide APIs (e.g., gpio_port_set_bits_raw), align behavior
with hardware drivers by masking out invalid pins instead of returning an
error. This mimics hardware behavior where writing to unimplemented bits
is ignored, and ensures compatibility with generic tests that use full
32-bit masks (e.g., 0xFFFFFFFF).
Signed-off-by: Jayvik Desai <jayvik@google.com>
Add a documentation section about the KeepSorted compliance check and
which options it provides.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
i3c_bus_mode() is duplicated across several drivers. Move it into
i3c_common.c to eliminate that.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
soc_per_core_init_hook() is usually called from arch_kernel_init() and
arch_secondary_cpu_init() which are C functions. As such, there is no need
to check for CONFIG_SOC_PER_CORE_INIT_HOOK since platform/hooks.h provides
a no-op function-like macro implementation if the Kconfig option is not
enabled.
Remove the Kconfig option check from all files.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
- Replace CONFIG_ESP32_WIFI_AP_STA_MODE with CONFIG_WIFI_USAGE_MODE_STA_AP
- Move AP-STA mode enable/disable control to prj.conf
- Update documentation to reflect new configuration option
- Remove redundant Wi-Fi NM and SoftAP options from RW612 board configs
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Take PLL fractional part into account when computing PLL output rate
for stm32h7xx and stm32h7rs based targets.
Co-authored-by: Tim Pambor <tim.pambor@codewrights.de>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add the memory-regions property to mac in stm32h7rs.dtsi,
same as in stm32h7.dtsi, and set sram2 as default. Also add
the #memory-region-cells to sram2 and sram1 nodes.
Override the sram2 as default with sram1 in stm32h7s3.dtsi and
stm32h7s3.dtsi since sram2 is disabled per default.
Add the same checks as for h7 series to mpu_regions.c and sections.c.
Signed-off-by: Benjamin Klaric <benjamin.klaric01@gmail.com>
Use the memory-regions property in stm32h7.dtsi to explicitly locate
ethernet buffer and descriptor to an sram region. Set sram2 as default
and override with sram3 when available, in soc level .dtsi files.
Add #memory-region-cells to sram2 and sram3 nodes in specific .dtsi
files in dts/arm/st/h7, since it is needed by the memory-regions
property.
Add a check for memory-regions before the check and definition of the
sram_eth_node in mpu_regions.c and sections.ld.
Signed-off-by: Benjamin Klaric <benjamin.klaric01@gmail.com>
Add the compatible for h5 series for ethernet. The h5 series needs
it own because the memory-regions property isn't currently supported
by the implementation.
Add the h5 compatible to stm32h563.dtsi, in mac node.
Adjust the description in h7 compatible to remove the mention of h5
series, as now h5 series has it's own.
Signed-off-by: Benjamin Klaric <benjamin.klaric01@gmail.com>
When output from ruff check subprocess is not in JSON format
compliance script raises an exception without any useful information
about the error. This commit improves that by printing output from
subprocess in case of error.
Signed-off-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
i2c_burst_write is not portable,
as it is not supported by some drivers,
replace its use with i2c_write.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
i2c_burst_write is not portable,
as it is not supported by some drivers,
replace its use with i2c_write.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
i2c_burst_write is not portable,
as it is not supported by some drivers,
replace its use with i2c_write.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
i2c_burst_write is not portable,
as it is not supported by some drivers,
replace its use with i2c_write.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
i2c_burst_write is not portable,
as it is not supported by some drivers,
replace its use with i2c_write.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
i2c_burst_write is not portable,
as it is not supported by some drivers,
replace its use with i2c_write.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
i2c_burst_write is not portable,
as it is not supported by some drivers,
replace its use with i2c_write.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
i2c_burst_write is not portable,
as it is not supported by some drivers,
replace its use with i2c_write.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The binary-info feature that introduced in #54290 causing trouble
with some rp2xxx variant boards.
Turning off this feature defaultly to solve these problems.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
This commit aims to declare and call NAT64 functions used by Border
Router application only if corresponding flag is also set.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Make use of CONFIG_OPENTHREAD_ZEPHYR_BORDER_ROUTER_NAT64_TRANSLATOR flag in
platform code.
Fixed some compile warnings in `mdns_socket.c` when IPV4 is not enabled,
by moving some variables under `CONFIG_NET_IPV4` define
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
This config flag sets all the requirements and dependencies for NAT64
translator enablement. By default, NAT64 translator is enabled in an
OpenThread Border Router application.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Those were needed when uoscore-uedhoc was using "mbedtls_pk_ec()" function
to uncompress EC points. The library has been updated since then and
this legacy function is no more required. As a consequence also legacy
Kconfigs can be removed as well.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Remove dependency on legacy Mbed TLS legacy crypto functions which have
been removed in the latest Mbed TLS/TF-PSA-Crypto release.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Implement pm device runtime to resume PWM devices before they are
used, and put them after, for platforms which use and enable pm
device runtime.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The ipv4 code now filters for multicast packets for non joined groups,
make sure the test join the group before trying to create traffic on
that address.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a check to drop ipv4 multicast packets that are not matching any
currently registered multicast group for the interface that received
them.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The CMake extensions module depends on the yaml module, but extensions did
not explicitly include yaml.
When using find_package(Zephyr ...) with no components specified this
issue is not seen as zephyr_default is included which includes many other
modules, including yaml and extensions.
However, when find_package(Zephyr ... COMPONENTS ...) is used only the
components specified are included, which can result in a build error. For
example, using find_package(Zephyr ... COMPONENTS FindHostTools ...)
includes FindHostTools, which includes extensions, which depends on yaml
but doesn't include it.
This issue is fixed by including yaml in extensions.
Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
The existing sram node wiring is incorrect as it starts from 0x0, where the
TCM is mapped. The TCM size is 128 KB (with TCM A having 64 KB, TCM B 32
KB, and TCM C 32 KB). While TCM and DDR are mapped contiguously, to avoid
having TCM addresses in sram region to prevent potential DMA failures. The
address view of TCM for the RPU differs from that of other DMA masters,
which can cause DMA failures if DMA buffers are allocated in the TCM
region. Therefore, start sram region from 0x30000 (192 KB) to prevent DMA
buffer allocation within the TCM region.
Note: Although the TCM size is 128 KB, the SRAM region base address set to
192 KB to align with the QEMU models, where additional 64 KB memories are
mapped beyond the TCM.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
This patch modifies k_timer_status_sync() to idle the CPU when MT
is disabled, instead of busy-looping. For this purpose, the spinlock
in the MULTITHREADING=n case has been reduced to a irq_lock(),
which works in pair with k_cpu_atomic_idle() to ensure the atomicity
of enabling the IRQs and idling the CPU.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Since this file is not built with the documentation system,
some of the references didn't work. References to tools, boards,
etc. have been encapsulated by the appropriate ticks.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Move the assignment of the callback function and user data within the mutex
lock when adding CAN RX filters to prevent race conditions.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Remove useless asserts. These indexes are determined via a for loop which
already uses the asserted value as its maximum.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add support for configuring the SysTick clock source via devicetree
using a new `clock-source` property. This allows selecting between
the external reference clock (0) and the processor clock (1).
Previously, the driver always set the CLKSOURCE bit, forcing the use
of the processor clock. This change introduces a helper function
`systick_ctrl_clksource_flag_from_dt()` that reads the devicetree
property and returns the appropriate CTRL register flag.
The CTRL register is now programmed deterministically using direct
assignment instead of `|=` to ensure the CLKSOURCE bit is properly
cleared when switching to external clock, preventing potential
interrupt storms when CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC reflects
the external clock rate.
If the property is absent, the driver defaults to legacy behavior
(processor clock).
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Without removing this line, I would get a warning (promoted to error) that
the symbol was being redefined in either `net_ip.h` or
`posix/net/if_arp.h`. Actually, `posix/net/if_arp.h` probably should not
exist, but that is part of a separate PR.
Signed-off-by: Chris Friedt <chris@fr4.co>
Use zsock APIs rather than POSIX APIs in net subsys tests.
The primary last remaining API call was `fcntl()` and related
constants, strings, etc.
It's convention to use native zephyr APIs in the testsuites and
POSIX APIs in samples.
Signed-off-by: Chris Friedt <chris@fr4.co>
After iface was link up, the IPv4 multicast address was added to iface
repeatly. This patch is to fix this.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Add support for handling a gpio connectd to the device enable pin, this
has to be driven high to enable the device, and can be pulsed low to
reset the registers to the default configuration.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The LCD_CAM peripheral is a parallel I/O controller integrated in the ESP32
series. It consists of an LCD output module and a DVP camera input module.
The camera side is already supported in Zephyr as a video driver.
This commit adds support for the LCD module by implementing it as a
MIPI-DBI backend. The LCD_CAM supports multiple output formats, and the
initial implementation provides I8080 mode.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
The former `&lcd_cam` node has been split into an `&lcd_cam` controller
and an `&lcd_cam_dvp` subdevice. Update the board DTS accordingly.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
The former `&lcd_cam` node has been split into an `&lcd_cam` controller
and an `&lcd_cam_dvp` subdevice. Update the board DTS accordingly.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
Move the shared pinctrl and clock initialization for the LCD_CAM peripheral
from the ESP32 DVP driver into a new SoC-level implementation.
Update the ESP32-S3 DTS to reflect the new structure by introducing an
`lcd_cam_dvp` child node under the common `lcd_cam` parent node.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
Rename the ESP32 LCD_CAM DVP driver and its DT binding from
`espressif,esp32-lcd-cam` to `espressif,esp32-lcd-cam-dvp` to clearly
identify it as the DVP (camera) input block of the LCD_CAM peripheral.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
C99 § 7.19.6.5 defines `snprintf`. According to ¶ 2:
> If `n` is zero, nothing is written, and `s` may be a null pointer.
And according to § 7.19.6.12 ¶ 2:
> The `vsnprintf` function is equivalent to `snprintf` (...)
However, prior to this change, `vsnprintfcb` (and indirectly, `snprintfcb`)
unconditionally null-terminates the output buffer.
This fixes#48394, which was auto-closed without actually being fixed.
Co-authored-by: Adrien Lessard <adrien.lessard@rbr-global.com>
Signed-off-by: Samuel Coleman <samuel.coleman@rbr-global.com>
The goal is to slowly convert all Microchip MEC to in-tree drivers
and support code (no HAL). We had partial HAL support for MEC172x
as the mech172x folder. We are removing HAL based mech172x since HAL
will be deprecated in the future and it has no board support.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
In-progress add Microchip MEC to PINCTRL test.
Note: This test only checks the pinmux value created by
device tree. It does not check the pin configuration.
We enhanced the tests by checking GPIO control register field(s)
match the device tree properities.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
As part of the long term HAL deprecation goal, we add PINCTRL
files for MEC174x, MEC175x, and MEC1653B.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
GPIO hardware in Microchip MEC parts is the same except for the MUX
field (number of alternate functions). We modify the old XEC PINCTRL
driver to work on all MEC parts and also be independent of HAL and
CMSIS register structures. During development we found a DT issue
with DT_ENUM_IDX_OR always inserting the default value. Worked around
by converting slew rate and drive strength to YAML integer type and
created defines for the values in the dt-bindings header.
Signed-off-by: Scott Worley <scott.worley@microchip.com>
Enabled async read function for NXP SAR ADC driver by implementing
nxp_sar_adc_read_async() and modifying nxp_sar_adc_read() to call it
with a NULL signal for synchronous operation.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. enable adc_sequence test for frdm_mcxa156
2. use DMA to transfer ADC conversion data in this sample
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Allow alarm_cfg->ticks to be 0 for immediate callback execution.
When ticks equals 0, set the interrupt pending instead of returning
-EINVAL, causing the ISR to fire immediately.
Implementation:
- Add irq_set_pending()/irq_is_pending() helpers for NVIC and GIC
- Store IRQ number in device config for pending operations
- Refactor timer state handling to eliminate duplication
- Update get_pending_int() to check both HW flags and NVIC/GIC state
This supports idle timer use cases where sleep duration may be zero
and eliminates the need for special-case handling in application code.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Add device tree property to configure LPTMR free-running mode instead
of hardcoding it to disabled.
The freerunning property controls counter reset behavior:
- If false (default): Counter resets after compare match
- If true: Counter resets only on overflow, continues after compare
This allows per-instance configuration of the LPTMR timer mode based
on application requirements without code changes.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Added mikrobus_serial and mikrobus_header node labels to EK-RA4L1
device tree board definition, allowing compatible shield boards to
be used.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
Disable the automatic handling of the `NET_EVENT_IF_UP` event when the
WPA supplicant is enabled, as the supplicant already explicitly calls
`net_dhcpv4_restart` when the interface is ready for use. This fixes
the DHCP binding process being restarted before the interface is ready
(after `NET_EVENT_IF_UP`, before authorization), which always fails.
Signed-off-by: Jordan Yates <jordan@embeint.com>
set_sequencer() never reports errors and always returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
csr_write(), csr_set(), and csr_clear() use GNU C statement expressions,
which triggers SonarQube/clang warnings like:
use of GNU statement expression extension from macro expansion
Rewrite these write-only macros as do { ... } while (0) statement macros.
No functional change expected.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
Correct the description in the "What Cannot be Expected to Work" section
to state that the listed functionality fails when CONFIG_MULTITHREADING
is **disabled**, as the previous wording implied the opposite.
Fixeszephyrproject-rtos/zephyr#101718
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fixes a small typo in the example which, if copied, would result
in a error in the python file
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
gpio_pin_set_dt() return value was not assigned when pulling the
reset GPIO high, making the subsequent error check always false.
Store the return value to properly detect and report failures.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
This commit replaces in the documentation of uart_tx_abort()
function, the generated event type `UART_TX_DONE` with the
correct one: `UART_TX_ABORTED`.
Signed-off-by: Sebastian Panceac <spanceac@gmail.com>
frdm_mcxaxx6: frdm_mcxa266, frdm_mcxa346, frdm_mcxa366
1. enable power_mgmt_soc test for NXP frdm_mcxaxx6 board.
2. enable systick and disable ostimer, this enabled systick
as system timer.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
mcxaxx6: mcxa266, mcxa346, mcxa366.
1. Add power state nodes for mcxaxx6, including
sleep, deepsleep and powerdown.
2. Add power management related peripheral nodes
for mcxaxx6, including spc, cmc, vbat and wuu.
3. Add 'zephyr,cortex-m-idle-timer' node in frdm_mcxaxx6.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. enable power_mgmt_soc test for NXP frdm_mcxa153 board.
2. enable systick and disable ostimer, this enabled systick
as system timer.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. Add power state nodes for mcxa153, including
sleep, deepsleep and powerdown.
2. Add power management related peripheral nodes
for mcxa153, including spc, cmc, vbat and wuu.
3. Add 'zephyr,cortex-m-idle-timer' node in frdm_mcxa153.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. enable power_mgmt_soc test for NXP frdm_mcxa156 board.
2. enable systick and disable ostimer, this enabled systick
as system timer.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. Add power state nodes for mcxa156, including
sleep, deepsleep and powerdown.
2. Add power management related peripheral nodes
for mcxa156, including spc, cmc, vbat and wuu.
3. Add 'zephyr,cortex-m-idle-timer' node in frdm_mcxa156.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
- Moves nxp,imx-gpt.yaml from the timer to the counter folder,
as this is the binding for the counter driver
drivers/counter/counter_mcux_gpt.c
- Fixes: #100947
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
this commit enables building and running the sample on
stm32h573i_dk board,stm32h735g_disco board, arduino_giga_r1
board, and b_u585i_iot02a board by providing the required overlay
and configuration updates.
Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Signed-off-by: Sarah Younis <zephyr@exalt.ps>
Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
This commit introduces support for the mspi and ospi drivers on STM32,
enabling functionality APIs for MSPI/OSPI/QSPI host controllers..
Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Signed-off-by: Sarah Younis <zephyr@exalt.ps>
Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
This commit adds the main DTS configurations required
to enable MSPI/OSPI/QSPI support on STM32.
Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Signed-off-by: Sarah Younis <zephyr@exalt.ps>
Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
Raspberry pi based boards are now using binary info by default
(96b9b0f2df), and that limits pinctrl groups to 4 or 6 nodes. Split
this node in multiple groups.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
set_iir_config() dereferences the device pointer before checking it
against NULL, making the defensive check ineffective.
Remove the redundant check.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
This patch adds support for the QSPI memory controller (for the
SiWG917 SoC) in order to enable PSRAM testing. It also adds board
overlays for this family that include PSRAM.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Previously, eventfd file descriptors were not being counted against the
required size for the global file descriptor table, which would result
in the function `eventfd()` (and `zvfs_eventfd()`) failing due to
insufficient resources.
Signed-off-by: Chris Friedt <chris@fr4.co>
This driver uses math functions that require the math.h header. If not
included a lot of implicit declaration warnings are generated during
build.
Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
Add the node I3C4 in non-secure context to dtsi. Others I3C nodes cannot
be added as they rely on EXTI1 interrupt lines that is not supported yet
for the STM32MP2.
Co-authored-by: Charles Wenger <charles.wenger@savoirfairelinux.com>
Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
Since the STM32MP2 I3C controller uses a combined interrupt line for I3C
events and errors, add the support for handling this type of interrupt
in the I3C driver.
Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
This adds a test case to the access BSIM tests to check that vendor
models can specify a handler for and receive messages using a
SIG-defined 1-byte opcode.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
This fixes a limitation where the stack assumed that vendor models could
not specify handlers for SIG-defined (1- or 2-byte) opcodes. This
assumption does not exist in the specification. In fact, the
specification expects this very use-case to be possible, in MeshPRT 1.1,
section 3.8.3:
> To exchange messages with a Bluetooth SIG adopted model, a Vendor Model
> shall use the Access message defined for the Bluetooth SIG model.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
This deprecates CONFIG_BT_MESH_MODEL_VND_MSG_CID_FORCE. This option was
added to allow an optimization that a) only can apply in edge case
networks that use multiple vendor models with different CIDs, b) doesn't
really have much potential gains even in this case unless there is a
large number of opcodes in these vendor models, and c) makes it
impractical to implement support for vendor models handling SIG opcodes.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
Since the entire cid checking function is conditionally included based
on KConfig, the usage site also needs to use #if instead of IS_ENABLED,
otherwise you get the following warning during compilation when the
option is disabled:
`error: implicit declaration of function
‘bt_mesh_vnd_mod_msg_cid_check’`
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
Implement eeprom_target_program() using eeprom_target_write_data() and
eeprom_target_read() using eeprom_target_read_data() to limit redundant
code.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
eeprom_target_program() is about to become deprecated as it does not take
an offset argument, so switch to eeprom_target_write_data() instead.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The current functions to access the EEPROM data are not ideal, E.G.:
- eeprom_target_program() is hard coded to write to the beginning of the
EEPROM data
- eeprom_target_read() reads a single byte, so large overhead to read all
data
So as an alternative, add an interface similar to what is provided by
zephyr/drivers/eeprom.h, E.G. functions taking an offset and and length.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
For some use cases it can be interesting to know when the eeprom has been
written to by the I2C host (E.G. once a stop has been received after a
write transaction), so add a "changed" callback.
Multiple EEPROM instances are supported, so pass the device and user data
as arguments to the callback.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Updated the MMU region entries for the GIC device to use
MT_DEFAULT_SECURE_STATE instead of MT_NS,
aligning the security attribute with the default secure sate macro.
Signed-off-by: Niu Zhihong <zhihong@nzhnb.com>
use the allow-list generated by --keep-artifacts whenever
cleanup_artifacts() is called. This resolves an issue where this allow-list
was not being honored when using the --prep-artifacts-for-testing flag.
Signed-off-by: Mike Szczys <mike@golioth.io>
Reduce the test time by ~300 seconds by mocking the listed serial port
Result from running:
pytest --durations=0 ./scripts/tests/twister/test_handlers.py
Before:
60.12s test_devicehandler_handle[valid pty]
60.12s test_devicehandler_handle[communicate timeout]
60.06s test_devicehandler_handle[popen called process error]
60.05s test_devicehandler_handle[valid dev]
60.03s test_devicehandler_handle[nonzero returncode]
0.01s test_devicehandler_handle[create serial failure]
After:
0.01s test_devicehandler_handle[valid dev]
0.01s test_devicehandler_handle[valid pty]
0.01s test_devicehandler_handle[nonzero returncode]
0.01s test_devicehandler_handle[create serial failure]
0.01s test_devicehandler_handle[communicate timeout]
0.01s test_devicehandler_handle[popen called process error]
Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
Binary Info embeds program meta information in flash,
which can be viewed with RaspberryPi Pico's `picotool`.
Metadata is automatically collected from pinctrl.
It can be override by the Kconfig configurations, such as
```
CONFIG_RPI_PICO_BINARY_INFO_OVERRIDE_PROGRAM_NAME="my program name"
```
When this feature is enabled, pinctrl groups are restricted to
consisting of pins with a single rpi_pico function.
In other words, SPI's MISO and MOSI can be in the same group,
but I2C's SDA cannot be included in this group.
This is rarely an issue in normal use,
and can be resolved by dividing them into separate groups.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
The binary info feature references `boot_stage2` and `pico_binary_info`.
Add these to include dirs.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
When transceive is called on a chip without CONFIG_SPI_STM32_INTERRUPT,
spi_stm32_shift_frames was called even if there was no transfer ongoing.
This lead to an unwanted SPI transfer shifting the whole connection,
causing drivers to malfunction.
Fix it by replacing the do-while loop with a while loop.
Signed-off-by: Robyn Milas <robyn.milas@valotec.com>
The following examples build and work as expected.
Blink backlight using PWM on white backlight keyboard or numpad:
> west build -p -b framework_laptop16_keyboard samples/basic/blinky_pwm
Blink capslock on keyboard (not numpad or macropad):
> west build -p -b framework_laptop16_keyboard samples/basic/blinky_pwm
> west build -p -b framework_laptop16_keyboard samples/subsys/usb/console
> west build -p -b framework_laptop16_keyboard samples/subsys/usb/cdc_acm
> west build -p -b framework_laptop16_keyboard samples/drivers/adc/adc_dt
Signed-off-by: Daniel Schaefer <dhs@frame.work>
Enabled servo port GP0. Added commented-out entries for the other ports,
as is done for the other overlay files.
Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
Add a trailing space to the Ruff error message string in the compliance
checking script. Previously, the error message concatenated the URL and
the description with a colon (e.g., ".../unsorted-imports:Import").
This caused the terminal to interpret the description as part of the URL,
resulting in a 404 error when clicked.
Signed-off-by: Thamaraimanalan M <devthamaraimanalan.m@gmail.com>
The debug/stack.h header uses k_thread types and APIs such as
struct k_thread, k_thread_stack_space_get(), and k_thread_name_get(),
but does not include <zephyr/kernel.h>.
This makes the header rely on transitive includes, which can lead to
build failures depending on include order.
Add an explicit include of <zephyr/kernel.h> to make the header
self-contained.
Signed-off-by: Michele Sardo <msmttchr@gmail.com>
Since e150ffb92c, Zephyr only really
supports native_simulator based targets when building native/posix
arch based targets.
So this comment is not relevant anymore. Let's remove it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Until now transmission FIFO was not used.
With this chamge the FIFO will be filled up, until it is full.
Signed-off-by: Daniel Fladerer <d.fladerer@gmx.de>
Updates the time slicing image in the associated documentation to ...
1. Show the resetting of a time slice after scheduling a new thread
2. Indicate that it is specific for UP scheduler
It also adds a note to the documentation describing how the ordering
of the threads would change with the SMP scheduler.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Commit e7f222a fixed the bug where a data size mismatch produces unexpected
behavior with the DMA on V1 devices. However, this limitation is only valid
for the STM32 series with V1 DMA, V2 doesn't have this. The STM32CubeMX
configuration tool correctly implements this limitation in the UI,
it is a good way to cross-check.
Signed-off-by: Benedek Kupper <kupper.benedek@gmail.com>
Add property to enable eMIOS instances to reference a global timebase
provider, either from itself or another eMIOS instance, enabling
synchronized timing operations across multiple instances.
Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
The setup.sh script of the Zephyr SDK runs "which cmake"
to find out whether CMake and wget are installed:
71df6c27da/scripts/template_setup_posix (L43)
"which" is not installed by default on Arch Linux,
so the check will fail and the script will yield:
Zephyr SDK setup requires 'cmake' to be installed
and available in the PATH.
Please install 'cmake and run this script again.
Although CMake is already installed.
Fix this by adding "which" to the list of dependencies.
Signed-off-by: Stefan Gloor <code@stefan-gloor.ch>
Replace legacy hand-mantained tables with the new directive that generates
a table automatically based on platform device tree.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Change at_get_string() return type to 'const char *'. Correspondingly,
change string parameters in HFP HF callbacks and related functions
from 'char *' to 'const char *' to reflect that these strings are
read-only data returned from AT command parsing.
- Update bt_hfp_hf_cb callback signatures for clip, operator,
call_waiting, and textual_representation
- Update at_get_string() return type to 'const char *'
- Update local variables in hfp_hf.c handlers to use 'const char *'
- Update shell callback implementations to match new signatures
- Change NULL check style from '!text' to 'text == NULL' for consistency
- Remove unnecessary initialization of 'number' variable in clcc_handle
This improves const-correctness and prevents accidental modification
of AT command response strings.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
1. Add power state nodes for mcxnx4x soc dtsi, including
sleep, deepsleep and powerdown.
2. Add power management related peripheral nodes
for mcxnx4x soc dtsi, including spc, cmc, vbat and wuu.
3. Add 'zephyr,cortex-m-idle-timer' node in mcx_nx4x_evk_cpu0.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
This commit enables mcx_nx4x_evk LPUART pin internal pullup resistor.
For MCXN547, during LPUAR initialization, the RX pin is pulled down
internally and STAT[RAF] is set to one. In this state, attempting to
enter low power mode will trigger LPACK reset and therefore cannot
truly enter low power mode. The correct setting should be to enable
LPUART pin internal pullup resistor.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Include files should be named .dtsi and not .dts
This PR renames the .dts files that are:
- Not board files
- Included by other dts/dtsi files
- Aligns the #include to use the .dtsi
This PR also deletes `boards/mediatek/mt8186/afe-mt8186.dts` as this is
not included by any file and is clearly not a board file.
Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
Fix the Kconfig dependency for CYW20829 so that enabling the
low-power system timer automatically disables the Cortext-M SysTick
Signed-off-by: Merin George <merin.george@infineon.com>
- Flash configuration was previously done in the driver selected by
Kconfig. Instead move flash configuration to the board removing
the need for ifdefs in the driver. This will allow boards to
configure specifics related to the on board (not part of the SoC)
flash.
Signed-off-by: Merin George <merin.george@infineon.com>
The current "drop" command stops i2s asynchronously as the peripheral
produces/consumes up to MAXCNT. When complete, the IRQ STOPPED event
will free memory and disable the peripheral. However, when triggering
a "start" command before this completes, the internal state variables
are cleared and we leak application memory.
Signed-off-by: Victor Brzeski <vbrzeski@gmail.com>
The nRF TDM Driver has a bitfield containing the TDM events it has
already processed. This variable is unused, delete it.
Signed-off-by: Victor Brzeski <vbrzeski@gmail.com>
Now that the west_commands directory has a pyproject.toml configuration
file, it should consider local packages for first party imports.
Make sure the top-level ruff config is extended, and fix some import
sorting.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add a new function, bt_bap_ep_get_conn, which returns
the ACL connection for the endpoint. This works because
endpoints are specific to an ACL in BAP. The function
returns a pointer with a new reference similar to the
lookup functions from conn.h
The conn pointer was not added to the bt_bap_ep_info
struct, as doing so would be more likely to cause
reference leaks if the caller did not care about the
conn pointer when using bt_bap_ep_get_info. It can be
added later if that is requested.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When using PAST, it is best not to use an ACL that is a multiple
of the PA or ISO interval to avoid overlaps.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Once the BASS has been discovered, the sample will now attempt
to read all the receive states on the remote device.
The receive states will only be logged, and the sample will
not (yet) perform any logic on them (to e.g. determiner whether
it needs to perform a remove source operation before the add
source, or perform a modify source). That behavior is postponed
to a future commit, as the purpose of this is to showcase
reading the receive states.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Refactor the bt_bap_broadcast_assistant_discover function
to not read receives at the end of discovery.
This makes the function more true to what it is supposed to
do, and significantly reduces the complexity of the
procedure and the read callback.
Users will be required to, if wanted, to read the
receive state themselves with the existing
bt_bap_broadcast_assistant_read_recv_state.
The start_offset had to be modified to avoid issues with
PA sync.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add support for getting the UCI.
For now the UCI will be duplicated by the TBS
implementation, but will be optimizied in the future
so only one copy of the UCI exists.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The existing documentation was not explicit on how qualifiers should be
combined with board revisions. This commit makes it explicit and adds a
concrete example.
Signed-off-by: Nick Brook <nrbrook@gmail.com>
- Update dts to ext-ram since section allocation is updated
in the display driver
- Move the Display, LVGL config definitions from board layer
to shield layer
- Update the LVGL config value to match the new SDRAM allocation
- Remove sdram.ld in the board layer for all Renesas boards
- Update .conf overlay for Renesas devices in display_read_write
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
Adds a sample application for the CS40L5x haptics driver. This PR
provides a custom shell interface to expose most of the CS40L5x-specific
API functions; basic demonstrations of other functions are provided.
Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
CS40L5x is a family (CS40L50/51/52/53) of haptics drivers designed
for trackpads, tablets, and automotive applications.
This PR provides basic functionality for ROM features and serves
as a starting point for the upstream driver. Notably, RAM firmware,
SPI, and certain CS40L51/52 features (e.g., diagnostics,
closed-loop algorithms) are excluded from this PR.
Tested with internal/external boost configurations. Tested I2C.
Tested all ROM features with each device variant (50/51/52/53),
including ROM playback, "buzz" playback and configuration, custom
haptics playback and configuration, trigger playback and configuration,
runtime haptics logging, and gain configuration.
Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
The Raspberry Pi 5 product line has expanded since launch. The current
documentation only lists the original 4GB and 8GB models. This commit
updates the board documentation to include the missing variants.
Signed-off-by: Thamaraimanalan M <devthamaraimanalan.m@gmail.com>
stm32h523/33Xe devices have different addresses than stm32h562/72/73xx
(RM0481 fig. 21).
Tested on a custom board with stm32h523cet6 where the board crashed when
accessing sram3.
Signed-off-by: Cezar Burlacu <cezar@embeddedp.ro>
A few fixes to the PSOC Edge 84 Eval kit documentation by re-using
Zephyr sphinx commands.
Adds a very critical note that a switch hidden under and LCD needs to
be flipped before you can successfully program the board.
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
Check for errors on eth_bridge_iface_add, these can add if, for example,
an interface does not support promisc mode.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
PR #93198 introduced the support for the timer kernel
clock for most STM32 series.
it was missing for STM32WB0 serie.
These changes are required for the related timer tests/samples
to pass.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
For STM32WB0x series, LL_GetFlashSize returns the flash size in words,
not bytes. The previous implementation incorrectly interpreted this
value, leading to a large discrepancy between the expected size (512 KB)
and the computed size (64 MB) in the test_get_size ztest.
This change updates the logic to correctly compute the flash size in
bytes, ensuring accurate results in size-related operations.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
- update board dts flash0 node to match the layout required
for the SWAP USING OFFSET algorithm.
- Update related test/sample yaml files to enable CI testing
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
When HAL_SDIO_WriteExtended_DMA or HAL_SDIO_ReadExtended_DMA returns
an error, interrupts are not enabled so the semaphore would never be
given, and it will always timeout.
Some drivers expect certain functions to fail during normal operation.
For example, WHD calls whd_kso_enable during sleep/wakeup cycles which
can fail. This would waste 200ms (CONFIG_SD_CMD_TIMEOUT default) on
every such failure.
Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
Changed the parameter description for _observers in ZBUS_CHAN_DEFINE and
ZBUS_CHAN_DEFINE_WITH_ID. The original description was hard to interpret
and appeared to be split by "@see struct zbus_channel".
Fixed several spelling and grammar issues.
Signed-off-by: Christoffer Gjedsted Brask <cgb@develco.dk>
hl78xx_set_apn_internal() was calling strlen(apn) before checking
the APN pointer against NULL, making the defensive check
ineffective.
Reorder the code so the NULL check is performed before dereferencing
the APN pointer.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Simplified the LPCMP driver migration notes by removing outdated
information about the devicetree compatible renaming. The compatible
nxp,lpcmp is now shared between both the sensor API-based and
comparator API-based LPCMP drivers, so the previous note about
renaming to nxp,sensor-lpcmp is no longer accurate.
Moved the comparator API-based LPCMP driver information to the
'New Drivers' directory.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. Removed nxp,sensor-lpcmp.yaml and merged its
properties into nxp,lpcmp.yaml. Now a single
dt-binding (compatible: nxp,lpcmp) is shared
by two drivers: the sensor API-based LPCMP
driver and the comparator API-based LPCMP driver.
2. Updated the driver and samples accordingly.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Ensure callee registers included in coredump.
Push callee registers onto stack for
CONFIG_ARMV6_M_ARMV8_M_BASELINE as well
when CONFIG_EXTRA_EXCEPTION_INFO enabled.
Effectively a complement to df6b8c3 by mholden.
Signed-off-by: Andy Lin <andylinpersonal@gmail.com>
Add missing documentation for the required Wi-Fi firmware blob download
step when building for the Pico 2W variant (rpi_pico2/rp2350a/m33/w).
The Infineon CYW43439 Wi-Fi chip requires proprietary firmware files
that must be fetched before building. Without this step, users
encounter CMake errors about missing firmware files.
Added a new section explaining:
- The requirement to run 'west blobs fetch hal_infineon'
- What files are downloaded (43439A0.bin and 43439A0.clm_blob)
- That this only needs to be done once per workspace
This resolves a common issue where new users following the
documentation cannot build Wi-Fi applications successfully.
Signed-off-by: Florian Mahon <florian.mahon@gmail.com>
Swap using offset requires that slot1 has one extra sector
size compared to slot0.
These changes are necessary to execute MCUboot tests and fix
issues detected in common flash test drivers.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Similar to how it's done for other driver classes, create a new doxygen
group to put all device-specific DAC API extensions under.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Added a test suite for the RPI Pico PIT driver that tests both
functionality and erroneus inputs.
Signed-off-by: Jan Behrens <jan.behrens@navimatix.de>
Added a counter driver for the RPI Pico/RP2040 that implements
programmable interval timer (PIT) functionality using the PWM HAL.
Signed-off-by: Jan Behrens <jan.behrens@navimatix.de>
This will delay non security dependabot updates to packages,
giving automated tools and researchers more time to catch updates
with malicious intent, thus reducing the supply chain security risks.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Add devicetree binding for the NXP LPC CRC controller
(compatible "nxp,lpc-crc") with required reg property.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Minimal board definition for the Elan em32f967 SOC:
- Includes DTS, YAML, and Kconfig files
- Provides board.cmake with misc-flasher for CI/build
- Actual flashing is not included in this PR
Signed-off-by: Johnny Chuang <johnny.chuang@emc.com.tw>
Add initial support for the Elan em32f967 SoC based on ARM Cortex-M4.
Minimal SoC definition for upstream:
- soc.h, Kconfig, and CMakeLists.txt provided for completeness
- This PR does not implement drivers or UART functionality
Signed-off-by: Johnny Chuang <johnny.chuang@emc.com.tw>
Add minimal DT binding headers and matching YAML files for the
Elan em32f967 SoC. The new definitions are required to build the
sample board and follow the upstream style.
Signed-off-by: Johnny Chuang <johnny.chuang@emc.com.tw>
Minor improvements in this cmake:
Add a comment to clarify why we set one option, and move an if
into an else with a comment of what is doing.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This variable is not set to anything.
This line has always been just bogus.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix unsafe handling of the clock control subsystem pointer.
The subsystem argument was cast before being validated, which could
lead to invalid memory access when NULL is passed.
Rework the on/off callbacks to validate the subsystem pointer before
casting it, drop unnecessary device checks, and mark the device
argument as unused.
Also simplify get_rate() validation by checking only the rate
pointer.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Remove a NULL check on the device pointer that occurs after the
pointer has already been dereferenced.
This check can never be true and is therefore misleading.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
NO_POSIX_CHEATS was a macro used to avoid including the content of a
header (`posix_cheats.h`) which allowed building applications in the
POSIX architecture without the native simulator, avoiding collisions
between some embedded symbols and those from the host C library.
Support for this way of building, and this header and macro were
removed in e150ffb92c, but these users
were forgotten. This was harmless, but let's just clean it up now.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add newlib to ignore_tags so twister will no longer run newlib
tests. These platforms have memory mappings that are not quite
what newlib is expecting so malloc may sometimes fail or even
returns invalid addresses. Fixing it is not worth the effort
because:
() Zephyr SDK provides picolibc now and not newlib, and malloc
works fine with picolibc.
() Downstream projects uses xcc/xt-clang as toolchains where
their provided newlib are not multi-thread safe, and cannot
be safely used under SMP environment.
So simply ignore any newlib tests as they are not really
providing any values on these platforms.
Fixes#100895
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Instead of directly calling the current thread-specific time slice
handler in z_time_slice(), we must call a saved copy of the handler
that was made when _sched_spinlock was still held. Otherwise there
is a small window of time where another CPU could change the handler
to NULL just before we call it.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
When k_sched_time_slice_set() is called, the current time slice
should not be reset if the current thread is using thread-grained
time slicing. This is to maintain consistency with the already
established idea that thread-grained time slicing takes precedence
over the system-wide time slice size `slice_ticks`.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
This fixes several minor items related to the priority or importance
of checks in determining whether the thread can be time sliced.
A thread that is prevented from running can not be time sliced
regardless of whether it was configured for thread-grained
time slicing or not. Nor can the idle thread be time sliced.
If the thread is configured for thread-grained time slicing, then
do not bother with the preemptible or priority threshhold checks.
This maintains the same behavior, and just optimizes the checks.
If the thread is sliceable, we may as well return the size of the
tick slice since we are checking that information anyway. Thus, a
return value of zero (0) means that the thread is not sliceable,
and a value greater than zero (0) means that it is sliceable.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Within z_sched_ipi() there is no need for the thread_is_sliceable()
test as z_time_slice() performs that check. Since as a result of this
thread_is_sliceable() is now only used within timeslicing.c, the
'static' keyword is applied to it.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
When a driver requires the usage of a low level driver subsystem
(like SPI, I2C, DMA...), it shall enable it instead of depending on it.
Also, make DMA usage depend on its DT properties being defined.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
When a driver requires the usage of a low level driver subsystem
(like SPI, I2C, DMA...), it shall enable it instead of depending on it.
Also, make DMA usage depend on its DT properties being defined.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Update broadcaster_multiple sample to start multiple
advertising sets of type legacy and extended advertising.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Tune the aux offset calculation overhead assertion to use
EVENT_OVERHEAD_START_US; this is the correct maximum
overhead causing ISR latency for start of a radio event that
occurs thereafter.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Enable similar Controller Kconfig features between nRF52 and
nRF5340 BabbleSIM LE Audio testing.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Disables the shell serial backend in this Kconfig fragment to
prevent conflicting with the serial one
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Remove a redundant NULL check on the device pointer in the GPIO
interrupt handler.
The device pointer is dereferenced unconditionally before the check
and cannot be NULL in this context.
No functional change intended.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
There are cases where the device can operate by polling
without using interrupts, so `interrupts` are not mark as required.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
- Adds sam_e54_xpro.overlay files for tcc.
- Adds sam_e54_xpro platform allow in testcase.yaml.
Signed-off-by: Farsin NASAR V A <Farsin.NASARVA@microchip.com>
- Add counter tag in the board yaml file seciton to allow CI run TCC
G1 counter tests on this board
Signed-off-by: Muhammed Asif <muhammed.asif@microchip.com>
The tolower() function takes an int parameter. LLVM compilers generate a
warning if a char is passed instead.
Signed-off-by: Keith Short <keithshort@google.com>
Add explicit casts from 'uint8_t *' to 'char *' in at_get_string()
and at_get_raw_string() return statements to resolve implicit cast
warnings. The data.start field is uint8_t *, but the functions
return char *.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add macro definitions to map generic ADC instance names to hardware
specific SARADC base addresses, enabling driver portability.
Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
Add two new definitions, ADC_SAR_IP_HW_REG_SIZE and
ADC_SAR_IP_CHAN_2_BIT, to eliminate the inclusion of
Adc_Sar_Ip_HwAccess.h, since this header file does not
exist for the S32K5 platform.
Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
When one generated .pb.h file includes another generated .pb.h file,
the build can fail because compilation may start before all headers
are generated.
The nanopb_generated_headers target collects all proto generation
targets as dependencies, but the calling target was not depending on
it. This can cause a race condition where the compiler fails with
"No such file or directory" for included headers.
Make the calling target depend on nanopb_generated_headers to ensure
all protobuf headers are generated before source compilation begins.
Signed-off-by: Nick Brook <nrbrook@gmail.com>
icm45686_encoded_fifo_payload is defined as packed struct,
while the nested structures are not. It causes an issue of
potential unaligned access to accel and gyro members.
The issue was detected by clang compiling with
-Wunaligned-access flag:
```
icm45686.h:52:6: error: field accel within 'struct icm45686.h:46:3)'
is less aligned than 'struct icm45686.h:48:4)' and is usually due
to 'struct icm45686.h:46:3)' being packed,
which can lead to unaligned accesses [-Werror,-Wunaligned-access]
icm45686.h:57:6: error: field gyro within 'struct icm45686.h:46:3)'
is less aligned than 'struct icm45686.h:53:4)' and is usually due
to 'struct icm45686.h:46:3)' being packed,
which can lead to unaligned accesses [-Werror,-Wunaligned-access]
```
Small C code snippet to demonstrate the reported issue:
```
struct icm45686_encoded_fifo_payload icm45686;
// prints 1:
printf("%lu\n", __alignof__(icm45686));
// prints 1:
printf("%lu\n", __alignof__(icm45686.accel));
// prints 2:
printf("%lu\n", __alignof__(typeof(icm45686.accel)));
```
This commit resolves the following Zephyr issue:
https://github.com/zephyrproject-rtos/zephyr/issues/101142
by adding `packed` attribute to accel and gyro members.
Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
bmi08x_accel_frame is defined as packed struct,
while the nested structures are not. It causes an issue of
potential unaligned access to accel member.
The issue was detected by clang compiling with
-Wunaligned-access flag:
```
bmi08x.h:605:2: error: field within 'struct bmi08x_accel_frame'
is less aligned than 'union bmi08x.h:605:2)' and is usually due
to 'struct bmi08x_accel_frame' being packed,
which can lead to unaligned accesses [-Werror,-Wunaligned-access]
```
This commit resolves the following Zephyr issue:
https://github.com/zephyrproject-rtos/zephyr/issues/101142
by adding `packed` attribute to accel member.
Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
In case of native build, the CONFIG_architecture
cannot currently be resolved with Kconfig, so we
must fall back to resolving it during compilation
using compiler definitions.
Signed-off-by: Jaagup Averin <jaagup.averin@gmail.com>
Add adxl345_attr_set_range() to allow runtime config.
of the accelerometer's measurement range via the
SENSOR_ATTR_FULL_SCALE attribute.
The function maps the requested range to the nearest supported
ADXL345 range (±2g, ±4g, ±8g, or ±16g) and updates the device
configuration accordingly.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Add SPDX-License-Identifier and copyright headers to Infineon
board overlay files in flash_shell, uart async_api, and
nvs samples for cy8cproto_062_4343w and cy8cproto_063_ble boards.
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
A alignment of 1 is also called 'unaligned'.
This default causes exceptions on CPUs that use different paths
for unaligned and aligned access.
Use a sane default that doesnt guarantee a store/access exception.
Signed-off-by: Camille BAUD <mail@massdriver.space>
Update hostap cleanup intervals to 120 seconds for NXP wifi chips.
CONFIG_WIFI_NM_WPA_SUPPLICANT_CLEANUP_INTERVAL for wpa_supplicant.
CONFIG_WIFI_NM_HOSTAPD_CLEANUP_INTERVAL for hostapd.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Both wpa_supplicant and hostapd register cleanup interval to eloop and
the intervals are all 10 seconds by default and this can cause device to
be woken up twice from sleep every 10 seconds. In order to reduce power
consumption, add below new items in Kconfig so that users can update the
cleanup intervals based on their requirements.
CONFIG_WIFI_NM_WPA_SUPPLICANT_CLEANUP_INTERVAL
CONFIG_WIFI_NM_HOSTAPD_CLEANUP_INTERVAL
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Enable clock for tempsense module in NXP MC CGM driver to
support temperature sensing functionality.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add a new driver for the NXP TempSense temperature
sensor found in various NXP MCUs, such as the MCX
family. The driver reads temperature data from the
TempSense peripheral and provides it via the Zephyr
sensor API.
The TempSense peripheral details can be found in the
NXP MCXE31x reference manual chapter 78.
reference manual can be found at:
https://www.nxp.com/webapp/Download?colCode=MCXE31XRM
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
This commit enhances the SAR ADC driver by adding
support for clock frequency selection. The clock
frequency can now be configured via the devicetree,
allowing for better optimization of ADC performance
based on application requirements.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Since RPI_PICO_PIO_GET_PROGRAM returns const variable, so changed
`pio_program_t *` variables in data to `const pio_program_t *`.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
This PR combines node content in the same file spread over multiple
node definitions.
This PR has not funtional changes to the boards
Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
Fix adc_dt run issue on NXP MCXN boards, the default
mode of vref is standby mode, the BUF21 is not enabled,
so the LPADC can not work normally. Need to set the vref
mode to 'NXP_VREF_MODE_LOW_POWER' or 'NXP_VREF_MODE_HIGH_POWER'
to enable the BUF21.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Move the NULL checks for the protection configuration parameters
before dereferencing them to avoid potential NULL pointer
dereferences.
The device pointer is assumed to be valid.
No functional change intended.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
uint64_t is not in general unsigned long long int, and therefore
its format specifier is not llu in general.
The macro PRIu64 resolves to whatever it is.
For 64bit targets, uint64_t is relatively normal to just be
unsigned long.
Providing the wrong format specifier results in the build warning
```
format %llu expects argument of type long long unsigned int, but
argument <x> has type long [unsigned] int
```
The issue can be reproduced by building this test with
native_sim/native/64.
Issue introduced in da6cd1a474
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Segger Systemview calls k_current_get() in sys_trace_k_thread_switched_in.
During early boot, this hook is triggered while k_is_pre_kernel() is true.
This triggers an assertion failure when CONFIG_ASSERT is enabled.
Add a guard to ignore the thread switch event if it is called pre-kernel.
Signed-off-by: Igor Knippenberg <knippenberg@filics.eu>
The nrfs audiopll is automatically started if freq fraction or
prescaler is requested. The initial state of the clock should be
off, so send a disable request after setting initial freq fraction
and prescaler.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Ensure the MAIN power domain is on before triggering
NRF_LRCCONF_TASK_CLKSTART_0 task.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add board shield definition for the Semtech SX1261MB2BAS LoRa module. This
is mostly copied over from semtech_sx1262mb2das.
Signed-off-by: Carlo Caione <carlo.caione@gmail.com>
Use API for registering synchronous interrupts. It reduced interrupt
latency due to NVM memory wake up.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add API for indicating that a deterministic interrupt will occur at
certain point in time in the future. Implementation is ensuring that
there will be no latency due to NVM memory waking up. There are 2
ways of ensuring that:
- setting low latency power mode in RRAMC (higher power consumption
in idle (not available in non-secure build)
- using PPI and GRTC to trigger the RRAMC wake up task right before
an expected interrupt
Module has a pool of GRTC channels and dynamically allocates and
frees those channels when events are registered and unregistered.
If GRTC channel is not available then algorithm falls back to power
mode setting (in secure build).
API offers registering an event using relative and absolute timing.
API can be used from Zero Latency interrupts.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add support for testing AMD-Xilinx Inter-Processor-Interrupt(IPI) on
Versal Gen2 RPU.
Add an overlay configuration to enable IPI-1 as the default
inter-processor interrupt for RPU0 in Versal Gen2. While IPI-1 is the
preset, it can be adjusted based on design requirements.
rpu0_rpu0_mailbox is set up in loopback mode for testing.
Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
Add support for testing AMD-Xilinx Inter-Processor-Interrupt(IPI) on
Versal-NET RPU.
Add an overlay configuration to assign IPI-5 as the default
inter-processor interrupt for RPU0 in Versal-NET. While IPI-5 is preset,
it can be adjusted based on design requirements.
rpu0_rpu0_mailbox is set up in loopback mode for testing.
Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
Add the inter-processor interrupt (IPI) nodes to the device tree for the
Versal Gen2 platform, as per Versal Gen2 Technical Ref Manual (AM026)
Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
Add the inter-processor interrupt (IPI) nodes to the device tree for the
Versal-NET platform, as per Versal-NET Technical Reference Manual (TRM).
Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
Add a new MBOX driver for the AMD-Xilinx IPI Mailbox, providing support
for the Versal-NET and Versal Gen 2 platforms
Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
Add device tree bindings for the AMD-Xilinx Inter Processor Interrupts
(IPI) mailbox.
The IPI architecture allows the passing of messages across the system
without the complications of autonomous read-write transactions and
polling inefficiency. The notification of the interrupt is also
possible without message buffers on some platforms. Some IPI channels
are hard-wired to particular core while others can be configured to
assign to any core on AMD-Xilinx heterogenous multiprocessor platform.
Signed-off-by: Ajay Neeli <ajay.neeli@amd.com>
1. Update the CRC sample’s Twister console regex to match the current
log output.
2. Add an integration_platforms entry (ek_ra8m1) so the sample runs
in PR CI.
3. Make CRC verification unconditional so the expected
“verification succeeded” log is always emitted and mismatches fail
the test.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Release the buffer with net_buf_unref(rsp) once the reading default link
policy settings response has been parsed.
Signed-off-by: zhenwei fang <fangzhenwei@bytedance.com>
Enable GP14 for this sample. Use commented-out entries for the
other servo outputs, as is done in the other overlay files.
Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
Update FlexCAN clock configuration across NXP MCXN family boards to use
PLL0 as clock source with a divider of 3 instead of FRO_HF with divider
of 1.
The new configuration provides FlexCAN peripherals by using the PLL0
output (150MHz) divided by 3 to achieve 50MHz, replace previous 48MHz
FRO_HF.
Signed-off-by: William Tang <william.tang@nxp.com>
Add CAN FD support for MCXN SOC family, including mcxn23x, mcxn94x
and mcxn54x.
Tested with tests/drivers/can.
Fixes#91138
Signed-off-by: William Tang <william.tang@nxp.com>
Add support for the DFRobot Beetle ESP32-C3 board. This is a small IoT
development board based on the Espressif ESP32-C3 RISC-V SoC.
Board features:
- ESP32-C3 (32-bit RISC-V at 160MHz)
- 400KB SRAM, 4MB Flash
- 2.4GHz WiFi and BLE
- 13x IO ports
- Integrated lithium battery charging management
The board has been tested with the following Zephyr samples:
- samples/basic/blinky
- samples/hello_world
- samples/net/wifi/shell
Signed-off-by: Mikołaj Rosowski <m.rosowski1@wp.pl>
Update the NXP FlexCAN migration guide entry to take the latest Kconfig to
devicetree change into account.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Rename the Aesc Silicon platform label used on GitHub to match the rest of
the platform labels.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Document breaking changes in prescale-glitch-filter configuration
and the new prescale-glitch-filter-bypass property. Provide migration
example for out-of-tree device trees.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Fix incorrect LPTMR prescaler/glitch filter mapping that led to wrong
frequency calculation and wrong hardware configuration.
- Calculate effective counter frequency correctly:
* Time Counter mode: divide by 2^(value + 1)
* Pulse Counter mode: divide by 2^value
- Map prescale-glitch-filter directly to the HAL enum (no offset math)
- Add prescale-glitch-filter-bypass DT boolean (default false)
- Restrict prescale-glitch-filter to 0..15 and update bindings/DTS users
- Add build-time validation for Pulse mode (value 0 requires bypass)
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Adjust the pin function bitfield to 4 bits to fit all RZ/V SoCs
(RZ/V2L, V2H, V2N). PFC bitfield of RZ/VH, V2N have 4 bits, so
the current 3-bit width does not fit them.
Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
If api->trylock(dev, id) fails (typically because a cross-core
HW lock is held by another core and returns -EBUSY, or returns
-EINVAL, etc.), the function will immediately return the error
code, but the local ctx->lock is not released, and interrupts
also remain in the locked state from the trylock. This may cause
IRQ lock state leakage. If there's no opportunity in the call path
to reach k_spin_unlock(), the system may exhibit unpredictable
"freeze-like" behavior.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The macro names sys_port_trace_k_fifo_put_slist_enter/exit in
tracing.h were incorrectly named and did not match the corresponding
definitions in backend implementations.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Remove the CONFIG_CAN_MCUX_FLEXCAN_MAX_MB configuration option from
the documentation notes, as the message buffer count information has
been moved to the devicetree and no longer needs to be described in
Kconfig.
Update the constraint for CONFIG_CAN_MCUX_FLEXCAN_MAX_FILTERS to
reflect that it must be less than the maximum number of message
buffers supported by the FlexCAN instance, as shown in the table
below the note. This keeps same behavior as driver.
Signed-off-by: William Tang <william.tang@nxp.com>
This change refactors the FlexCAN driver to use per-instance message
buffer configuration instead of global Kconfig options. The driver now
calculates message buffer allocation at compile time based on device
tree properties for each FlexCAN instance.
Key changes:
- Remove global CAN_MAX_MB Kconfig option and associated range constraint
- Add number_of_mb, rx_mb, and tx_mb fields to mcux_flexcan_config
structure
- Move callback arrays and atomic allocation bitmaps from static global
arrays to per-instance static arrays generated by macros
- Update data structure to use pointers to per-instance arrays instead
of fixed-size embedded arrays
- Add compile-time validation to ensure sufficient message buffers are
available for required RX filters and RX filters greater than 0
This approach allows different FlexCAN instances to have different
message buffer configurations based on their hardware capabilities
and device tree settings, improving memory efficiency and flexibility.
The change maintains backward compatibility while enabling better
resource utilization across different SoC variants.
Fixes#92798
Signed-off-by: William Tang <william.tang@nxp.com>
Add the `number-of-mb` and `number-of-mb-fd` device tree property to
all the NXP FlexCAN controller nodes across various SoC families to
specify the maximum number of 8-byte and 64-byte payload message
buffers supported by each FlexCAN instance.
This change updates device tree source files for multiple NXP SoC
families including Kinetis K6x, RT10xx, RT11xx, RT118x, MCX, S32K,
S32Z, and i.MX8MP/i.MX93 series. The property values are set based
on hardware specifications for each specific FlexCAN instance.
This property addition ensures proper resource allocation and
prevents buffer overflow issues in FlexCAN driver implementations.
Signed-off-by: William Tang <william.tang@nxp.com>
Removing the esp32s3_devkitm as deprecated and redundant.
The esp32s3_devkitc has essentially the same functionality.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Introduce the I2C_CODE_IN_RAM option to place selected critical
functions into the RAM code section.
This allows latency-sensitive I2C paths to execute from RAM when
required, while keeping the default behavior unchanged.
NOTE1: Enable I2C_CODE_IN_RAM on it81202bx: RAM size +2272B.
NOTE2: With kernel in RAM, enabling I2C_CODE_IN_RAM saves ~558ms
over 1,000 transfers (W/R/W2R), tested on it81202bx.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Fix WWDT warning interrupt by configuring ITRC to not intercept WWDT
timeout events.
ROM may configure ITRC OUT3_SEL0/OUT4_SEL0 to route WWDT0-2 to ITRC,
causing ITRC to reset the system faster than WWDT, preventing the
warning interrupt from functioning. Reconfigure these registers to
0xAAAAAA0A to allow RSTCTL to properly handle WWDT reset events.
Also enable WWDT warning interrupt in the board configuration to ensure
proper watchdog interrupt handling during tests.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
The WWDT callback is only invoked from the warning interrupt path.
If CONFIG_WDT_MCUX_WWDT_WARNING_INTERRUPT_CFG is 0, the warning
interrupt is effectively disabled, so a configured callback would
never fire.
Return -ENOTSUP and log an error when a callback is provided
without enabling the warning interrupt, to avoid a silent no-op.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Correct the WWDT window value calculation and add proper
range validation.
The window value was incorrectly set to the minimum timeout value.
Per hardware specification, it should be calculated as:
windowValue = timeoutValue - min_window_ticks
Also add:
- MAX_TIMEOUT boundary checks
- Validation before value assignment
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Move pinctrl_apply_state() from configure to init to ensure pinctrl
is applied once at boot rather than on every transaction.
When cs-gpios is defined, spi_context_cs_configure_all() runs after
pinctrl and reconfigures the CS pin as GPIO, properly overriding
any CS routing set by pinctrl.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Implement read_c45 and write_c45 functions to support clause 45
register access. This enhancement allows to access C45 registers
even when the MDIO controller does not natively support clause 45.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Use clause 45 MDIO access by default and only fallback to the phy
internal clause 45 bridge if the MDIO controller does not support
clause 45 transactions.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
DAT3-based card detection may fail for the first attempt on RT1060evkc
+ NXP_IW610x_v1 card, caused by transient signal states during
initialization. Set IMX_USDHC_DAT3_DETECT_RETRY as 10 can fix this issue.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
DAT3-based card detection can return a false negative on the first read
due to transient signal states after enabling detection. Add a bounded
retry loop (limited by IMX_USDHC_DAT3_DETECT_RETRY) with a short delay
between attempts to improve robustness.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
The /soc node is a simple-bus node and not an interrupt provider. Leaving
the #interrupt-cells property produces misleading Device Tree build
warnings:
Warning (interrupt_provider): /soc: '#interrupt-cells' found, but node is
not an interrupt provider <stdout>: Warning (interrupt_map): Failed
prerequisite 'interrupt_provider'.
Signed-off-by: Dong Wang <dong.d.wang@intel.com>
Add the SOC_IT8XXX2_RAM_CODE_NOINLINE Kconfig option to prevent
functions marked with __soc_ram_code from being inlined when LTO
is enabled.
This ensures RAM code functions remain in the RAM section instead of
being merged into callers by the compiler.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Adds doxygen documentation for the extended API of the Texas Instruments
TLC5971 LED strip controller driver.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Similar to how it's done for other driver classes, create a new doxygen
group to put all device-specific LED strip API extensions under.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The current driver implementation only support pooling and
synchronous operations. By adding DMA support the driver will
be able to operate in asynchronous mode which helps to improve
CPU usage and save power.
Signed-off-by: Fabin V Martin <Fabinv.Martin@microchip.com>
Add ADC0 and ADC1 pinctrl definitions and update the board metadata
to list ADC as a supported feature on the SAM E54 Xplained Pro board.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
Add a Zephyr ADC driver for the Microchip G1 ADC peripheral
with support for differential mode, multi-channel sequencing,
oversampling, and NVM-based factory calibration.
Signed-off-by: Arunprasath P <arunprasath.p@microchip.com>
This commit enables tests/driver/uart/async_api demo
for m33 in NETCMIX of imx943_evk.
- build command as follows,
west build -p always -b imx943_evk/mimx94398/m33
tests/drivers/uart/uart_async_api
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Exclude imx943,
- multi level interrupts feature is enabled defaultly,
so irqsteer1 driver is enabled, then the test case
report the build issue:
multiple definition of z_soc_irq_enable,
tests/arch/arm/arm_custom_interrupt/src/arm_custom_interrupt.c:47
first defined here.
Signed-off-by: Biwen Li <biwen.li@nxp.com>
This commit enables multi level interrupts:
- Enable multi level interrupts
imx943 is a two level interrupts system and
some interrupts(eg. edma interrupts) depend on irqsteer.
- Increase irq number from 405 to 790
Actually there are 407(IRQ 0 ~ IRQ 406) interrupts
from nvic(first level interrupts),
The second level interrupts are extended by irqsteer,
it extends 32 x 12 = 384 interrupts,
So first level interrupts + second level interrupts
= 407 + 384 = 791(IRQ 0 ~ IRQ 790) interrupts
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Supporting irqsteer using NXP HAL becomes increasingly harder with new
SoCs.
For example now there are two incompatible HAL drivers for IRQ steer
(mcux-sdk-ng/drivers/irqsteer and mcux-sdk-ng/drivers/irqsteer_1).
In order to avoid overcomplicating code and better scaling code for
newer SoCs just drop using the NXP HAL and implement an IRQ Steer native
Zephyr driver
Use irqsteer node of imx943 as example.
New features:
- Support multiple irqsteer instances.
- Indroduce new properties(nxp,irq-offset, nxp,num-irqs).
Signed-off-by: Biwen Li <biwen.li@nxp.com>
This adds priority attribute to irqsteer in order to
support multi level interrupts.
We need to make this change atomic so that we don't break
the build.
So, we introduce a new property named 'priority' to
`interrupt-cells` and we increase the number of cells.
Then we update all instances of interrupts
using irqsteer (for imx95, imx8m, imx8qm, imx8qxp and also
update the overlay(imx8mp_evk_mimx8ml8_adsp) for tests.
Signed-off-by: Biwen Li <biwen.li@nxp.com>
A couple of tests were inconsistent with glibc and picolibc.
Significant rework done to the `fnmatch()` implementation which included
refreshing that and the `rangematch()` implementations from commit
0a3b2e376d150258c8294c12a85bec99546ab84b
in https://github.com/lattera/freebsd
Removed `match_posix_class()` and implemented that functionality as
`rangematch_cc()`, which uses 64-bit integer comparison for matching
`[:alnum:]` et al instead of string comparison. That likely only works
for the "C" locale.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Signed-off-by: Harun Spago <harun.spago.code@gmail.com>
A regression in 936d0278bd introduced a
subtle bug in the way that escaped expressions were handled.
The regression originated with the assumption that test data (originally
adapted from a 3rd-party testsuite) was correct when it was in fact
flawed.
Specifically, `fnmatch("[[?*\\]", "\\", 0)` should fail (`FNM_NOMATCH`),
since the "\\" sequence (a single backslash after compilation) escapes
the following ']' character, thus leaving the bracket expression
incomplete.
As @keith-packard has pointed out,
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/\
V3_chap02.html#tag_18_13_01 says that a bracket expression is only
interpreted as a bracket expression, when a proper bracket expression
is formed.
Therefore, the pattern is interpreted as the sequence
`'['`, `'['`, `'?'`, `*` (wildcard), `']'` and the call should return
`FNM_NOMATCH` to indicate failure rather than 0 to indicate success.
Added new test cases from #98827 and some commentary for subsequent
reviewers.
This change does not completely fix#55186 but is related to it.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
1. Enable SAR ADC support for nxp mcxe31x platform.
2. Enable SAR ADC support for nxp frdm_mcxe31b board.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Zephyr's current ADC API only supports 32 logical channels,
which is inadequate for SAR ADCs on certain SoCs. For instance,
the ADC on the MCXE31B has 64 hardware channels. The previous
implementation used a one-to-one mapping between logical and
hardware channels. In the new SAR ADC driver version, we bind
hardware channels to logical channels via the zephyr,input-positive
property, enabling us to access any channel.
Currently, only imx93 uses this ADC. To maintain the bisectability
of Zephyr commits, in this commit we will also modify the imx93-related
files, inlcuding:
1. Update the clock_control_mcux_ccm_rev2.c to use the new Kconfig
option 'CONFIG_ADC_NXP_SAR_ADC'.
2. Add properties to the imx93_evk_mimx9352_m33.overlay of the adc_api
testcase.
Now the sar adc is native driver, so, remove
CONFIG_MCUX_COMPONENT_driver.sar_adc from the glue cmake.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add migration guide entry for compile definitions 'XIP_EXTERNAL_FLASH',
'USE_HYPERRAM' and 'XIP_BOOT_HEADER_XMCD_ENABLE' that were changed from
global to local scope in NXP board CMakeLists.txt files.
Applications that depended on these definitions being globally available
may need to be updated.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1.'XIP_EXTERNAL_FLASH' and 'USE_HYPERRAM' are only used in
zephyr/boards/nxp/mimxrt1180_evk/xip/evkmimxrt1180_flexspi_nor_config.c,
so just change them to local scope.
2.'XIP_BOOT_HEADER_XMCD_ENABLE' is only used in
zephyr/boards/nxp/mimxrt1170_evk/xmcd/xmcd.c,
so just change it to local scope.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Replace K_SYSCALL_OBJ() with K_SYSCALL_DRIVER_AUXDISPLAY() in syscall
handlers to validate that the requested driver operation is actually
implemented before invoking it.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add missing K_SYSCALL_MEMORY_WRITE and K_SYSCALL_MEMORY_READ
verifications in syscall handlers for pointer parameters.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fixed the sys_clock_announce to be outside of spinlock context to
resolve the issues related to invalid spinlock when CONFIG_PM is
enabled
Signed-off-by: Merin George <merin.george@infineon.com>
move depends on to only apply to default case, remove 'example' case,
remove unnecessary display tag on ai_m62_12f_kit
Signed-off-by: Camille BAUD <mail@massdriver.space>
Add the adc exemple configuration in boards dtsi an pinctrl.
Additionally, the SiWx917_rb4338a overlay file has been removed as
its contents have been integrated into the main device tree files.
Also, only siwg917_rb4342a is now tested in CI for adc_dt and
adc_sequence (even thought other boards can run the sample).
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This patch moves the definition of the pinctrl for both siwg917_rb4338a
and siwg917_rb4342a boards from the board dtsi to a dedicated file.
It allows better maintenance and consistency with other boards.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
This patch introduces a new header file regarding ADC binding with
SiWx91x SoC. It allows a more friendly definition of ADC channel input.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
- Include the enable, m0, and m1 microstep to the common init config.
- Refactor drivers that manually init these pins to use the pins
from the common config.
Signed-off-by: Hong Nguyen <hong.nguyen.k54@gmail.com>
Some PSA configs were missing for DTLS to work in LwM2M interop tests.
CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID was defined twice, so remove
redundant entry.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This test itself (not the code under test) needs to be build with the
host C library as it calls into its open/close/read/write APIs.
So let's ensure we build it with it, independently of what the
default C library may be.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Ensure we call into the host C library open/close/read/write
independently of which embedded C library the code is built with.
We do this by:
a) Using the native simulator nsi_host* trampolines when we just want
to call straight into the host libC.
b) Building in the native_simulator runner context (and therefore with
the host C library) two functions which we call from the embedded
side.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
VIDEO_BUFFER_POOL_NUM_MAX default value is 2 so remove it from
samples conf files setting it to that default value.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Now that VIDEO_BUFFER_POOL_HEAP_SIZE is available is used
in all projects, VIDEO_BUFFER_POOL_SZ_MAX can be removed.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Update video common code and applications to rely on the
CONFIG_VIDEO_BUFFER_POOL_HEAP_SIZE instead of
CONFIG_VIDEO_BUFFER_POOL_SZ_MAX.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
In preparation to the renaming of CONFIG_VIDEO_BUFFER_POOL_SZ_MAX
into CONFIG_VIDEO_BUFFER_POOL_HEAP_SIZE, add the new CONFIG
in all conf files equal to POOL_SZ_MAX multiply by POOL_NUM_MAX.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Clarify the size of the video buffer pool by having a
dedicated CONFIG for it. Until now the size of the
video buffer pool was equal to VIDEO_BUFFER_POOL_SZ_MAX
multiply by VIDEO_BUFFER_POOL_NUM_MAX.
This commit only add the description, the config doesn't
have yet any effect. Change will be added after all configs
are updated to define it in order to avoid breaking
platforms between 2 commits.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Switch to usage of ext-sdram property (ZEPHYR_REGION) for display
buffers instead of usage via the Shared-Multi-Heap API.
The ZEPHYR_REGION mechanism offer more flexibility than the
shared-multi-heap which is allocated on the whole PSRAM.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Switch to usage of ZEPHYR_REGION for display and video
buffers instead of usage via the Shared-Multi-Heap API.
The ZEPHYR_REGION mechanism offer more flexibility than
the shared-multi-heap which is allocated on the whole
PSRAM.
If enabled, add allocation of the VENC internal buffers
from the PSRAM via the HEAP allocator.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
The CONFIG_VIDEO_BUFFER_POOL_SZ_MAX represent the size of the
biggest buffer in the pool size and not the whole pool size.
For the stm32-venc this should be 1-000-000 and not 10-000-000.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Allow usage of either Shared-Multi-Heap based internal memory pool
allocation or allocation from a HEAP located optional in a
Zephyr region.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Addition of two options in order to select the Zephyr region
into which the video buffer pool should be placed.
CONFIG_VIDEO_BUFFER_POOL_ZEPHYR_REGION allows to indicate that the
video video pool should be placed in a specific ZEPHYR region which
name is CONFIG_VIDEO_BUFFER_POOL_ZEPHYR_REGION_NAME
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
There is no USB port or headers for lpuart on the cvb board,
thus introducing a shield for the mother board in order to
visualize serial output and expand I/O connectivity:
Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
Add support for NXP S32K5XXCVB boards which features
S32K566 SoC.
Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
Co-authored-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
S32K566 is a member of the S32K5 family which expands
s32k3 series to higher performance and larger memory.
Zephyr port for S32K5 will support cortex-M7 and cortex-R52
After reset, swt_startup is enabled and starts running,
disable it using the watchdog hook.
Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
Co-authored-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
This adds support for clock_control_get_rate/clock_control_set_rate
API, so that module clock rate can fetch or modify via them in Hz.
Note only CANFD support is added as an reference example and other
module support will be added as-needed.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Fix the issue that occurs when building with GNU and
CONFIG_LINKER_GENERATOR=y.
Currently, the GROUP {region} directive does not function properly
with GNU. The input section cannot link to the memory group
defined by "zephyr,memory-region" in the final output linker
script.
This commit updates the GNU section name parser script, allowing
it to look up both group and region for output block generation
in the final output linker script.
Signed-off-by: Thinh Le Cong <thinh.le.xr@bp.renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Previously, the pinctrl macro definitions on the sf32lb platform relied on
manual maintenance, which led to some errors.
We will now use scripts to
generate the metadata, ensuring accuracy
Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
Btp got support of EAD in f04d0196de, enabling config flag will enable
GAP/SCN/BV-01-C and GAP/ADV/BV-20-C to be executed
Signed-off-by: Evgenii Kosenko <Evgenii.Kosenko@silabs.com>
Similar to how it's done for other driver classes, create a new doxygen
group to put all device-specific ADC API extensions under.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Update the release-notes-4.4 to document:
1. The mcux_lpcmp driver will be deprecated.
2. The compatible 'nxp,lpcmp' for mcux_lpcmp
has now been changed to 'nxp,sensor-lpcmp'.
3. A new lpcmp driver based on the comparator
driver API has been created, and the 'nxp,lpcmp'
compatible is used for it.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Update the board overlay files for mcux_lpcmp sample to use
the sensor-lpcmp driver:
1. Delete the 'compatible' and 'clocks' properties from
the SoC-level lpcmp nodes.
2. Set the compatible to "nxp,sensor-lpcmp" to use the
sensor-based lpcmp driver.
3. Add '#io-channel-cells = <2>' property for sensor API.
4. Add pinctrl configuration for lpcmp0.
5. Ensure status is set to "okay".
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
We shall enable lpcmp in application level. Enabling lpcmp
at the board level doesn't make any sense, since the lpcmp
input is determined by the application.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. We shall set the proper clock source for lpcmp.
2. The property '#io-channel-cells' is currently
not needed for LPCMP.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
1. Enable MCXA/MCXN platforms' LPCMP clock control through
the clock driver (syscon).
2. Enable MCXE platform's LPCMP clock control through the
clock driver (mc_cgm).
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
We are planning to implement a new lpcmp driver based on the
comparator API and deprecate the current sensor-based driver.
We now mark the mcux_lpcmp as deprecated.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
We are planning to implement a new LPCMP driver based on the
comparator API and deprecate the current sensor-based driver.
We would like to use the nxp,lpcmp binding for the new
comparator-based driver implementation. To avoid naming conflicts,
we are renaming the current sensor binding to nxp,sensor-lpcmp.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Split device initialization into two phases across all LBM drivers:
1. Boot-time init: Minimal device initialization
2. First config: Radio hardware initialization
This deferred initialization approach provides full control over the
radio hardware, allowing applications to perform any necessary setup
before the radio is initialized. The radio init is automatically
triggered on the first call to lora_config().
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Add functions to register and unregister user GPIO callbacks for DIO1
interrupts on LBM lora radio devices. This allows external code (e.g., the
LoRa Basics Modem HAL) to receive notifications when DIO1 fires.
The driver configures the pin mask automatically based on the DIO1 pin
from devicetree.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
KeepSorted can fail on Windows when the active code page is
not UTF-8 (e.g. GBK), because text files in the Zephyr tree
are UTF-8. Detect file type via libmagic and only process
text/* files, avoiding attempts to decode binary content.
Open text files via GIT_TOP / <path> with encoding="utf-8"
(and errors="surrogateescape") to prevent UnicodeDecodeError
during local compliance runs without changing the KeepSorted
sorting rules.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Refactor the Infineon TCPWM counter driver to use the TCPWM block base
address instead of the counter instance base address. This change aligns
with the standard Infineon PDL API which requires the TCPWM block base
and counter index as separate parameters.
This modification maintains functional compatibility while providing
better alignment with the underlying hardware abstraction layer.
This also aligns with PR feedback to move the ifx_tcpwm.h header file
from the include folder (public APIs) to the drivers folder. Instead,
this refactoring prepares to remove that header file entirely.
Signed-off-by: Braeden Lane <Braeden.Lane@infineon.com>
Spec - Section 2.3.8
> If the property is defined with an <empty> value, it specifies that
the parent and child address space is identical, and no address
translation is required.
Spec - Table 2.3
> <empty>: Value is empty. Used for conveying true-false information,
when the presence or absence of the property itself is sufficiently
descriptive.
`ranges = <>;` should be interpreted as `<prop-encoded-array>` with
empty array, when processing the child the ranges should be used and
given it is and empty array we will fail to map and behaviour
is undefined by the dts spec!
Hence IMO `ranges;` is the correct syntax here. This leaves no space
for uncertainty and undefined behaviour by tools and
user interpretation.
Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
Similar to how it's done for other driver classes, create a new doxygen
group to put all device-specific Disk Access extensions under.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This is a follow-up to commit 59d8fbc0a9.
Add missing brackets in mask definitions that use `COND_CODE_1()`.
Without those, the call to `__DEBRACKET()` that is done inside
`COND_CODE_1()` removes the outer brackets provided by `GENMASK()`,
what causes problems when the mask is directly used with another
operator like `~`.
Remove also no longer needed brackets added in `start_next_packet()`
by the commit mentioned above as a workaround for this problem,
the root cause of which was not identified at that time.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add new configuration item color_coding in the structure
mipi_dbi_config and in mipi-dbi-device binding property.
The color coding is defined by MIPI Alliance Standard for
Display Bus Interface v2.0, which is required by some display
controllers and device.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
Some diagrams on the file dt-bindings/mipi_dbi/mpi_dbi.h
doesn't deploy the correponsing pulse signal, many of them
the rising flag looks moved some spaces before or after
the rising/falling time. This is fixed by replacing
tasb with spaces
Signed-off-by: Nicolas Moreno <niko722795@gmail.com>
Add a `zephyr_i2c` node label pointing to `i2c0`, which is the bus used by
Units connected through Grove PORT.A. This follows the convention already
used on the Core2 and CoreS3 boards.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
According to the M5Stack Fire v2.7 documentation, the HY2.0-4P Grove PORT.C
is wired to GPIO16 and GPIO17.
Update the DTS pinctrl configuration to route the PORT.C UART to these pins
so that the Grove connector matches the official hardware documentation.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
Implement set_orientation api
Inverting segment_remap and com_invdir at the same time, rotates the
screen by 180 degrees.
Signed-off-by: Greter Raffael <rgreter@baumer.com>
Implement `disk_access_erase` by setting all bytes to 0x00, with the
same bounds checking as `disk_access_write`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add the `disk_access_erase` command to complement the read and write
commands.
As a backwards compatible new feature, this increments the API version
from `1.0.0` to `1.1.0`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add a function for erasing a chunk of blocks.
The SD Card Association Pt1 Simplified Physical Layer Specification
recommends to erase many blocks simultaneously in order to enhance data
throughput (4.3.5.1).
Signed-off-by: Jordan Yates <jordan@embeint.com>
Re-instate a z_is_thread_ready() check on the preempted metaIRQ
thread before selecting it as the preferred next thread to
schedule. This code exists because of a corner case where it is
possible for the thread that was recorded as being pre-empted
by a meta-IRQ thread can be marked as not 'ready to run' when
the meta-IRQ thread(s) complete.
Such a scenario may occur if an interrupt ...
1. suspends the interrupted thread, then
2. readies a meta-IRQ thread, then
3. exits
The resulting reschedule can result in the suspended interrupted
thread being recorded as being interrupted by a meta-IRQ thread.
There may be other scenarios too.
Fixes#101296
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
ZMS IDs are not necessarily 32 bit anymore, so the sample ought to
reflect that.
When the sample is built with CONFIG_ZMS_ID_64BIT=y, the KEY_VALUE_ID
will use a 64 bit value, chosen so that it would conflict with CNT_ID
only if 64 bit IDs were not handled properly.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
By request, add another loop to fill an extra sector with small data
entries only (4 bytes per entry in the 64 bit ID case).
This should cover ZMS' special case handling of different data sizes.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Previously, there was no proper test coverage of `zms_calc_free_space()`
or `zms_active_sector_free_space()`, so they had some undiscovered bugs.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
The initial implementation had a couple of flaws, including:
* Generally overcounting the free space by ATE_SIZE bytes per sector.
* Counting multiple ATEs of the same ID if placed in the same sector.
The correct behavior is to only count the most recent entry.
* When a sector was mostly or completely filled with small data sizes,
there was a correction term applied in the wrong location.
* The same correction term would be mistakenly applied when a sector
was filled with only delete ATEs, which resulted in undercounting
the free space in that sector.
This is addressed by rewriting the API according to a simple principle:
the total free space in a filesystem should equal the sum of free space
in every GC'd sector (minus 1 sector reserved for GC itself).
This should work because during garbage collection, ATEs are not moved
between sectors arbitrarily. Only one sector gets GC'd at a time and
every entry in sector N gets either removed or copied to sector N-1.
This means that any two valid entries that occupy a single sector would
still occupy a (different) single sector before and after the operation.
This property lets us simplify the total free space calculation by
considering one sector at a time and reapplying the calculation which
was just introduced for `zms_active_sector_free_space()`.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
The initial implementation had a flaw in it: when an active sector was
almost full, the naïve calculation could easily underflow and return a
negative value, which would be misinterpreted as an errno.
Rewrite this API to satisfy the following, reasonable expectations:
* Always return a non-negative value, provided ZMS is initialized.
* Always return 0 if no more data can be written into the sector
without triggering garbage collection.
* Never return a value less than the actual number of bytes that can
still be written into the sector.
This requires awareness of a few special cases in ZMS. These are now
captured in a helper function, which will be reused later.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Use the same function to parse all records. The main difference is that
answer record handling matches the answer with the initial query, i.e.
AAAA query will have AAAA answer record. Additional records do not have
any matching with the original query.
Also just warns if an additional record parsing fails. But answer record
parsing is an error.
Tested on BeagleConnect Freedom
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
As described in Section 12 of RFC 6763 [0], DNS-SD responses can contain
SRV, TXT and A/AAAA under additional records. This is done even in the
zephyr DNS service advertisement. So these additional records should be
passed to the user for handling.
Most of the code for additional records is taken from normal dns answer
unpacking. However, I have split the handling into a separate function
since I have only added additional records handling for DNS-SD. The same
code should be usable for answer record as well if required. The main
thing missing from additional record code is that we do not need to
match the query type to the response type.
Tested on BeagleConnect Freedom.
[0]: https://datatracker.ietf.org/doc/html/rfc6763.html#section-12
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
These SoCs don't have LL_PKA_IsEnabled() due to the PKA IP being different.
Since PKA can operate without RNG clock on entire STM32WB0 series, skip
the check on the entire series which avoids the call to non-existent
function on STM32WB06/07 and fixes build.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Adds doxygen documentation for the extended API of the Solomon SSD16XX
EPD display controller driver.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Similar to how it's done for other driver classes, create a new doxygen
group to put all device-specific Display API extensions under.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Perform call to LL_DBGMCU_{Dis,En}ableDBGStandbyMode() for STM32WBA series
in the common code, as done with other series. While at it, also add
missing call to LL_DBGMCU_{Dis,En}ableDBGStopMode().
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The hard coded 2s timeout might be too small for LTE and Nb-IoT
networks.
Instead use already existing CONFIG_NET_SOCKETS_DNS_TIMEOUT
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
3GPP TS 27.010 defines default timeouts as follows:
* Acknowledgment Timer (T1), min 10ms, max 2.5s default 100ms
* Response Timer for multiplexer control channel (T2),
min 20ms, max 2.5s, default 300ms
* Add Kconfig for both T1 and T2 timers
The Response Timer for wake-up procedure(T3) is already a Kconfig
and its default match the specification.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add retry counter for opening and closing CMUX as well as
opening and closing the DLCI channel.
Use same retry counter for both DLCI control messages as well as CMUX
control messages as there is very minimal room for race condition.
DLCI messages are only send when CMUX control channel is open.
Where relevant, use disconnect(cmux) for all closing calls.
So we have one entry point for cleaning.
Similarly refactor modem_cmux_on_dlci_frame_dm() to dlci_close() as
this is the single function to close and clean up a channel.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Changes the default page size to 4096 (4KiB) for SPI/QSPI NOR flash
devices if MCUboot is enabled to allow for swap updates to work by
default
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Restore the clock source and exception bits in the CTRL register after
waking from low-power modes that reset SysTick. Also reconfigure the
interrupt priority.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Aligned with changes in pytest plugin, where added support
of multiple connections from one device.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Changed 'harness: console' to 'harness: pytest' to verify output
from both application and network cores using the new multiple
UART connection support. The pytest test reads from connection_index=0
(application core) and connection_index=1 (network/remote core) to
validate IPC communication on both sides.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Replace manual serial port handling with the new multiple UART
connection support from pytest-twister-harness. The test now uses
connection_index=1 to read from the second core UART instead of
managing a separate serial connection fixture.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Document the new multiple UART connection support in pytest-twister-harness
plugin. Hardware devices can now access multiple connections using the
connection_index parameter (0=main UART, 1=second core UART).
Also update readlines_until() examples to use explicit regex= parameter
for improved API clarity.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Updated unit tests from pytest-twister-harness
with wupport of multiple connextions.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Add support for multiple connections (e.g. UART) from one device,
enabling communication with second core UARTs. Feature implemented
by extracting connection logic from DeviceAdapter to new
DeviceConnection class with specialized implementations:
- SerialConnection for hardware UART ports
- ProcessConnection for native simulation
- FifoConnection for QEMU communication
Each connection maintains separate log files (handler.log,
handler_1.log, etc.) and can be accessed via connection_index
parameter in device methods like readline() and write().
This enables testing multi-core applications where different
cores communicate through separate UART interfaces.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
The z_vrfy_uart_configure function was incorrectly checking for the
existence of the 'config_get' handler instead of 'configure'.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add a parameter to MQTT TLS configuration that allows to force native
TLS on a socket if offload dispatcher is used. This allows for MQTT to
use native TLS implementation with an offloaded TCP socket.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Adds a warning to `bt_l2cap_chan_send` that the user must not pass
buffers to this function whose pool has implemented a destroy callback
(net_buf_pool::destroy) that uses synchronization primitives. This is
due to the HCI driver interface not having defined rules for where a
buffer may be freed, leading to the possibility of the callback
being called from the ISR. This warning can be removed at a later point
if the HCI driver interface is redesigned to not pass the net_bufs
directly.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
The pio_rpi_pico_get_pio function was defined as 'inline' in the
header file. This caused 'undefined reference' linker errors when
building with CONFIG_NO_OPTIMIZATIONS=y (-O0), as the compiler
doesn't inline the function and no external symbol is provided.
This patch changes the definition to 'static inline' to ensure a
local copy is generated in each translation unit when not inlined,
consistent with other helper functions in Zephyr and the Linux kernel.
Fixes#101155
Signed-off-by: Vincent Liao <vincent932693@gmail.com>
Add implementations for the following SBC codec parameter getter functions:
bt_a2dp_sbc_get_channel_mode(): returns the channel mode (mono, dual,
stereo, joint stereo); bt_a2dp_sbc_get_subband_num(): returns the number of
subbands (4 or 8); bt_a2dp_sbc_get_block_length(): returns the block length
(4, 8, 12, or 16); bt_a2dp_sbc_get_allocation_method(): returns the
allocation method (SNR or loudness).
These functions parse the SBC codec configuration parameters and return
the corresponding values, completing the API defined in a2dp_codec_sbc.h.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
add initial version of devicetree for amebad SOC.
amebad devicetree file is main platform dtsi file, which should
be included from board dts (e.g rtl872xd_evb.dts)
Signed-off-by: zjian zhang <zjian_zhang@realsil.com.cn>
The documentation is generally using 'inst' consistently to refer to
instance numbers, but a few helper macros have gone their own way.
Clean this up to restore consistency.
This addresses changes introduced somewhere around the following
commits:
- 4c8ed7dd9a ("devicetree.h: Rework
DT_ANY_INST_HAS_PROP_STATUS_OKAY")
- ca6645d508 ("devicetree: shorten DT_ANY_INST_HAS_*_STATUS_OKAY")
- 75ab4d5507 ("devicetree: add DT_ALL_INST_HAS_PROP_STATUS_OKAY()
macro")
- 35a8e37ac2 ("devicetree: add DT_ALL_INST_HAS_BOOL_STATUS_OKAY()
macro")
Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
The `renesas,ra-adc` compatible was replaced by `renesas,ra-adc12`,
at #95710 but one ADC devicetree node was not updated accordingly.
This commit updates the missing node to use the correct
`renesas,ra-adc12` compatible.
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
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>
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>
None of these headers are needed by this file for anything.
Let's just remove them.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The test fails on 64bit targets running out of heap.
Let's just increase it.
Circumstantially it started failing after
d5982f0f89
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
According to the reference manual, 'When the BYPSHAD control bit is set
in the RTC_CR register [...] the value of one of the registers may be
incorrect if an RTCCLK edge occurs during the read operation'. We need
to read te subseconds register until two successive reads are equal.
Signed-off-by: Adrien Lessard <adrien.lessard.42@gmail.com>
According to the reference manual, 'When the BYPSHAD control bit is set
in the RTC_CR register [...] the value of one of the registers may be
incorrect if an RTCCLK edge occurs during the read operation'. We need
to read te subseconds register until two successive reads are equal.
Signed-off-by: Adrien Lessard <adrien.lessard.42@gmail.com>
Add USB host support for rw612_bga board:
- Update board YAML to include usb_host
- Add zephyr_uhc0 node in device tree with status "okay"
Signed-off-by: Aiden Hu <weiwei.hu@nxp.com>
Add the clock emablement in the LPUART driver to avoid
depending on the default enablement settings.
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
The PSA Crypto implementation in Mbed TLS requires some heap
to operate.
Provide a small malloc arena to ensure this test remains
compatible with MINIMAL_LIBC configurations
where the arena is disabled by default.
Signed-off-by: Mohamed Moawad <moawad@synopsys.com>
Update system clock related variables
otherwise Cy_SysLib_Delay or Cy_SysLib_DelayUs are incorrect
Signed-off-by: Kevin Chan <kevin.chan3@infineon.com>
Example DTS config comment is meant to help users of the
driver, with the PSRAM device tree configuration.
Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
Tested:
Verified that reading and writing data to the PSRAM
with MCU's FlexSPI controller in Quad Mode, works as
expected.
Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
It's not possible to add comments to a json file, so there's no option to
add license or copyright text.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add mcxw23_evk and frdm_mcxw23 platforms to the power management
test suite to validate power management functionality on MCXW23
hardware.
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
Enabled modes:
idle: SLEEP
suspend: DEEP-SLEEP
standby: POWER-DOWN with CPU retention
OS Time Base: OSTIMER with 32K clock source
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
Clarify the different requirements for QEMU emulation versus real
hardware deployment in the versalnet_rpu board documentation.
For QEMU target:
- XSDB (Xilinx System Debugger) is not used
- PDI (Programmable Device Image) is not required
- QEMU provides direct emulation without hardware initialization files
For real hardware target:
- XSDB and PDI file are required
- PDI contains the hardware initialization and boot configuration
needed for the physical device
This documentation update helps users understand why PDI is optional
for QEMU testing but mandatory for physical board deployment.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
This reverts commit d11474ce64.
Follows the reversal of 1f69b91e90, as
this commit reflects changes made in there.
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
This reverts commit 1f69b91e90.
Chose to revert it because its changes constitute a deviation from
the dmic API, resulting in failing tests on affected platforms
(mimxrt685s and mimxrt595s mainly).
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
On non-Windows systems execute a new program, replacing the west packages
call, when trying to install packages using pip.
For Windows, update the documented way of installing python packages,
or using 'west packages pip --install' print a warning.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Update hal_stm32 revision to support ble and link layer
libraries selection thanks to KConfig
BT_STM32WBA_LIB_CONFIG
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Add new KConfig BT_STM32WBA_LIB_CONFIG specifying the configuration
of the stm32wba ble library (full or basic) depending to bluetooth
features.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Select BT_CTLR_PHY_CODED_SUPPORT for ESP32 variants that support
Bluetooth 5.0 coded PHY (long range). The original ESP32 series
is excluded as it only supports Bluetooth 4.2.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
- support accel feature using lpi2c0 and enable accel cases:
accel_trig/accel_polling
- enable i2c_target_api case using lpi2c0 and lpi2c1
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Updates hal_infineon to remove stray includes of cyhal that broke the
build for folks using our wireless parts with non-Infineon
microcontrollers when building with Zephyr.
Wrap #include's of cyhal such that they are not included when building.
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
Since d45cd6716b this code does not use
types defined in the POSIX_API and therefore we do not need to work
around header include issues.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The drivers section of migration guides has always been kept ordered using
a zephyr-keep-sorted block. However, due to the default sorting order, the
list elements are not always in alphabetical order: for example, 'STM32'
comes before 'Shell' because of the uppercase 'T'.
Turn on case-insensitive sorting to ensure the list is sorted in
alphabetical order and adjust the existing contents accordingly.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Use void * cleanly: avoid needless type-casts and use void * for
generic pointers instead of uint8_t *.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
CONFIG_WARN_DEPRECATED is 'y' by default.
When a user actively disables CONFIG_WARN_DEPRECATED, one would expect
that they would stop getting all deprecation warnings, not just the
ones from kconfig.
Otherwise users continue getting tons of these warnings when building
deprecated functionality.
So let's indeed disable them also for symbols and macros.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The combination of pytest's `-s` (--capture=no) option and
`--log-cli-level=DEBUG` was causing duplicate log output.
Fixed by replacing `--log-cli-level=DEBUG` with `--log-level=DEBUG`.
`--log-cli-format` removed as is not used.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
When using --only-failed with required applications, twister could enter
an infinite loop during application dependency resolution.
Fixes#100808
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
This test checks the functionality of the callbacks for erase and write
operations. The callbacks allows the modification of the simulated flash
behaviour during this operations.
Signed-off-by: Radosław Koppel <r.koppel@k-el.com>
Add the functionality that allows to register write and erase callbacks.
The callbacks can modify the behaviour of this operations.
It are meant to be used during testing of the situation when the memory
starts to generate errors or the data cannot be trusted anymore.
It expands the testing possibility, for a situation when the module
is tested that checks the data integrity and and we cannot just jump in
between its internal write and read operations to inject an error.
Signed-off-by: Radosław Koppel <r.koppel@k-el.com>
PWM driver clears its runtime state on each suspend event.
However, since nrfx 4.0 integration nrfx driver instance is part
of the runtime state structure, so clear action must be limited.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
struct net_val is a packed struct containing
`struct bt_mesh_key dev_key` member which contains uint32_t
variable inside.
Compiling this code with llvm clang produces the following
warning:
`
error: field dev_key within 'struct net_val' is less aligned
than 'struct bt_mesh_key' and is usually due to 'struct net_val'
being packed, which can lead to unaligned accesses
[-Werror,-Wunaligned-access]
`
However, the `struct bt_mesh_key dev_key` is handled in accordance
to its actual alignment. I.e., it is copied using memcpy() which
prevents any alignment issues.
This commit resolves the following Zephyr issue:
https://github.com/zephyrproject-rtos/zephyr/issues/101144
by suppressing -Wunaligned-access warning
on the `struct net_val` declaration.
Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
TOOLCHAIN_WARNING_UNALIGNED_ACCESS can be used to
suppress false-positive warnings generated
by llvm clang compiler caused by -Wunaligned-access option
Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
Add callback `codec_negotiate` if the `CONFIG_BT_HFP_HF_CODEC_NEG` is
set.
Calling the function `bt_hfp_hf_select_codec()` if the codec ID is
valid in the callback `codec_negotiate`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Capture the voice from PCM and play voice through Codec if the SCO
connection has been established.
Capture the voice from Codec and send out through PCM if the SCO
connection has been established.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Send VS commands to configure the PCM pins before establishing SCO
connection.
Send VS commands to start the voice transferring when SCO connection
has been established.
Send VS commands to stop the voice transferring when SCO connection
has been broken.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
For some controllers, such as NXP IW612 Chipset, the PCM pins of
controller needs to be configured before the SCO connection is
established. And it requires to get the `air_coding_format` to
configure the PCM pins of controller.
So, it requires to known when the SCO connection will be established
and what the `air_coding_format` of the SCO connection.
Add the function `bt_sco_hci_cb_register()` to monitor the HCI
commands `setup_sco` and `accept_sco_req`.
Add the function `bt_sco_hci_cb_unregister()` to remove the monitor.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Fix the Video section heading underline to use the correct number
of equal signs to match the heading length.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
`rtio_executor_handle_multishot` releases the RX buffer in case of
cancellation or error. However, in case of an sqe that uses a mempool,
it reset the buffer before that, making the release a NOOP. Fix that by
moving the reset of the buffer to right before pushing the sqe back onto
the queue.
Signed-off-by: Wouter Horré <wouter@versasense.com>
The DNS-based Service Discovery has the following abstract:
This document specifies how DNS resource records are named and
structured to facilitate service discovery. Given a type of service
that a client is looking for, and a domain in which the client is
looking for that service, this mechanism allows clients to discover
a list of named instances of that desired service, using standard
DNS queries. This mechanism is referred to as DNS-based Service
Discovery, or DNS-SD.
As is stated here, DNS-based service discovery is designed to find all
instances implementing a service, not just the first one.
Currently, zephyr `dns_resolve_service` will call the callback for only
the first client instance found. It still does receive the responses
from other instances, but those are dropped since the query is already
marked as finished. The seems incorrect behavior.
With that said, the changes in this commit are API breaking, since even
the docs already state that only the first response is currently used.
So I am fine with creating a new function for discovering all instances
if that is more acceptable.
Since DNS-SD queries expect multiple responses, timeout or manual
cancellation are the only methods to stop an in-flight request. When a
timeout happens, the callback is called with one of the following
responses:
- `DNS_EAI_ALLDONE`: If at least one successful response was received.
- `DNS_EAI_CANCELED`: If no successful response was received.
Tested with 3 BeagleConnect Freedoms (2 running mdns_responder and 1
running dns_resolve sample).
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Adds CONFIG_ETH_NET_IF_NO_AUTO_START to allow
pre-configuration of Ethernet interfaces (e.g., filters, mac)
before they become operational. When enabled, net_if_up() must be
explicitly called by the application.
Signed-off-by: Jeremy Truttmann <jetstreeam.code@outlook.com>
arch reboot is not included in PM flow, so drop
the option CONFIG_PM_LOG_LEVEL to
fix build issue:
- error: CONFIG_PM_LOG_LEVEL undeclared here (not in a function)
Signed-off-by: Biwen Li <biwen.li@nxp.com>
The boot container was using a non-standard symbol name
`__rom_start_address` for the ROM start address. This symbol
is not defined when build with `-DCONFIG_CMAKE_LINKER_GENERATOR=y`.
This commit use the symbol `__rom_region_start` which is
available for both cases.
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
Update the hal_renesas rev to fix the USB device not sending ZLP
at the end of the DCP data stage
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
The arbitrary ordering of ILINK may cause the .last_section
to be placed between the gaps of consecutive sections in the ROMABLE
region.
This commit adds a workaround for Renesas RA devices, which have OFS
registers placed in FLASH. Adding a small .rom_padding section at
the beginning of the ROM_REGION stabilizes the placement order and
ensures that all ROM sections remain within the expected region.
Signed-off-by: Thinh Le Cong <thinh.le.xr@bp.renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Switch OFS-related linker sections from GROUP FLASH to GROUP ROM_REGION
to avoid overlapiping placement with .text when build with GNU and
CONFIG_CMAKE_LINKER_GENERATOR=y of RA boards that have OFS in FLASH
Signed-off-by: Thinh Le Cong <thinh.le.xr@bp.renesas.com>
CONFIG_XLNX_PSTTC_TIMER_INDEX has been unused since commit 57784fb9d5
(v2.3 era), which switched to using the `DT_INST_` macro and defaulted to
the first instance via `DT_INST_REG_ADDR(0)`.
Remove the obsolete and broken CONFIG_XLNX_PSTTC_TIMER_INDEX.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
The existing ASCS test callback verification functions scale poorly and are
not easily reusable across different cases.
This change introduces a more generic approach to expectation checks by
adding `expect_bt_bap_unicast_server_cb_release_called(_expected_count,
_streams)` and similar functions, improving readability and maintainability
of ASCS unit tests.
Fixes#58034
Signed-off-by: Dima Kushchevskyi <d.kushchevskyi@sirinsoftware.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>
- Only compile the mtb-hal-cat1 module's source when
CONFIG_USE_INFINEON_LEGACY_HAL is set.
- The serial-flash sub-module relies on the legacy hal.
It was getting added to all builds, including ones that
don't use the legacy hal.
Signed-off-by: Bill Waters <bill.waters@infineon.com>
Move reference labels within definitions so that they do not break the
flow of definition lists.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fixes documents where blocks where indented to the right of their parent
causing them to render as definition lists.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Definition lists are key for explaining terminology, and making them
visually cohesive can help the reader better scan information.
This change introduces a distinct visual hierarchy by:
- Adding a vertical border to group the list items.
- Highlighting terms (dt) with a background color and rounded corners.
- Adding decorative indicators (bullets) to separate entries clearly.
The new style is also intentionally more visually distinct so that
_incorrect_ usage of definition lists (usually due to bad
indentation) can be more easily detected as it won't look good
when not used for things meant to be "definition lists" :)
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Some tweaks to the CSS to have better contrast of the cards on the
homepage, and a few other places.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
"Touch targets with sufficient size and spacing help users who may have
difficulty targeting small controls to activate the targets", so move
the gear icon a bit to give it more air.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
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>
When regulator-min-microvolt and regulator-max-microvolt properties are
provided in the devicetree node, a fixed regulator is never ready due to
failed initialization in regulator_common_init().
At at commit 9463d9a51d regulator_common.c
lines 68-71, if min or max voltages are set, then regulator_common_init()
attempts to get the regulator's current voltage setting so that it might
"Snap to closest interval value if out of range." However
regulator-fixed has not implemented the regulator_get_voltage() api, so
regulator_common_init() fails.
Adding an implementation for regulator_get_voltage() which returns
min voltage, just like regulator_fixed_list_voltage() does, resolves
this issue.
Fixeszephyrproject-rtos/zephyr#99339
Signed-off-by: Alex Hogen <alex@edt.com>
In d45cd6716b the mayority of the
Zephyr codebased 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
fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In 55c49cdb8f wifi
drivers were 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
fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In 55c49cdb8f wifi
drivers were 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
fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In 55c49cdb8f wifi
drivers were 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
fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In 55c49cdb8f wifi
drivers were 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
fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In 55c49cdb8f wifi
drivers were 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
fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Socket dispatcher should create a native TLS socket with a native
underlying socket even if the socket is only bound to a native interface,
it shouldn't be needed to call ZSOCK_TLS_NATIVE specifically. This works
just fine, so add a test case for this scenario to make sure it remains
that way.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Split the code for DMA setting to consider the tx and rx buffers
separately, this makes the driver work for use cases where tx only or rx
only is needed, such as when using this with the ws2812 driver.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
In b5588ed684, and after in
e19d78e607 the mayority of the
Zephyr modem drivers were changed to use the Zephyr native
net_ prefixed types, but a few were missing.
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>
In b5588ed684, and after in
e19d78e607 the mayority of the
Zephyr modem drivers were changed to use the Zephyr native
net_ prefixed types, but a few were missing.
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>
In b5588ed684, and after in
e19d78e607 the mayority of the
Zephyr modem drivers were changed to use the Zephyr native
net_ prefixed types, but a few were missing.
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>
In b5588ed684, and after in
e19d78e607 the mayority of the
Zephyr modem drivers were changed to use the Zephyr native
net_ prefixed types, but a few were missing.
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>
In e6daacf3c9 the mayority of the
ethernet drivers code was changed to use the Zephyr native net_
prefixed symbols, 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
fail to build.
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, 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
fail to build.
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, 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
fail to build.
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, 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
fail to build.
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, 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
fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
It seems no other test (or sample) was building this.
So let's enable them in this test, so we at least build test them
somewhere.
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, 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
fail to build.
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, 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
fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
- add an overlay file and enable i2c1 and i2c2 nodes.
- add stm32l562e_dk to testcase.yaml for CI testing.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
The disk_access test failed during 8‑sector writes with:
- sd write error 16
- Failed to write to sector zero (assert in
tests/drivers/disk/disk_access)
Enabling idma on &sdmmc1 allows proper multi‑block transfers
and eliminates the write failure.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
- Update the driver to support the PSE84 device
- Update to new peripheral clock allocation scheme
Signed-off-by: Bill Waters <bill.waters@infineon.com>
Allow making the zephyr-keep-sorted check ignore cases, for example:
// zephyr-keep-sorted-start ignorecase
....
// zephyr-keep-sorted-stop
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
In d45cd6716b the mayority of the
Zephyr codebased 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
fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Since the shell (and its use of sys_getopt) does not have any dependency
on the POSIX_API anymore, we do not need to disable it when we disable
the POSIX_API compatibility layer.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This sample does not need it, and having it enabled masks uses of the
non native API by this code.
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, 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
fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In c52c206e26 &
32059d7414 the USB code was changed to
use the Zephyr native net_ prefixed API, but some were forgotten
(nto[hn][ls]()). Let's change it now.
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>
In 32059d7414 this code was changed to
use the Zephyr native net_ prefixed API, but some were forgotten
(ntohs()). Let's change it now.
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>
In c52c206e26 this code was changed to use
the Zephyr native net_ prefixed API, but some were forgotten
(ntohs()). Let's change it now.
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>
The vector_table_relocation.dtcm test assumes that the vector
table can be relocated to a DTCM region and executed from there.
However, on STM32F4 (Cortex-M4),this is not possible due to
architectural constraints.
The CCM RAM on STM32F4 series is connected via the D-bus,
not the ICode bus, and therefore cannot serve as an executable boot
space for the vector table.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
In the STM32F3 series, the CCM RAM can interface with
the Arm Cortex-M4 core via the I-BUS, which makes it
possible to run the vector table relocation test.
See Refman 0316 Page 50.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Replace inefficient string parsing loop with CMake list iteration for
processing list_hardware.py output. The previous implementation used
repeated string operations on the entire output string for each line,
which is increasingly slow as hardware list grows.
Local tests show hwmv2.cmake module loading in ~350 ms instead of
540 ms on my machine.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add parameter to the link_layer_register_isr() to force
or not the link layer isr registration in case of multiple
function calls.
This change fixes the interrupt service when resuming
from a PM standby state.
Update Bluetooth hci_stm32wba.c driver and
IEEE 802.15.4 ieee802154_stm32wba.c driver accordingly.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Add support for the FocalTech FT9001 evaluation board:
- Board dts/dtsi and pinmux
- defconfig and board.cmake
- Basic documentation
The board has been tested with the following Zephyr sample:
– samples/hello_world
Signed-off-by: Robert Cheng <robert.cheng@focaltech-electronics.com>
Add initial support for the FocalTech FT9001 ARM Cortex-M SoC including:
- SoC Kconfig and dtsi integration points
- Early init and core setup
- Pinctrl base definitions
This prepares the tree for the FT9001 board and drivers.
Signed-off-by: Robert Cheng <robert.cheng@focaltech-electronics.com>
Add devicetree bindings for the FocalTech FT9001 SoC:
- Clock controller
- Reset controller
- UART
These bindings are required by the SoC and drivers added in subsequent
commits. Headers are placed under include/zephyr/dt-bindings/.
Signed-off-by: Robert Cheng <robert.cheng@focaltech-electronics.com>
Allocate one GPIOTE channel for coex grant GPIO pin. This fixes a nrfx
assert during MPSL init in CPURAD.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This shield is a standalone coex shield without relying on the base
Wi-Fi shield (edge_connector).
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
According to the hashmap interface specification sys_hashmap_remove will
"Erase the entry associated with key `key`, if one exists"
If a rehash is performed OA/LP will return 1 and no old_value for
sys_hashmap_insert.
If a rehash is NOT performed OA/LP will return 0 and a stale old_value for
sys_hashmap_insert even though the user requested the entry for that key to
be removed.
This patch makes OA/LP not return the value of tombstoned entries.
Signed-off-by: Emil Hammarstrom <emil.hammarstrom1@assaabloy.com>
Configure the GAU (General Analog Unit) clock from T3 PLL 256M with
a divider of 4 to achieve 64MHz, replacing the previous configuration
that used the main clock at 260MHz main clock with a divider of 1.
The GAU ADC has a maximum clock frequency limit of 64MHz. The previous
260MHz clock configuration caused incorrect conversion results when
operating at 12-bit and 14-bit resolutions. Using the T3 PLL 256M
source divided by 4 provides the correct 64MHz clock frequency.
This change also corrects a typo in the comment from "Attack clock"
to "Set 64M GAU clock from T3 PLL 256M and reset".
Signed-off-by: William Tang <william.tang@nxp.com>
This is done by:
- No more sending periodic messages from endpoint to owner - keep
parity with UART sample: owner sends periodic ping to endpoint, that
replies to those;
- Waiting one second between each message sent by the owner, so people
can actually see what's going on;
- Wrapping the content of the messages (strings "ping" and "pong")
in quotes, so it's clear what they are;
- Toning down the logging to INF - no need for DBG.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
MCTP I2C-GPIO controller wasn't properly reenabling interrupt on the
GPIO line after disabling it during transfer.
This patch also uses `GPIO_INT_LEVEL_ACTIVE` instead of
`GPIO_INT_LEVEL_HIGH` to respect GPIO active state.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Fix build issues,
- error: format %x expects argument of type
unsigned int, but argument 7 has type ssize_t
{aka long int} [-Werror=format=]
zassert_false(ret < 0, "attr->read returned unexpected (err 0x%02x)"
, BT_GATT_ERR(ret));
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Move the programmable unit buffer used to detect double writes out of
the function stack. This fixes stack overflows when simulating flash
devices with large programming units (SPI-NAND, 2-4 kB).
Signed-off-by: Jordan Yates <jordan@embeint.com>
Test the `timeutil` libraries compile and behave the same way
(excluding the skew application) when `CONFIG_TIMEUTIL_APPLY_SKEW=n`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Accurately applying clock skew correction in
`timeutil_sync_ref_from_local` and `timeutil_sync_local_from_ref`
requires double-precision floating point operations. If this is the only
usage of double precision logic in the build, but clocks skews are not
used, this can be a significant ROM overhead. Disabling this option can
save ~2.4 kB of ROM.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The Video drivers section was mistakenly placed below the end marker of the
zephyr-keep-sorted block.
Move it back inside the block for proper ordering.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
This commit enables use of FTFC flash controller.
Together with DT changes it adds support for FTFC into soc_flash_mcux.c
driver.
Signed-off-by: Petr Buchta <petr.buchta@nxp.com>
Remove the conditional compilation guard FSL_FEATURE_RCM_HAS_PARAM.
`hwinfo_mcux_rcm_xlate_reset_sources` has handled the
supported cause using `FSL_FEATURE_xxx` macros, passing `UINT32_MAX`
can get all supported reset cause.
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
There was a misunderstanding in the spec, where if the bcr says there
is no payload, there are NO data bytes that follow the ibi address.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Renamed total_rx_iso_packet_count to
total_unicast_rx_iso_packet_count to make it consistent
with total_unicast_tx_iso_packet_count.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The sample recently started supporting multiple sink ASEs,
but only support a single sink stream. Updated the number of
sink streams supported.
Modified how/when we reset the requested_bis_sync and
FLAG_BROADCAST_SYNC_REQUESTED in the broadcast implementation.
Removed a call to bt_bap_broadcast_sink_delete that would
always fail because it was already deleted.
Modified how/when the total_unicast_rx_iso_packet_count
and total_unicast_tx_iso_packet_count values were reset,
to support a future case of CAP handover.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The driver was unconditionally setting hal_dev->cs_pin_id to the target
number, which activates hardware CS lines even when GPIO-based chip
select (cs-gpios) is used. This caused issues when using hardware CS
via pinctrl with reg > 0.
Also update the binding documentation to clarify the interaction between
cs-gpios and hardware CS via pinctrl.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add a new Kconfig option CONFIG_BT_HFP_AG_INBAND_RINGTONE to allow
enabling/disabling the in-band ringtone capability in HFP AG profile.
The in-band ringtone feature is now conditionally compiled based on
this configuration option. When disabled, the feature flags are set
to 0 and the bt_hfp_ag_inband_ringtone() API returns -ENOTSUP.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add devicetree properties to control UHCI SLIP encoding/decoding
when using UART with DMA (async API). Both properties default to
disabled to prevent unintended data corruption.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Program I2S link for DSP offload, allowing to run DSP tests using
the I2S/SSP interface. On ACE1.5 and older, no additional programming
is required, I2S link is available by default.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add board support for LCKFB ESP32-C3 Development Board.
This board is based on ESP32-C3 with 8MB SPI flash and includes:
- Wi-Fi and Bluetooth Low Energy support
- Complete pin configuration for UART, I2C, SPI2, I2S
- OpenOCD debugging support
- Board documentation with WebP image (optimized size)
Signed-off-by: Wu Yingxiang <wuyingxiang58@gmail.com>
When os_timer is enabled in dts, then os_timer will be used as
OS tick timer.
To make systick as the default OS tick timer, currently os_timer
is not enabled in dts. When users want to use os_timer as
OS tick timer, they need to override the dts.
Improve the method, enable the os_timer is dts, but not enable
in Kconfig by default. If need to use os_timer as OS tick, just pass
CONFIG_MCUX_OS_TIMER=y
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
In current implementation, the additional buffer is required by AT to
store the parsing AT response data temporarily. To store the parsed
AT response data completely, the buffer size is as high as the MTU of
the RFCOMM connection. And the buffer is dedicated for each HFP HF
connection. That means the RAM usage depends on the MAX HFP HF
connection count. Actually, the RFCOMM receiving buffer is valid when
processing the received AT response. The changes aim to remove the
additional buffer and leverage the receiving buffer to process the AT
response.
And there is an issue found that the type of the additional buffer
length is `uint8_t`, while the configured RFCOMM receiving data length
is 65535. When the additional buffer length exceeds 255, the AT cannot
process the received data normally.
Replace manual buffer management with net_buf_simple in the AT command
parser. This change eliminates the need for manual position tracking
and buffer length management by leveraging Zephyr's existing buffer
utilities. And leverage RFCOMM receiving buffer instead of allocating
dedicated buffer.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Refresh pinned dependencies to pick filelock 3.20.1 version since 3.20.0
is subject to CVE-2025-68146.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add heap size configuration and add new panel rk055hdmipi4ma0 for RT700.
It requires extra space for 720p panel.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
Add memory region definition for PSRAM space which is controlled
by XPSI2 in board dts for RT700. In this way user/developer
can place the data in the region in code more easily. This space
can be used by media domain masters like DCNano lcdif controller.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
It is better to let the FLEXSPI2 memory region in the final
linker file be generated from dts, in this way user/developer
can place the data in the region in code more easily.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
1. For the situation when the RAM space is limited and the driver's
frame buffer cannot be place in RAM, add a new property 'ext-ram' in the
binding, so if in device tree this property is assigned to a secondary
RAM space, place the frame buffer there. The old way is to define the
frame bufeer address in Kconfig, which may cause inconvenience if other
data also needs to be placed in the same RAM space.
2. Update the driver to support new requirement on RT700. The IP requires
a 64-byte alignment for the frame buffer stride.
3. Update the calculation of frame buffer size. If the pixel format is
updated, the frame buffer size shall be updated too.
Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
PINT connects GPIO pin to seperate IRQ slot. This info is
hidden in PINT driver, there is no way to know which IRQ
actually the GPIO pin is connected to.
Add new API to get which IRQ slot is connected to, based on
pin index.
Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
Disable rejoin by setting max_retry_attempts to 1. This is done to keep
the NWP state in sync with Zephyr Host, given that Zephyr does not have
a "rejoin ongoing" state.
Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
Adding details regarding the Infineon driver refactoring to drop
cat1 from the driver names and binding files.
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
Drop cat1 from the binding files to enable reuse by other
category devices as well.
Fixes#99174
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
Since the w5500 is used in arduino shields it should use the current
code patterns since it will be examined as a reference for other
drivers. So, this is just trying to catch up to the changes that have
been made in the microchip, litex, and virtio drivers.
Use the net_eth_mac_load code pattern from those other drivers and
update a few things to the code guidelines as well.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
From the prior change b38a46bade adding
in the mac configuration in the device tree it is appropriate to
remove the local mac address bindings. This is done in this commit.
There is no intended functional change
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
There is an implementation of the System power management protocol in
the SCMI driver, so mention it.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fix incorrect indentation that caused some elements to render as
defintion lists.
Added proper nesting of the various headings as everything was top-level
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Remove duplicated #include directives within the same
preprocessor scope across the Zephyr tree.
Duplicates inside different #ifdef branches are preserved
as they may be intentional.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Preserve the volatile qualifier when casting the shared memory pointer
in flash_cpu01_receive_cb() to avoid dropping volatile semantics during
inter-processor communication.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The driver gives us this information, so we just need to translate it to
Zephyr's type like we already do for security.
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Remove test from tests/boards/nrf/i2s/i2s_divider.
The i2s_divider test was relying on debug log from I2S driver.
With the recent NRFX updates log was removed.
Better test, that counts rising edges on I2S_LRCLK line was added
in downstream (https://github.com/nrfconnect/sdk-nrf/pull/26230).
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
ext and loader aren't modified inside llext_get_section_header(),
they are just passed to llext_section_shndx(), where they're already
const. Make them const in this function too.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Update the HW models module to:
0f0c43748111c65800c6920f1c0690676423a351
Including the following:
0f0c437 nrfx: Replace nrfx_gppi_domain_id_get() (requires new nrfx)
1bead00 nrf_ppi: Add support for NRF_PPI_ENDPOINT_IS_EVENT in simulation
9f11c2f NHW_misc: Add API to convert from/to simulated addr to real HW
ones
Note: This requires an nrfx 4.0.x which is newer than 2025/12/03,
i.e. modules/hal/nordic 0dbbf4794156ca09dc2d4bad8c42dcdb54acd662 or
newer which is has been used in Zephyr main since Zephyr's
242bf65d1d
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Added stlink_gdbserver as a runner for the nucleo_u0x boards.
Updated the boards' documentation to mention that JLink runners
do not work with the onboard debug probe and removed mention
of the unsupported openocd runner.
Signed-off-by: Martin Lampacher <martin.lampacher@gmail.com>
Add test suite for ARM MPU write-through cache functionality including:
- Cache coherency validation with dma ways
- Cache coherency validation
Support case on mimxrt1180_evk cm33/cm7 cores
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
- CONFIG_ARM_MPU_SRAM_WRITE_THROUGH: enables Write-Through cache policy
for SRAM regions instead of default Write-Back
Includes corresponding MPU attribute macros for ARMv7-M and ARMv8-M
architectures. Maintains backward compatibility with existing
configurations.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Add Renesas EK-RA2A1 board support for these tests:
- tests/drivers/adc/adc_api
- tests/drivers/adc/adc_accuracy_test
Signed-off-by: Thinh Le Cong <thinh.le.xr@bp.renesas.com>
Add ADC device node to support ADC 16-bit on EK-RA2A1
Update other Renesas board nodes to include the "unit" property
Signed-off-by: Thinh Le Cong <thinh.le.xr@bp.renesas.com>
In current implementation, if the codec is not selected, the codec
CVSD will be used to as default value to start audio connection
procedure.
Optimize the codec selection to select the supported highest quality
codec as the default value.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add feature support validation in `bt_hfp_ag_voice_recognition()` to
verify that both HF and AG support voice recognition feature before
attempting to activate/deactivate it.
This prevents attempting voice recognition operations when the feature
is not supported by either the Hands-Free device or the Audio Gateway,
returning -ENOTSUP in such cases.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Some macros defined for SDRAM timing configuration have typo.
This commit fixes the mistake and updates the macro used
in the code.
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
The GDB is not compiled by default and a recent change in the slot manager
series contained a typo in ifdef and missed by not compiling the GDB
support.
Fixes: ebb5625bee ("intel_adsp: Add debug slot manager")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Add an option to keep the SPI bus in `ACTIVE` while the WiFi module is
powered up. Previous testing has shown transitioning the bus on every
SPI transaction to reduce UDP uplink throughput from 8 Mbps to 6 Mbps.
Signed-off-by: Jordan Yates <jordan@embeint.com>
`SHELL_STACK_SIZE` should not be redefined as a symbol with no
dependencies, it should be applying a new default to the existing
symbol.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The combination of two different return variables (`status` and `ret`)
resulted in most failure paths through the bringup code still returning
success.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Preserve original write length for DCACHE_InvalidateByRange()
Guard declaration of `size` with CONFIG_HAS_MCUX_CACHE to avoid
unused-variable warnings when cache is disabled
Add pointer validity checks before cache invalidation
Signed-off-by: Holt Sun <holt.sun@nxp.com>
In async UART mode with DMA, the RX completion callback was incorrectly
relying on rx_counter which is never updated in DMA mode since data
bypasses the UART FIFO via UHCI+GDMA.
Fix by reading the actual transferred byte count from the DMA
descriptor's length field using gdma_ll_rx_get_success_eof_desc_addr().
Direct LL calls are used because this runs in ISR context where
dma_get_status() is not IRAM-safe.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Added configuration option to disable auto acknowledgment for
virtual wire WARN signals and added a callback to handle them.
This change introduces:
1. Support to disable automatic acknowledgment for VW WARN signals.
2. A callback mechanism to notify application firmware for explicit
handling.
Behavior:
1. If auto-ack is disabled, the callback notifies the application to
handle VW WARN signals.
2. If auto-ack is enabled, the driver acknowledges VW WARN signals
without notifying the application.
Signed-off-by: Yerrajennugari Raj Kumar <yerrajennugari.raj.kumar@intel.com>
25a71f3972 changes the behavior so that :
if "zephyr,entropy" is set in the DT then CONFIG_CSPRNG_AVAILABLE get
enabled;
This breaks our implementation, disable the trng in ns world for now
Signed-off-by: Guido Roncarolo <guido.roncarolo@nxp.com>
Added MCNX947 support in trusted-firmware-m
module Cmake and Kconfig. Cmake is cleaned,
removed unused variables.
Signed-off-by: Guido Roncarolo <guido.roncarolo@nxp.com>
Add initial TF-M support for mcxn947 target
- added ns_decofnig and yml files
- added non secure dts for the MCXN974 SOC
- added checks with CPU0 enabelement in SOC
- added ns memory slot and configs
Signed-off-by: Guido Roncarolo <guido.roncarolo@nxp.com>
Signed-off-by: Waqar Tahir <waqar.tahir@nxp.com>
Add workaround that enables `west debug` and `west attach`
on nrf54h20dk/nrf54h20/cpuppr and cpuflpr.
Remove "-if SW" as this generates warning
WARNING: runners.jlink: "f SW" does not match any known pattern
And breaks JLinkGDBServer command by setting option `-select` to
`usb=f SW`.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
Fixed the following bugs with the heartbeat monitor
- State did not update on CHAN_ALL
- Adjusted semaphore behavior
- Fixed interrupt setup
- Fixed time calculation bug
- Split heartbeat update into seperate function call
Signed-off-by: Robert Perkel <robert.perkel@microchip.com>
The previous implementation had three issues regarding temperature
reading:
1. The unit scaling was incorrect. The datasheet specifies 0.125 C/LSB,
but the code multiplied by 125 instead of 125000 for micro-degrees,
resulting in values off by a factor of 1000.
2. The MSB and LSB registers were read in two separate transactions,
which is not atomic.
3. The bitwise reconstruction of the 11-bit value was inefficient.
This commit fixes the scaling factor to 125000, implements a burst read
for both temperature registers to ensure atomicity, and optimizes the
bit manipulation logic.
Signed-off-by: Liang Jiaxiang <moonbite233@gmail.com>
In the case, when the connection is established on the local side, the
test script will require peer device to send ACL disconnection
request. But due to the timing issue, the connected event may be not
notified on the peer device side when the peer device received the ACL
disconnection requirement. The exception will happen. It causes the
case to fail.
Wait for the connected event of the peer device before sending the ACL
disconnection request.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The case `sdp_discover_with_range` will consume much time to
exhaustively enumerate all supported attribute id ranges. It will
consume much time.
Optimize the set of the supported attribute ID ranges to reduce
the time consumption.
Such as, the discovered attribute ID list is [1, 2, 3, 4, 7, 9, 256].
In the original implementation, the range count is 35511. While in
the optimized range count is 105.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
For the case sm_key_persist_004, the disconnected event may be
printed before the log `Pairings successfully cleared` since there
is no order between log `Pairings successfully cleared` and the
disconnected event. It causes the script discards the disconnected
event in this case and rise the assert issue.
For the case sm_key_persist_004, check the disconnected event in
the captured log. If it is not found, wait the disconnected event
until timeout.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The payload status is evaluated when decoding, which may indicate sharp
distance transitions (from very long to close) and requiring a few more
cycles to stabilize. We don't want to stop the data-stream because of
these, otherwise the data-stream continuity is compromised.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Check the return value of the function `atomic_cas()`. If the new
value cannot be set for the OBEX server, return the error code
`BT_OBEX_RSP_CODE_INTER_ERROR`. If the new value cannot be set for
the OBEX client, return the error code `-EINVAL`.
Fix#100012Fix#100018Fix#100019Fix#100021Fix#100022Fix#100023
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
For the case sm_init_035, the similar issue also be found. The
message `Enter 16 digits wide PIN code for` may be printed after
the shell prompt. The assert issue also be found in this case.
For the case sm_init_035, check the message `Enter 16 digits wide
PIN code for` in the captured log. If it is not found, wait the
message until timeout.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The clock options used within the driver are supposed to be ordered
from lowest to highest power consumption, so the lowest/default
option is the most power efficient. The order was reversed to make
the init code of the lfclk a bit simpler, and this was accounted for
in the clock option lookup function. However, the common nrf clock
control request/release feature would request the lowest index, not
the lowest clock option, so the lfclk would default to its highest
power consumption mode.
The clock option init and lookup has been refactored to be sorted
from lowest to highest power consumption, and comments have been
adjusted accordingly.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
- Add overlay files for the pwm_api and pwm_gpio_loopback tests
- Update platform_allow for pwm_gpio_loopback
Signed-off-by: McAtee Maxwell <maxwell.mcatee@infineon.com>
- Update the driver to support the kit_pse84_eval board
- Update to new peripheral clock allocation scheme
Signed-off-by: McAtee Maxwell <maxwell.mcatee@infineon.com>
Fix build issue from the below commit:
c520b3da1a
soc: nxp: imx943: m33: add and reuse api to initialize clocks
error: soc_clock_enable defined but not used.
Signed-off-by: Biwen Li <biwen.li@nxp.com>
If a warm reboot is issued (e.g., via mcumgr reset), the sam
controller just hangs because of loop in reboot.c. This can
be devastating if no watchdog is present to reboot the controller.
Signed-off-by: Jaro Van Landschoot <jaro.vanlandschoot@basalte.be>
This commit implements a rule that will silently discard incoming mDNS
messages if number of OT free message buffers after message conversion
will be under a user-predefined threshold.
mDNS is making use of OT message buffers, if an mDNS TX message can't be
allocated, it will trigger an assert.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
This commit adds a new configuration flag which is used to compute a
threshold that determines if an incoming mDNS packet will be processed.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
This modification prevents the bet pointer from being nulled at the end
of the loop, which would otherwise render the search for a suitable
erase type ineffective. It also optimize the loop as it omits
unnecessary operations.
Without this change, the erase size defaults to one sector. If the chip
defines fewer than JESD216_NUM_ERASE_TYPES (=4) erase types, this
behavior still works, as the resulting command will correspond to a
sector erase operation. However, if the chip defines all erase types,
the resulting command will be the one specified in the erase type. But
since bet is nulled, the erase size will incorrectly default to the
sector size.
Signed-off-by: Martin Gysel <me@bearsh.org>
depending on build configuration, spi_context_cs_configure_all() is a
no-opt, so mark the data variable as maybe unused.
Signed-off-by: Martin Gysel <me@bearsh.org>
- call spi_stm32_pm_policy_state_lock_xxx functions wenn context is
locked
- do not call spi_stm32_pm_policy_state_lock_put() in internal helper
spi_stm32_complete() (which gets called from various places) but at the
end of a transfer where it belong
Signed-off-by: Martin Gysel <me@bearsh.org>
when in batch mode, we do not need manually 'go'.
with this, we can use `west debug` in twister run test
enable for jlink and linkserver which is tested
example:
west debug --runner jlink -- --batch
Signed-off-by: Hake Huang <hake.huang@nxp.com>
On main.c from sample sensor/accel_polling the header
<zephyr/drivers/sensor.h> is duplicated, as well in
sample sensor/stream_fifo. This is solved on this PR
Signed-off-by: Nicolas Moreno <niko722795@gmail.com>
Changes generic clock source for DAC in SAMD5X MCU's.
Generic clock source 0 speed is above the maximum speed
permitted by the DAC.
The generic clock was changed to the same one the ADC uses (0x2).
Compared output of working microchip auto-generated code to the zephyr
implementation to find discrepencaies in register values.
Signed-off-by: Roberto Flores <Roberto.flores@daikincomfort.com>
Move most of the code that is used to interface with IronSide SE on the
nRF54H20/nRF9280 from the soc/nordic directory to the hal_nordic
repository. The interface code is now provided by the new IronSide
support package. Build system code and glue code that makes use of
Zephyr APIs is now located in the modules/hal_nordic directory.
Update the directory path for IronSide SE interface code in
MAINTAINERS.yml to match the move from soc/nordic/ironside to
modules/hal_nordic/ironside.
Also included are some refactoring changes and cleanup to match the new
supporting code.
C code and Kconfigs have been renamed to *ironside_se* / *IRONSIDE_SE*
to match the supporting code changes. Users of these APIs in zephyr
have been updated to match.
Individual configurations for different "IronSide services" have been
removed as the API serialization for all of these is now provided in
a single C file / header file (ironside/se/api.h).
The ironside_boot_report_get() API has been removed. The boot report
structure can be accessed through the IRONSIDE_SE_BOOT_REPORT macro.
Most configs relating to UICR / PERIPHCONF have been moved under the
"IronSide SE" menu to make it clear that these are part of the
IronSide SE interface.
The macros that in uicr.h that were used to add entries to the
PERIPHCONF section have been removed. The supporting code now provides
PERIPHCONF_XYZ() macros that can be used to initialize structures that
go into this section, and the zephyr part now only contains a macro
UICR_PERIPHCONF_ENTRY() that is used to place an arbitrary structure
into the section. The gen_periphconf_entries.py script used to generate
PERIPHCONF entries based on devicetree has been updated to use the new
macro system.
IronSide SE integration code/configs is now guarded by HAS_IRONSIDE_SE.
Note that the UICR build system integration that relies on Sysbuild
remains under the soc/nordic directory for now, but will be moved to
the modules/hal_nordic directory once it is clear how the integration
will look there.
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
Add assertion to ensure MTU is at least the size of the start header
before calculating the remaining length for fragmentation. This prevents
potential underflow when subtracting the header size from MTU.
Fix coverity #551657
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Add support for the Waveshare ESP32-S3-GEEK USB dongle. It features an
ESP32-S3R2 with 2 MB PSRAM, a 16 MB on-board Flash, a 1.14" LCD, and a
microSD slot.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
Current driver protections prevent to initialize driver when run as from
an external application running from ext flash. Aim is to avoid performing
full driver initialization of the NOR flash controller the application
is read from.
But this problem is actually only valid when application is running in XIP
mode (read in memory mapped mode at run time).
In ram load mode, since there is no direct activity from the application
on the NOR device, nothing prevents the ext flash driver to be used fully.
Hence, we should allow the controller initialization to happen, with some
adjustments. Mostly, what we need is to:
- skip the hal init
- abort memory mapping afterwards to let the jedec reading happen.
Remove conditions around `stm32_xspi_is_memorymap()` and
`stm32_xspi_abort()` which can finally be useful in various cases.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Instantiate a `soc-nv-flash` compatible node to allow using XSPI flash
driver as a real flash controller on NOR device.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Add support for gesture / motion based interrupts
when INPUT_CST816S_EV_DEVICE is enabled.
Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
rts5913_sha256_update was changed in #94218, but this function passes
it's input into rts5912_sha256_process also.
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Add support for Nuvoton NuMaker M55M1X high-speed USB 2.0 device
controller. Compared to M46X HSUSBD, M55M1X HSUSBD introduces some
differences:
- DMA must handle cache coherency because net_buf can be cache-able
- USB suspend interrupt becomes continuous. Aavoid being locked by
this interrupt and forward this message just once
- New register bit HSUSBD_OPER_HISHSEN_Msk, which controls to enable
USB handshake
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Add support for Nuvoton NuMaker M46X high-speed USB 2.0 device
controller.
The code is re-organized to implement both usbd and hsusbd in single
source file. Multiple instances of either usbd or hsusbd are supported,
but usbd and hsusbd cannot support simultaneously. This limitation is
for easy implementation with just single source file, assuming that real
application just needs one usb device type.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Previous control transfer can be incomplete and then causes not only
net_buf leak but also logic error. This recycles dangling net_buf for
new clean control transfer.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
On Control Out failure, this changes to report error message instead of
assert failure because USB bus error is allowed to happen.
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
Refine code on ATTR undefined bits:
- Add USBD_ATTR_PWRDN_Msk if it is not defined
- Following BSP USBD driver, add note on BIT(6) for hidden
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
the phy is already configured by the phy driver in zephyr
and we don't want to overwrite it in the HAL_ETH_Init
function in the stm32 HAL.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The openocd --config paramter is not needed.
And it causes an error when used on a ci runner.
The path created by
scripts/west_commands/runners/openocd.py is wrong.
Signed-off-by: Bill Waters <bill.waters@infineon.com>
This patch is a workaround to a know issue when Bluetooth and pm
is activated.
We actually need to set the tx power to the Bluetooth controller
(network coprocessor) before sending power saving request to the
coprocessor.
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Power profile property doesn't need to be defined in device three.
It is a configuration value that is defined if we want pm with
Bluetooth and/or Wifi .
Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
If PKA is running, it needs the RNG clock to properly works.
Don't turn it off when RNG computation is over.
Signed-off-by: Gaétan Froissard <gaetan.froissard@marshmallow.kids>
The clock-frequency value in dtsi can be used to change
the bus frequency for rts5912 driver and
it support in the range between 15000 to 50000000.
Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
mcux_eps_interval is added as the new member of
uhc_mcux_data. It is used to save endpoint's
original interval value and can be compared
with xfer->interval.
Signed-off-by: Aiden Hu <weiwei.hu@nxp.com>
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>
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.