Commit graph

97620 commits

Author SHA1 Message Date
Sebastian Głąb
a3e1e398bf boards: nordic: nrf54h20: Add ADC to the list of supported peripherals
ADC driver was aligned to nrf54h20 target.
Enable ADC Twister tests on that platform.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-06-14 15:36:17 +02:00
Piotr Kosycarz
1b3725e099 samples: sensor: accel_polling: Allow coverage calculation
Sample must end to dump coverage data.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-14 15:35:17 +02:00
Piotr Kosycarz
e63c691a86 samples: sensor: bme680: Allow coverage calculation
Sample must end to dump coverage data.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-14 15:35:02 +02:00
Seppo Takalo
35cc774aa5 net: lwm2m: Retry DTLS handshake before dropping to bootstrap
Allow DTLS handshake to be retried before the engine
drops into bootstrap. Otherwise any termporary failure,
for example DNS failure might drop us into bootstrap
without retrying.

Now all the retry logic should be in sm_do_network_error().
sm_do_registration() should only fall back to bootstrap
if there is configuration error.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-06-14 15:34:39 +02:00
Jens Rehhoff Thomsen
ab9fd0b5c9 Bluetooth: BAP: Add bt_bap_base_get_size function
bt_bap_base_get_size function returns the size of the BASE.

Fixes #73847

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
2024-06-14 15:34:23 +02:00
Rubin Gerritsen
768c45a11d Bluetooth: Controller: Clarify that it can be overridden out of tree
Nordic devices are commonly used with the nRF Connect SDK.
There the SoftDevice Controller is set as the default
Bluetooth Controller. To avoid confusion when reading DTS
and Kconfig files, clarify this by adding a note.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-14 15:33:59 +02:00
Andries Kruithof
811387600a Bluetooth: Audio: CAP: babblesim test for broadcast reception start
Add a babblesim test for the broadcast reception start procedure
from the CAP commander

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-06-14 15:33:34 +02:00
Alberto Escolar Piedras
9ae5352372 tests/bsim/run_parallel.sh: Do not attempt to run parallel with no tests
If there is no tests in the test list, do not attempt to run
parallel.
This avoids parallel trying to attempt to read the input from
the terminal in that case.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-14 05:31:08 -04:00
Alberto Escolar Piedras
c2950bec73 ci: bsim tests: Fix for missing result xml files
Do not fail during results merge if
twister or the bsim workflows did not run
(or produce an xml).
Depending on what has changed in a PR
and therefore what tests are run this can happen.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-14 05:31:08 -04:00
Yong Cong Sin
bb66d1188c arch: riscv: stacktrace: conditionally check stack_info
Check if an address is in the thread stack only when
`CONFIG_THREAD_STACK_INFO` is enabled, since otherwise the
`stack_info` will not be available.

This fixes compilation error when `CONFIG_THREAD_STACK_INFO`
is explicitly disabled.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-14 05:22:59 -04:00
Maximilian Deubel
96112ade74 drivers: swdp: document API
This patch adds documentation for the SWDP API.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Maximilian Deubel
f1b6073a27 driver: swdp_bitbang: hardcode request lut
Hardcode the lookup table for SWDP requests.
This is an optimization to save some space.
Documentation was added to understand the values.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Maximilian Deubel
05a45a19e3 dap: fix timeout handling
Use k_timepoint_t for timeout handling in the swj_pins function.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Johann Fischer
94f48c7a78 samples: debug: add CMSIS DAP sample using USB as interface
Add CMSIS DAP sample using USB as interface.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Johann Fischer
9a9afb0b54 dap: implement DAP SWD sequence command
DAP SWD sequence command is a requirement to support CMSIS-DAPv2.
Raise supported version to "2.1.0".

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Johann Fischer
e31cdc00a0 dap: react properly to unsupported UART commands
Add ID_DAP_UART_* command definitions and react properly to
unsupported UART commands.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Maximilian Deubel
58d9d889aa dap: add support for DAP_INFO string elements
Add support for DAP_INFO string elements.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Maximilian Deubel
6522dd7f53 dap: implement wait for SWJ pins command
Implement wait for SWJ pins command.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Johann Fischer
3e8f9fb7df drivers: swdp_bitbang: add SW output sequence
Add API to read count bits from SWDIO into data LSB first.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Maximilian Deubel
3ef2c66a8a driver: swdp_bitbang: rework pin configurations
Move low-level GPIO functions to a separate file and use GPIO driver
API if low-level GPIO support is not available for the platform.
Allows alternative pin configuration using only two pins, clk and dio.
Improve binding description.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Johan Carlsson
f5ccc3c82c dap: do not return error in DAP connect command
If a host client crashes or fails to disconnect, the probe will
hang. Allow a new connection without raising errors.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Johan Carlsson
e46e72320e dap: add Konfig option to set maximum packet size
This also fixes a bug where the packet size returned was only 17 byte.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-06-14 11:14:17 +02:00
Johann Fischer
7c9259abbc dap: add CMSIS-DAP compatible controller
Add CMSIS-DAP compatible controller which is a handler between
the host interface and SWD driver. The controller follows CMSIS-DAP
reference implementation. It expects a request buffer from the host
interface, splits it to simple transfers and forwards to the DP driver,
and finally returns a response buffer to the host.
Interface to the host can be implemented with USB HID device support.

