Commit graph

110884 commits

Author SHA1 Message Date
Jun Lin
dee7927a21 drivers: flash: npcx: add k_usleep when polling busy status
Adding k_usleep while polling the flash's busy status yields the CPU
resource, giving lower-priority threads the opportunity to run.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2025-02-26 07:40:37 +01:00
Fabian Barraez
3295f7c5e2 drivers: sensor: si7060: fix: insecure data handling caught by coverity
- Checking each retval from read register before continue

Signed-off-by: Fabian Barraez <fabianbarraez@gmail.com>
2025-02-26 07:40:00 +01:00
Declan Snyder
0b843be90d drivers: spi_context: Add comments for context
Personally I found this file hard to understand at first,
but since now it is clear to me, I decided to put these comments
with my understanding to help anyone else who needs to use these.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-02-26 01:39:54 +01:00
Mahesh Mahadevan
cccd9619f4 drivers: nxp_flexio_spi: Fix transfer failures
This fixes failures seen with the SPI loopback test.
The fix waits for the TX and RX side to be complete
i.e when RX SHIFTBUF has been loaded from the RX Shifter
and the TX SHIFTBUF has transferred to the TX Shifter.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-02-26 01:39:25 +01:00
Anas Nashif
73fd29f76e twister: logging: verbose names for logging handlers
Trivial rename of variables to make them more clear.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-02-26 01:39:10 +01:00
Anas Nashif
96ab891f3a twister: filter out native_sim on ! Linux
native_sim only works and builds on Linux, when running twister on the
Mac, this platform fails to build and reports errors.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-02-26 01:39:10 +01:00
Manuel Argüelles
fa93fe271b boards: nxp: mr_canhubk3: mention required trace32 version
Document the host tool version for the TRACE32 runner required by this
board.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2025-02-26 01:37:45 +01:00
Manuel Argüelles
6ece8cb859 boards: nxp: mr_canhubk3: fix trace32 runner scripts
Update path to TRACE32 demo scripts for S32K3 to the latest version.

Fixes #86302

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2025-02-26 01:37:45 +01:00
Anas Nashif
ac082d17b6 doc: contrib: remove outdated note about rebases
The button for rebasing PRs is not available anymore, so this note does
not apply and will only cause confusion, remove it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-02-26 01:37:21 +01:00
Anas Nashif
6ca79bba72 doc: contrib: clarify twister support
Twister works on all OSes with different levels of features/targets
supported, so clarify the message.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-02-26 01:37:21 +01:00
Jilay Pandya
ebcc1b71af drivers: stepper: fix doxygen documentation
reorganize stepper api function sequence

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-02-26 01:36:53 +01:00
Johann Fischer
05fb46cb91 drivers: udc_stm32: handle ZLP flag for control transfers as well
I mistakenly assumed in the commit 6aaad0a5cd
("drivers: udc_stm32: handle ZLP flag") that the HAL driver would handle
ZLP flag in control transfers itself, but that does not seem to be the
case.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-25 20:41:03 +01:00
Pavel Vasilyev
112e27f035 tests: bsim: bluetooth: run host gatt notiy_stress test on nrf5340bsim
This commit runs host/gatt/notify_stress test on nrf5340bsim cpuapp
target.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2025-02-25 20:39:58 +01:00
Pavel Vasilyev
f804b28bf2 tests: bsim: bluetooth: build host tests for nrf5340bsim cpuapp
This enables host tests build for nrf5340bsim cpuapp target.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2025-02-25 20:39:58 +01:00
Pavel Vasilyev
a43b893a15 tests: bsim: bluetooth: host: add hci driver stress test
This commit adds a stress test to verify that the HCI driver does not
drop any data. Specifically, it tests whether the HCI IPC driver can
reliably pass data between the Host and Controller.

