Commit graph

57274 commits

Author SHA1 Message Date
Andrew Hedin
e828009757 mgmt: mcumgr: Make SMP service notification function public
Allow SMP messages to be sent from user space.
For example, a user defined command can be sent when a value changes
so the client doesn't have to poll.
Signed-off-by: Andrew Hedin <andrew.hedin@lairdconnect.com>
2021-11-03 16:36:17 -04:00
Pavel Hübner
14ecebcde8 settings: Add name to backend choice in Kconfig
Unless a choice is named, its default value
cannot be changed in another Kconfig file.

Signed-off-by: Pavel Hübner <pavel.hubner@hardwario.com>
2021-11-03 16:35:46 -04:00
Erwan Gouriou
e19716e5c9 include/driver/clock_control: stm32: Remove STM32_PLL_PREDIV1
Make the code coherent with the comment:
purely remove STM32_PLL_PREDIV1.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-03 16:19:06 -04:00
Erwan Gouriou
dede798ce5 include/drivers/clock_control: stm32: Simplify macro definitions
When possible, replace DT_INST(0, st_stm32xx_rcc) by equivalent
DT_NODELABEL(rcc).
Also, replace DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(pll),
st_stm32f1_pll_clock, okay) by equivalent
DT_NODE_HAS_STATUS(DT_NODELABEL(pll), okay).

