Commit Graph

57512 Commits

Author SHA1 Message Date
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
Marin Jurjević b6ffd3cac8 net: lwm2m: add missing resources to Firmware Update object
Firmware Update object did not initialise resources PkgName,
PkgVersion and Firmware Update Protocol Support. Initialise
Firmware Update Protocol Support on creation and report CoAP
as default transfer protocol.

Signed-off-by: Marin Jurjević <marin.jurjevic@hotmail.com>
2021-11-03 15:34:15 +01:00
Sylvio Alves 220a55f5fd samples: hci_uart: esp32: add overlay and config files
Enabling hci_uart sample requires changing
max BT connections and proper uart overlay. Use
this as sample for ESP32 soc.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-11-03 15:12:30 +01:00
Yasushi SHOJI 27c79d2fd6 doc: application: Explain Zephyr application CMakeLists.txt
Add descriptions for each line in application's CMakeLists.txt.  Since
this is the first time a new user is exposed to Zephyr applications
CMakeLists.txt, it's a good time to explain why each line exists.

The descriptions must be for both new Zephyr developers with or
without CMake knowledge.

This commit also moves the comment lines from CMakeLists.txt to the
descriptions to make the file simpler.

ref. #39014

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Co-authored-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-11-03 15:06:11 +01:00
Krzysztof Chruscinski 5d73d81ca1 tests: kernel: mem_slab: Fix test for no multithreading
Modified test to exit early when multithreading is disabled to
fix linking errors.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-11-03 09:18:40 -04:00
Armando Visconti aa3f3d943a drivers/sensor: lsm6ds0: Fix SENSOR_DEG2RAD_DOUBLE macro
In order to convert from degrees to radiants the SENSOR_DEG2RAD_DOUBLE
macro must divide the argument by 180 degrees and multiply by PI
radiants, and not the other way around. Please note that same macro
is already defined in the correct way in other sensor drivers as well.
(Fix #39483)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-11-03 08:16:45 -05:00
Robert Lubos 20bdb6ee21 tests: net: all: Add LwM2M to build all test
LwM2M was not covered by networking build all test, leaving an opening
for possible regression in modules that are not enabled by default in
the sample.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-11-03 11:19:40 +01:00
Robert Lubos 96b8ed85ad net: lwm2m: Fix removed engine_observer_list usage
`engine_remove_observer_by_path()` was not updated during some recent
LwM2M observer changes, still using the `engine_observer_list` which got
moved into the `lwm2m_context` structure. Update the function to align
with these changes.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-11-03 11:19:40 +01:00
Robert Lubos 17856620cf drivers: ieee802154_cc1200: Fix unchecked return value coverity issue
Verify the return value of `gpio_add_callback()` call.

CID: 240678

Fixes #39825

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-11-03 11:17:58 +01:00
Robert Lubos cf49c8676c drivers: ieee802154_cc2520: Fix unchecked return value coverity issue
Verify the return value of `gpio_add_callback()` calls.

CID: 240700

Fixes #39806

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-11-03 11:17:58 +01:00
Nicolai Glud 28a4bb0763 boards: imxrt1050_evk_qspi: added nor config to dts
This fixes the build issue with chosen zephyr,flash missing.

Signed-off-by: Nicolai Glud <nicolai.glud@prevas.dk>
2021-11-03 10:53:55 +01:00
Nicolai Glud b3e5076e59 boards: imxrt1060_evk_hyperflash: added hyperflash to board dts
This fixes the build issue with chosen zephyr,flash missing.

Signed-off-by: Nicolai Glud <nicolai.glud@prevas.dk>
2021-11-03 10:53:55 +01:00
Henrik Brix Andersen 6b4a2d3e47 dts: can: nxp: flexcan: specify sample point instead of time quanta
Convert all in-tree NXP FlexCAN instances from hardcoding the CAN bus
timing in time quanta to specifying a desired sample point of 87.5% as
recommended by CAN in Automation (CiA).

This allows for the CAN driver to calculate the optimal time quanta
based on the CAN clock and the requested CAN bitrate.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-11-02 22:28:00 -04:00