Commit graph

96479 commits

Author SHA1 Message Date
Erwan Gouriou
a8b04606af west.yml: hal_stm32: Don't include legacy headers anymore
We're not supposed to rely on symbols provided by these files.
In case it is required stm32 zephyr code base should be updated rather
than relying on legacy definitions.

Additionally:
Fixes #70136

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-06-03 15:39:51 +02:00
Rubin Gerritsen
3609d97c95 Bluetooth: Document reasons for HCI command timeouts
When reading the error message:
"ASSERTION_FAIL: command opcode 0x0c03 timeout with err -11" it may not be
obvious what is wrong with their setup unless you are very familiar
with HCI.

This commit adds some more documentation to make this more obvious.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-03 15:39:23 +02:00
Jukka Rissanen
a124dd2596 net: http_server: Send chunked response correctly
The chunked response was not sent properly. There were extra
"\r\n" before the chunk lenght and the length of the string
to be sent was calculated incorrectly.

Fixes #72887

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 15:39:09 +02:00
Alexander Kozhinov
0f1d69d21a drivers: can_mcan: can_mcan_line_1_isr: add more debug outputs
In some cases CAN-Bus communication may be
disturbed by other parts of SoC. For example USB
may disturb CAN communication if electircal wiring
of the board is not done properly or the system is
in development stage.
This change adds debug-prints s.t. CAN-Bus protocol
errors in arbitration or data phases can be
detected while in CAN-Bus ISR.

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2024-06-03 15:38:38 +02:00
Tomasz Moń
a1afd349a1 usb: device_next: initialize BOS device caps number
Explicitly initialize bNumDeviceCaps to 0 because the bos descriptor is
stored on stack.

Fixes: b0d7d70834 ("usb: device_next: add initial BOS support")
Coverity-CID: 368798

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-03 15:38:23 +02:00
Daniel DeGrasse
814403a4f5 boards: nxp: vmu_rt1170: fix dummy cycle value in flash configuration
The VMURT1170 board configures the FLEXSPI to run at 200MHz serial clock
in DDR mode, via the flash configuration block passed to the ROM API.
Per the datasheet of the MX25UM51345G flash present on the board, 20
dummy cycles are required before reading data in OPI DTR mode. Correct
the dummy cycle value used for read commands to 0x28 (40 DDR dummy
cycles, equivalent to 20 dummy cycles of the clock) to resolve this
issue.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-03 15:38:05 +02:00
Henrik Brix Andersen
beb5b676f3 scripts: requirements: run-tests: add python-can
Add python-can dependency for the newly introduced tests/drivers/can/host
test suite.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-03 15:37:49 +02:00
Grant Ramsay
1e0a882f0d boards: shields: arceli_eth_w5500: Fix spelling and broken link
The URL in the documentation no longer exists

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2024-06-03 15:37:41 +02:00
Seppo Takalo
9e615429d5 net: lwm2m: Block-Wise response NUM field fix
When calculating the offset for blockwise writes,
we should not advance the block_ctx->current field
past the block boundary.
It causes CoAP layer to reply with the next NUM field
instead of the current one being processed.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-06-03 15:37:21 +02:00
Chris Wilson
365187e63c boards: shields: Add nRF9160 DK overlay for arduino_uno_click shield
The original Arduino Uno provides the same SCL/SDA on two sets of pins,
but the nRF9160 DK maps these pins to two different pairs of GPIO. When
using the Arduino Uno Click Shield board with the nRF9160 DK, the
P0.18/P0.19 pair must be used.

Also, the default pin group for the nRF9160 DK includes RTS/CTS HW flow
control, but the Arduino Uno Click Shield board does not connect these
pins (only TX/RX are connected on the shield). This keeps RX/TX on the
same pins, but just removes RTS/CTS from the pin groups.

References:

 - Arduino Uno R3 pinout:
   https://docs.arduino.cc/resources/pinouts/A000066-full-pinout.pdf

 - Arduino Uno R3 schematic:
   https://www.arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf

 - Arduino UNO click shield schematic:
   https://download.mikroe.com/documents/add-on-boards/click-shields/arduino-uno/arduino-uno-click-shield-schematic-v101.pdf

