Commit graph

96503 commits

Author SHA1 Message Date
Hess Nathan
209a3bd40a coding guidelines: comply with MISRA Rule 11.8
- modified parameter types to receive a const pointer when a
  non-const pointer is not needed

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-03 16:09:51 -04:00
Maciej Perkowski
a9565f7a96 docs: Add pytest files to a scope triggering doc-build workflow
Those files are used with autoclass to use their docstrings
in docs.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2024-06-03 16:08:50 -04:00
Tom Burdick
90c1aaad69 tests: i2c_ram: Add fixture for i2c_ram testing
i2c_ram expects that a ram-like part is connected to an i2c bus and
therefore requires a hardware fixture setup much like spi_loopback.

Adds a fixture that must be designated when running twister tests on a
board with -X i2c_ram.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-03 16:07:59 -04:00
Henrik Brix Andersen
e087d1bbb3 tests: drivers: can: api: add test for frame without data
Add test for sending/receing a CAN classic frame with no data.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-03 16:07:47 -04:00
Kai Vehmanen
1541fe9e2f intel_adsp/ace: power: fix address space annotation for powerdown
power_down() expects a cached pointer. Fix the sparse annotation
to match the implementation (sys_cache_cached_ptr_get() returns a cached
pointer so this is correct).

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-06-03 16:07:28 -04:00
Luca Burelli
0d2b3e1f36 samples: add IS31FL3194 RGB LED driver sample
This sample app cycles several colors on an RGB LED forever using the LED
API. It can be built and executed on an Arduino Nicla Sense ME, or on any
board where the devicetree has a similar compatible I2C device node.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-03 15:30:01 -04:00
Luca Burelli
5fea5c4358 arduino_nicla_sense_me: add RGB LED support to the device tree
This patch enables the user to control the RGB LED on the Arduino Nicla
Sense ME board. The RGB LED is controlled by the IS31FL3194 LED driver
and is connected to the I2C0 bus.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-03 15:30:01 -04:00
Luca Burelli
912a581a95 drivers/led: add IS31FL3194 LED driver
Add support for the IS31FL3194 3-channel LED driver. This driver can be
configured to handle its outputs as either a single RGB LED or (up to)
three independent LEDs.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-03 15:30:01 -04:00
Mathieu Choplain
8aa6ae43ce llext: add support for SLID-based linking
This commit introduces support for an alternate linking method in the
LLEXT subsystem, called "SLID" (short for Symbol Link Identifier),
enabled by the CONFIG_LLEXT_EXPORT_BUILTINS_BY_SLID Kconfig option.

