This driver supports CLOCK_MONITOR_MODE_MEASURE:
configure programs REF_CNT from the user's window_ns and the
reference clock rate queried via clock_control; start() triggers a
single measurement whose completion is delivered through the
configure-time callback, with the device auto-disarmed before the
callback runs so the callback may restart the next measurement from
ISR context. get_rate() returns the most recent completed result.
stop() is ISR-safe and aborts an in-flight measurement; a transient
CONFIGURING state guards configure()'s unlocked clock query and HAL
init against concurrent start().
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
This driver supports CLOCK_MONITOR_MODE_WINDOW:
configure programs HFREF and LFREF from the user's expected_hz +
tolerance_ppm (auto-derived from the monitored clock via
clock_control when expected_hz is 0), start begins the background
comparison and stop disables it.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
When an application issues a WiFi management request (e.g.
NET_REQUEST_WIFI_CONNECT) shortly after boot, wpa_supplicant may not
have finished initializing the per-interface control connection yet.
In that window get_wpa_s_handle() already returns a valid wpa_s, but
wpa_s->ctrl_conn is still NULL because zephyr_wpa_ctrl_init() has not
run.
The wpa_cli_cmd_v() macro and a few direct callers passed this NULL
ctrl_conn down to zephyr_wpa_cli_cmd_v() -> wpa_request() and on into
send_data(), which dereferenced the connection (its send fifo),
producing a hard fault / NULL pointer dereference. Calls that go
through global_ctrl_conn were unaffected, which is why only some
commands crashed.
Add NULL checks so the supplicant fails the request gracefully with
-EAGAIN ("not ready yet") instead of faulting:
- wpa_cli_cmd_v(): central guard covering all command call sites,
including the unlocked ones.
- wpas_add_and_config_network(), supplicant_connect() and
supplicant_status(): explicit early checks before the direct
z_wpa_ctrl_*() uses, returning a clear error to the caller.
- Also propagate -EINVAL when "remove_network all" fails so the
connect path no longer reports success on a dropped command.
The ctrl_conn pointer is only ever opened once during interface bring
up (NULL -> valid, never freed), so the NULL check alone is sufficient
for the reported boot-time race. To keep the check correct against
interface teardown as well (valid -> NULL + freed in del_interface),
serialize the open/close of ctrl_conn with the existing
wpa_supplicant_mutex that the API entry points already hold, so a
command holding the mutex cannot have ctrl_conn torn down underneath
it.
Applications should still wait for the NET_EVENT_SUPPLICANT_CMD_READY
event before issuing requests; this change just makes premature calls
fail safely.
Fix#111756.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-4.8
This commit adds the option to externally manage the mDNS hostname
creation from application layer which runs alongside border router
sample.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
MBEDTLS_ECP_NIST_OPTIM enables optimized modular reduction for the NIST
curves (P-256/P-384/P-521). Upstream Mbed TLS and TF-PSA-Crypto define
this option by default in their configuration headers, but when it was
converted to a Kconfig symbol it was given no default and therefore
silently defaults to n.
Without it, every field multiplication on a NIST curve falls back to
generic modular reduction, which is roughly an order of magnitude
slower. This significantly penalizes ECC-heavy paths; for example a
WPA3-SAE (group 19) handshake slows from ~450 ms to ~5 s.
Restore the upstream default by defaulting the option to y. It is
already gated on PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_BASIC, so it only takes
effect when ECC is in use; the only cost is a small amount of flash for
the reduction tables.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-4.8
While most of the XMClib was enabled for all xmc4xxx parts, ethercat was
completely ommitted. Enable it for the xmc4500 and xmc4800, the two
variants that support ethercat.
Signed-off-by: Karl Palsson <karl.palsson@marel.com>
The addition of a default value for LV_DRAW_BUF_ALIGN in STM32
led to build warning due to a Kconfig defined without a type.
Set its type to int in modules/lvgl/Kconfig, matching the type
defined for this Kconfig option in the LVGL Kconfig.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Expose the LV_USE_DRAW_DMA2D_INTERRUPT config in order to
enable/disable the interrupt based DMA2D usage in LVGL.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Remove `$(ZEPHYR_BASE)` from `source "<file>"`.
Source is always relative to ZEPHYR_BASE, so no need to specify it.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Map CONFIG_MCUX_SYSCTR_TIMER to the mcux-sdk-ng driver.sysctr component
so the HAL's fsl_sysctr sources and headers are pulled into the build
whenever the new MCUX System Counter timer driver is selected.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
CONFIG_MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS no longer mirrors TF-PSA-Crypto
builtin private headers into CMAKE_BINARY_DIR without the private/
segment. Consumers must include mbedtls/private/... explicitly; the
mbedtls library INTERFACE already exposes drivers/builtin/include.
When building the MCUboot image, add drivers/builtin/src to the mbedTLS
INTERFACE include path so bootutil can include rsa_alt_helpers.h by
basename.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor: Auto
WIFI_NM_WPA_SUPPLICANT_LEGACY_CRYPTO drops CONFIG_FIPS, which re-enables
EAP-TTLS phase-2 CHAP and the chap_md5() call in eap_ttls.c. chap.c was
never added to the Zephyr CMake source list, so enterprise builds with
EAP-TTLS fail to link once LEGACY_CRYPTO defaults to enabled.
Link eap_common/chap.c when LEGACY_CRYPTO is on and EAP-TTLS (peer or
server) is enabled. md5_vector still comes from md5-internal.c or PSA
as today.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor:Auto
WEP is legacy broken crypto and belongs under the same opt-in as RC4,
MD5, and the CONFIG_FIPS strip. LEGACY_CRYPTO implies
WIFI_NM_WPA_SUPPLICANT_WEP by default; CMake defines CONFIG_WEP when
both are enabled.
Keep WIFI_NM_WPA_SUPPLICANT_WEP as a hidden symbol without depends on
LEGACY_CRYPTO so existing prj.conf references keep parsing. Only WEP
selects DEPRECATED (it predates LEGACY_CRYPTO). Build-time WEP effect
requires LEGACY_CRYPTO.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor:Auto
The supplicant is built with CONFIG_FIPS, which strips the broken and
legacy crypto call sites (HMAC-MD5, RC4, DES, ...) so that the default
build stays robust. This is not real FIPS validation, MbedTLS is not
FIPS validated, it is just a convenient switch to drop algorithms that
modern Wi-Fi no longer needs.
Some deployments still have to associate with old WPA-PSK/TKIP access
points or run legacy interop/QuickTrack test cases, which rely on the
EAPOL-Key descriptor version 1 (HMAC-MD5 4-way MIC and RC4 group-key
unwrap). Add WIFI_NM_WPA_SUPPLICANT_LEGACY_CRYPTO to drop CONFIG_FIPS
for those builds instead of patching the supplicant core sources.
When enabled, CMake links hostap rc4.c for group-key unwrap and, when
PSA_WANT_ALG_MD5 is off, md5-internal.c and md5.c so EAPOL-Key v1
HMAC-MD5 does not depend on PSA (for example Oberon does not implement
PSA_ALG_MD5). The option selects NOT_SECURE.
The option defaults to enabled so WPA/TKIP interop works out of the box.
Enabling it disables CONFIG_FIPS wholesale and brings back the entire
legacy crypto surface, not just TKIP. TKIP is deprecated and not allowed
in current Wi-Fi Alliance certification programs.
Enabled by default for now. The default will change to disabled in a
future Zephyr release. Set WIFI_NM_WPA_SUPPLICANT_LEGACY_CRYPTO
explicitly if you need WPA/TKIP or other legacy AP interop.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor:Auto
Added option to nrf gswdt drivers to be able to configure
maximum timeout window and also to be able to stop gswdt.
This features are only available when gswdt service is
supported by local domain, otherwise gswdt can still be
used but with fixed timeout and cant be stopped.
Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
Similarly to the existing CONFIG_ZVFS_OPEN_ADD_SIZE_* mechanism used to
size the file descriptor table, allow subsystems to declare their eventfd
count requirements via CONFIG_ZVFS_EVENTFD_ADD_SIZE_* Kconfig options.
These are summed up at build time and compared against
CONFIG_ZVFS_EVENTFD_MAX, with the larger of the two values used to size
the eventfd table, exposed as the ZVFS_EVENTFD_SIZE compile definition.
A new CONFIG_ZVFS_EVENTFD_IGNORE_MIN option allows to override the
calculated requirement and use CONFIG_ZVFS_EVENTFD_MAX as-is.
As each eventfd also consumes a file descriptor, the resulting eventfd
count is now reserved in the file descriptor table as well, replacing the
former CONFIG_ZVFS_OPEN_ADD_SIZE_EVENTFD option which only accounted for
CONFIG_ZVFS_EVENTFD_MAX.
The WPA supplicant requirement is moved from a CONFIG_ZVFS_EVENTFD_MAX
default into a dedicated
CONFIG_ZVFS_EVENTFD_ADD_SIZE_WIFI_NM_WPA_SUPPLICANT option.
Assisted-by: Cursor:Claude Opus 4.8
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
zep_shim_qspi_cpy_to() discarded the return value of the bus write, so a
failed SPI/QSPI transfer to the RPU went unnoticed and only surfaced much
later as a firmware boot signature mismatch. Check the return code and
log an error so the actual point of failure is visible.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor:Auto
- Kconfigs in modules/ should not define configs with an SOC_ prefix.
Furthermore, these options are SDK specific, not SoC specific.
- The simplicity_sdk configs do the same.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Update hal_silabs with latest NWP firmware, which fixes issues
related to privacy for BLE Central mode and TWT for Wi-Fi.
Update the version check to match the new firmware version.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add a counter driver for the MCUX wake timer. The hardware is a
one-shot down-counter with one load/count register, so the driver
uses the register either for periodic top handling or for relative
single-shot alarms.
Absolute alarms are reported as unsupported because programming an
alarm reloads the hardware counter and changes the value space that
an absolute target would be measured against. Clear stale pending IRQ
state around start, stop, cancel, and alarm setup.
Built and ran tests/drivers/counter/counter_basic_api on frdm_mcxa153
with CONFIG_COUNTER_MCUX_WAKE_TIMER_ALARM=y.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Provide explicit control over the LVGL timer handler running on the
internal workqueue, allowing applications to halt rendering activity
(e.g. while the display is off) and resume it later.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add TF-M non-secure variant for the PSE84 AI Kit board, enabling
secure/non-secure partitioning. The NS variant is configured with
TF-M medium profile, clock control, GPIO and UART console.
Assisted-by: GitHub Copilot:claude-sonnet-4.5
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
Co-authored-by: Laura Carlesso <laura.carlesso@infineon.com>
TF-m includes a GeneratedSource folder with default generated
sources files that are the standard use case for the kit_pse84_eval
board with EPC2. When supporting different boards we'd need a TF-m
PR to update those files and the cherry pick that into Zephyr's
fork and then directing the build properly. It makes more sense
to host a copies of these files and give them as inputs to the
TF-m build so that they are more easily maintainable.
Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
Starting from LVGL 9.5.0, LVGL has changed way to include
lvgl_os_private.h. Directly include the lvgl_private.h
header into lvgl_zephyr_osal.c instead of relying on the
LV_USE_PRIVATE_API.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Automatically generate the list of files to be compiled
and apply exclude pattern on the file list in order to
avoid having to manually update the CMakeLists at each
update of LVGL.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Add a Zephyr cache backend for NXP LPCAC instances whose control
signals are wired through the MCM CPCR2 register. The backend exposes
instruction-cache enable, disable, and full invalidation through the
standard cache API.
Select the matching MCUX cache_lpcac HAL component with the new
HAS_MCUX_MCM_LPCAC capability. This keeps MCM-controlled LPCAC separate
from the existing SYSCON LPCAC backend.
Build coverage is provided by the MCXW7xx enablement that uses this
backend in the following commit.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
When enabling SRF Multicore support both the cm33ns and the cm55
cores need additional files to be included in the build to be
successful and functional.
On cm33s we need to instruct TF-M to enable the CM55 present flag and
the mailbox support.
On cm33ns side we need to enable the custom process request handling
for IPC SRF requests specify custom IPC packets and handle the address
remapping for CM55 addresses.
On cm55 side we have to reference files built durint TF-M install
and add the custom IPC handling for SRF requests. Additionally we need
to link its source files to the same one used by TF-M in ifx-cycfg.
Also added check for defines to avoid redefining in infineon_kconfig.h
Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
Specify timeout as no wait for pre-kernel semaphore take as
it cannot block before the kernel is started.
Also force select of EVENTS for rtoe events operations to be
functional.
Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
Add new parameter -C to enable or disable SSID protection in wifi connect
and wifi ap enable commands. The SSID protection is disabled by default.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Add Wi-Fi NAN (Neighbor Awareness Networking) support to Zephyr
including event handling, management API, and shell commands.
NAN enables devices to discover services and communicate with
nearby devices without requiring a traditional access point.
This commit includes:
- NAN management APIs and event handling
- Shell commands for NAN operations (publish, subscribe, transmit)
- Build test configuration and documentation
Signed-off-by: Qingling Wu <qingling.wu@nxp.com>
HMAC is a direct dependency of certain algs. TF-PSA-Crypto enables it
automatically under the hood in `crypto_adjust_config_dependencies.h`,
so enable it at the Kconfig level too.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Add a Kconfig option to configure the path to the t_cose repository
just as exists for the QCBOR one.
Zephyr won't ship with t_cose for now either because having Initial
Attestation work would require shipping both t_cose and QCBOR and for
the latter the licensing issue should be resolved first.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Replace the two-line pattern:
bt_conn_unref(ot_plat_ble_connection);
ot_plat_ble_connection = NULL;
with bt_conn_drop(&ot_plat_ble_connection) which performs both
operations atomically in a single step.
Assisted-by: GitHub Copilot:claude-opus-4.7
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Add NXP Neutron NPU support for mcxn and mimxrt700evk.
Add a TFLite Micro sample that run inferences on NXP Neutron.
Signed-off-by: Xiaodong Xie <xiaodong.xie@nxp.com>
Maybe there is a better way to do that, but this plugs a kconfig leak.
Anything you build has a whole lot of Kconfig specific to Realtek right
now, for example, building hello_world for native_sim, gets you this:
#
# HAL Realtek Bee Drivers
#
# CONFIG_REALTEK_BEE_ADC is not set
# CONFIG_REALTEK_BEE_CAN is not set
# CONFIG_REALTEK_BEE_CODEC is not set
# CONFIG_REALTEK_BEE_DMA is not set
# CONFIG_REALTEK_BEE_GPIO is not set
# CONFIG_REALTEK_BEE_I2C is not set
# CONFIG_REALTEK_BEE_I2S is not set
# CONFIG_REALTEK_BEE_IR is not set
CONFIG_REALTEK_BEE_NVIC=y
# CONFIG_REALTEK_BEE_KEYSCAN is not set
# CONFIG_REALTEK_BEE_MAC_802154 is not set
# CONFIG_REALTEK_BEE_PINMUX is not set
# CONFIG_REALTEK_BEE_PWM is not set
# CONFIG_REALTEK_BEE_QDEC is not set
# CONFIG_REALTEK_BEE_AON_QDEC is not set
# CONFIG_REALTEK_BEE_LPQDEC is not set
# CONFIG_REALTEK_BEE_RCC is not set
# CONFIG_REALTEK_BEE_RTC is not set
# CONFIG_REALTEK_BEE_GRTC is not set
# CONFIG_REALTEK_BEE_SDHC is not set
# CONFIG_REALTEK_BEE_SPI is not set
# CONFIG_REALTEK_BEE_TIMER is not set
# CONFIG_REALTEK_BEE_ENHTIMER is not set
# CONFIG_REALTEK_BEE_UART is not set
# CONFIG_REALTEK_BEE_USB is not set
# CONFIG_REALTEK_BEE_USING_USB_HAL is not set
# CONFIG_REALTEK_BEE_AON_WDT is not set
# CONFIG_REALTEK_BEE_CORE_WDT is not set
# end of HAL Realtek Bee Drivers
CONFIG_REALTEK_BEE_COMMON_DRIVER=y
CONFIG_WRAP_REALTEK_BEE_NVIC=y
# CONFIG_USE_REALTEK_BEE_OS_INTERFACE is not set
# end of hal_realtek (/home/nashif/zephyrproject/modules/hal/realtek)
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Even though the repos are split between Mbed TLS and TF-PSA-Crypto,
successful compilation of Mbed TLS requires TF-PSA-Crypto to be
available.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
CMSIS SystemInit() disables the internal hardware watchdog by default
(DISABLE_WDOG defaults to 1). MCXE24x previously forced DISABLE_WDOG=0
as a global compile definition from the SoC CMakeLists, leaving the
watchdog running even when no driver was responsible for servicing it.
On frdm_mcxe247 this made every application reset-loop.
Scope the bridge to the MCUX HAL library instead of the whole build and
drive it from Kconfig, so a SoC opts in only when its CMSIS SystemInit
honors DISABLE_WDOG:
- HAS_MCUX_SYSINIT_DISABLE_WDOG: capability selected by the SoC.
- MCUX_SYSINIT_KEEP_WATCHDOG: enabled only when an enabled watchdog
driver supports the boot-time disable policy and the application asks
to keep the watchdog running (WATCHDOG && HAS_WDT_DISABLE_AT_BOOT &&
!WDT_DISABLE_AT_BOOT).
The MCUX HAL CMake then applies DISABLE_WDOG=0 to the hal_nxp library
only; MCXE24x selects the capability and the SoC CMakeLists no longer
defines the macro globally.
Tested on frdm_mcxe247 over MCU-Link: tests/kernel/common (the reset
loop reproducer from #109911) boots once and runs to PROJECT EXECUTION
SUCCESSFUL, and samples/hello_world boots cleanly. Confirmed that
DISABLE_WDOG=0, when active, is applied only to the hal_nxp library
sources (including system_MCXE247.c) and to no kernel or application
source.
Fixes#109911
Signed-off-by: Holt Sun <holt.sun@nxp.com>
The Silicon Labs Link Layer allocates a connection context when PAwR
with response discovers an advertiser to synchronize with.
Since this procedure currently relies on connection resources, ensure
that at least one connection is configured whenever PAwR responses are
enabled.
Signed-off-by: Petri Pitkanen <petri.pitkanen@silabs.com>