Due to the current HCI IPC driver implementation, this test is
guaranteed to fail if Controller-to-Host HCI ACL data flow control is
disabled.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2025-02-25 20:39:58 +01:00
Alberto Escolar Piedras
bab10c0f6f tests/drivers/gpio/gpio_reserved_ranges: Fix overlays
Correct overlays names.
In 982425f818
this test was changed from using native_posix to native_sim,
but the overlay file renaming slipped thru the cracks.
Due to the test DT filter, the test just was not run since then,
and we did not realize.
Let's fix it now so the test can run again.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-02-25 20:39:41 +01:00
Alberto Escolar Piedras
8087053ab9 tests/drivers/gpio/gpio_reserved_ranges: Fix missing includes
Revert the changes done in
b51f998063
to this file.
Those 2 headers are indeed needed for it to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-02-25 20:39:41 +01:00
Butch Warns
141561fc1e doc: fix debug/informational options wrong defaults
Fixes: #86021
Documentation erroneously states CONFIG_DEBUG option is enabled by default.

Signed-off-by: Butch Warns <contact@butchwarns.de>
2025-02-25 20:39:10 +01:00
Martin Gysel
9cc8301dfa usb: device_next: prevent CDC ACM notifications from being blocked forever
Reset semaphore if USB transfer failed or was canceled and prevent
cdc_acm_send_notification() from blocking forever.

Signed-off-by: Martin Gysel <me@bearsh.org>
2025-02-25 15:33:25 +00:00
Emil Kieri
ed1b56b557 arch: arm: cortex_a_r: Add cfi directives to z_arm_cortex_r_svc
Add call frame information (cfi) directives to the function
z_arm_cortex_r_svc, which triggers an SVC exception whose handler will
execute a context switch. The return address stored on the stack of a
suspended thread will point into z_arm_cortex_r_svc, that is, this
function will be the starting point when a debugger tries to produce a
call stack for a suspended thread. As the function is written in
assembly, most compilers will not emit any cfi automatically. This patch
adds cfi directives manually so that the call stack can be unwound.

The added cfi directives instruct the compiler to note in the
.debug_frame section that the canonical frame address is at offset 0
from r13, i.e., from the stack pointer.

Signed-off-by: Emil Kieri <emil.kieri@iar.com>
2025-02-25 15:23:53 +00:00
S Swetha
6688f62f92 tests: drivers: uart: boards: Disable Userspace
This commit disables CONFIG_TEST_USERSPACE in
intel_rpl_s_crb.conf of uart_async_api
testcase.Enabling this config introduces
restrictions that interfere with cacheable
regions by blocking access and modifying
cache attributes.By disabling this
configuration, the following issues
are resolved:
-Cacheable region retain their attributes.
-Execution and data transactions work without
restrictions.
-System behavior align with expected
configuration in privileged mode.
-Some code primarily relying on non-cache
region continues to work.

This change is neccessary to ensure
cachebale memory regions function as intended
without interferance from user mode restrictions.

Signed-off-by: S Swetha <s.swetha@intel.com>
2025-02-25 15:23:34 +00:00
S Swetha
bf7f53d0cd tests: drivers: uart: Aligned buffers to 32 bytes
This commit aligns the buffers to 32 bytes in
uart_async_api testcases.This is because most
of the platform DMA operations are aligned to
32 bytes.This ensures proper memory alignment
for cache handling and avoid potential
unaligned access issues.

Signed-off-by: S Swetha <s.swetha@intel.com>
2025-02-25 15:23:34 +00:00
Mathieu Choplain
3393ab5474 boards: st: nucleo_wb0*: start execution in bootloader
Nucleo-WB05KZ and Nucleo-WB09KE are lacking "--start-address" argument for
STM32CubeProgrammer runner, which makes them begin execution in limbo then
HardFault. On the other hand, Nucleo-WB07CC has it but starts execution
directly into user flash. This skips the bootloader code which performs
some bookkeeping (notably, updating RAM_VR.ResetReason); as a result,
code relying on RAM_VR.ResetReason is broken until PORRESET, or until
RESET occurs twice.

