Enable the Software Watchdog Timer instance on this board.
Now that SWT is enabled for this board and made the default watchdog,
sample.task_wdt.no_hw_fallback can be removed as is no longer needed.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Convert NXP SWT watchdog driver to a native driver and extend the
SWT supported functionalities and configuration options.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Parse the more flag in coap_get_block2_option(), so that the function
can be used not only with requests but also with replies (where the more
flag should not be ignored).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The block number in block1/2 options can be encoded on up to 20 bits
according to RFC 7959, therefore the underlying type used in helper
functions to retrieve the block number should be large enough to hold
the result. Therefore, replace the container for block number with
uint32_t instead of uint8_t.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
add missing FOREACH macros to stop clang-format from moving the opening
curly brace into a new line.
Signed-off-by: Gerhard Jörges <joerges@metratec.com>
Convert power management to native drivers retaining existing
functionalities. Presently only SoC reset support and power control
initialization is supported, but these drivers will be extended to
support power management as well.
MC_ME and MC_RGM peripherals are common enough to be reused by other NXP
S32 devices, whereas PMC has specific implementations for each SoC
series.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Allow CONFIG_NRF_APPROTECT_LOCK and
CONFIG_NRF_SECURE_APPROTECT_LOCK with TF-M with all the SOC's
that support TF-M.
Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
Use LL calls to enable/disable interrupts rather than make calls to the
interrupt controller.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Add required initialisation of OCOTP. The IMXRT10XX
variants don't support fuseWords to be greater than 1.
MAC0 fuse map address is 0x22 instead of 0x620.
Fill in mac_addr buffer correctly.
Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
When receiving data over the eswifi module, we currently read the data
first, then allocate a buffer, and finally write the data into the
buffer. The issue is that if we can't allocate the buffer, the data
that was read is lost. To fix this, we should first attempt to allocate
the buffer before reading any data. If we can't allocate the buffer, we
should not proceed with reading the data. By allocating a buffer with
the MTU size, we can read the packet, write it into the allocated buffer
and then resize by removing unused allocated buffer with
net_pkt_trim_buffer().
Signed-off-by: Léo BRIAND <leo.briand@smile.fr>
Remove the duplicate `USE_STM32_HAL_RAMCFG` Kconfig symbol definition
from Kconfig.stm32, which was introduced by accident in PR #66181,
commit 6ed002ddae.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
Fix start address of storage partition.
Address did not match reg address of devicetree node, and the size of
the storage partition would make it exceed flash region.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
MAX32672FTHR board has CFAL12832C-0091B display which
is Monochrome 128x32 I2C OLED graphic display.
This commit enables LVGL stack for MAX32672FTHR board
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
Switch from `DT_INST_NODE_HAS_PROP(n, zephyr_random_mac_address)`
to `DT_INST_PROP(n, zephyr_random_mac_address)` since the property
is always present and we are interested in its value.
Signed-off-by: Maksim Salau <maksim.salau@gmail.com>
In some ICs (including nRF54H20) the DEVICEID register is not part of
FICR, and thus it is not accessible to applications. Use instead the
device address, along with a couple of bytes from ER and IR, to
generated a unique device id.
At the same time update the pointer to the hal_nordic repo to pull in
https://github.com/zephyrproject-rtos/hal_nordic/pull/196.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
With e.g. a 216MHz core clock, the 32-bit cycle counter overflows after
just 20 seconds. The 32-bit monitor timestamp (100us resolution) overflows
after around five days regardless of what we do, but we should try our best
to reach that.
Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
Split SIUL2 instance index for the MSCR and IMCR registers as required
by some pins. Pinmux macros definitions in hal_nxp must be updated
accordingly.
Fixes#76147
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
The adafruit feather nrf52840 express board was recently renamed
from adafruit feather, but the board deprecation entry was missed.
The previous board name also was an update to a hwmv1 board name,
which this also updates.
Signed-off-by: Jacob Winther <jacob@9.nz>
As there is no LiteUART it is more fitting
to rename the uart driver. This way it is also
more coherent with the other drivers and will
match the conditions in the MAINTAINERS.yml.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add new config, ARCH_SUPPORTS_COREDUMP_THREADS, and
only enable it for ARM CORTEX M where the gdb server
can support it.
Signed-off-by: Mark Holden <mholden@meta.com>
Add support in arm_cortex_m python script to read thread
registers off of a thread's stack when switching context.
When CONFIG_ARM_STORE_EXC_RETURN is enabled, check the exc_return value
in thread's arch struct to determine accurately where the stack pointer
is. Also, set r7 (the frame pointer register) in case the frame pointer
is not omitted.
Only 8 registers are read from the top of the stack
for other threads present in the dump. So update the
script to reflect that.
Signed-off-by: Mark Holden <mholden@meta.com>
Update zephyr gdb-server scripts to understand threads.
Parse the kernel_thread_info out of the elf file to be used
for finding offsets to data from _kernel structs or from
individual threads.
Update log_parser to understand latest format change, which
allows for the presence of a new section, threads metadata.
Update gdbstub to respond to various packets to describe
the threads present in a dump, and allow switching to
thread context of each thread.
Signed-off-by: Mark Holden <mholden@meta.com>
Add z_test which uses new configs to capture multiple
threads in a core dump and with all of the context
necessary to debug the threads.
Signed-off-by: Mark Holden <mholden@meta.com>
Update core dump file format to support a new section which contains
metadata about threads necessary for debugging.
Define configs to capture that metadata and include it in the dumps
when enabled.
Update documentation to reflect the changes.
Signed-off-by: Mark Holden <mholden@meta.com>
Add uart configuration for UART driver, add frdm_ke17z512_uart.overlay
and update testcase.yml to support UART testing.
There are LPUART and UART IPs in frdm_ke17z512 platforms, so add
additional shell tests as UART, the shell instructions can be entered
on the UART console window.
Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
The enableRxRTS and enableTxCTS can only be configured when the
'UART_HAS_MODEM_SUPPORT' feature is enabled.
Uart has no 'error' IRQ on frdm_ke17z512, so update irq configuration
to configure the error interrupt when it exists.
Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
Twister scans C-files to find testcases that are implemented
using ZTest framework. Also runs scanning of Elf files
after building. Skip scanning files if it is not required.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Refactor pm_device_driver_init code to keep the normal execution path
inline and the early exit branches at a single indentation, this is
commonly done throughout the code base.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
If it's a I3C v1.0 device without any HDR modes do not treat as an error
if GETCAPS gives no valid response.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
It seems this SiP variant is not sold by espressif directly, but it is
used by the Odroid Go. The Odroid Go documentation calls this a "custom"
model [1].
There already exists a SiP specific device tree include file:
zephyr/dts/xtensa/espressif/esp32/esp32_wrover_e_n16r4.dtsi
[1] https://wiki.odroid.com/odroid_go/odroid_go#specifications
Signed-off-by: Gero Schwäricke <gero.schwaericke@posteo.de>
Removes the ISR restriction from k_thread_priority_set().
Since the first commit, the routine k_thread_priority_set() has
had a restriction preventing it from being called from within
the context of an ISR. As there does not (any longer) appear to
be a reason why the restriction exists, it is being removed.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
... so that a clear devicetree error is reported when the pinctrl-names
property is missing, not a quite cryptic compilation error about an
undeclared PINCTRL_STATE_*_UPPER_TOKEN symbol in pinctrl.h.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Do not re-assign err from helper function, this just causes loss of
information from the helper function.
Only possible err returned is -EINVAL, so not a functional change.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
`ret` holds the amount of bytes received from the modem. However during
processing of the bytes its value is overwritten by the return value of
`modem_ubx_process_received_byte`, in practice discarding all but the
first byte read.
To prevent this, store the length in a separate variable.
Signed-off-by: Anders T. Akre <anders@akre.io>
It was not being set, and thus if the user_data contained garbage from
before, then conn.c would attempt to call that garbage.
Static channels don't have this issue, as every "SDU" fits into one PDU.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Huajiang Zheng <nxf88597@lsv051208.swis.nl-cdc01.nxp.com>
Storing stuff in user_data? That's a paddlin'
We have been debugging issue after issue because ownership of this
"user" data is not clearly defined. Now it is. L2CAP owns the user_data
field entirely, as soon as `send()` is called.
Also add a warning and retval using CHECKIF.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
ESP32S3 requires ESP_ADC_CAL_VAL_EFUSE_TP_FIT calibration
scheme. The use of ESP_ADC_CAL_VAL_EFUSE_TP is not supported
in the SoC..
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
Declare __stdout_hook_install in libc-hooks.h and use it in the console
drivers rather than redeclare it every time.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The commit fixes soc_flash_nrf sample documentation where incorrect
partition names has been used and removes information of
CONFIG_TRUSTED_EXECUTION_NONSECURE affecting which partition is used
as this is no longer true.
The printf message reporting start of sample has been modified
to print "Nordic nRF5 Flash Sample" instead of
"Nordic nRF5 Flash Testing", which is more accurate for code
residing in samples.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This is needed to avoid warnings about uninitialized
structure member, which was added in nrfx 3.6.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
Update `ssd1306_write_default` to take into account the `segment_offset`
property. This is needed for some displays to show the image correctly.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Necessary for supporting for EastRising 0.42 OLED display/board.
Some boards don't have external Iref set up. This is probably done in an
effort to save on component cost. This command is only documented in the
V1.1 revision of the SSD1306 datasheet.
See issue https://github.com/olikraus/u8g2/issues/1047
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
If using `<zephyr/linker/section_tags.h>` without including
`zephyr/linker/sections.h` as well, we get a warning an the linker fails
to place the data in the desired section.
Signed-off-by: Martin Stumpf <finomnis@gmail.com>
The ICACHE must be disabled on STM32H5 series due to documented
behaviour of the flash controller, not to an errata.
For a more technical explaination: (see RM0492 for references)
- on STM32H5, the ICACHE block is interposed on C-bus between
the Cortex-M33 and the FLASH (§2.1.1)
- the ICACHE determines if accesses are cacheable or non-cacheable
based on an AHB attribute; the Cortex-M33 sets this attribute or
not depending on the MPU configuration (§8.4.6)
- when a cacheable access is requested by the Cortex-M33, if the
requested data is not present in ICACHE (cache miss), a cache line
refill (128-bit burst read) is performed (§8.4.7)
- however, all accesses to OTP and Read-Only regions of the FLASH must
be done with caching disabled (§7.3.2); indeed, the accesses MUST be
16 or 32-bit sized - otherwise, the flash interface raises a bus
error (§7.5.9 / Table 38 "OTP/RO access constraints").
This is the behaviour that was observed and lead to the introduction
of ICACHE disable code in 065a8f25e1.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
This commit disables the Vbat sensor on the Nucleo-H753ZI
board, as the corresponding ADC is not enabled.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
This commit disables the Vbat sensor on the STM32H735G
Discovery board, as the corresponding ADC is not enabled.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
This commit modifies the STM32 battery voltage sensor driver
to handle erroneous usage more gracefully. More precisely,
it now fails builds with an explicit error message when the
sensor is enabled but the corresponding ADC is not. This can
only happen on STM32 series with more than one ADC (e.g., H7).
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
This commit modifies the STM32 internal voltage reference sensor
driver to handle erroneous usage more gracefully. More precisely:
- driver no longer builds if no ADC node is enabled
- fail builds with an explicit error message when the sensor
is enabled but the corresponding ADC is not. This can only
happen on STM32 series with more than one ADC (e.g., H7).
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
This commit modifies the STM32 internal temperature sensor driver
to handle erroneous usage more gracefully. More precisely:
- driver no longer builds if no ADC node is enabled
- fail builds with an explicit error message when the sensor
is enabled but the corresponding ADC is not. This can only
happen on STM32 series with more than one ADC (e.g., H7).
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
This commit removes the requirement for pinctrl in the STM32 ADC binding.
This allows usage of ADC with internal channels only (no GPIO pin waste).
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
With CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_LINKER_RAM, buffer_output() is
called on the entire RAM memory area. This includes the stack for the
coredump thread, which is where tmp_buf is stored. Eventually, it will copy
(parts of) tmp_buf into tmp_buf itself, which invokes Undefined Behaviour
in memcpy():
> The memory areas must not overlap. Use memmove(3) if the memory areas do
> overlap.
- memcpy(3)
With picolibc, this is detected in __memcpy_chk() and causes a fault in
__chk_fail().
Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
Add tests for removing and adding nodes to a list under
`SYS_SLIST_FOR_EACH_NODE_SAFE` and `SYS_SLIST_FOR_EACH_CONTAINER_SAFE`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Fix failed test for platforms with flash program size > 128 bytes.
Update supported program size to 512 bytes, the highest supported
program size by Zephyr platforms.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Add ozersa and ttmut as collaborators on ADI areas. Both are ADI
employees that have contributed multiple PRs in these areas.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Tweak some Kconfig variables to reduce the overall memory footprint of
the test application. For some reason x86 MMu throws errors when
accessing iterable section entries when the image size is too large.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This has been renamed in b6ed4ba761, the current entry is causing a CI
breakage for unrecognized platform.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Adapting icmsg to work without the MULTITHREADING functionality.
Dependencies for kernel work_queue, mutexes and other functions
related to running multithreaded applications have been 'ifdefed'.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
probe-rs is a new programming and debugging tool written in Rust, supports
many probes and targets.
This commit introduces initial support for probe-rs to Zephyr.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
1. Support USB-C drivers TCPC, PPC, and VBUS with UTCPD H/W IP
2. UTCPD is interconnected with Timer-triggered EADC for updating
VBUS/VCONN voltage periodically
Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
DMM shall be initialized as early as possible to allow drivers to
use it. For example, uart may need it early since it starts
RX during initilization in some configurations.
Making dmm_init() public and calling it in soc init function.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This test's purpose is to verify we (as a peripheral) don't leak resources
when communicating with multiple centrals that connect and disconnect
intermittently.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Add support of sys_poweroff API on m46x series.
It could support SPD standby or DPD deep power down mode.
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
The I2C API itself now enforces last msg stop, remove duplicate code
from driver.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The I2C API itself now enforces last msg stop, remove duplicate code
from driver.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The I2C API itself now enforces last msg stop, remove duplicate code
from driver.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The I2C API itself now enforces last msg stop, remove duplicate code
from driver.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The i2c_transfer API specifies that the I2C_MSG_STOP flag implicitly
is set for the last message in a i2c_transfer(). This is identical to
explicitly setting the I2C_MSG_STOP flag in the last message, which is
what every driver which properly adheres to this specification does.
The i2c_transfer_cb API is seemingly identical to the i2c_transfer_api,
it references it using @see i2c_transfer(), while providing a callback,
and being available from isr context. This commit extends the wrapper
to provide the following guarantees also present in the i2c_transfer API:
- If num_msgs is 0, no transfer will occur
- The last message of the transfer implies a stop condition
This allows for users to use both functions interchangeably, while
removing handling of num_msgs = 0 and last message missing stop cond
from device drivers.
Additionally a check for num_msgs == 0 is added to prevent any transfer
and immediately call back with success then return without invoking
the transfer_cb API.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The i2c_transfer API specifies that the I2C_MSG_STOP flag implicitly
is set for the last message in a i2c_transfer(). This is identical to
explicitly setting the I2C_MSG_STOP flag in the last message, which is
what every driver which properly adheres to this specification does.
This commit updates the i2c_transfer() API wrapper to explicitly set
the flag before calling the drivers API implementation, which ensures
the specification is followed, while moving this additional complexity
from the device drivers themselves.
Additinally it checks for the num_msgs being 0, in which case no
transfer shall occur, nor shall any stop condition be set. This removes
an additional check from device drivers.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add acmp pinctrl configuration to support ACMP driver for NXP frdm_ke17z
and frdm_ke17z512, tested 'sample.sensor.mcux_acmp' case.
Update the index.rst to add acmp description for ke17z.
Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
Remove the ‘HAS_MCUX_ACMP’ Kconfig, and also remove it from
driver and soc Kconfig files. It is not needed since we already
depend on 'ACMP' enabled in the dt file, the 'HAS_MCUX_ACMP'
kconfig is a relic of the past before devicetree was stable.
Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
Mentioning that stm32h7 and stm32F7 series do not have the
CONFIG_CACHE_MANAGEMENT by default. The application must
explicitly set CONFIG_CACHE_MANAGEMENT=y to activate
the cache (Icache, Dcache) on those stm32 series.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
When using the eeprom_target in 16-bit mode on rp2040, some issues in the
addressing have been observed where the read was executed before all writes
where finished.
Signed-off-by: Manuel Aebischer <manuel.aebischer@netmodule.com>
Force disabling the USB OTG HS and PHY clock during sleepmode
By default, that clock is enabled by clock gating during sleep
mode. Like stm32H7, it has to be kept running.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Special sequence to enable clock and power for the OTG HS
peripheral of the stm32U59x serie
This code is based on the stm32Cube HAL_HCD_MspInit/DeInit.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Force disabling the USB OTG HS and PHY clock during sleepmode
By default, that clock is enabled by clock gating during sleep
mode. Like stm32H7, it has to be kept running.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Special sequence to enable clock and power for the OTG HS
peripheral of the stm32U59x serie
This code is based on the stm32Cube HAL_HCD_MspInit/DeInit.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Set the correct the phy_itface depending on the setting
Save few lines after resetting the priv->pcd structure
with the memset
Signed-off-by: Francois Ramu <francois.ramu@st.com>
In lis2dux12_set_odr(), the call to stmemsc module lis2dux12_mode_set()
API is done with the .fs field left uninitialized, so setting the
underlying device regs in an unproper way.
Suggested-by: Luis Ubieda <luisf@croxel.com>
Signed-off-by: Armando Visconti <armando.visconti@st.com>
In the it8xxx2 chip, the interrupt for INT0 is reserved. However,in some
stress tests, the unhandled IRQ0 issue occurs. To prevent the system from
going directly into kernel panic, we implemented a workaround by
registering interrupt number 0 and doing nothing in the IRQ0 handler.
The side effect of this solution is that when IRQ0 is triggered, it will
take some time to execute the routine. There is no need to worry about
missing interrupts because each IRQ's ISR is write-clear, and if the
status is not cleared, it will continue to trigger.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Now that I2C support has been added, include it in documentation and
YAML metadata for MAX32655FTHR and MAX32655EVKIT boards.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
So far receving was possible in active mode, but IP and port information
was not fetched nor propagated to application layer. Support fetching that
information even in active mode, so that using bind() with recvfrom() is
working accordingly.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This is just a step forward to make cmd_ipd_parse_hdr() capable of parsing
IP address and port when CONFIG_WIFI_ESP_AT_PASSIVE_MODE=n. After obtaining
this information (IP and port) it will be simply much easier to write this
information into 'struct esp_socket' directly, instead of passing to upper
layer.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Treat ':' similar as ',', '\r' and '\n', so that AT response parameter
parsing can be gracefully stopped.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Use it to get information about RSSI. In subsequent commits this helper
will be used to get other information as well.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
'struct sockaddr_in' should contain port number in network byte order. This
means that htons() macro should be used, instead of ntohs().
This was working before since both htons() and ntohs() end up in calling
BSWAP_16().
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This is related to change in commit dacb3dbfeb
("iterable_sections: move to specific header")
Until now iterable sections APIs have been part of the toolchain
(common) headers. They are not strictly related to a toolchain, they
just rely on linker providing support for sections. Most files relied on
indirect includes to access the API, now, it is included as needed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
When LwM2M engine is requested to stop,
emit the disconnected event unconditionally.
There is really no reason to skip the event
on network error, or if we have never been registered.
Fixes#76422
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Fix the second k_thread_foreach_unlocked argument, it's supposed to be
an instance of ta_cb_user_data as that's what's it casted back to in
thread_analyze_cb. Current code results in an exception and crash for
single core applications.
This is a regression introduced in 1b6e0f6479.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
In thread_analyzer_auto(), it casts one function argument
directly into unsigned int. However, on 64-bit platforms,
the compiler complains about casting from pointer of
different size (-Wpointer-to-int-cast). So cast it first to
uintptr_t before casting it into unsigned int.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Compressing doc build to upload it to AWS S3 is talking several minutes.
Use -T0 to run xz in parallel mode to speed up the process.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This variable is only used under DUAL_BANK condition and a warning
is generated in !DUAL_BANK case, so move its definition accordingly.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Some boards claim `sdhc` support but use the `zephyr,mmc-disk`
instead of `zephyr,sdmmc-disk` compatible, with the former not being
compatible with this sample.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Move the check for valid disk drivers to compile time to enable twister
to run the configure step without errors.
Signed-off-by: Jordan Yates <jordan@embeint.com>
While Breathe seems to not care, the proper role to reference an
enumerator is :c:enumerator:
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Breathe is not very strict about the types used to reference C domain
objects (ex. referencing a struct using `:c:type:` would work, and vice
versa) but other tooling might be. This commit fixes some of such
incorrectly documented elements.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Integrated the application version feature of the build system with
the default configuration of the Bluetooth DIS module and its Firmware
Revision characteristic.
The firmware revision string now defaults to APP_VERSION_TWEAK_STRING
if the application version feature is used in a project. This specific
version format is used to unify version formatting with other parts of
Zephyr like the MCUboot module and its versioning Kconfig:
CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Allow an application to add a Block2 option to an initial request for a
resource. For any subsequent requests as part of a blockwise transfer,
drop the application-added Block2 option since the coap_client must
append a Block2 option with updated NUM and SZX fields based on the
server response.
Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
Booting the hello world sample fails with an error on the odroid go:
I (124) quad_psram: This chip is ESP32-D0WD
I (124) esp_psram: Found 4MB PSRAM device
I (124) esp_psram: Speed: 40MHz
I (125) esp_psram: PSRAM initialized, cache is in normal (1-core) mode.
SPIRAM size is less than configured size, aborting.
abort()
The device features only 32 Mbit PSRAM (4 MiB), see
dts/xtensa/espressif/esp32/esp32_wrover_e_n16r4.dtsi
included from
boards/hardkernel/odroid_go/odroid_go_procpu.dts
Signed-off-by: Gero Schwäricke <gero.schwaericke@posteo.de>
Remove HTS221 sensor support from sensortile_box_pro as it has been ruled
out from final version. In fact, HTS221 is in the process of being
terminated and is not recommended for new design. The candidate replacement
is SHT40 from Sensirion, which is available also as a DIL24 adapter, which
can be plugged on sensortile_box_pro board.
See SENSEVAL-SHT4XV1:
https://www.st.com/en/partner-products-and-services/senseval-sht4xv1.html
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The documentation does not provide any guides on how to configure
the MCO pin, and responsebility is given to the application.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
During driver init make sure that the IRQ_CTL field is set before enabling
the interrupts. Fixes the i2c read error on startup.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Add support for the Mikroe BLE TINY Click shield that contains the
Renesas DA14531 Bluetooth LE Module.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
Add usbd_device_set_bcd_device() for setting the bcdDevice device
descriptor value.
The default bcdDevice is set to the version of Zephyr being used, which may
or may not be what a downstream USB device wants it to be.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Rename usbd_device_set_bcd() to usbd_device_set_bcd_usb() to make room for
other BCD encoded values being set.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
In the sample, print the jesd216_bfp_density is expressed
in bits. add the unit to avoid confusion with the Flash
density expressed in bytes (dw2 entry)
Page size is for programming expressed in bytes, meaning
program execution on bytes basis or here page basis.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
When QSPI configuration is the dual-flash, the total
flash size and erase size are doubled. This is handled
with a STM32_QSPI_DOUBLE_FLASH factor which doubles
the values of one qspi component.
Note that SFDP table is for ONE flash component.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Some of the fields currently in hid_device_data are constant.
Move them to a const config struct to save some RAM and drop the rest of
the data static initializers to runtime to save some flash as well.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Adafruit feather is a generic name that could match many
boards. Renamed to reflect actual board name:
- Adafruit Feather nrf52840 Express
There are two boards based on the nrf52840, so keeping directory
generic to support additional board defs with mostly shared dts.
Signed-off-by: Jacob Winther <jacob@9.nz>
Add the configuration with a board overlay to execute
the samples/subsys/task_wdt on the nucleo_f091rc
Adjust the window-watchdog clock to PASS the test.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Set the Mode Register definition of the SDRAM command Mode
register to 0x230 when programming the CAS_LATENCY
of the external memory mode.
Adjust the delay on read data path.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Rename it from litex,eth to litex,liteeth
to reflect the new name of the driver.
Zero got removed from the litex
ethernet compatible, as it now supports
multiple instances.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
add helper for interrupts, so multiple
instances of peripherals work.
this way out-off-tree peripherals are supported.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
When not using BT, users may want to enable the cpunet core. Until now,
this has been done at board level (so duplicating unnecessary code)
using CONFIG_BOARD_ENABLE_CPUNET. The board-level options were usually
enabled automatically for BT, however, this was unnecessary as BT driver
already takes care of the setup.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Since HWMv1, we also have CONFIG_$BOARD Kconfig symbols defined, ie, no
SoC/core/variant needed.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add broadcast support to the CAP initiator sample.
This adds new sample-specific Kconfig options to help
select the right Kconfig options based on whether
unicast, broadcast or both is being used.
This also moves common TX functionality
to cap_initiator_tx to reuse the same TX thread
and functionality.
Finally there is a babblesim implemented for
the broadcast. There is not broadcast support for the
CAP acceptor sample yet, so this test only verifies that we
get the TX complete events from the controller.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Improve buffer handling logic to use local variables extensively.
This change reduces the number of pointer dereferences, which leads
to more efficient runtime and helps reduce the code size.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Improve buffer handling logic to use local variables extensively.
This change reduces the number of pointer dereferences, which leads
to more efficient runtime and helps reduce the code size.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Windows TCP stack has a peculiar behavior - when running iperf, it will
fill out the RX window almost entirely, but will not set PSH flag on
packets. In result, our stack would delay the ACK and thus window
update, affecting throughputs heavily.
In order to avoid that, keep track of the most recent window size
reported to the peer, and reduce it when receiving new data. In case the
RX window, as seen from the peer perspective, drops below certain
threshold, and the real RX window is currently empty, send an ACK
immediately when updating window, so that peer can continue
with sending data.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add board support for nucleo_h503rb.
STM32CubeProgrammer and pyocd are supported as runner.
The following samples were tested:
- samples/hello_world
- samples/basic/blinky
- samples/basic/button
- samples/subsys/task_wdt
Signed-off-by: Sandra Schmidt <sandra.schmidt@arrow.com>
Add a list of general purpose input drivers, hopefully this will make
them easier to be discovered by users.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
3.5.0 went out of support end of August.
Note the end date was stated as either 2024/07/31 or 2024/07/26
in different places.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add a point for the updated callback API as well as the analog axis
inversion property rename.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Use an explicit callback name so that multiple instances of this do not
result in a:
redefinition of '_input_callback__longpress_cb'
error. This used to work when it was using unique generated wrappers,
but now it needs an index in the callback name.
Use it in one of the API tests as well, just in case.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a INPUT_CALLBACK_DEFINE_NAMED macro, same as INPUT_CALLBACK_DEFINE
but with custom struct name, useful for declaring multiple callbacks
with different user_data on the same callback function.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a void *user_data pointer to the input callback structure. This is
useful for driver to get back the driver data structure and avoid
defining wrapper functions.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
If IPv6 is not enabled for a given network interface, then there
is no need to try to join IPv6 multicast groups as it will just
cause an error print which is pointless in this case.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The .bls files are no longer useful after the BT SIG switched
qualification tool. This will still remain in the git history
and can safely be removed.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
While routing between interfaces source Link-Local L2 address is set
for a packet. However, it should not be done for some of the interfaces.
This commit adds helper function to check this condition in runtime.
Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
When packet is routed between interfaces new routing entry is added
to the table. This should not be done for interfaces that do not
support Neighbor Discovery protocol as they are not keep potential
neighbors in the common table.
Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
Appropriately setting the `--target` flag is necessary when using clang
and building for a target other than the default. Zephyr generally
accomplishes this by setting the CMAKE_<LANG>_COMPILER_TARGET variables and
allowing cmake to automatically provide the `--target` flag when building.
For the external_lib sample, however, cmake can't add the flag and it was
not otherwise exported. As such, clang typically threw errors when building
this sample for any non-default targets due to mismatches between
target-specific flags and the default target.
To fix this, ensure we select the correct target by checking if
CMAKE_C_COMPILER_TARGET has been defined and adding
`--target=<triple>` to the list of flags that are exported if so.
Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
Convert pin control, GPIO and external interrupt controller drivers
based on SIUL2 peripheral to native drivers. This must be done in a
single commit to preserve atomicity, as these drivers depend on each
other.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
adds filesystem as a resource for the http_server which serves static
(gzipped) files from a filesystem to the client.
Signed-off-by: Gerhard Jörges <joerges@metratec.com>
Beacon frames can be received with association permit bit set or not,
but the correct information should be in the data given to the
application.
Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
When trying to implement a testcase for the previous commit, an error
occoured, that stopped the test from executing.
As the tests require a full IPv6 stack, the usual router solicitation
(RS) messages will be scheduled by the net stack. To avoid conflict
with RS messages the active scan test must be kept shorter than one
second, otherwise a race condition with additional packages being
reported by the fake driver might occur.
Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
The Association permit bit shall be set to zero if the coordinator does
not accept association requests.
Not accepting association request ist not a reason to filter the
beacons from this coordinator during network scan. It is still a
network, just one you cannot associate with.
Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
Limit the coap payload size passed up to the application callback to the
block size, when a block transfer is in progress and the current payload
is not the final block.
If the current payload is not part of a block transfer, or is the final
block of a transfer, then the full payload can be passed to the
application to avoid having to make another request over the network for
data that has already been received.
This avoids a problem raised in issue #76089, where a payload longer
than CONFIG_COAP_CLIENT_MESSAGE_SIZE causes the same data to be passed
to the application callback twice (once in the large packet, and once in
the next block which must have an offset that is a multiple of the block
size).
Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
Use the MSG_TRUNC flag to check the total length of UDP packets
receieved by the coap_client, and hence check if the receive buffer
contains the whole message, or if it is truncated.
If the message is truncated, then use a blockwise transfer to fetch the
rest of the data.
This is related to issue #76089.
Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
This should make it more clear for users that they shouldn't
run blocking code in the callback.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Due to the introduction of `shell_xxx_impl` wrapper functions in
PR #75340, we can minimize caller overhead by eliminating direct
`color` parameter passing.
This is achieved by using `shell_print_impl`, `shell_error_impl`,
`shell_info_impl` and `shell_warn_impl` instead of `shell_fprintf`.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Update in-tree device drivers to depend on the reference frame
datums they support.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add choice symbol for reference frame datum from which GNSS will
produce navigation data. All in-tree device drivers use WGS84 by
default, for now, this is the only available option until support
for other datums are added.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Update the struct gnss_time millisecond member to specify
that a leap second is a valid value.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The project charter has apparently changed location on
the main zephyrproject.org website.
This fixes a couple occurences of the old URL.
fixes#76433
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The `create_runners_yaml` function no longer saves the yaml file
location in the cmake cache since 5b4c8945.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Moved the definition of the phy device from depending on stm32hx
series SOC to its own #if...#else...#endif. This way mdio support
can be enabled on any stm32 soc that supports it by defining the
mdio node in the devicetree.
I have tested this in a custom board.
Signed-off-by: Rahul Arasikere <arasikere.rahul@gmail.com>
Updates the GitHub security page with the current supported versions
after the v3.7.0 release.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The HTTP server tests are self-contained, they do not require network
environment to execute, hence should not specify "harness: net".
The consequence of specifying the harness was that HTTP server tests in
the CI were only built, and not executed, which doesn't make much sense.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit adds a brief thread b suspend while the sample sets its
affinity mask.
If the call to `k_thread_cpu_pin` is being made while the thread is
actively running, then we get `-EINVAL` and the affinity mask is left
unchanged.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
We should disable the feature when it is not needed to
save flash and RAM.
There is no point in enabling data length extensions
when the maximum packet size used is always smaller or equal
to 27 bytes. Then data length updates would only use
parameters (octets=27, time=T) where T is some supported value
which would not improve throughput or power consumption.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
The test expects this feature to be enabled.
We should therefore enable explicitly instead of relying on
default values.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
With HWMv2 CONFIG_BOARD_NRF9160DK_NRF9160 is not defined when building
the non-secure target, so it has to be specified.
Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
The button sample is really a gpio interrupt sample, one may easily miss
the debounced driver and think it's not provided.
Add a note in the basic button sample documentation to refer to the
input subsystem doc and sample.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Running 'west blobs fetch' does not verify the digest of downloaded files:
1. if the checksum of the previously downloaded file does match
that in the blob metadata (status BLOB_PRESENT), do nothing
2. if the checksum of the previously downloaded file does not match
that in the blob metadata (status BLOB_OUTDATED),
download the "up to date" file
3. if the blob has not yet been downloaded (status BLOB_NOT_PRESENT),
download it
None of the 2) and 3) code paths will verify that the checksum of the file
just downloaded actually matches the digest in the blob's metadata.
In the event that the metadata of a module is incorrect, then the user
will not notice anything, and may rely on an unexpected binary,
e.g. a static library for a different architecture.
According to the Binary Blobs documentation [1], the expected
behavior is to check the blob digest after downloading.
[1] Fetching blobs, Zephyr 3.6.0 (still applies to Zephyr 3.7.0rc3)
docs.zephyrproject.org/3.6.0/contribute/bin_blobs.html#fetching-blobs
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
Driver includes wrong header zephyr/usb/usb_device.h and uses defines
from include/zephyr/drivers/usb/usb_dc.h.
Also fix udc_ep_enable() implementation in general. HAL_PCD_EP_Open()
takes the ep_type parameter as uint8_t integer type and the shim driver
should not just pass int type.
It is recommended that drivers use ep_cfg or cfg for struct
udc_ep_config, fix this as well.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The global otg interrupt hs/fs is enabled by the udc_stm32
driver. Get it in the list of interrupts of the OTG node.
Use UDC_STM32_IRQ naming.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
The total number of IRQs for this chip is 110.
Refer to the reference manual table 46 for IRQs.
Signed-off-by: Rahul Arasikere <arasikere.rahul@gmail.com>
Add frdm_ke17z_fgpio.overlay to add fgpio configuration, and
add update testcase.yml to add FGPIO driver test for frdm_ke17z
and frdm_ke17z512 platforms.
Updated ke17z512 gpio test pins to avoid conflicts with I2C pin.
Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
Add FPIO support for NXP frdm_ke17z and frdm_ke17z512,
the Fast GPIO(FGPIO) and GPIO share physical pins on the board.
Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
The B1 user button has an active-high polarity, but was configured
active-low in the DTS file. This commit fixes that.
Fixes#75867
Signed-off-by: Lasse Fröhner <lasse@starcopter.com>
Add an emulated UART device test case. Demonstrate using the
zephyr,uart-emul bus for passing data to an emulated implementation for a
UART device driver.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Some NXP drivers were not being associated with any
NXP maintainer areas. Fix by using regex to include them.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Fix implementation to consider event latencies due to
BIG events being skipped due to overlap with other state or
role, and generate any received/buffered pre-transmissions
towards the Host.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix missing PTO subevent reception for second or more BISes
when current payload count associated PDUs where already
received in previous ISO events as pre-transmissions.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
twister expects regex print from logging used in the sample. Sample
is using minimal logging which does not protect against logs being
interleaved if printed from various contexts. Minimal logging is
just mapping of logging API to printk. Add CONFIG_PRINTK_SYNC to
ensure that printing of each log is synchronous (with lock) and
logs are never interleaved.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Define the support /openocd.cfg and the board.cmake to add the openOCD
as runner for the stm32h5x boards.
Note that the openOCD is hack downloaded and build from
from https://github.com/STMicroelectronics/OpenOCD
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Added MIPI and I2C connectors to enable display shields. Tested with
shields rk055hdmipi4m, rk055hdmipi4ma0, and g1120b0mipi.
Signed-off-by: Derek Snell <derek.snell@nxp.com>
Adds device tree configs for dppic and ipct connections
between the Radio core and the Global domains.
The connections are required by the radio driver.
Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
Now that flash controller driver is supported on M4 of stm32h745i_disco,
remove it from platform_exclude list and add an overlay for flash_shell
sample.
Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
Now that flash controller driver is supported on M4 of stm32h747i_disco,
remove it from platform_exclude list and add an overlay for flash_shell
sample
Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
The offset is wrong when the second bank is used by M4 as the
offset is relative to the base which is 0. So add the least
significant 6 nibbles from the CONFIG_FLASH_BASE_ADDRESS to
find the sector.
Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
Currently flash controller driver builds and runs only on M7.
This patch supports enablement of the driver on M4 CPUs. The
main issue in using the driver on M4 is that LL_GetFlashSize()
to read the flash size works only on M7 as the internal register
is not accessible from M4. So to use the driver on M4, add a dt
property, bank2-flash-size, to configure flash size of bank2.
this will allow gradual support of flash controller driver
on M4 of all supported STMH7 boards by defining the above
dt property and testing it. Currently this is verified only
on STM32H747i-disco board.
Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
Remove BUILD_ASSERT for Internal DMA and DCACHE if both are enabled, and
enable Internal DMA support by default.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
UDC_BUF_POOL_*_DEFINE macro will place buffer pool in __nocache
section if NOCACHE_MEMORY is enabled.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Introduce UDC_BUF_POOL_*_DEFINE macros based on NET_BUF_POOL_*_DEFINE
macros but use our own version of alloc and unref callbacks to get
buffers with specific alignment and granularity. Also, do not use ref
callback because it breaks alignment.
Also introduces helper macros for defining and checking UDC
driver-compliant static buffers.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
When developing Bluetooth applications, you typically run into
some errors. If you are an experienced Bluetooth developer,
you would typically have an HCI error lookup table in your memory.
Others might not.
This commit utilizes defines CONFIG_BT_DEBUG_HCI_ERR_TO_STR
and utilizes bt_hci_err_to_str() to print out HCI error strings
when enabled to improve the user experience.
Several alternatives where considered. This approach was chosen
as it had the best balance between readability, code size, and
implementation complexity.
The alternatives are listed below as a reference.
1. Macro defined format specifier:
```c
#define HCI_ERR_FMT "%s"
#define BT_HCI_ERR_TO_STR(err) (err)
#define HCI_ERR_FMT "%d"
#define BT_HCI_ERR_TO_STR(err) bt_hci_err_to_str((err))
LOG_INF("The event contained " HCI_ERR_FMT " as status",
BT_HCI_ERR_TO_STR(err));
```
Advantage: Space efficient: Code size does not increase
Disadvantage: Code becomes hard to read
2. Format specifier to always include both integer and string:
```c
static inline const char bt_hci_err_to_str(err)
{
return "";
}
LOG_INF("The event contained %s(0x%02x) as status",
bt_hci_err_to_str(err), err);
```
Advantage: Simple to use, implement, and read,
Disadvantage: Increases code size when CONFIG_BT_DEBUG_HCI_ERR_TO_STR
is disabled. The compiler seems unable to optimize away the unused
format specifier. Note: The size increase is only present when
logging is enabled.
3. Always print as string, allocate a stack variable when printing:
```c
const char *bt_hci_err_to_str(char *dst, size_t dst_size, uint8_t err)
{
snprintf(dst, dst_size, 0x%02x, err);
return dst;
}
LOG_INF("The event contained %s as status", BT_HCI_ERR_TO_STR(err));
```
Advantage: Very easy to read.
Disadvantage: Printing error codes becomes slow as it involves calling
snprint.
4. Implement a custom printf specifier, for example E.
This requires a global CONFIG_ERR_AS_STR as I assume we cannot have
one specifier for each type of error code.
Also, I assume we cannot start adding specifiers for each subsystem.
```c
#define BT_HCI_ERR_TO_STR(err) (err)
#define BT_HCI_ERR_TO_STR(err) bt_hci_err_to_str((err))
LOG_INF("The event contained %E as status", BT_HCI_ERR_TO_STR(err));
```
Advantage: Both efficient code and readable code.
Disadvantage: This requires a global CONFIG_ERR_AS_STR as I assume
we cannot have one specifier for each type of error code.
Also, I assume we cannot start adding specifiers for each subsystem.
That is, this approach is hard to implement correctly in a scalable
way.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
For the LE Audio unittests there exists a few mock files
that implement mock versions, or callbacks, for some of the
roles and features tested.
These have been moved to where they are actually used,
reducing the scope of these files.
This both allows the individual tests to implement their own
versions of it, but more importantly it prevents issues when
adding tests for these roles. For example, due to the
bap_unicast_client.c mock file, it is impossible to implement
unit tests for the unicast client, as the functions are already
defined.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add implementation to analyze threads on each cpu separately. This
feature can be enabled with THREAD_ANALYZER_AUTO_SEPARATE_CORES Kconfig
option. If enabled, an analyzer thread is started for each cpu, and
the threads will only analyze thread on the cpu its running on.
This feature is needed for Intel ADSP platform, where cpu specific
caches are not synchronized between the cpu. It is also probably
needed by other platforms having CONFIG_KERNEL_COHERENCE=y, so default
to THREAD_ANALYZER_AUTO_SEPARATE_CORES=y for those platform.
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Add functions k_thread_foreach_unlocked_filter_by_cpu() and
k_thread_foreach_filter_by_cpu() to loop through the threads on the
specified cpu only.
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
With the recent change to hwmv2, loading the
boards is extremely slow and can take several
seconds.
To solve that problem this commit add a cache
of the boards. The cache is updated based on:
- when the latest commit of the manifest
file directory is updated or;
- when the manifest file directory is not
a git directory, when the manifest file
content itself is updated.
At the same time:
- update how the board completion is
displayed by including the board vendor to it;
- add missing `--board` and `--board-dir`
options;
- remove `hwmv1` board completion code.
Signed-off-by: Théo Battrel <theo.util@protonmail.ch>
Add the missing timeout parameter to `modem_pipe_open()` and
`modem_pipe_close()` calls.
10 seconds is the default value used in the Zephyr tree.
Fixes a regression introduced in
https://github.com/zephyrproject-rtos/zephyr/pull/74325.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Add the missing timeout parameter to `modem_pipe_open`. 10 seconds
appears to be the default value added to other in-tree drivers.
Signed-off-by: Jordan Yates <jordan@embeint.com>
This fixes a bug where the stack may get stuck in the
POWER_CLOCK ISR after enabling and disabling the Bluetooth
stack a couple of times. It happens after calling
`onoff_request()` after a failing call to `onoff_release()`.
Then the `lf_cli`s next points to itself, generating a
circular list of clients.
Calling `onoff_release()` may fail if there is an outstanding
request. By calling `onoff_cancel()` we enter a state where
we can safely remove the client.
This was not seen earlier because the return value
from `ll_deinit()` in `hci_driver_close()` was ignored.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
GR716A has two GRGPIO2 controllers.
This adds the GPIO controller description to the DTS and
makes the GPIO option available in the kernel configuration.
Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
Revision 1p7 of the silicon added support for IBI TIR, full word fifo
while target usage, defining byte with direct CCCs. This also adds
support of HDR-DDR.
This also fixes short ccc commands where multiple targets in a
payload for the same ccc.
Modification of the i3c_target_tx_write had to be done in order to
distinguish the difference for each fifo to be written to.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The commit removes one-line overlay files, when copyrights excluded,
with direct Kconfig options selection inside testcase.yaml.
The overlays have been removed.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The accel_polling sample uses various sensor, but doesn't set a sampling
rate. But some sensors (like st,lsm6dso) have a default sampling
frequency of 0. So, depending on the sensor, the sample may not always
work.
There are two ways to fix this: either all drivers must set a valid
sampling rate, or the sample shall at least try to set a value if there
is none.
We propose here the second approach, wich should allow the sample to
work on more sensors out of the box.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
Describe the lsm9ds1 sensor available in the Arduino Nano 33 BLE through
I2C.
Set the accel0 alias.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
The LSM9DS1 is a system-in-package featuring
a 3D digital linear acceleration sensor, a 3D digital angular rate
sensor and a 3D digital magnetic sensor.
This driver implements only the linear acceleration sensor and the
angular rate sensor, on the I2C bus.
This driver is without trigger support.
The driver is based on the stmemsc HAL.
link: https://www.st.com/resource/en/datasheet/lsm9ds1.pdf
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
This commit adds a description for the lsm9ds1 sensor,
with a .h file containing all configuration options.
Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
This commit adds a new API function, `dai_ssp_dma_control_set`, to the
Intel SSP DAI driver. This function is designed to set DMA control
parameters specifically for the SSP interface.
The addition of this API function allows for more granular control of
DMA settings, which can be beneficial in scenarios where DMA
configuration needs to be modified independently of other DAI settings.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Refactor the TLV parsing code from the dai_ssp_parse_aux_data function
into a new, separate function called dai_ssp_parse_tlv. This change
improves the modularity of the code and allows for the TLV parsing logic
to be reused in other contexts where only TLV data needs to be parsed
without the entire configuration blob.
The new dai_ssp_parse_tlv function takes a pointer to the TLV data and
its length as parameters, enabling it to process a buffer containing
multiple TLV entries. The original dai_ssp_parse_aux_data function is
now simplified to prepare the TLV data and call the new parsing
function.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This patch introduces a new API function, `dai_config_update`, in the
DAI driver API to enable runtime updates to the DAI configuration. This
function allows bespoke configuration parameters to be set, enabling
updates that are specific to the DAI implementation and can be applied
outside of the regular configuration flow.
The addition of this API provides greater flexibility for adjusting DAI
settings at runtime, which is particularly useful in scenarios where
only specific parameters need to be modified without the need to
reconfigure the entire DAI interface.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
The TPIU supports serializing the data stream both using an UART-like NRZ
protocol as well as using Manchester encoding. Using Manchester encoding
has the advantage that it enables receivers that support it to recover the
clock from the SWO signal itself. This is particularly useful in situations
where the clock rate changes dynamically or is unknown (for example when
debugging the clock tree setup or working with a device with a misbehaving
main oscillator).
Add a Kconfig choice to switch the protocol, keeping the current default of
using the NRZ encoding.
Signed-off-by: Florian Larysch <larysch@fixme.gmbh>
The modem pipe APIs include synchronous calls to open/close,
which internally use a fixed timeout of 10 seconds. The timeout
should be configurable through the APIs, anywhere from K_NO_WAIT
to K_FOREVER.
This commit adds timeout parameters to the open/close APIs, and
updates in-tree usage of the open/close APIs to explicitly
provide the previously implicit timeout of 10 seconds.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Added i2c configuration to test target_eeprom case for frdm_ke17z
Added `sample.drivers.i2c.target.kinetis` in sample.yaml for frdm_ke17z
and frdm_ke17z512 automatically run the tests
Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
Add the following AD types:
- `BT_DATA_DEVICE_CLASS`
- `BT_DATA_SIMPLE_PAIRING_HASH_C192`
- `BT_DATA_SIMPLE_PAIRING_RAND_C192`
- `BT_DATA_DEVICE_ID`
- `BT_DATA_PAWR_TIMING_INFO`
- `BT_DATA_ESL`
Note that `BT_DATA_DEVICE_ID` has the same value as
`BT_DATA_SM_TK_VALUE` (0x10), this is not a mistake from the author but
a mistake in the Core Specification, specifically the Assigned Numbers
document with the version date 2024-04-10.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
There is problem with running this test in validation,
because of DBGR mode watchdog can't reset board by itself,
and it needs cold reset. This proves that test is not automated,
and should be exluded on this board.
Signed-off-by: Patryk Kuniecki <patryk.kuniecki@intel.com>
Updates the output sample to more closely resemble the output for a
recent Zephyr version (current was v1.14). Fixes#76275.
Updates broken tf-m documentation link to their new URL.
Signed-off-by: Adrien Leravat <adrien.leravat@gmail.com>
When dynamic fifo sizing is enabled the driver can assign fifo size
lower or equal to the reset value. Software must respect the maximum
sizes because fifo width registers are optimized during synthesis and
the larger values simply get discarded.
Use 16-bit values for FIFO depths because maximum FIFO depth the vendor
can configure the DWC2 otg is 32768.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
This creates a common folder in order to share code between similar
boards. This is mostly for the CC1352P1 and CC1352P7 launchpad which
are very similar but it could be probably useful for some other boards.
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
Add an API function allowing the application to determine the amount of
free bytes in the current sector.
Add a second API function allowing the application to switch to the next
NVS sector, calling the garbage collector on such sector.
The goal is togive more granularity to the application to control when
the garbage collector is triggered.
Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
Expand testing for QDEC at nrf platforms.
It uses general sensor API,
however there are also nrf driver specific assumptions.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Modify the bt_bap_scan_delegator_add_src to take an address and
a sid instead of a PA sync object, so that the scan delegator
can add a source without syncing to the PA.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Raise the descriptor table span to 201 due to the inclusion of the USB
configuration descriptor.
Tested with:
$ west build -p -b it82xx2_evb tests/subsys/usb/desc_sections
-T usb.desc_sections
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
This change adds a Kconfig option "USB_CONFIGURATION_STRING_DESC_ENABLE"
to enable the USB configuration string descriptor. The default
configuration string is specified in "USB_CONFIGURATION_STRING_DESC."
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
If config library is disabled but DHCPv4 client is enabled,
then start DHCPv4 when zperf application starts.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Iface name which is used by native posix ethernet driver can only be
specified at compile-time. I wanted to run two instances of the same
program on native posix but did not want to make two separate builds only
to change the iface name. I have implemented getting the iface name from
command line.
Signed-off-by: Kacper Dalach <dalachowsky@gmail.com>
Packets are routed between OT and Zephyr net stacks.
For IPv4 these packets are managed by NAT64 by default.
Signed-off-by: Marcin Gasiorek <marcin.gasiorek@nordicsemi.no>
Update to enable CANXL_INT_RXSMB_OVER and
CAN_INT_ERR_FAST(ERR for CAN-FD).
Statistic CAN errors and count CAN TX and RX errors via
BCANXL that uses CANXL MRU to exchange informations with CAN host.
Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
This commit reduces `#if / #endif` pairs by leveraging the
`IS_ENABLED` macro:
- Removed `#ifdef / #endif` around `NET_L2_DECLARE_PUBLIC` in `net_l2.h`,
enabling compilation without affecting link time if the configuration
is unavailable.
`set_default_name` function:
- Replaced multiple `if` statements with `else if` to use the last `else`
without indirectly checking `name[0] == '\0'`.
- Since `snprintk` guarantees null-termination if `sizeof(name) > 0`,
the `-1` subtraction is unnecessary, eliminating the need for
zero initialization in `char name[CONFIG_NET_INTERFACE_NAME_LEN + 1];`.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Fixes: #72363
The existing function to set the postfix is converting postfix
string to hexadecimal. Adding a new function to handle a use case
where the provided postfix should be used as is without any conversion.
Signed-off-by: Vineeta S Narkhede <VineetaSNarkhede@Eaton.com>
Downsize `dlci_address` field from `uint16_t` to `uint8_t` in
`modem_cmux_frame` for better memory alignment.
Note: The maximum value of `dlci_address` is 63, which fits
within `uint8_t`.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Added `static const` to various `struct modem_pipe_api` and
`frame` in `modem_cmux_connect_handler` to make these structures
immutable and reduce RAM usage.
Corrected a typo, changing "consequtive" to "consecutive".
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Changed the `api` field in the `modem_pipe` structure to be
a pointer to constant.
This ensures that the `api` field remains immutable after
initialization.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Zero length arrays are only allowed at the end of the structure. Here
those were used as placeholders for BTP response creation and can be
easily replaced with common member.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Most set functions have a get function as well, add the missing
function to get the set gateway IPv4 address.
Signed-off-by: Bas van Loon <basvanloon@betronic.nl>
Enable sysbuild for nRF5340 app core.
This automatically builds the image for the network core, making a
better user experience.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Changes the ramp-up time from 1000us to 550us
on nRF54H20.
The time must fit inside general preconditions ramp up.
The hfclk time can be adjsuted this way because
the current solution is not precise until
the clock_control is available.
Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
Refactor. The deferred work is rescheduled just after it's canceled.
This is hopefully equivalent to just the reschedule, so the cancel can
be removed.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Refactor shell output macros to minimize caller overhead by eliminating
direct `color` parameter passing:
- Introduce wrapper functions: `shell_info_impl`, `shell_print_impl`,
`shell_warn_impl`, `shell_error_impl`.
- Replace `shell_fprintf` in macros with these new wrappers.
- Update `shell_hexdump_line` to use the new wrappers,
minimizing caller overhead.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
If we receive multiple DNS servers via DHCP only the first one is used,
regardless of CONFIG_DNS_RESOLVER_MAX_SERVERS constant.
Parse DHCP option and save addresses that fit
Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
Place zephyr library in ILM. This can improve performance.
test:
Print the message 10000 times with 1ms sleep interval to compare the
time difference before and after adding RAM code on the it82002bw evb.
RAM code size save time
original: 1954 bytes
libzephyr.a: +16974 bytes -608ms
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Place kernel library in ILM. This can improve performance.
test:
Print the message 10000 times with 1ms sleep interval to compare the
time difference before and after adding RAM code on the it82002bw evb.
RAM code size save time
original: 1954 bytes
libkernel.a: +8941 bytes -649ms
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Place serial library in ILM. This can improve performance.
test:
Print the message 10000 times with 1ms sleep interval to compare the
time difference before and after adding RAM code on the it82002bw evb.
RAM code size save time
original: 1954 bytes
libdrivers__serial.a: +2282 bytes -226ms
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
This commit introduces the ability to set the CAN
interface from command-line. This is helpful
if we want to run multiple instances of the app
with different CAN interfaces without making
separate compilations for each instance.
Signed-off-by: Kacper Dalach <dalachowsky@gmail.com>
Add a Kconfig.constants file that defines variables for different known
integer minimum and maximum values.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Added mikrobus_serial and mikrobus_header node labels to EK-RA8M1 device
tree board definition, allowing compatible shield boards to be used.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
Remove address-of operator ('&') when assigning `init_fn`
function pointer in `DEVICE_DT_INST_DEFINE` macro.
This change aims to maintain consistency among the drivers in
`drivers/serial`, ensuring that all function pointer assignments
follow the same pattern.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Reduce `k_spin_unlock` calls in `k_obj_core_stats_xxx` functions by
consolidating error handling into an `if-else if-else` structure and
using a single return variable `rv`.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
According to the riscv's `arch.h`:
+------------+ <- thread.arch.priv_stack_start
| Guard | } Z_RISCV_STACK_GUARD_SIZE
+------------+
| Priv Stack | } CONFIG_PRIVILEGED_STACK_SIZE
+------------+ <- thread.arch.priv_stack_start +
CONFIG_PRIVILEGED_STACK_SIZE +
Z_RISCV_STACK_GUARD_SIZE
The start of the privilege stack should be:
`thread.arch.priv_stack_start + Z_RISCV_STACK_GUARD_SIZE`
Instead of
`thread.arch.priv_stack_start - CONFIG_PRIVILEGED_STACK_SIZE`
For the `end`, use the same equation of `top_of_priv_stack` in
the `arch_user_mode_enter()`
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
When using SPI-NOR SFDP autodeteection, the flash size printed to
the log is rounded to 1 MiByte. If flash is smaller than 1 MiByte
it is printed as 0 MiByte.
With this patch smaller flash sizes are printed in kiByte, for instance
512 kiByte is printed correctly.
Signed-off-by: Stefan Petersen <spe@ciellt.se>
The broadcast assistant will only be able to send
BT_BAP_BASS_PA_REQ_SYNC_PAST if
CONFIG_BT_PER_ADV_SYNC_TRANSFER_SENDER is enabled.
Similarly the scan delegator will only set
past_supported = true if
CONFIG_BT_PER_ADV_SYNC_TRANSFER_RECEIVER is enabled.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The driver right now only allows inverting the input value, which can be
useful for differential channels but is quite confusing for single ended
ones. Implement a simple output inversion flag instead to make up for
that.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
WIFI_REASON_DISCONN_UNSPECIFIED is 1, when disconnect reason is 0,
wpas_to_wifi_mgmt_disconn_status return the
WIFI_REASON_DISCONN_UNSPECIFIED and print error log "Disconnection
request failed (1)"
Signed-off-by: Gaofeng Zhang <gaofeng.zhang@nxp.com>
Refactors teh BIS bitfield values used for ISO
and BAP.
Previously BIT(1) meant BIS index 1, which was a Zephyr choice
in the early days of ISO, as the BT Core spec did not use
a bitfield for BIS indexes.
Later the BASS specification came along and defined that
BIT(0) meant BIS index 1, which meant that we had to shift BIS
bitfields between BAP and ISO.
This commit refactors the ISO layer to use BIT(0) for Index 1 now,
which means that there is no longer a need for conversion
between the BAP and ISO layers, and that we can use a value
range defined by a BT Core spec (BASS).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The current option used as an example, --recover, is actually a separate
option in the runner itself. Instead use --clockspeed as an example,
which is applicable to all nrfjprog commands.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Allow for users to provide a --qspiini parameter that is passed directly to
the nrfjprog executable but only in the --program operation. This is
required since e073210ec2 enabled the
-O/--tool-opt for all operations, but --qspiini is only allowed combined
with --program.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Initialise flashdisk devices in `POST_KERNEL` instead of `APPLICATION`.
This aligns with the other disk drivers, which are all `POST_KERNEL`,
and causes no problems as `disk_access_register` is a purely software
action and does not perform any operations on the underlying device.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Use `depends on DT_HAS_* default y` instead of `default y if DT_HAS_*`
as the driver depends on devicetree instance.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Disable the flash disk driver in the RAM driver test to prevent the
test using the wrong disk in the tests.
Signed-off-by: Jordan Yates <jordan@embeint.com>
When --erase was specified, esp32 runner was autodetecting serial port to
be used, regardless of --esp-device argument.
Append '--port SERIAL_DEVICE' parameter earlier, so that erase command
invocation uses explicitly specified serial device.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
The Softdevice Controller now sends the disconnect event only after
receiving all Host Num Completes for the packets it sent to the host.
This is done for security reasons.
In our current reassembly logic, it does not really matter when we
withhold the num complete.
Before this patch, it's the first fragment that is withheld, and after
the patch it will be the last fragment that is withheld until the host
is done processing.
The flow control properties are maintained, just in a different way.
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
The functionality is moved in preparation of the next commit which will
re-use this function from somewhere else.
Also add (default-on) asserts that we are able to allocate and send the
command. If that is not the case, we will leak buffers from the PoV of
the controller, leading to a stall in data transfer.
Depending on the error, we could probably recover using a disconnection.
For now, do the safe thing and stop the whole stack.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
The spec only guarantees the connection complete event parameters
are valid if the status is BT_HCI_ERR_SUCCESS. When the status is
not BT_HCI_ERR_SUCCESS, the host shall ignore the other parameters.
See Vol 4, Part E, 4.5 Command error handling:
"""
If an error occurs for a command for which an HCI_Command_Complete event
is returned, the Return Parameters field may only contain some of the
return parameters specified for the command.
...
The above also applies to commands that have associated command specific
completion events with a Status parameter in their completion event, with
the exceptions shown in Table 4.1, Event Valid parameters
...
Event | Valid parameters
------------------------------------------------------------
LE_Connection_Complete | none
LE_Enhanced_Connection_Complete | none
"""
Refactor `le_legacy_conn_complete`, `le_enh_conn_complete_v2` and
`le_enh_conn_complete` to check and handle the status before handling
any other parameters.
An issue was seen where SDC returned event with status
`BT_HCI_ERR_UNKNOWN_CONN_ID`, but because adv_handle and sync_handle
were not invalid the event was not handled.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
Sometimes, performing a rstact which will reset all devices during init
on the bus may not be ideal. Add a KConfig to easily turn off.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
The default base timeout for pytest is statically set by
the TwisterHarnessConfig class to be 60 seconds. However,
sometimes it takes longer than 60s before the app starts
to run, especially on emulator/simulator where it takes
quite some time to start. So pass the test timeout as
the base timeout via pytest command line argument.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When ubx_m10_ubx_cfg_rst is returning something negative there is a loop
in the code which in turn can easily turn into an endless loop if the
function is never returning something positive or zero.
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
It's not allowed to sleep during initialization of driver as called by
bg_thread_main --> z_sys_init_run_level(INIT_LEVEL_POST_KERNEL)
--> do_device_init --> ubx_m10_init
There is no thread_base.timeout struct setup so far.
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
ubx_m10_init_pipe is calling modem_backend_uart_init which in turn is
memsetting the backend data structure and thus also overwrites the work
queue function pointer in it.
Remove call to ubx_m10_init_pipe as data structures are already set up.
Tested with u-blox NEO M9N.
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
The motion event handler is currently setup to always retrigger until
there's no more motion data from the sensor. Change that to only
retrigger if the motion pin is asserted when the handler has finished
running, this saves a bunch of unnecessary spi transactions.
Ideally this driver would use a level interrupt, but I'd rather avoid
that as that is unsupported by many gpio controllers.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Prior to the fixes in the previous commits, combining a build
for native_sim with
CONFIG_CPP=y
CONFIG_POSIX_API=y
CONFIG_STD_CPP20=y
CONFIG_REQUIRES_FULL_LIBCPP=y
would fail.
It succeeds now.
This change adds a testcase to monitor that scenario in CI.
Note: this was partially necessary because the deprecation of
CONFIG_NET_SOCKETS_POSIX_NAMES is not yet complete, so there
is a dependency cycle, and also because <sys/types.h> was
pulling in the host <sys/types.h> instead of Zephyr's or one
of the embedded OSes we support.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
A number of types such as uid_t, gitd_t, etc, were defined in
sys/stat.h to workaround compatibility issues many years ago.
Since posix_types.h is slated to become equivalent to
sys/types.h in terms of standard headers, move these types
to where they belong.
For more information, please see
https://pubs.opengroup.org/onlinepubs/9699919799/\
basedefs/sys_types.h.html
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
A corner case involving C++, posix, networking, and native_sim
was causing problems.
Even though C and C++ builds should include zephyr/posix/.. in
the default search path with `CONFIG_POSIX_API=y`, for some
reason, the native compiler pulls in /usr/include first anyway.
The stat.h header pulled in <sys/types.h> (which is normally
fine) but due to the native build, it was pulling in
/usr/include/sys/types.h, from the host toolchain.
Explicitly include <zephyr/posix/posix_types.h> instead of
<sys/types.h> from stat.h, and continue using the workarounds
for native builds (explicitly including zephyr/posix/arpa/net.h
from net/sockets.h .
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Several refactors and improvements for `net_bytes_from_str` as follows:
- Replaced manual hex digit checks with `isxdigit()`.
- Changed variable `i` from unsigned int to size_t for consistency with
the `strlen()` return type.
- Added `src_len` to store the result of `strlen(src)` to avoid
multiple calls to `strlen` in the `for-loop`.
- Ensured casting to `unsigned char` before passing to `isxdigit()` to
prevent undefined behavior.
- Explicitly cast the result of `strtol()` to `uint8_t` to match
the buffer type.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Device drivers should not be calling `pm_device_runtime_enable` on
themselves, it should be left up to the application. If automatic
enablement is desired, `zephyr,pm-device-runtime-auto` exists as a
devicetree property.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The `pm_device_runtime_get` and `pm_device_runtime_put` functions work
correctly regardless of whether `PM_DEVICE_RUNTIME` is enabled or not.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The `count` semaphore was being used as an atomic counter, so replace
it with an atomic variable, which is a simpler solution and enables
removing the conditionals with `PM_DEVICE_RUNTIME`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The register offset definition of the I/O port Data Base Address
register (0x60, 0x61) and Command/Status Base Address register
(0x62, 0x63) are reversed. This commit fixes it to avoid confusion.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
NEORV32 doesn't provide platform and model name in it's dts file.
This makes hard for some tools to determine with what board they're
working with. Fixed it by adding model and platform name in it's dts file.
Signed-off-by: Sebastian Kwaśniak <skwasniak@internships.antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
Was broken after BT_LE_ADV_OPT_USE_NAME and
BT_LE_ADV_OPT_FORCE_NAME_IN_AD were deprecated.
The periodic_adv_rsp sample
looks for the string "PAwR sync sample" and connects based on that.
So, the periodic_sync_rsp sample needs to advertise this string.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
Commit 3dbbb73 accidentally changed the MIPI_DBI spi interface from
spi4 to spi2 for this board during conversion to use the MIPI_DBI wrapper.
This does not work, and this change reverts it back to spi4.
Tested on actual boards (bl5340, bl5340pa).
Before this change LVGL demo displays nothing, after this change it works
fine again.
Signed-off-by: Daniel Berlin <dberlin@dberlin.org>
Initialize TCM and SRAM contents only after a destructive reset (e.g.
PoR reset). SRAM retains content during functional reset through a
hardware mechanism, therefore accesses do not cause content
corruption errors.
Fixes#75912
Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
The current implementation is such that if two or more events are
generated in quick succession, only one is handled. This would
have happened as follows.
At the beginning of the ISR, the contents of INTPEND are read.
Then, the ISR unconditionally clears all events that are set.
When two (or more) events are generated in rapid succession,
it may happen that by the time we enter the ISR, INTPEND is set
only for one event, but while we process the ISR, EVENTS_TRIGGERED
will be set for more than just that one event (more events are
generated).
By unconditionally clearing all events, we can potentially lose
all events that are generated during ISR processing.
This patch changes the ISR so that it only clears those events
that have a corresponding bit set in INTPEND at the time it is read.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
- Use references whenever possible instead of literals (e.g. `@c`)
- Remove incorrect usages of `@see`
- Fix incorrect usage of INTERNAL_HIDDEN blocks
- Detail Kconfig-dependent options with `@kconfig{}`
- Other minor enhancements
Ref. https://www.doxygen.nl/manual/autolink.html
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
In case POLLIN is set, and no new application data has been detected,
the ztls_poll_update_ctx() should only return -EAGAIN if no other events
are available for the socket. Otherwise, the function may end up
busy-looping, in case for example POLLOUT is also monitored for the
socket.
Current check verifying that was wrong, as it caused to function to
return -EAGAIN even if some other events could've been reported for the
socket.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Updates dts files to use the same GPIOTE interrupt lines as NRFX
for zephyr when TF-M is used.
Signed-off-by: Vidar Lillebø <vidar.lillebo@nordicsemi.no>
the dts binding of the ethernet-phy has the option
"no-reset" and the according driver already has the
right logic to make use of it, but unfortunately
the connection between them was missing.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
If the application is not explicitly scanning, then there is not
really any need to parse advertising reports nor send them to the
application.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When RISCV_ALWAYS_SWITCH_THROUGH_ECALL is enabled, do_swap() enables PMP
checking in is_kernel_syscall.
If the PMP stack guard is triggered and do_swap() is called from the
fault handler, a PMP error occurs because the stack usage violates the
previous PMP setting.
Remove the stack guard setting during a stack overflow handler to allow
enabling PMP checking safely in fault handler.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
When RISCV_ALWAYS_SWITCH_THROUGH_ECALL is enabled, do_swap() enables PMP
checking in is_kernel_syscall.
If a user thread violates memory protection and do_swap() is called from
the fault handler, a PMP error occurs because the thread is in privileged
mode but still using the old user mode PMP setting.
Update the PMP setting to privileged mode for fault handler.
This also enables the stack guard for user thread's privileged stack in
fault handler.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
Apparently, disabling the intterupt is not enough,
because without clearing the flag, some errors are occurring.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
There were code paths that could have lead to divide by zero given an
invalid scale setting for accel or gyro. In practice this should be an
invalid setup even before getting to these conversion functions. The
conversion functions now better show all valid values are accounted for
by using CODE_UNREACHABLE in the default case.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Fix Advertising PDU memory allocation for redundant Periodic
Advertising related PDU allocations. The buffer count
related to Periodic Advertising was included twice.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix the NM iface type check error, should use (1 << WIFI_TYPE_STA),
instead of WIFI_TYPE_STA. Same for WIFI_TYPE_SAP.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
When implementing vendor specific HCI APIs and events,
we want to be able to convert between host objects,
handles and back again.
Exposing this API makes that possible
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
When implementing vendor specific HCI APIs and events,
we want to be able to convert between host objects,
handles and back again.
Exposing this API makes that possible.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
When implementing vendor specific HCI APIs and events,
we want to be able to convert between host objects,
handles and back again.
Exposing this API makes that possible.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Add test cases verifying that request containing header frame with
priority flag set is processed properly.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add tests cases covering interaction with dynamic resources with
POST/GET requests.
Simplify HTTP2 request generation to facilitate adding more tests.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add test case verifying that the server keeps the connection open if no
Connection: close header is present in the request.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Remove pointless helper functions, the test code can simply be included
in the test case w/o code duplication.
Clarify the naming of existing test cases. Backward compatibility simply
tests HTTP1. The upgrade test wasn't really testing HTTP upgrade, so
rename the test case too. Add a new test case actually verifying HTTP
upgrade.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Do some cleanup regarding naming used in the test suite to prepare it
for adding more test cases.
Extract common setup/teardown into respective before and after ztest
functions to simplify test code. Proper before and after functions also
ensure that individual test case failure does not disrupt other tests
operation.
Split the tests into two separate test suites, one for those which
require pre-setup and second for those which don't.
Finally, enable receive timeout on the client socket to ensure tests
won't stall in case of errors.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
"prototype" is ambiguous in this regard, as it doesn't really tell what
the test suite is testing. As tests in this test suite verify core HTTP
server functionality, rename it to "core".
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
It looks like nrf-regtool depends on the
https://pypi.org/project/devicetree/ Python package, which contains an
old copy (https://github.com/zephyrproject-rtos/python-devicetree) of
the in-tree devicetree package.
Because no major changes have happened in the devicetree scripts, this
likely went unnoticed. However, realized today that such old package is
not able to parse bindings with multiple buses (e.g. in I3C, where we
have `bus: [i3c, i2c]`).
While a proper solution is discussed, inject `PYTHONPATH` with the
in-tree library.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Fix compilation error implicit declaration of function 'free'
in case of `CONFIG_NEWLIB_LIBC`.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
If the remote side has already terminated the connection (or the
connection failed to establish), don't attempt to terminate an invalid
connection object. Instead, start advertising again immediately.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Rename `MBEDTLS_PSA_CRYPTO_RND_SOURCE`->`MBEDTLS_PSA_CRYPTO_RNG_SOURCE`
as all other options use `RNG` for random number generator instead of
`RND` for random number.
Signed-off-by: Jordan Yates <jordan@embeint.com>
In S32K1 devices, Arm Systick clock frequency is equal to the
CPU core clock frequency, and its value can be obtained from
devicetree.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Change USBD_CONFIGURATION_DEFINE macro to take the address of a string
descriptor node as an argument. This is a breaking change for macro
users, but quite convenient and easy to implement.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
TBS had 2 cases where 16-bit values were not properly
converted to LE before being sent over air.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Changes include:
- Introducing a local `ctx` variable to replace multiple
`sock_ctx[i]` references.
- Using a local `revents` variable to simplify repeated
`sock_fds[i].revents` checks.
- Consolidating conditional checks for socket events
(ZSOCK_POLLERR, ZSOCK_POLLNVAL, and ZSOCK_POLLHUP) as they are
individual bit definitions, allowing them to be checked simultaneously.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Removes the ALWAYS_INLINE attribute from the definition of the
routine z_unpend_thread_no_timeout() to fix an unresolved symbol
error that was occurring with some compilers.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Fix "designator order for field 'usbd_desc_node::ptr' does not match
declaration order in 'usbd_desc_node'" error when building applications
with CONFIG_CPP enabled.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
When multicast packet is forwarded to the OpenThread stack it has to
have its "multicast loop" flag enabled to be processed by the stack
itself instead of only propagating it further.
Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
Constify the config and reorder the data fields for better packing.
This reduces the RAM usage of `mipi_dbi_spi` by 20 bytes.
Signed-off-by: Michael Hope <mlhx@google.com>
In the send_ipv4_fragment function, if net_pkt_get_data returns
fail, a tx_pkts slab leak will occur. If leak exceeds the
maximum number CONFIG_NET_PKT_TX_COUNT of tx_pkts slab, tx_ptks
will be used up, and the related modules(dhcp, ping and so on)
of net cannot alloc tx_pkt slab, and will sleep and can not
return successfully until available slab.
dhcp work or ping work cannot be executed beacause can't alloc
memory, and ping command cannot return, console also fails to
input commands, and the console hang problem occurs.
Signed-off-by: Gaofeng Zhang <gaofeng.zhang@nxp.com>
Adds support for setting the number of conversion results that are
collected and averaged before updating the temperature register.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
The test case for SO_BINDTODEVICE socket option was flaky, the client
socket always sent the datagram to the IP address of the second
interface, so in theory every packet should end up on that interface.
In practice though, due to imperfect loopback packet handling, the test
worked as the packet ended up on the interface it was sent from.
The test should send datagrams to the IP addresses of the interface 1
and 2 alternatively. The server socket binds to ANY address, so w/o
interface binding it should receive all datagrams, so it allows to
verify if SO_BINDTODEVICE filtering works fine.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When IPv6 packet is received, there is a check of the packet's source
address to verify that it is not interface's non-tentative address.
This commit moves this check to the later stages of processing as
packets that can be routed are dropped in the early stage otherwise.
Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
If the packet was routed between interfaces by IPv6 module it should
not be looped back but has to be passed to the destination interface
instead.
Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
When a packet's transmission is prepared and Neighbor Solicitation is
sent its souce address is always the same as of a packet awaiting -
also for packets routed from an other interface.
Quote from the RFC:
If the source address of the packet prompting the solicitation is the
same as one of the addresses assigned to the outgoing interface, that
address SHOULD be placed in the IP Source Address of the outgoing
solicitation. Otherwise, any one of the addresses assigned to the
interface should be used.
This commit fixes the behavior.
Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
Before packet is routed there is a check verifying if the destination
address is not the device's one. However, the check should be limited
to the packet's original interface. Otherwise, packet cannot be routed
if it is destined for an other interface of the device.
Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
Enable hostname verification in DTLS handshake when server URI contains
valid hostname.
When URI is given just as IP address, don't fill up the
ctx->desthosname or enable hostname verification.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Currently the code suggests, that setting the SRAM disabling mask to
0 skips powering off SRAM, whereas in fact it's the address of the
mask variable that's checked for NULL. Make this consistent and let
platforms select whether SRAM power down should be selected.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The memory allocation for socketpairs is not conformant to the new
MEM_POOL_ADD_SIZE_ mechanism for allocating heap memory.
Specifically CONFIG_NET_SOCKETPAIR_HEAP can not be selected unless
the user has specified CONFIG_HEAP_MEM_POOL_SIZE. We should be
using MEM_POOL_ADD_SIZE_ to add to the heap if the user wants to
use it for socketpair allocation.
Additionally increase the size of pre-allocated sockets to 8 from 1
to support larger devices by default, taking into consideration the
required socketpairs and buffer sizes when using
WIFI_NM_WPA_SUPPLICANT.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Introduce a more generic mutex for protecting coap_client structure.
This allows to avoid a certain race condition when sending consecutive
CoAP requests. The case was, that when a CoAP receive thread notified
the application that a complete response was received, and the
application wanted to send another request from the application thread,
the consecutive call to coap_client_req() might've failed if the
application thread has higher priority than the CoAP receive thread
because of the request context cleanup is done after calling the
application callback.
Having a mutex, which is locked while processing the response, and when
attempting to send a new request allows to synchronize threads as
expected.
As this new mutex seemed redundant with the more specialized send_mutex
already present in the coap_client, the latter was removed (i. e.
transmission is also protected with the new mutex).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Change the `platform_allow` to multi-line format so that newly
supported archs/boards can be added as a new line.
Refactor the tags out to `common`, and add
`CONFIG_ARCH_HAS_GDBSTUB` filter
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
The standard does allow for a optional beacon payload, which gets lost
during scan, that could be interesting for the application to access
in the NET_EVENT_IEEE802154_SCAN_RESULT callback.
See section 7.3.1.6 in IEEE Std 802.15.4 for more information about
the beacon payload field. And section 7.3.1 and figure 7-5 about general
beacon frame format.
Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
The IMR is used by the firmware to hold its own copy for hot-booting
and for an "L3 heap," used for slow large allocations like loadable
libraries. The beginning of the L3 heap is currently hard-coded and
now the firmware has grown too large to fit into the dedicated area
so that it gets overwritten by heap allocations. This is a critical
bug that needs an urgent solution, for which we increase the offset,
but a real fix must calculate the L3 heap offset automatically.
BugLink: https://github.com/thesofproject/sof/issues/9308
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Perform the modulo operation on `bitpos` before using it. This should
make code slightly more clear.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Both $ra and $t2 are caller-saved registers and may be modified in ISR
callback. Save $ra to stack to follow the calling convention.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
Not sure why this was returning a void * but it seems to make sense to
return the correct type instead.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a zephyr/printk.h header for the __printk_hook functions, these are
currently manually declared by all console drivers for no good reason.
Move the documentation into the header and also unify the way that
console drivers call the function.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Looks like this was really meant to be static, there are explicit
getters and setters for it anyway.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
When running dhcp, it was not assigning gateway/router
address to the client devices. It is fixed in this PR.
Signed-off-by: Muhammad Munir <muhammad.munir@zintechnologies.com>
Make sure we are not accessing NULL pointer when checking
if the IPv4 mapping to IPv6 is enabled.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Update flash0 configuration to add boot, slot0, slot1 and storage
partitions to test FTFE/FTFA driver and flash.
Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
The BR SMP fixed channel BR/EDR Security Manager
(CID 0x0007) cannot be set in L2CAP Information
Response. It is caused by the invalid fix channel
definition used.
Move macro `BT_L2CAP_BR_CHANNEL_DEFINE` to
`l2cap_br_interface.h`, that the macro can be
accessed in smp.c. And remove duplicated
header file include `#include "classic/l2cap_
br_interface.h"` from smp.c.
Define fixed channel, BR/EDR Security Manager
(CID 0x0007), by using `BT_L2CAP_BR_CHANNEL_DEFINE`.
Fix the smp L2CAP channel of BR cannot be found
issue. Use `bt_l2cap_br_lookup_tx_cid` to get
the BR SMP L2CAP channel instead of using
`bt_l2cap_le_lookup_tx_cid`.
Fix the invalid SMP L2CAP channel used when
the BR smp failed.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The function `bt_hci_le_past_received_v2()` is not compiled
in for this configuration, so the reference needs to be removed.
Fixes#76268.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Add \since and \version doxygen tags to the networking APIs, so that
they render correctly on the API overview page.
The version used for \since tag was determined, based on the commit that
introduced the header or in individual cases, when the API was
introduced as a part of a larger header (mostly apply for the oldest,
core network APIs).
The version of the API was set as follows:
* components that use EXPERIMENTAL Kconfig symbol were assigned with
0.1.0
* The oldest, "core" networking APIs were marked as "stable" (1.0.0).
* Everything else ended up as "unstable" (0.8.0).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Use proper description for the socket_can and socket_net_mgmt groups.
Additionally, socket_can group was defined twice, which is incorrect.
For socketcan_utils.h use @addtogroup instead to merge the API
documentation into the socket_can group defined in socketcan.h.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Return to sensor_api i/f the temperature in Celsius instead
of the register raw value in LSB.
Fixes#75686
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The current implementation assumes that sensor odr and range are
always configured in the Device Tree at compile time which might
not be the case.
Instead, application can set odr and range either at compile time
through the DT or using SENSOR_ATTR_SAMPLING_FREQUENCY and
SENSOR_ATTR_FULL_SCALE attributes at runtime, so each driver instance
must keep trace of the latest values set and use them in the sensor
APIs which require them (e.g. lis2dux12_mode_set).
Signed-off-by: Armando Visconti <armando.visconti@st.com>
When setting the full scale through SENSOR_ATTR_FULL_SCALE the
driver must convert the g value (i.e. one of 2g/4g/8g/16g) to
the corrispondent sensor fs raw value.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Extended the x-nucleo-iks4a1 shield standard sample adding lsm6dsv16x
sensor die temperature display.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Remove working draft status from the v3.7.0 release notes and migration
guide.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Adds v3.7.0 to the list of supported releases.
The EOL data is currently set as 2.5 years after release
which is the minimum support period we claim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
ac52bd629d removed from the
tree some kconfig options which weren't there for a full release.
Let's also not mention them in the release notes so we avoid
broken links.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix a few typos, minor grammar mistakes and simplify grammar
in a couple of sentences.
Also fix indentation in one list.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
No significant changes to 1-Wire master drivers for the 3.7 release.
Only the changes in the pull-up configuration of the zephyr,w1-gpio
driver added in the migration guide.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
As of v2.1.0 TF-M has updated to CMSIS v6 and switched from hosting
the sources to depending on the upstream repository, cloning it at
build time.
To prevent a download from happening during the build, CMSIS v6 sources
are pushed to Zephyr's fork of TF-M and the `CMSIS_PATH` CMake variable
is set to point to them.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
These were copied-over from cdc-acm-console by mistake. It's not valid
for this snippet, therefore it's being removed.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Add information support for BR key traversal by bt_foreach_bond.
Add information support for NXP IW612.
Change "Added support for NXP platforms." to
"Added support for NXP RW61x.".
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Some HCI drivers issue HCI reset when disabling, like the IPC HCI
driver. We need to keep the RX thread running to allow receiving
the command complete.
This commit postpones aborting the RX thread until this is done.
The issue happens started occuring after commit
d0e75ab87c4b53d66008c941c38709a2fca9dbea.
Fixes#76202.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Added Isochronous channels to the controller
Moved Isochronous channels from LE Audio to the host
Changed the LE Audio to refer to the page where
the feature is more detailed described.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
For some reason, when the "Supported" coumn of the posix option
documentation included large strings, it would distort the size
of the entire table.
Move blurbs about undefined behaviour and failing with ENOSYS
to a paragraph above the table, so that all tables have a
homogeneous size.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Reorder posix options and option groups so that they are
in alphabetical order in the documentation.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Make sure all added (and removed) HCI drivers are mentioned, and also
provide a reference to the new HCI driver API.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
With the new Bluetooth Qualification process the QDID and link to
launchstudio are outdated, remove them.
Also remove the ICS listing as it hasn't been updated for a while.
Instead add a download link to the Zephyr Bluetooth Host ICS file.
Update the documentation configuration script to include the ICS file
(`*.pts`) in the external contents.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
PM_DEVICE_RUNTIME_EXCLUSIVE was deprecated and its behavior
is achived with PM_DEVICE_SYSTEM_MANAGED=n.
Fixes#76037
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-22 03:28:54 -04:00
1280 changed files with 27438 additions and 12677 deletions