Controller implements only SW-DP support and is tested
with pyOCD and ADIv5.x.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2024-06-14 11:14:17 +02:00
Johann Fischer
3cf630fb0b driver: add SWDP driver interface API and bit-bang driver
Add Serial Wire Debug Port interface driver API and bit-bang driver.

The driver requires a simple Hardware Interface Circuits (HICs),
where signals CLK, DOUT, DIN, ENn, OE_ENn, RESETn
are connected to board GPIOs and buffered signals SWD_CLK and SWD_DIO
to the target.

Signal OE_ENn controls the direction of the Serial Wire (SWD_DIO),
ENn the buffers SWD_CLK possibly others and enables/disables HIC.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 11:14:17 +02:00
Francois Ramu
2146813cb3 tests: drivers: adc stm32 api testing on the stm32h7s78 disco kit
add the stm32h7s78_dk disco kit to run the tests drivers
This  testcase is executed (XiP) from the external NOR
of the stm32h7s78_dk board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 11:13:54 +02:00
Francois Ramu
e78cdc823d boards: arm: stm32h7s78 disco kit supporting more features
Add the ADC, WDG, entropy features to the stm32h7s78_dk disco kit

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 11:13:54 +02:00
Francois Ramu
4ade2a88e4 dts: arm: stm32h7 add wdg and adc, rng node to stm32h7R/h7S devices
Add the IWDG and WWDG watchdog peripherals
the ADC1 & 2 peripherals with sensor for die temperature and voltage
the RNG entropy generator

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 11:13:54 +02:00
Francois Ramu
b014150508 drivers: flash: stm32h7 flash driver supports the stm32h7rs serie
Add the support of the stm32h7rs serie to the flash stm32h7 driver
Remap Flash registers to the stm32h7rs serie.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 11:13:54 +02:00
Francois Ramu
da8a812582 drivers: adc: stm32 adc driver supporting the stm32H7RS
Introduce the stm32h7RS serie to the ADC driver,
based on the stm32h7: two ADC 12 resolution
For stm32h7rs ADC calibration, the
LL_ADC_SetCalibrationFactor is not used.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 11:13:54 +02:00
Francois Ramu
24ff13e92c drivers: watchdog: stm32 wdg driver support stm32H7RS serie
Add the stm32h7rs serie to the stm32 WDG driver

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 11:13:54 +02:00
Francois Ramu
895ef1d6c5 drivers: hwinfo: stm32 driver supports the stm32h7rs serie
Add the support of the stm32h7rs serie to the HWinfo
driver. UID base is 0x8FFF800

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 11:13:54 +02:00
Luca Burelli
08eb314c35 llext: refactor: use cached section headers
The section headers are now available in the loader structure, so we can
use those directly instead of reading them from the ELF file every time.

This commit contains no logic changes; it removes all copies of the
header loading code and replaces them with direct access to the cached
section headers.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-14 11:13:44 +02:00
Luca Burelli
817bbda5cc llext: read all section headers at once
This change reads all section headers at once, instead of reading them
one by one. This is more efficient and allows to further simplify the
code downstream.

The section headers are directly accessed from the file buffer if the
llext_peek() function is supported by the loader. Otherwise, they are
read into a buffer allocated on the heap and used only during the
llext_load() function.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-14 11:13:44 +02:00
Luca Burelli
a976a1a25c llext: llext_load: document memory management policy
The do_llext_load function is responsible for loading an extension from a
file, and for this purpose it calls a number of functions that a) allocate
memory, and b) can fail. This creates the opportunity for memory leaks if
the error paths are not handled correctly.

This commit adds a comment at the beginning of the function to document
the memory management policy that has to be followed in this file:
cleanup is not performed in the error paths, and all memory is freed at
the end of the do_llext_load() function, both in the case of error and of
successful loading.

As an improvement, the symbol table is not freed if the LLEXT log level
is set to debug, so that it can be used, for example, to inspect the
symbols of the loaded extension.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-14 11:13:44 +02:00
Luca Burelli
89e27b9312 llext: improve debug messages
The recent llext_map_sections() rework changed the way debug messages
are output so that the names of most skipped sections are not printed
at all. This makes debugging harder since the section names are useful
to identify the contents at a glance.