Force all three boards to begin execution in bootloader after flash to
ensure proper system behavior at all times.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-02-25 15:15:04 +00:00
Jianxiong Gu
2fb35b10b8 drivers: tcpc: rt1715: Remove ALERT_EXTENDED handling
The RT1715 does not support TCPC_ALERT_EXTENDED_STATUS and
TCPC_ALERT_EXTENDED. This commit removes the related interrupt handling.

Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
2025-02-25 15:14:45 +00:00
Jianxiong Gu
2b01c6c2b4 drivers: tcpc: rt1715: Refactor rx_fifo_enqueue
The original i2c_transfer setup was complex and contained an incorrect
message count. Replace i2c_transfer with i2c_burst_read.

Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
2025-02-25 15:14:45 +00:00
Jianxiong Gu
ba45fb749f usb-c: tcpc: Fix TCPCI status register functions
CC_STATUS is an 8-bit register.
CC_STATUS and POWER_STATUS are cleared by the TCPC.

Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
2025-02-25 15:14:45 +00:00
Krzysztof Chruściński
9323adf4af tests: kernel: usage: thread_runtime_stats: Improve test_all_stats_usage
Improve robustness of test_all_stats_usage test. Test was relying on a
fact that system did not go to idle before this test is run. It means
that it was assuming that it will be the first test which might not be
true. Additionally, on some targets there might be some idle waits
during system boot. Test is adjusted to validate gathered statistics
with an assumption that there might have been idle period prior to the
test.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-02-25 15:14:33 +00:00
Axel Le Bourhis
e5a1c0bbe4 drivers: bluetooth: hci_nxp: fix unexpected command complete event
As the previous version of the MCXW71 BLE Controller wasn't sending a
command complete event after setting the BD address, we used a
workaround to directly send the HCI command without using zephyr's API.
Now, on the latest version of MCXW72 and MCXW71, this issue is fixed,
so we need to use `bt_hci_cmd_send_sync` to properly expect the
command complete event.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2025-02-25 15:14:18 +00:00
Johan Hedberg
05b16b971b Bluetoth: Host: Fix buffer allocation warnings in system workqueue
The buffer allocation in conn.c will trigger warnings if we try to use
anything else than K_NO_WAIT for the timeout when called from within the
system workqueue.

The calls in l2cap.c and att.c which may pass non-zero timeouts already
have proper handling for failed allocations, so make sure we use K_NO_WAIT
to avoid unnecessary warnings from conn.c.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-02-25 15:14:08 +00:00
Guillaume Gautier
6cf1ecbeff doc: develop: tools: add doc to debug with stm32cubeide
Add documentation to use STM32CubeIDE for debug only.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-02-25 15:13:57 +00:00
Jamie McCrae
d2698a17ac doc: migration: 4.1: Add note on deprecated macro removal
Adds a note about removing this deprecated macro

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-02-25 15:13:42 +00:00
Jamie McCrae
82ec3265ad include: zephyr: mgmt: mcumgr: callbacks: Remove deprecated macro
Removes a macro that was deprecated with Zephyr 3.4

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-02-25 15:13:42 +00:00
James Roy
1ab8b8ff45 dts: cache: Simplify the description of the binding
Remove redundant descriptions in cache bindings, such
as "This is a representation of" and "... node".

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-02-25 15:13:08 +00:00
Aksel Skauge Mellbye
8fefb44e3e tests: drivers: adc: Fix silabs overlays
Fix typo in overlays for silabs boards that stopped tests from
running.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-02-25 15:12:58 +00:00
Marcio Ribeiro
71277577be driver: adc: esp32: fix read function
Compensates raw value reading before adc_read returns it

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-02-25 07:57:00 +01:00
Adrien MARTIN
355143b4ab drivers: wdt_gecko: wdt opt pause in sleep also in EM1 mode
default watchdog initialization disable counting in EM1, EM2 and EM3
modes. If user use the WDT_OPT_PAUSE_IN_SLEEP flag via the watchdog api,
all 3 EM modes must take this flag into account to avoid wdt count
being frozen if we don't want to.

