To allow easily building samples using the shell, without needing to
specify additional configurations. Tested with:
```
west build -b nrf52840dk/nrf52840 \
-S nus-console` \
samples/subsys/shell/shell_module
```
Signed-off-by: Luis Ubieda <luisf@croxel.com>
The Synopsys Designware SPI peripheral exists in two versions with
slightly different register layouts. Added a Kconfig option that makes the
driver compatible with the HSSI register layout.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Add a diagram that was first created for eoss 2024 to help
visualize the relation between the different application
environment profiles of IEEE 1003.13-2003.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
The POSIX Application Environment Profiles are additive and
offer incrementally more features over the System Interfaces.
For example, PSE51 includes all of the features of the Minimal
Realtime System Profile plus all of the System Interfaces.
PSE52 includes all of the features of the Realtime Controller
System Profile, plus the features of PSE51, plus the System
Interfaces, and so on.
It makes sense to take advantage of that and to condense the
AEP documenation.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Define additional options and option groups for PSE51 to PSE53.
The options groups added in this commit are:
POSIX_SIGNAL_JUMP
POSIX_FILE_SYSTEM
POSIX_PIPE
POSIX_FILE_LOCKING
The options added in this commit are:
_POSIX_MEMLOCK
_POSIX_MEMLOCK_RANGE
_POSIX_MONOTONIC_CLOCK
_POSIX_SHARED_MEMORY_OBJECTS
_POSIX_THREAD_CPUTIME
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Previously, some links were not resolving properly since they
lacked the :ref: prefix, so it was added.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add mps2/an385 and unit_testing to the simulator
criteria while parsing testsuites. Now the testsuit
will count as a simulator only where the platform
is quemu*, native*, unit_testing, mps2/an385.
Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
The function writes random data to the provided buffer. Maximum
permitted buffer size is 256 bytes. On success the function returns 0,
otherwise it returns -1 and sets errno to appropriate value.
Signed-off-by: Patryk Duda <patrykd@google.com>
Unicast RX stats
It represents total number of unicast (any type data, action or
any other unicast frames) frames received at firmware level.
The actual frames passed to host will be different as firmware
may drop packets or some packets may be dropped because of
errors.
Unicast TX stats
Transmission side the unicast packets count states the packets
handed over to firmware. The stats taken at firmware level.
Actual packets transmission may vary depending upon various factors.
Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
Add USB out support for the BAP shell, so that decoded LC3
data can be sent to the host (e.g. a PC).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The volume controller always set the busy flag in
bt_vcp_vol_ctlr_set_vol, where it should only set it
if the GATT operation succeeds.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
For historical reasons, inversion mode is enabled by default in the
current implementation. This commit introduces an `inversion-off`
boolean DTS property, allowing it to be disabled if necessary.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
Mark the _POSIX_ASYNCHRONOUS_IO headers as supported, and note
the deviation that they return -1 and set errno to ENOTSUP.
At some later date, it might be possible to implement the
standard functions with other Zephyr API calls.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add tests to ensure that the aio.h header exists, the
structures are declared, and that the functions are present.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add stubs for POSIX asynchronous io that return -1 and set
errno to ENOTSUP.
The functions and structures in aio.h are required by the
_POSIX_ASYNCHRONOUS_IO Option as detailed in Section E.1 of
IEEE-1003.1-2017.
The _POSIX_ASYNCHRONOUS_IO interface is required for PSE51,
PSE52, PSE53, and PSE54 conformance, and is otherwise mandatory
for any POSIX conforming system as per Section A.2.1.3 of
IEEE-1003-1.2017.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Test that the Host give back the correct error when we try to set too
big advertising data. And ensure that long advertising data are
correctly transmitted.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Send a `READ_MAX_ADV_DATA_LEN` command to the controller at the
initialization of the host to fetch the maximum advertising data length
the host can accept.
This is done because even if the Zephyr controller provide the
`CONFIG_BT_CTLR_ADV_DATA_LEN_MAX` Kconfig symbol, other controllers may
not have such Kconfig symbol. So this is a way for the host to be more
controller-agnostic and provide useful feedback to the users.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
In most cases these were defined as 1. Saving one byte for the rest
doesn't really justify the added complexity that comes with these
options. Removing them also simplifies the interface between HCI
transports/drivers and the host stack, which in turn helps pave the way
for having HCI as a proper Zephyr driver API.
Fixes#71907
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Commit adds using host\controller based random number
generator instead of zephyr driver.
No mesh dependency anymore on zephyr system
random driver.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
This function is used in many places, but just by reading its
name it is not obvious why it is needed.
By adding some documentation it will hopefully become a bit more
clear that this function is mainly used for auto connection
establishment.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This line was clearly intended to check for the value returned by
ad_init(). The ad_len is unsigned, so checking for a negative value
showed up in a recent Coverity run (no GitHub issue for it yet).
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
The pinctrl driver actually uses SYSCON, so 'depends on' should be used
instead of 'select'. SYSCON should be selected in SoC config instead,
just like other SoC do.
This breaks Kconfig dependency loop for configs that indirectly depends
on SYSCON and causes PINCTRL to be selected.
Signed-off-by: Patryk Duda <patrykd@google.com>
When a target was registered with the controller but a controller-mode
request was performed, the driver failed to mask the interrupts that
were occurring as a result of the controller-mode transfer, causing an
interrupt flood. Ensure that all interrupts not handled by target mode
are handled as potential controller-mode events and acknowledged
properly.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
It appears that a controller re-initialization is sometimes needed for
proper operation when handling target mode requests after a request from
the core is completed in controller mode. Add this re-initialization as
was already done between controller mode requests.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
There is a duplicate write in `z_sched_thread_usage()` that can be
removed. Also modified the docstrings to `k_thread_runtime_stats` to
help better describe the differences between execution_cycles and
total_cycles when getting stats for the CPU or a thread
Signed-off-by: Eric Johnson <eric@memfault.com>
Update the documentation of `BT_CTLR_ADV_DATA_CHAIN` Kconfig symbol to
say that it's only supported in *non-connectable* extended advertising.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Apply changes which significantly speed up cache operations.
Removed k_busy_wait from function which polls for cache busyness.
Removed spinlock from cache operation. Lock taking and releasing
takes time and it is faster to check if LINEADDR changed
after performing the operation. If LINEADDR changed then it
indicates that current context was preempted by another cache
operation. If such state is detected current operation is
repeated.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Driver was disabling cache before full range operations and that
was causing hanging on polling for cache busy status since
state was never changing (because cache was disabled).
Additionally, added flushing to data cache disabling. If flushing
is not performed then execution fails since data in cache is lost.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
nrf54h20 has a bug that requires to manually set 28th bit in the line
address. 28th bit indicates secure memory space. Add handling to the
cache driver.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
When duplicating a page table, we don't need to copy
the mapping to the kernel l1 page table virtual address.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
We can (and do) open multiple channels with a single L2CAP command. If the
remote doesn't support dynamic channels at all, then it sends back a
REJECT_RSP.
We only destroyed the first channel that matched the command PDU
identifier. Fix that and remove all channels that match.
Also add a test that verifies the patch.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Implement `DT_INST_NODE_HAS_COMPAT` to check if a node has a
compatible. This is helpful when a node has more than one
compatible, which can be used to enable additional features
in the driver.
Updated the devicetree test to play with the new API.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
USB_NATIVE_POSIX dependencies were partially broken for
native_sim as the option was duplicated in the boards
defconfigas.
Let's not define it also in the board Kconfig.defconfig
but instead default it to y in its main definition if
building for either native_posix[//64] or native_sim[//64]
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Instead of having the boards override the default
in their Kconfig.defconfig
let's just default to IMMEDIATE logging mode in the main
definition if we are building for a ARCH POSIX board.
This avoid issues w dependencies being lost if not duplicated
correctly.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The EEPROM_SIMULATOR already defaults to 'y' with proper
dependencies in its main definition in drivers/eeprom/Kconfig.
Let's not define it also in the board Kconfig.defconfig
as that causes dependencies to be lost if not duplicated
correctly.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The FLASH_SIMULATOR already defaults to 'y' with proper
dependencies in its main definition in drivers/flash/Kconfig.
Let's not define it also in the board Kconfig.defconfig
as that causes dependencies to be lost if not duplicated
correctly.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>