Signed-off-by: Chris Wilson <chris@cgnd.dev>
2024-06-03 06:21:03 -07:00
Dominik Ermel
e801f1a9ad tests/fs/littlefs: Fix mimxrt1060_evk QSPI overlay
Changes to contents of boards directory for the board cause duplicate
definitions when combined with test overlay; the commit removes
duplicate partitions from overlay in test.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-06-03 05:06:29 -07:00
Tomasz Moń
88dc03618b scripts: west_commands: runners: nrf_common: adjust json output
Make the generated json file match the contents generated with:
  * nrfutil device erase --uicr --core Application --x-operation-id 1
    --x-family nrf54h --x-append-batch batch.json
  * nrfutil device program --firmware uicr_merged.hex
    --options chip_erase_mode=ERASE_NONE,verify=VERIFY_READ
    --core Application --x-operation-id 2 --x-family nrf54h
    --x-append-batch batch.json
  * nrfutil device reset --reset-kind RESET_PIN --x-operation-id 3
    --x-append-batch batch.json

The erase options are supposed to be placed under "option" subkey.
Without the "option" subkey, nrfutil defaulted to ERASE_ALL.

Remove the firmware file format field because it is auto detected by
nrfutil when executing the batch script.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-03 04:45:59 -07:00
Jordan Yates
924db97724 usb: cdc_acm: add locks around ring_buf_put
The ring buffer API is explicitly not thread safe, with users needing to
implement their own locking. As `poll_out` and `fifo_fill` are operating
on the same ringbuffer, these locks are needed.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-03 03:44:45 -07:00
Gerard Marull-Paretas
71dcbdd29c drivers: clock_control: nrf_auxpll: add lock timeout
This patch adds a timeout to the clock_control_on() implementation. The
reason for this timeout is to prevent system freezes when the PLL is
configured incorrectly, or, if BICR is wrong. The locking time of the
AUXPLL is <30us, however, when it starts it also starts other
dependencies which take much longer to become ready. The locking time
has been experimentally measured to be around 2ms, so a 10x bound has
been added.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-06-03 03:39:26 -07:00
Aurelien Jarno
19827b9be5 drivers: rtc: rtc_shell: fix milliseconds display
The RTC shell get command displays the time according to the ISO8601
standard. Fix the milliseconds field to be displayed on 3 digits instead
of 6 like if they were microseconds. In addition change the separator
between seconds and milliseconds to a dot like specified in the ISO8601
standard.

Before:
2024-06-02T22:33:10:000667

After:
2024-06-02T22:33:10.667

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-06-03 03:39:17 -07:00
Emil Gydesen
1af717430a Bluetooth: CAP: Do not require CAS unless necessary
Removes the requirement that CAS is found on the remove
device for ad-hoc sets. This makes the CAP API more
versatile as it allows applications to use it with
remote non-CAP devices.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-03 03:39:07 -07:00
Ioannis Damigos
90974248ec west/ezflashcli: add dev_id capability
Add dev_id capability

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-03 03:02:11 -07:00
Ioannis Damigos
5ad5ac6414 west/ezflashcli: add tool_opt capability
Add tool_opt capability

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-06-03 03:02:11 -07:00
Yong Cong Sin
02770ad963 debug: EXCEPTION_STACK_TRACE should depend on arch Kconfigs
Fix the dependencies of `CONFIG_EXCEPTION_STACK_TRACE`:
- Architecture-specific Kconfig, i.e.
  `X86_EXCEPTION_STACK_TRACE`, will be enabled automatically
  when all the dependencies are met.
- `EXCEPTION_STACK_TRACE` depends on architecture-specific
  Kconfig to be enabled.
- The stack trace implementations should be compiled only if
  user enables `CONFIG_EXCEPTION_STACK_TRACE`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-03 03:02:04 -07:00