Signed-off-by: Adrien MARTIN <adrienmar@kickmaker.net>
2025-02-25 07:56:43 +01:00
Marek Matej
d13fae97e4 soc: espressif: Fix psram0 node size and smh heap size calculation
Fixing multiple things related to psram usage:
- fix conflicting psram0 dts node for all ESP32 SiP and SoC.
- fix dcache and icache area used in psram mapping.
- fix smh spiram heap allocations.
- add `espressif,esp32-psram` compatible to set psram0 size in dts.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2025-02-25 07:56:19 +01:00
Mark Wang
259e890039 west.yml: Sync hal nxp
sync the fix of usb device controller zlt issue

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-02-25 07:55:42 +01:00
Mark Wang
b15dcc196d drivers: udc_mcux_ip3511: fix typo in transfer handler
If the to-host data stage length is less than that requested by the
host, but equal to or a multiple of MPS, the device should send a ZLP,
not receive it.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-02-25 07:55:42 +01:00
Benjamin Cabé
18b5c740e4 dts: cpu: Make descriptions consistent
Streamline the description field for CPU bindings by removing
inappropriate use of terminology such as "This is a representation
of...", or mentions to "node".

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-25 07:55:09 +01:00
Axel Le Bourhis
0034e12599 drivers: bluetooth: hci_nxp: fix nomem handling
When allocation fails in `hci_rx_cb`, we should return immediately
instead of continuing the execution of the function.

Also, we need to free the allocated buffer from the heap when sending
to the message queue fails to avoid memory leak.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2025-02-25 07:54:56 +01:00
Jacob Wienecke
70f55bccf8 scripts: requirements-compliance.txt: fix windows requirements
Modify the requirements-compliance.txt to exclude python-magic from
windows system installation. On windows, the line:
""python-magic-bin; sys_platform == "win32""" already exists. Adding:
python-magic on windows creates issues where the check_compliance.py
script will either freeze or throw errors related to libmagic.

Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
2025-02-24 20:20:09 +00:00
Jeppe Odgaard
ae2e42b925 boards: st: nucleo_u083rc: move spi cs
Move CS to GPIO connected to pin header CN5 pin 8 which is also labeled CS.
This GPIO is free and is also placed next to the other SPI GPIOs.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-02-24 20:19:58 +00:00
Sylvio Alves
5902f00bd5 driver: flash: esp32: fix unaligned read
Fix flash read operation to account for all unaligned
scenarios, i.e, address, buffer and length. This is needed
when using flash APIs provided in ROM.

This also removes the unaligned flash write call as it
expects aligned values only.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-02-24 20:19:47 +00:00
Luca Burelli
904ec026b5 qemu/riscv: define RAM and Flash sizes
Define RAM and Flash sizes for QEMU boards in the board YAML. This is
needed to ensure those boards are considered by Twister for tests that
require a minimum amount of RAM and Flash.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-02-24 20:19:29 +00:00
Pierrick Curt
f63bb9cafa samples: sensor: accel_trig: fix twister tests
Add twister tests for tap detection feature

The overlay must be applied only if the shield x_nucleo_iks01a3
is enabled on board nrf52dk/nrf52832.

Signed-off-by: Pierrick Curt <pierrickcurt@gmail.com>
2025-02-24 20:19:12 +00:00
Vinayak Kariappa Chettimada
17d695a535 Bluetooth: Controller: Simplify required ISO PDU length and buffer count
Simplify the defines calculating the minimum required ISO
PDU length and the buffer count.

Co-authored-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-02-24 20:18:37 +00:00
Vinayak Kariappa Chettimada
662acab1ae Bluetooth: Controller: Fix ISO Tx PDU buffer counts for fragmentation
Fix ISO Tx PDU buffer count required when SDU fragmentation
is used.

Rename BT_CTLR_CONN_ISO_SDU_LEN_MAX to
BT_CTLR_ISO_TX_SDU_LEN_MAX so the value is common to both
Broadcast and Connected ISO transmissions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-02-24 20:18:37 +00:00
Vinayak Kariappa Chettimada
4161db72cd Bluetooth: Controller: Rename to BT_CTLR_ISO_TX_PDU_BUFFERS
Rename the internal BT_CTLR_ISO_TX_BUFFERS to
BT_CTLR_ISO_TX_PDU_BUFFERS correct represent the number
of actual ISO PDU buffers allocated in the Controller.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-02-24 20:18:37 +00:00
Yago Fontoura do Rosario
ee8266797c bluetooth: id: Fix logging
* Logging module already adds a new line, no need to add it

Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
2025-02-24 15:37:41 +00:00