SLID-based linking uses a unique identifier (integer) to identify
exported symbols, instead of using the symbol name as done currently.
This approach provides several benefits:
 * linking is faster because the comparison operation to determine
   whether we found the correct symbol in the export table is now an
   integer compare, instead of a string compare
 * binary size is reduced as symbol names can be dropped from the binary
 * confidentiality is improved as a side-effect, as symbol names are no
   longer present in the binary

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-06-03 15:29:34 -04:00
Joel Guittet
05ad2565fa llext: add _POSIX_C_SOURCE definition to build shell
Fix implicit-function-declaration warning while building the llext shell.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2024-06-03 15:28:33 -04:00
Luca Burelli
435b72dc18 llext: add a test for the pre_located feature
This test checks that the pre_located feature works as expected. It
creates a new extension that is manually relocated to a specific address
via the add_llext_command() CMake function invoking a custom linker
command. The test then loads the extension setting the pre_located
option and checks that the symbol is resolved properly.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-03 15:28:18 -04:00
Emil Gydesen
92002b2dff Bluetooth: CAP: Implement bt_cap_initiator_unregister_cb
Implement function to unregisterd the CAP initiator callbacks.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-03 15:28:05 -04:00
Alberto Escolar Piedras
68adc77cbd boards nrf_bsim: Add NVIC_GetEnableIRQ()
Provide a replacement for CMSIS' NVIC_GetEnableIRQ()
as some applications use it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-03 15:27:48 -04:00
Francois Ramu
5bd1689ac8 boards: st: stm32c0116_dk defines the select pin with zephyr,code
Define the select_key with the correct zephyr,code
which is <INPUT_KEY_ENTER>

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-03 15:27:36 -04:00
Henrik Brix Andersen
64e9ba3742 dts: bindings: can: native linux: the CAN Linux driver supports CAN FD
The native Linux CAN driver supports CAN FD. Change the binding to reflect
this. No functional changes.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-03 15:27:17 -04:00
Henrik Brix Andersen
8edbbdf332 dts: bindings: can: loopback: the CAN loopback driver supports CAN FD
The CAN loopback driver supports CAN FD. Change the binding to reflect
this. No functional changes.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-06-03 15:27:17 -04:00
Maureen Helm
6305c17d6e manifest: Update hal_adi to pick up newlib compatibility fix
Updates the hal_adi module to pick up a fix for building with newlib.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-06-03 15:27:00 -04:00
Tomasz Moń
8d344cc9d8 usb: device_next: Rename usbd_contex to usbd_context
Add the missing "t" to struct usbd_contex. No functional changes.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-03 06:43:20 -07:00
frei tycho
b76fde64a1 include: kernel: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-03 15:43:09 +02:00
Emil Gydesen
d2fbeffaa9 Bluetooth: BAP: Unicast client Split start and connect
Removes the CIS connection establishment from bt_bap_stream_start
and move the behavior to a new funciton bt_bap_stream_connect.

This has 2 advantages:
1) The behavior of bt_bap_stream_start is much more clear and more aligned
with the spec's behavior for the receiver start ready opcode.
2) It is possible to connect streams in both the enabling
and the QoS configured state with bt_bap_stream_connect as
per the spec. This allows us to pass additional PTS test cases.

To implement this new behavior, samples and tests have been updated.

The CAP Initiator implementation has also been updated
to accomodate for the change in BAP, but the CAP
initiator implementation should work the same for application, except
that it's now possible to do unicast start on ASEs in any order
(https://github.com/zephyrproject-rtos/zephyr/issues/72138).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-03 15:42:33 +02:00
Ioannis Karachalios
5b0cc42968 drivers: clock_control: smartbond: Update clock control driver
This commit should deal with the followings:

1. PLL requires that VDD level be changed to 1V2 and then released
   to 0V9 when it's turned off. Changing the VDD level should be
   done when the regulator driver is available. Otherwise, the VDD
   level will be fixed to 1V2 (reset value).

2. Check if PLL is allowed to be turned off as it might happen that
   USB is enabled which is clocked by PLL.

3. Do not wait for the PLL to lock. This is now performed silently
   when PLL is requested.

4. Before switching to PLL we should check if PLL is already enabled
   as it might happen that PLL node is initially disabled.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-03 15:41:20 +02:00
Ioannis Karachalios
570a508633 drivers: regulator: smartbond: Regulator driver update
This commit should deal with the followings:

1. Change regulator's driver priority as it should now
   be used by the clock control driver.
2. Check if the VDD level is permitted to change when PLL
   is the system clock. This is because the PLL requires
   that VDD be 1.2V.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-03 15:41:20 +02:00
Ioannis Karachalios
c1fecdc2e3 west: Update manifest revision
Update the manifest SHA to point to the HAL PR
that introduces the PLL clock handling updates.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-03 15:41:20 +02:00
Ioannis Karachalios
8c651be4ef drivers: counter: smartbond: Add support for PM
This commit should add all the functionality needed for the counter
driver to work when PM is enabled. The sleep state is bound to the
counter start/stop functionality. TIMER3/4 block instances are
powered by PD_SYS and so sleep should be constrained when they are
up and running. On the other hand TIMER1/2 block instances are
powered by PD_TMR which is always on (used to generate the os tick).

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-03 15:40:24 +02:00
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