Yong Cong Sin
190777dccf arch: arm64: create ARM64_EXCEPTION_STACK_TRACE
Currently, the stack trace in ARM64 implementation depends on
frame pointer Kconfigs combo to be enabled. Create a dedicated
Kconfig for that instead, so that it is consistent with x86 and
riscv, and update the source accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-03 03:02:04 -07:00
Yong Cong Sin
ea00e04382 arch: x86: select DEBUG_INFO in X86_EXCEPTION_STACK_TRACE
Select `DEBUG_INFO` instead of depending on it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-03 03:02:04 -07:00
Yong Cong Sin
8a5823b474 debug: remove !OMIT_FRAME_POINTER from EXCEPTION_STACK_TRACE
Not all stack trace implementation requires frame pointer, move
that dependency to architecture Kconfig.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-03 03:02:04 -07:00
Yong Cong Sin
413b1cf409 debug: remove DEBUG_INFO from EXCEPTION_STACK_TRACE
The `DEBUG_INFO` in the `EXCEPTION_STACK_TRACE` is only
required by x86. Move that to `X86_EXCEPTION_STACK_TRACE`
instead.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-03 03:02:04 -07:00
Yong Cong Sin
1570ef2863 debug: remove PRINTK from EXCEPTION_STACK_TRACE
The `PRINTK` was required for `EXCEPTION_STACK_TRACE` because
it's initial implementation for x86 in #6653 uses `printk()`.
We are using `LOG_ERR()` now, so this is not required anymore.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-03 03:02:04 -07:00
Håvard Reierstad
d4a59a8655 tests: Bluetooth: Mesh: Default to ext adv
Changes twister tests and nrf samples from using legacy adv to ext adv
since this is the default for Mesh. Legacy adv is still tested in bsim.

Removes redundant test configuration testing ext adv.

Removes redundant config for ext_adv in `multi_ext_adv.conf`.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-06-03 03:01:55 -07:00
Aleksandr Khromykh
86b68000b2 tests: Bluetooth: Mesh: move semaphores out bsim initializations
It is not correctly to call Zephyr API from bsim
HW thread.
Commit moves friendship test suite semaphores
initialization into test bodies.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2024-06-03 03:01:49 -07:00
Jukka Rissanen
5740997f7c doc: net: Fix DHCPv4 info as server is also supported
The DHCPv4 information was not mentioning server support
which is currently supported.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 03:01:42 -07:00
Jukka Rissanen
6fae78eb31 doc: net: Add DHCPv6 information
DHCPv6 description was missing from the documentation.

Fixes #73290

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 03:01:42 -07:00
Vinayak Kariappa Chettimada
fb774fef74 soc: nordic: Select new nrf54lx compatible kconfig option
Select the newly introduced nrf54lx compatible kconfig
option.

This is common both for real HW and for simulated HW,
allowing SW to behave appropriately for both.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-03 03:01:36 -07:00
Sean Nyekjaer
ede866440d dts: arm: st: mp1: fix exti interrupt numbering
Align interrupt numbering with RM0436 for STM32MP157.
This will allow EXTI interrupt for line 6, 7, 8, 9, 10 and 11.

Fixes: ff231fa20a ("dts: stm32: Populate new properties for exti nodes")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
2024-06-03 03:01:31 -07:00
Gerard Marull-Paretas
e2f8f5b131 drivers: can: mcan: skip read/write to mram if data length is 0
can_mcan_send/can_mcan_get_message issued a message ram write/read even
when data length was 0. This caused some issues on systems where data
cache is enabled, because the cache invd/flushing calls present in the
mcan driver can fail if provided length is 0.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-06-03 03:01:22 -07:00
Valerio Setti
a15af0be9f mbedtls: fix Mbed TLS Kconfig options
PR #72475 disabled default enabling of most Mbed TLS features.
This means that:

- CONFIG_MBEDTLS_CIPHER_AES_ENABLED needs to be manually enabled
  when required;
- CONFIG_PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_BASIC does not need to
  be (almost) always added because there is no default RSA
  key-exchange enabled, so PSA can be built without RSA support.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-03 09:55:58 +02:00
Emil Gydesen
a2f354cabd Bluetooth: Audio: Update documentation for bt_audio_codec_qos
The struct and its fields were poorly documented.
The new documentation should she some light on when the fields
can be modified.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-03 09:49:39 +02:00
cyliang tw
a30c5731ae tests: drivers: can: api: support numaker_m2l31ki
Add support for Nuvoton numaker board numaker_m2l31ki.
m2l31x has 4 MPU regions and can't afford one more region
for USERSPACE, so set CONFIG_USERSPACE=n in m2l31ki_defconfig.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-06-03 09:49:17 +02:00
cyliang tw
9bb6e2d6f4 drivers: can: support for numaker m2l31x
Add Nuvoton numaker m2l31x series can-fd controller in Kconfig.numaker
Add can-fd nodes in m2l31x.dtsi

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-06-03 09:49:17 +02:00
Jukka Rissanen
8363b8cfd9 samples: net: Increase CONFIG_NET_SOCKETS_POLL_MAX to pass checks
The number of suitable network IPv6/4 configurations in interfaces
affect the number of pollable sockets. So need to increase the value
from the default value of 3.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 09:49:01 +02:00
Jukka Rissanen
b95821f809 net: dns: llmnr_responder: Print query type properly
Instead of printing either A or AAAA resource query type,
print the correct query type value.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 09:49:01 +02:00
Jukka Rissanen
b305be037c net: Start socket service thread by net core init
Do not depend on init level but start the socket service
already in net core init because DNS init code depends on
socket service API to be ready to serve. And we call DNS
init at the net core init.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 09:49:01 +02:00
Jukka Rissanen
1eb4a709e8 net: dns: Allow using resolver and responder at the same time
Allow mDNS resolver and responder to to be used at the same
time so that both can use the port 5353. This requires
a DNS traffic dispatcher which affects also the normal DNS
resolver.

