Fix issue with directed advertiser not accepting connection request
from non-privacy enabled peer that has given us a non-zero IRK.
When device privacy is enabled then ull_filter_lll_rl_addr_allowed will
return true, and update the rl_idx to entry in the resolving list.
When the directed advertiser is not privacy enabled then lll->rl_idx is
set to FILTER_IDX_NONE and will not use RPA for the target address.
The check rl_idx != lll->rl_idx will then fail (0 != 0xff) and the
connect request is denied, even though all addresses matches on-air.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Use the NRF RNG entropy device as the entropy device for bt_rand and
controller internal functions when LLL is Nordic.
Using an entropy source with a significant increase in stack usage
will invalidate all stack size configurations in the system and lead
to stack overflow issues.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Refactor pdu.h defined in anticipation of reused in
Advertising Extensions implementation. To reuse in
calculating ticks_slots etc.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This is a rework for OpenISA SW LL of
"b7220cef86 Bluetooth: controller: split: Fix densely scheduled event
preemption"
Fix LLL implementation handling preemption of currently
active radio event with densely scheduled events in the
pipeline.
Preempt timeout was stopped without consideration to there
being more queued events in the pipeline. Also, added
chaining of preemption timeouts one after the other expiry
so as to preempt currently active events by the densely
scheduled events in the pipeline.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
This is a rework for OpenISA SW LL of
"b0826a7f65 Bluetooth: controller: split: Reduce time to setup tIFS
switch"
Refactor to reduce the setup next tIFS switch within tIFS
period of the Radio ISR.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
This is a rework for OpenISA SW LL of
"4547bfb452 Bluetooth: controller: split: handle latency for cancelled
conn events" as well as subsequent fixes
Update implementation of master and slave LLL's to correctly
handle event counter values when latencies introduced due to
connection events cancelled by active events operating in
unreserved time space.
When an active radio event extends into unreserved time
space, and a connection event prepare is scheduled but at
the time of pre-emption timeout if the connection event is
cancelled then the event count and latencies needs to be
continiued to get acummulated.
In the current controller usecases the above scenarios does
not get exercised, the changes in this commit is needed for
future roles that can extend into unreserved time space and
would cancel a scheduled connection event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
This is a rework for OpenISA SW LL of
"62c1e1a52b Bluetooth: controller: split: Fix assert on invalid packet
sequence"
Fix to remove assertion failure check on detecting invalid
packet sequence used by peer central and that no non-empty
packet was transmitted.
Fixes#22967.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
The radio on the VEGA platform will now be able to resolve Resolvable
Private Addresses through the use of the CAUv3 hardware. With this
patch the RPA feature is now fully supported on the Controller:
RPA addresses are generated with local IRK and resolved with
previously exchanged peer IRK.
Signed-off-by: Jeanina Dragusin <ancajeanina.dragusin@nxp.com>
For the ll code we know the exact entropy device as its the one for the
SoC that we are on. So use the new DT macro's to get the entropy device
via DT_INST rather than using CONFIG_ENTROPY_NAME.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Remove use of k_cpu_idle in controller, and refactor the
implementation used to start, wait and stop clocks needed
by the controller.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added the functions to turn on/off the radio from LLL.
Added WAKE_IRQ to start radio after it's out of DSM.
Signed-off-by: George Stefan <george.stefan@nxp.com>
Added the functions to turn on/off the radio.
Deep Sleep Mode (DSM)
Signed-off-by: Ionut Ursescu <ionut.ursescu@nxp.com>
Signed-off-by: George Stefan <george.stefan@nxp.com>
The radio on the VEGA platform supports both 1Mbps, as well
as 2Mbps BLE PHYs. It does not support coded BLE PHY. This patch
adds the necessary callback, as well as timings to enable the 2 Mbps
PHY support in the SW LL HAL for VEGA.
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
- avoid spourious radio interrupts by fixing ISR set,
waiting for idle, command configuration
- adjust counter to account for missing increment
- change preemption instant to avoid missing the deadline in LLL
- decrese EVENT_JITTER_US and
EVENT_TICKER_RES_MARGIN_US (same as Nordic)
Continuous scanning and connections are working fine now.
Signed-off-by: George Stefan <george.stefan@nxp.com>
Created unit tests for the encryption and decryption functions.
Tested with the peripheral and with central_hr samples.
Due to latency of CAUv3 when used as CCM inline accelerator
only one of the PDU can be encrypted/decrypted within an
bilateral exchange M->S + S->M in a connection event.
If the RXed PDU is encrypted, the TXed PDU must be empty
with More Data if there is data in the LLL queue.
The TXed PDU will be encrypted when an empty PDU is RXed.
Signed-off-by: Cristi Caciuloiu <cristian.caciuloiu@nxp.com>
If CONFIG_BT_CTLR_CONN_RSSI is enabled, then lll_conn.h should
be included as well. Otherwise, struct lll_conn is unknown
at the compile unit level. This has been reproduced by
compiling the hci_uart sample, where the following error occurs:
lll_adv.c: In function 'isr_rx_pdu':
lll_adv.c:722:13: error: dereferencing pointer to incomplete
type 'struct lll_conn'
lll->conn->rssi_latest = radio_rssi_get();
^~
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
This API will be deprecated in favor of the new API that clearly
specifies whether it works on logical or physical levels.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
As a part of a ticker extension interface, it is now possible to specify
a slot_window when starting a ticker. When setting the
ticks_slot_window to a non-zero value, it is requested that the node
timeout is re-located to a position within the window, where the node
does not collide with other nodes - aligning to the end of the window.
The solution takes into consideration if a node has already been
updated with drift correction (e.g. ADV randomization), subtracting this
from the window.
Signed-off-by: Morten Priess <mtpr@oticon.com>
Updated the lll_conn_flush interface to pass the connection
handle while the LLL connection context stored handle has
been invalidated.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
generated_dts_board.h is pretty redundant and confusing as a name. Call
it devicetree.h instead.
dts.h would be another option, but DTS stands for "devicetree source"
and is the source code format, so it's a bit confusing too.
The replacement was done by grepping for 'generated_dts_board' and
'GENERATED_DTS_BOARD'.
Two build diagram and input-output SVG files were updated as well, along
with misc. documentation.
hal_ti, mcuboot, and ci-tools updates are included too, in the west.yml
update.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Low frequency and high frequency clocks had separate devices
while they are actually handled by single peripheral with single
interrupt. The split was done probably because opaque subsys
argument in the API was used for other purposes and there was
no way to pass the information which clock should be controlled.
Implementation changes some time ago and subsys parameter was
no longer used. It now can be used to indicate which clock should
be controlled.
Change become necessary when nrf5340 is taken into account where
there are more clocks and current approach would lead to create
multiple devices - mess.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Remove leading/trailing blank lines in .c, .h, .py, .rst, .yml, and
.yaml files.
Will avoid failures with the new CI test in
https://github.com/zephyrproject-rtos/ci-tools/pull/112, though it only
checks changed files.
Move the 'target-notes' target in boards/xtensa/odroid_go/doc/index.rst
to get rid of the trailing blank line there. It was probably misplaced.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
There are some changes that were introduced to the Nordic SW LL,
and as such, in order to maintain compatibility, propragate them
to the OpenISA SW LL as well.
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
Non-direct ISRs are supposed to take a void pointer as an argument,
unliike direct ones, which take no arguments. Since the radio ISR is not
declared as direct, the void pointer argument was missing, likely due to
a copy-paste mistake from the nordic LLL, which indeed uses a direct ISR
for the radio ISR.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
An issue with DT generation where instance defines are not determinstic
generating values that collide with existing IRQs.
Fixes#20558
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit takes the Nordic LLL and adapts it for RV32M1 SoCs, using
the blocks that are specific to this SoC: the GenFSK & LPTMR IP
blocks.
Signed-off-by: George Stefan <george.stefan@nxp.com>
Signed-off-by: Radu Alexe <radu.alexe@nxp.com>
Signed-off-by: Ionut Ursescu <ionut.ursescu@nxp.com>
This commit adds the HAL layer needed for the BLE controller
LL on RV32M1 SoCs on OpenISA boards. Specifically, the controller
makes use of the the GenFSK and LPTMR IP blocks.
Signed-off-by: George Stefan <george.stefan@nxp.com>
Signed-off-by: Radu Alexe <radu.alexe@nxp.com>
Signed-off-by: Ionut Ursescu <ionut.ursescu@nxp.com>