This is an update to #34289.
When using CMake <=3.18 an interface library may not use the property
SOURCES.
Therefore, if an interface lib is added to the list of ZEPHYR_LIBS, then
CMake <=3.18 will raise the following error:
```
CMake Error .... (get_property):
INTERFACE_LIBRARY targets may only have whitelisted properties.
The property "SOURCES" is not allowed.
```
Therefore the check has been reworked into two steps.
First ensure all libs are static, and if they are, then check if they
are empty and not imported.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
nrfx 2.5.0 release includes the patch in the nrfx_twim driver that
fixes the driver behavior for zero-length transfers. No need to keep
the same fix in the shim layer.
This effectively reverts cb86a2b306.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Converts the sample to the new k_work API, and introduces a blink
boolean to catch cancel failures.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
This commit implements the OpenThread APIs to configure Enhanced-ACK
Based Probing in radio for a specific Initiator. This is needed for
Link Metrics functionality.
Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
Remove reset pin requirement from devicetree as this
is not required for modem functionality, and is not
used in the driver anyways.
Signed-off-by: Emil Lindqvist <emil@lindq.gr>
As the nucleo_g474re was converted to define clock properties
in devicetree, this commit makes the ncecessary changes such that
the ncecessary test properties are still applied.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
The request id is given by the DMA request MUX id which start at offset
1 and are vaid until req_nb + gen_nb.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Add nucleo_g431rb to spi_loopback test using spi async configuration.
Such that tests do not only run with syncronous spi configuration
(nucleo_g474re), but also with the asyncronous configuration.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
For dmamux nodes the dma-requests property specifies the number of
peripheral request inputs(not nr. of request trigger inputs).
This commit fixes this for g4 series.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
Change use of dedicated memory pool for linked list nodes for
node_rx_iq_report to common mem_link_rx. Former solution had
a drawback. Released link nodes may be enqueued to wrong memory
pool. E.g. link related with nopde_rx_iq_report went to common
link memory pool, whereas link nodes from common pool were enqueued
to dedicated list.
The solution was working because links have the same memory layout,
just different memory pools they originated from.
The problem may occur if one of those link memory pools is reset.
Then the same link may be used by node_rx and node_rx_iq_report
at the same time, causing controller failure.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add an application that uses Direction Finding API for reception
and sampling of CTE in connectionless mode (periodic adverising PDUs).
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Direction finding is implemented only for Nordic link layer.
Build was failing due to missing header files for Openisa (RiskV).
Added dummy lll_df_types.h header file to OpenISA lower link layer.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add new callback to periodic advertising sync callback.
The callback may be used to receive notification about CTE
reports in connectionless mode (periodic advetising sync).
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
The function get_per_adv_sync is used by HCI events to get
reference to periodic advertising sync object related with
handle available in handled events. Due to implementation
of Direction Finding event handlers in separate source file,
direction.c instead of putting in hci_core.c the function
get_per_adv_sync has to be globally accessible.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add functions that give possibility to enable or disable
CTE receive and sample in connectionless mode.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add Kconfig option that will enable supprot for connectionless
CTE reception. Thanks to that it will be possible to conditionally
enable or disable support of the feature and decrease code size
if the feature is not required.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Set BT_CTLR_DF_ANT_SWITCH_RX enabled by default.
There is already added implementation that supports
this feature in controller, so it may be enabled by
default.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add connectionless CTE RX feature to list of features supported
by controller. Add direction finding initialization in hci_core
if the feature is enabled.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Before thic commit the bluetooth/df unit tests subdirectory contained
connectionless CTE TX verification. Due to the implementation of
connectionless CTE RX new set of tests will be provided.
The new functionality requires different: configuration and common
setup code. Because of that, current test code was moved to
connectionless_cte_tx subdirectory.
Code shared by all DF tests is moved to common subdirectory.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Disable of CTE sampling for periodic advertising sync PDUs may be
interrupted by radio event. In such situation, TX thread will be
handled before RX thread delivers IQ samples report to host. In
this case RX thread would deliver IQ samples report after CTE
sampling was disabled.
To avoid such situation RX thread has to check if:
- CTE sampling is not disabled,
- CTE sampling was not requested to be disabled after start of radio
event.
CTE sampling configuration is double buffered. Updated configuration is
swapped at the beginning of radio event.
If CTE sampling is diabled or requested to disable (next radio event
didn't start), the IQ samples report should be dropped by RX thread
and should not be delivered to host.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add reporing of IQ samples collected for CTE attached to periodic
advertising PDUs with bad CRC.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add Kconfig option that will enable possiblity to sample CTE attached to
PDUs that have bard CRC. Sampling is based on CTEInfo field available
in received PDU. If radio is able to parse the field correclty then
it will start sampling even the CRC is wrong.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add function that enables or disables CTE sampling attached to received
periodic advertising PDUs.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
ULL may request LLL to start receiving and sampling CTE attached to
end of periodic advertising PDUs. When the CTE is successfully sampled,
LLL should report collected samples to ULL.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Nordic Radio perihperal provides possiblity to get value of CTEInfo
field parsed from received PDU. It is faster to get the information
from Radio register than parse a PDU content.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add function to enable CTE receive and sampling. The function
is aimed to be used by code in lll_sync.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
To enable or disable CTE sampling during periodic advertising sync evnet
it is requireq to change the event duration. To make it possible new
function was added that handles the operation.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
lll_sync object is used to store information for LLL to enable
or disable CTE sampling. The commit adds initialization of
lll_df_sync member of lll_sync.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
To enable or disable CTE sampling in periodic advertising scanner LLL
implementation lll_sync is extended by lll_df_sync member.
The lll_df_sync is a double buffer for lll_df_sync_cfg.
It will be used by LL thread to enable or disable CTE sampling and
provide configuration for sampling CTE in AoA mode.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add handling of Direction Finding node_rx_iq_report type in ULL.
This is required to correctly deliver IQ samples collected by
LLL during receive of PDU including CTE.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
CTE sampling enable or disable requests should be provided to LLL.
Double buffer of lll_df_sync_cfg is added to lll_sync for that purpose
Thanks to that:
- there is no need to synchronize LLL with LL thread
- LLL has always access to valid configuration (new or former)
The configuration is stored in double buffer as instances
of lll_df_sync_cfg, not as pointers. This is the only
difference between double buffer pattern used to store adverising PDU.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add new structure lll_df_sync_cfg to store DF configuration
for periodic advertising synchronization.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add functions that will allow to mangage IQ reports memory pool
e.g. allocate or relase new IQ report nodes.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add new kind of node_rx type that will store IQ samples report.
The structure includes node_rx_hdr and may be used by the same
queues that are used to forward regular node_rx_pdu objects
between LLL and ULL.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add HCI_LE_Connectionless_IQ_Report event that will allow controller
to report received CTE and provide collected IQ samples to host.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add new command HCI_LE_Set_Connectionless_IQ_Sampling_Enable that
will allow host to enable CTE sampling in controller.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
All commands are put in the file according to OpCode Command Field
increasing order. bt_hci_cp_le_set_cl_cte_tx_enable was written in
wrong position. This commit moves it to correct one.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Direction Finding support requires possibility to receive and sample CTE
attached to periodic advertising PDUs. New option will be used to enable
or disable the functionality. New option is introduced to avoid using
double statements checking if BT_CTLR_DF_CTE_RX and BT_CTLR_SYNC_-
-PERIODIC are enabled.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
To avid enabling HCI drived debugging, like in other controller source
files, Direction Finding has its own option BT_CTLR_DF_DEBUG_ENABLE.
This gives fine grained control deubgging output.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Set to disabled not yet implemented Direction Finding features.
The features will be enabled by default when they are implemented.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>