Fixes #72553

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 09:49:01 +02:00
Jukka Rissanen
63e6a83510 net: dns: Add helper for figuring out the query type
Add helper function that returns the name of the query type
so that we can print it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 09:49:01 +02:00
Jukka Rissanen
434e290649 net: dns: Add ANY query resource type
Don't give an error for ANY type record.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-06-03 09:49:01 +02:00
Emil Gydesen
f93b9dee5c Bluetooth: CSIP: Make set_member_by_conn a public function
The function is useful for application to lookup set
members from bt_conn pointers, e.g. when iterating on
connected devices.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-03 09:48:48 +02:00
Fengming Ye
4f8c2e8f58 net: conn: fix supplicant l2 recv unexpected frame
Supplicant create AF_PACKET proto ETH_P_PAE socket but receive other
frames like ICMP, UDP and causes following issues.
1. When frame len exceeds MTU, net_pkt_clone cannot clone pkt.
   Thus dropped it and print warning log.
2. It will lower throughput performance as every packet is cloned.

Fix it by conn_raw_socket does not deliver pkts protocol not macted,
after l2 processed, unless conn is all packets.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-06-03 09:48:32 +02:00
Fengming Ye
a3034d1802 tests: net: socket: af_packet: fix TSN socket recv IP pkt
test_packet_sockets_dgram create ETH_P_TSN sockets but
send and recv ETH_P_IP packet.

Fix it by sending ETH_P_TSN packet.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-06-03 09:48:32 +02:00
Caldeira Quentin
68527f5506 boards: stm32wb5mmg_dk: add button support
This patch add buttons support for the two user buttons

Signed-off-by: Caldeira Quentin <QuentinCaldeira@eaton.com>
2024-06-03 09:48:19 +02:00
Hake Huang
83d087caa3 samples: net: mqtt_publisher: increase num of thread to allowed
according to the latest build log, we need increase the MAX_THREEED

/usr/bin/python3 scripts/build/gen_kobject_list.py \
--kernel twister-out/frdm_k64f/samples/net/mqtt_publisher/\
sample.net.mqtt_publisher.userspace/zephyr/zephyr_pre0.elf \
--gperf-output kobject_prebuilt_hash.gperf --include-subsystem-list \
twister-out/frdm_k64f/samples/net/mqtt_publisher/\
sample.net.mqtt_publisher.userspace/zephyr/misc/generated/struct_tags.json
Too many thread objects (17)
Increase CONFIG_MAX_THREAD_BYTES to 3

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-06-03 09:48:07 +02:00
Chang Feng
fe03e0c4bb dts: gd: fix uart4 irq wrong
Fix IRQ number error of UART4 in DTS of gd32f4xx.

Signed-off-by: Chang Feng <chang_196700@hotmail.com>
2024-06-02 00:43:44 +02:00
Florian Weber
8f852551e0 drivers: sensor: akm09918c: fix decoder api define
Decoder api was not defined and lead to build error
if it is used in userland.
Fix that by adding necessary DT_DRV_COMPAT #define
in akm09918c sensor decoder.

Signed-off-by: Florian Weber <florian.weber@live.de>
2024-06-02 00:43:08 +02:00
Grzegorz Chwierut
76ff3afffe tests: Update pytest scenarios with sysbuild paths
Updated sample to test DFU with mcumgr.
Use paths to default domain build dir from device_config.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-06-02 00:42:54 +02:00
Grzegorz Chwierut
f52f08f877 twister: pytest: Sysbuild support in pytest-twister-harness
Read default domain from domains.yaml file and update
paths to proper build directory. It fixes native and qemu
pytest scenarios, when application is build with sysbuild.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-06-02 00:42:54 +02:00