Also print a few additional fields from the section header, and use 0x
prefixes for hex numbers.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-14 11:13:44 +02:00
Sercan Erat
0666fe2a35 boards: rak: Add Rak11720 board
Added support for the Rak11720 board. Rak11720 is a WisBlock Core module
with Apollo3 Blue SoC from Ambiq and a Semtech SX1262 LoRa® transceiver.
For more information about this board please check:
https://docs.rakwireless.com/Product-Categories/WisDuo/RAK11720-Module/Overview/#product-description

There are known issues that have been identified while communicating
with SX1262 transceiver:

- Gpio interrupt handling error: ambiq_gpio_pin_interrupt_configure
function is not able to configure SX1262 Dio1 interrupt pin correctly.
Please check issue 73958.
- Spi communication error: Rak11720 uses a custom CS pin.
Firstly, custom CS pin support is necessary. Secondly, spi_ambiq_xfer
function is not able to communicate with SX1262 transceiver.
Please check issue 73959.

These issues have been documented for future solutions. Despite these
limitations, the current support enables basic functionality.

Examples can be build by below command for Rak11720:
west build -b rak11720 samples/hello_world

Signed-off-by: Sercan Erat <sercanerat@gmail.com>
2024-06-14 11:13:27 +02:00
Declan Snyder
163ddc0e84 boards: lpcxpresso5s69//ns: Fix mbedtls build err
Fix issue where when building with TFM and PSA client
there is an error from want RSA key type not being
defined in mbedTLS library.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-14 11:13:05 +02:00
Declan Snyder
4bf9e62ba0 boards: nxp: Remove suppression of LPC DTC warns
DTC warnings are useful and we should keep them enabled.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-14 11:13:05 +02:00
Declan Snyder
801028b763 dts: nxp,lpc-gpio: Fix binding to group ports
LPC GPIO binding was wrong in that the reg address
on the simple soc bus was given as an index of the gpio ports
within a gpio controller. Fix this by putting the GPIO node
on the simple bus as a single node with the correct base address,
and make the ports children of this node.

Change the driver to get the port number from the reg address
instead of a custom property, and get base address from DT instead
of the SDK macro definition.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-14 11:13:05 +02:00
Anke Xiao
4141b7cb64 tests: drivers: i2c: add i2c support for NXP FRDM-KE17Z512
Added support for NXP FRDM-KE17Z512,
and tested i2c_target_api sample.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-14 11:12:27 +02:00
Anke Xiao
fdf39a7ab7 boards: nxp: frdm_ke17z512: enable lpi2c0 and lpi2c1 driver
Added lpi2c support to test i2c samples

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-14 11:12:27 +02:00
Anke Xiao
89a0ff8f61 soc: nxp: kinetis: soc.c: configure i2c driver clock
Set the i2c driver clock source when it is Okay.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-14 11:12:27 +02:00
Anke Xiao
5aeeae91e2 dts: arm: nxp: nxp_ke1xz.dtsi: add i2c periperal info
The i2c driver is disabled by default, enabled under board folder
for ke17z512 platform.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-06-14 11:12:27 +02:00
Johan Hedberg
1c53726e80 Bluetooth: Host: Fix deprecation and versioning for HCI APIs
Add versioning to the new HCI API so that it shows up officially as
unstable, and add a reference to the new API from the old API.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-14 11:12:01 +02:00
Johan Hedberg
c9a0ab2587 doc: migration-guide-3.7: Mention the removal of CONFIG_BT_NO_DRIVER
Mention the removal of the BT_NO_DRIVER option, and explain how drivers are
now expected to be enabled or disabled. Also group all bullet points
related to the HCI API changes as a dedicated sub list.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-14 11:12:01 +02:00
Dong Wang
72fa07e0bc manifest: hal_intel: update to lastest revision
The update contains all SEDI driver enhancements ported from ISH code base
for PV release.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-06-14 11:11:47 +02:00
Riku Karjalainen
ff0635d700 drivers: flash: stm32: fix flash write error handling
The stm32 flash driver returns success even though
writing failed when instruction cache was enabled.
Fix by not overriding error code when re-enabling
instruction cache.

Signed-off-by: Riku Karjalainen <riku.karjalainen@vaisala.com>
2024-06-14 11:11:33 +02:00
David Leach
d45605e6a3 drivers: apic_tsc: revert add dependency of DYNAMIC_INTERRUPTS
PR #74127 introduced a dependency loop that appeared to not be caught
by CI.

Signed-off-by: David Leach <david.leach@nxp.com>
2024-06-13 23:54:29 -05:00
Dong Wang
af6d790d0e drivers: apic_tsc: add dependency of DYNAMIC_INTERRUPTS
The reason is that this driver needs to call the function
'irq_connect_dynamic()' which  is implemented with DYNAMIC_INTERRUPTS.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-06-13 21:58:49 -05:00
Jeppe Odgaard
b1f2eb9a11 samples: drivers: adc: add nucleo_h563zi
Add Nucleo H563ZI board support to ADC sample.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-06-13 20:46:44 -04:00