This commit adds a unit test that checks the freed buffer callback of
the bluetooth data buffer API.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
The Bluetooth data buffer API currently lacks a mechanism to notify when
a buffer is freed in the RX pool. This limitation forces HCI drivers to
adopt inefficient workarounds to manage buffer allocation.
HCI drivers face two suboptimal options:
- Blocking calls: Use bt_buf_get_rx with K_FOREVER, which blocks the
execution context until a buffer becomes available.
- Polling: Repeatedly call bt_buf_get_rx with K_NO_WAIT, which increases
CPU load and reduces efficiency.
This commit introduces a callback mechanism that is triggered each time
a buffer is freed in the RX pool. With this feature, HCI drivers can:
- Call bt_buf_get_rx with K_NO_WAIT.
- Wait for the callback notification if a NULL buffer is returned,
avoiding unnecessary polling.
The new callback improves efficiency by enabling event-driven behavior
for buffer management, reducing CPU overhead while maintaining
responsiveness.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
The asserts were not proper here, replace those by runtime
checks as the functions can be called from applications and
asserts are not meant for error checking.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
1) Unless ACS is being used, both "channel" and
"vht_oper_centr_freq_seg0_idx" parameters must be set.
Fixed "channel center segment 0" not being set in VHT Operation IE.
2) Set HT capabilities and VHT capabilities via the wifi ap config command.
3) Set AP bandwidth to wifi driver via the wifi_mgmt_api->ap_config_params.
Signed-off-by: Gang Li <gang.li_1@nxp.com>
Add "bandwidth" parameter to "wifi ap enable" command.
Add "ht_capab" and "vht_capab" parameters to "wifi ap config" command.
Signed-off-by: Gang Li <gang.li_1@nxp.com>
Commit 55d9d1c6ba
("samples: led: consolidate LED samples under same directory")
moved the led_strip sample from samples/drivers to samples/drivers/led.
But commit f54a53b4b3
("drivers: ws2812_gpio: Make timing configurable and less hardware
dependend") was merged at the same time and added the bbc_microbit.conf
file to the old location.
This patch moves bbc_microbit.conf to its correct location.
Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
MDK 8.68.1 uses nRF54L15_XXAA symbol for determining whether
given errata is applicable or not for nRF54L Series SoCs.
This causes all erratas to be disabled for nRF54L05 and nRF54L10.
To mitigate this DEVELOP_IN_NRF54L15 symbol needs to be defined,
and removed once new MDK is integrated.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
This workaround will be replaced with a variant
executed at SystemInit() level, once MDK implements it.
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
On the stm32U5 serie the MCO prescaler is a value
set in the CFGR1 register to divide the MCO output clock.
See the RefMan for accepted values for this stm32U5 serie
Signed-off-by: Francois Ramu <francois.ramu@st.com>
remove Zephyr v3.6.0 from the list of supported releases. Zephyr v3.6.0
reached end-of-life on 2024-11-29.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Replaced `sys_cpu_to_le16(1)` with a direct `1` assignment to the
`cp->num_handles` (uint8_t) field to avoid truncation to `0x00` on
big-endian architectures.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Select TC_PROVIDES_POSIX_C_LANG_SUPPORT_R to keep Zephyr from
including the common libc implementation of the various _r APIs.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
now that CONFIG_POSIX_C_LANG_SUPPORT_R will
add a custom implementation for gmtime_r() if that
is not provided by the toolchain, we can simply depend on
that, instead of using out own.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
- Add support CAN-FD for EK-RA6E2, EK-RA4E2
- Enable ioport for can-transceiver on EK-RA6E2, EK-RA4E2
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
Update the migration-guide to inform the users that now
CONFIG_ENTROPY_GENERATOR is automatically enabled as soon as
devicetree property "zephyr,entropy" is set.
Update also the "General recommendations" section of the Board Porting
Guide on the same topic.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
CONFIG_ENTROPY_GENERATOR is now enabled by default as soon as
"zephyr,entropy" is set in the device-tree. Since the sub-Kconfig
CONFIG_ENTROPY_NRF5_RNG is also enabled by default on nrf boards,
this means that the driver is pulled in the build and intialized
at boot. This might cause runtime issues during some IRQ/kernel
tests, so it's better to remove "zephyr,entropy" on these tests.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
When "zephyr,entropy" is enabled the corresponding entropy driver is
pulled in the build and initialized during boot. This
- changes the initialization sequence expected by "check_init_priorities";
- add one extra device to the expected list in "shell_device_filter".
Therefore this commit removes the "zephyr,entropy" propery to return the
test to the original state.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
If/when "zephry,entropy" is enabled CONFIG_ENTROPY_GENRATOR is
automatically enabled, therefore enabling the corresponding
platform entropy driver. On some platform this is a problem
because the entropy driver is not used directly as random
source, but only to seed the ctr-drbg algorithm provided
by Mbed TLS. Unfortunately CONFIG_MBEDTLS_CIPHER_MODE_CTR_ENABLED
cannot be directly enabled because CONFIG_MBEDTLS_CFG_FILE used
in mcuboot is different from the "config-tls-generic.h" which
is required to use Kconfig symbols defined in
"zephyr/modules/mbedtls/Kconfig.tls-generic".
Moreover entropy and random number generators are not required
in mcuboot because signature verification is a
deterministic operation.
In conclusion this commit disables "zephyr,entropy" in
mcuboot DTS overlay file.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
entropy_nrf5 modules uses k_sem_xxx() functions in several
places, but these functions are only functional when
CONFIG_MULTITHREADING is set, otherwise they just fallback to
the empty weak implementation provided in
zephyr/lib/libc/armstdc/src/threading_weak.c.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
mcux_rnga driver calls k_cycle_get_32() which is not available
if CONFIG_SYS_CLOCK_EXISTS is not defined. Therefore we add
this depedendency to CONFIG_ENTROPY_MCUX_RNGA.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
ENTROPY_GENERATOR is now automatically enabled if the board
has "zephyr,entropy" chosen property set, so there is no need
to manually select it.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
ENTROPY_GENERATOR is now automatically enabled if the board
has "zephyr,entropy" chosen property set, so there is no need
to manually select it.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Automatically enable ENTROPY_GENERATOR if the device-tree has
any "zephyr,entropy" chosen property specified. This helps
in having CONFIG_ENTROPY_HAS_DRIVER set if the platform support
an entropy driver and this then enables CONFIG_CSPRNG_ENABLED.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Actively disconnect the connection with error code `BT_HCI_ERR_AUTH_FAIL`
when the notified link key type is not `BT_LK_AUTH_COMBINATION_P256` in
BR SC only mode.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Now that we enable `HAS_BT_CTLR` we should also declare which optional
features are supported. For now, we only add the features that are
available through the current driver init routine and found on all
supported platforms.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
In some Cortex-M3 implementations SCB_VTOR bit[29] is called
the TBLBASE bit.
This enables setting VTOR to an SRAM address for qemu_cortex_m3
Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
The `ti,hdc20xx` is a common definition for TI HDC20xx series,
so the actual device named `hdc20xx` does not exist.
Remove the "compatible" section.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
When loading a coredump with an an elf built using
'CONFIG_DEBUG_THREAD_INFO=y', gdbstubs assumes that the thread info
memoryblock populated by 'CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_THREADS=y'
will be present in the coredump. This is not always true and causes an
error, and a failure to load the coredump. Add a default value for the
threads_metadata variable in CoredumpLogFile which can be used to detect
when the memory block is not present. This allows the coredump to load
successfully.
Signed-off-by: Félix Turgeon <felixturgeon@meta.com>
The tcpc_get_status_register function was using int32_t for the status
parameter, while the other related functions used uint32_t. This change
unifies the data type across all related functions to uint32_t for
consistency and clarity.
Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
Add the required code for `west debug` to work the FLPR
core over JLink in the nRF54L 05, 10 and 15 devices.
Note that this requries an external J-Link probe, it will not work with
the on-board (OB) probe soldered on the DK.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
- Adds a flash runner configuration for mcxn/c/a/w
used for sysbuild multi-image projects.
- Solves sysbuild issue with multiple resets and mass erases.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
smp_log usage should be only used when SMP is enabled.
This is currently causing build issues after the fix
provided by #82377
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add CONFIG_MRAM_LATENCY_AUTO_REQ. When option is enabled then module
requests no latency during the initialization. This option might be
useful for cases where we want to achieve maximum performance and
want to avoid controlling MRAM in the code.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
When fast UARTE instance is used (e.g. UARTE120 in nrf54h20), PM actions
are not ISR safe because they include communication over IPC so they can
only be called from the thread context. Extend driver to support both
PM modes. When non ISR mode is used then uart_rx_enable() and uart_tx()
will return error if they are called from ISR and resume operation
would need to be called because device is suspended. On completion,
driver is calling pm_device_runtime_put_async which can be called from
the ISR context.
Additionally, suspending in the TXSTOPPED and RXTO events has been
moved after user callback. It allows to support the case where
uart_rx_enable() or uart_tx() are called from that callback context.
Since suspending is called after returning from the callback it will
not trigger suspend action because API called in the callback context
will increment the usage counter (when pm_device_runtime_get() is
called).
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>