Last, don't check about rcc node label status, which is not an
optional node.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-03 16:19:06 -04:00
Erwan Gouriou
1a73c39dfc dts/bindings: clock: cpu2-prescaler is optional on stm32wl
STM32WL could be either single core (stm32wlex) or
dual core (stm32wl5/4x).
Make CPU2 prescaler an optional property (while it will
be required if inherited from st,stm32wb-rcc.yaml.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-03 16:19:06 -04:00
Erwan Gouriou
bbe47ee529 dts/bindings/clocks: stm32: Set RCC properties as mandatory
Now that Kconfig option for STM32 clocks configuration has been
removed, set rcc properties as required.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-03 16:19:06 -04:00
Erwan Gouriou
ace71a98a4 drivers/clock_control: stm32: Remove CLOCK_STM32_ Kconfig symbols
Remove deprecated Kconfig based STM32 clock configuration system.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-03 16:19:06 -04:00
Daniel DeGrasse
7cd8c06bb3 boards: mimxrt1160: Enable watchdog timer on RT1160
Enable watchdog timer on RT1160 evk. This was tested using
the watchdog timer api test (tests/drivers/watchdog/wdt_basic_api)

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Daniel DeGrasse
a477b25060 boards: mimxrt1160: Enabled ADC support for RT1160
ADC support verified with driver sample. LPADC1 channel 0 pin used,
which maps to pin 10 on J9 on the EVK.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Daniel DeGrasse
a30d7b5125 boards: mimxrt1160: Added SPI support for RT1160
SPI support was verified on lpspi1, by connecting MISO to MOSI

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Daniel DeGrasse
2b0ef89f20 boards: mimxrt1160: Added CAN bus support for RT1160
CAN bus was verified in loopback mode, and transmitted output was
verified using an oscilloscope. Receive functionality was verified in
loopback mode only.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Daniel DeGrasse
309dfe7cfe boards: mimxrt1160_evk: Fix DTS inconsistencies with reference manual
Fix register addresses in rt11xx SOC dts. Flexcan1 was defined with an
incorrect register address, and watchdog 3 was incorrectly labelled as
watchdog 1. Watchdog 2 should not be enabled, as it is only accessible
from code running in the trustzone context.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Daniel DeGrasse
c0cee4fb5c boards: Add support for NXP RT1160 EVK
Add baseline support for mimxrt1160_evk Cortex M4 and M7 cores
UART shell, synchronization, and hello world have all been verified to
build and run correctly.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2021-11-03 16:18:25 -04:00
Jake Swensen
4a4a03d476 uncrustify: force a single EOF newline
The CI compliance check scripts check for newlines in patch submissions.

Signed-off-by: Jake Swensen <jake@swensen.io>
2021-11-03 16:14:20 -04:00
Jake Swensen
f7870ff61b gitignore: ignore macos DS_Store files
.DS_Store files contain meta-data for the local macos system and should
not be tracked.

Signed-off-by: Jake Swensen <jake@swensen.io>
2021-11-03 16:14:20 -04:00
Jake Swensen
9b923c46fe gitignore: add ci output to ignore list
When running `scripts/ci/check_compliance.py` with no arguments, the
script will output compliance.xml to the root project directory.

Additionally, if the script fails to find a library, it can output a
_error.types file.

Signed-off-by: Jake Swensen <jake@swensen.io>
2021-11-03 16:14:20 -04:00
Lingao Meng
fd5c30c68b Bluetooth: Add check given services is register API
Add API for chech given services is register.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-11-03 18:57:03 +01:00
Andrzej Głąbek
eafafa2816 drivers: spi_nrfx_spis: Fix handling of buffer lengths
Do not limit the length of the prepared transfer to the shorter of
provided TX and RX buffers if both are used. The SPIS peripheral
cannot handle scattered buffers anyway, so there is no point in
getting the common part of TX and RX buffers for a partial transfer,
like it is done for SPI and SPIM peripherals; everything what is
possible needs to be transferred in one shot. For the same reason,
there is no point in calling spi_context_buffers_setup() and using
the related part of the spi_context structure, hence the call is
removed and buffer pointers are used directly.
Also return an error if a requested transfer length exceeds the SPIS
peripheral hardware limit, instead of silently limiting the transfer
like it was done so far.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-11-03 17:34:35 +01:00
Vinayak Kariappa Chettimada
7d53c61da3 Bluetooth: Controller: Fix missing traversal of TargetA
Fix missing traversal of TargetA field in advertised Common
Extended Payload Format. This will cause invalid offset used
for fields following the TargetA when Extended Directed
Advertising is used.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:59:46 +01:00
Vinayak Kariappa Chettimada
a3baf8f5da Bluetooth: Controller: Fix ASSERTION FAIL [!hdr->disabled_cb]
Fix ASSERTION FAIL [!hdr->disabled_cb] @ ull_conn.c:882

When initiating a connection using continuous scan window
if there is preemption by the next window then the ISR
callback was overwritten to switch to next scan window
instead of the initiator event being closed.

Fixed by not aborting the initiating state when requested
by the next continuous scan window.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:59:00 +01:00
Vinayak Kariappa Chettimada
5f5a50aa14 tests: Bluetooth: bsim: Add iterations to multiple conn to peripherals
Add iterations of connections and disconnections to
Babblesim test of Bluetooth Low Energy Central role
functionality by scanning for other devices and establishing
connection to upto 62 peripherals with a strong enough
signal.

Enable Auto PHY Update and Auto Data Length Update procedure
in the central_multilink sample.

Enable Auto PHY Update and Auto Data Length Update procedure
in the peripheral_identity sample. Fixed issues related to
rotation of identities after maximum number of connection
iterations are repeated.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:59:00 +01:00
Vinayak Kariappa Chettimada
de445e2a89 tests: Bluetooth: bsim: Add mixed legacy and extended advertising
Add mixed Legacy Directed Advertising and Extended Advertising
test in the babblesim coverage for Extended Advertising
feature.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:59:00 +01:00
Vinayak Kariappa Chettimada
ffd34dae01 tests: Bluetooth: bsim: Missing Ext Adv Parameter initialization
Initialize the Extended Advertising Enable Parameter in the
test.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:59:00 +01:00
Vinayak Kariappa Chettimada
311d6da337 Bluetooth: Controller: Review rework fixes and adding const qualifiers
Review rework fixes and adding const qualifiers.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
5725cea881 Bluetooth: Controller: Use define for max advertising radio channels
Use define for maximum number of primary advertising radio
channels used while scanning.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
e4c40a5f99 Bluetooth: Controller: Use defined to check Adv and Scan filter policy
Use defines to check Advertising and Scan filter policy.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
2128e4ab1c Bluetooth: Controller: Use define to translate HCI to Aux Ptr PHY index
In HCI event, PHY indices start at 1 compare to 0 indexed in
aux_ptr field in the Common Extended Payload Format in the PDUs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
c1ed2bc17b Bluetooth: Controller: Minor whitespace and return data type fixes
Minor changes to remove redundant whitespaces and to use
uint8_t instead of uint32_t to return true or false.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
3ba30426ca Bluetooth: Controller: Add const qualifiers to functions
Add const qualifiers to function parameters.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
f0ea78815a Bluetooth: Controller: Improve directed address type readability
Improve readability of directed address type implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
effb0ef60f Bluetooth: Controller: Fix missing reset of LLL scheduling
Fix missing reset of LLL scheduling flag when auxiliary PDU
scan scheduled in LLL is aborted due to preemption.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
ed7e902813 Bluetooth: Controller: Fix skipped Extended Scanning
Fix continuous skipping of Extended Scanning of Auxiliary
PDUs. Due to duplicate prepare events of continuous scanning
present before the auxiliary scanning prepare, preemption
schedules only the primary scan prepare and auxiliary scan
infinitely is postponed.

This is a revert of commit 190532bcc4 ("Bluetooth:
Controller: Only remove duplicate resume events").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
333c23beec Bluetooth: Controller: Implement Extend Adv Report HCI fragmentation
Implementation to fragment the list of received Extended
Advertising PDUs into HCI LE Extended Advertising report
events.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
edb436512b Bluetooth: Controller: Fix missing PDU end timestamp for Scan Response
Fix missing implementation to setup the PDU radio end
timestamp capture for Scan Response PDU.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
158dd2936c Bluetooth: Controller: lll and lll_aux for lll_scan and lll_scan_aux
Use variable names lll and lll_aux for struct lll_scan and
struct lll_scan_aux respectively.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
ebc903aee5 Bluetooth: Controller: Add auxiliary PDU device address match
Add implementation to check auxiliary PDU device address
match by comparing the address in the AUX_ADV_IND PDU with
the addresses in the filter accept list.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
ae5ad392bc Bluetooth: Controller: Refactor out the filter check function
Refactor the filter check function so that it can be reused
for the Extended Auxiliary PDU filtering.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
8869d916bc Bluetooth: Controller: Add constant qualifier to radio_ar_resolve func
Add constant qualifier to radio_ar_resolve function's
parameters.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
ee0a5aadec Bluetooth: Controller: Minor move function alongwith global functions
Minor move of lll_scan_aux_isr_aux_setup function alongwith
other global functions in the file.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
4d01637926 Bluetooth: Controller: Implement direct addr type in ext adv report
Implement setting the correct directed advertisers address
type in the Extended Advertising Report.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
230088687f Bluetooth: Controller: Add filter access list for extended scan
Add implementation to filter using access list the received
extended auxiliary PDUs. Use resolving list addresses when
resolving list is enabled.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
ec14316ad2 Bluetooth: Controller: Fix Extended Adv Report directed addr type
Fix Extended Advertising Report to return correct directed
address type.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
9268a3c47e Bluetooth: Controller: Fix Extended Scanning filter for ADV_EXT_IND PDU
Fix Extended scanning filter implementation to permit
ADV_EXT_IND PDUs without AdvA so that AUX_ADV_IND PDU can
be received and to filter that PDU based on whether AdvA
is present.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
c66f4b258f Bluetooth: Controller: Fix minor indentation in scan filter code
Fix minor indentation in the implementation of scan filter
policy.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
9dc6660364 Bluetooth: Controller: Fix extended adv report data status
Fix Extended Advertising Report data status to have
"Incomplete, data truncated, no more to come" when data
length is more than "Scan_Max_data".

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
f8c5e0d515 Bluetooth: Controller: Cleanup scan event LLL done handling
Cleanup the scan event LLL done handling for abort on late
schedule, preemption pipeline abort, preemption current
event yield, duration expire, and connection establishment.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:58 +01:00
Vinayak Kariappa Chettimada
478eb2110c Bluetooth: Controller: Fix nrf52833dk_nrf52833 gpio debug pins
Fix Controller's GPIO debug pins use for nRF52833 DK.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:52:14 +01:00
Vinayak Kariappa Chettimada
0a850fe59e Bluetooth: Controller: Use 32-bit value for time reservations
Use 32-bit value variables when calculating Extended
Advertising and Periodic Advertising radio event time
reservations to consistently use 32-bit variables for
microsecond time units when calculating radio event where
there is possibility to reserve for scheduling of back to
back chained PDUs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:51:55 +01:00
Vinayak Kariappa Chettimada
80d590c689 samples: Bluetooth: periodic_adv: Add Extended Advertising disable
Add implementation to iteratively perform Extended
Advertising enable and disable while Periodic Advertising is
active.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-11-03 16:51:40 +01:00
Krzysztof Chruscinski
8aedcba6c9 bluetooth: monitor: Add support for logging v2
Added support for logging v2 backend API in bluetooth monitor backend.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-11-03 16:00:17 +01:00