2017-03-31 09:50:49 +08:00
|
|
|
# Kconfig - Bluetooth Controller configuration options
|
|
|
|
#
|
|
|
|
# Copyright (c) 2016-2017 Nordic Semiconductor ASA
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
#
|
2016-08-15 18:01:06 +08:00
|
|
|
|
2017-03-31 09:50:49 +08:00
|
|
|
comment "BLE Controller support"
|
|
|
|
|
|
|
|
config BLUETOOTH_CONTROLLER
|
|
|
|
bool "Bluetooth Controller"
|
|
|
|
select BLUETOOTH_RECV_IS_RX_THREAD
|
|
|
|
help
|
|
|
|
Enables support for SoC native controller implementations.
|
|
|
|
|
|
|
|
if BLUETOOTH_CONTROLLER
|
2016-08-15 18:01:06 +08:00
|
|
|
|
2017-03-14 17:48:59 +08:00
|
|
|
choice
|
|
|
|
prompt "Bluetooth Link Layer Selection"
|
|
|
|
default BLUETOOTH_LL_SW
|
|
|
|
help
|
|
|
|
Select the Bluetooth Link Layer to compile.
|
|
|
|
|
|
|
|
config BLUETOOTH_LL_SW
|
|
|
|
bool "Use the software-based BLE Link Layer"
|
|
|
|
help
|
|
|
|
Use Zephyr's software BLE Link Layer implementation.
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
2017-03-31 09:50:49 +08:00
|
|
|
comment "BLE Controller configuration"
|
|
|
|
|
2017-04-09 11:48:15 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_DUP_FILTER_LEN
|
|
|
|
prompt "Number of addresses in the scan duplicate filter"
|
|
|
|
int
|
|
|
|
default 16
|
|
|
|
help
|
|
|
|
Set the number of unique BLE addresses that can be filtered as
|
|
|
|
duplicates while scanning.
|
|
|
|
|
2016-08-15 18:01:06 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_RX_BUFFERS
|
|
|
|
prompt "Number of Rx buffers"
|
|
|
|
int
|
|
|
|
default 1
|
2016-11-11 19:18:20 +08:00
|
|
|
default 6 if BLUETOOTH_HCI_RAW
|
2016-08-15 18:01:06 +08:00
|
|
|
range 1 10
|
|
|
|
help
|
2016-11-09 17:37:04 +08:00
|
|
|
Set the number of Rx PDUs to be buffered in the controller.
|
2016-08-15 18:01:06 +08:00
|
|
|
|
|
|
|
config BLUETOOTH_CONTROLLER_TX_BUFFERS
|
|
|
|
prompt "Number of Tx buffers"
|
|
|
|
int
|
2017-03-17 15:35:36 +08:00
|
|
|
default 2
|
2016-11-11 19:18:20 +08:00
|
|
|
default 7 if BLUETOOTH_HCI_RAW
|
2016-08-15 18:01:06 +08:00
|
|
|
range 1 10
|
|
|
|
help
|
2016-11-09 17:37:04 +08:00
|
|
|
Set the number of Tx PDUs to be queued for transmission
|
|
|
|
in the controller.
|
2016-08-15 18:01:06 +08:00
|
|
|
|
2016-12-30 13:24:42 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_TX_BUFFER_SIZE
|
|
|
|
prompt "Tx buffer size"
|
|
|
|
int
|
|
|
|
range 27 16384
|
|
|
|
default 27
|
|
|
|
help
|
|
|
|
Size of the Tx buffers and the value returned in HCI LE Read Buffer
|
|
|
|
Size command response. If this size if greater than effective PDU size
|
|
|
|
then controller will perform fragmentation before transmitting on the
|
|
|
|
the packet on air.
|
|
|
|
Maximum is set to 16384 due to implementation limitations (use of
|
|
|
|
uint16_t for size/length variables).
|
|
|
|
|
2017-03-10 19:16:58 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_COMPANY_ID
|
|
|
|
prompt "Company Id"
|
|
|
|
hex
|
|
|
|
default 0xFFFF
|
|
|
|
range 0x0000 0xFFFF
|
|
|
|
help
|
|
|
|
Set the Company Id that will be used in VERSION_IND PDU.
|
|
|
|
|
|
|
|
config BLUETOOTH_CONTROLLER_SUBVERSION_NUMBER
|
|
|
|
prompt "Subversion Number"
|
|
|
|
hex
|
|
|
|
default 0xFFFF
|
|
|
|
range 0x0000 0xFFFF
|
|
|
|
help
|
|
|
|
Set the Subversion Number that will be used in VERSION_IND PDU.
|
|
|
|
|
2017-03-28 06:37:05 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_RX_PRIO_STACK_SIZE
|
|
|
|
int
|
|
|
|
default 320
|
|
|
|
|
|
|
|
comment "BLE Controller features"
|
|
|
|
|
2016-12-28 12:34:37 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_LE_PING
|
|
|
|
bool "LE Ping"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Enable support for Bluetooth v4.1 LE Ping feature in the Controller.
|
|
|
|
|
2016-12-28 13:35:05 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_DATA_LENGTH
|
|
|
|
bool "Data Length Update"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Enable support for Bluetooth v4.2 LE Data Length Update procedure in
|
|
|
|
the Controller.
|
|
|
|
|
|
|
|
config BLUETOOTH_CONTROLLER_DATA_LENGTH_MAX
|
|
|
|
prompt "Maximum data length supported"
|
|
|
|
depends on BLUETOOTH_CONTROLLER_DATA_LENGTH
|
|
|
|
int
|
|
|
|
default 27
|
|
|
|
range 27 251
|
|
|
|
help
|
|
|
|
Set the maximum data length of PDU supported in the Controller.
|
|
|
|
|
2017-03-28 06:25:14 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_ADVANCED_FEATURES
|
|
|
|
bool "Show advanced features"
|
|
|
|
help
|
|
|
|
Makes advanced features visible to controller developers.
|
|
|
|
|
|
|
|
menu "Advanced features"
|
|
|
|
visible if BLUETOOTH_CONTROLLER_ADVANCED_FEATURES
|
|
|
|
|
2017-03-30 16:49:34 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_WORKER_PRIO
|
|
|
|
prompt "Radio and Ticker's Worker IRQ priority"
|
|
|
|
int
|
|
|
|
range 0 3 if SOC_SERIES_NRF51X
|
|
|
|
range 0 6 if SOC_SERIES_NRF52X
|
|
|
|
default 0
|
|
|
|
help
|
|
|
|
The interrupt priority for event preparation and radio IRQ. This value
|
|
|
|
shall be less than or equal to the Ticker's Job priority value.
|
|
|
|
|
|
|
|
config BLUETOOTH_CONTROLLER_JOB_PRIO
|
|
|
|
prompt "Ticker's JOB IRQ priority"
|
|
|
|
int
|
|
|
|
range BLUETOOTH_CONTROLLER_WORKER_PRIO 3 if SOC_SERIES_NRF51X
|
|
|
|
range BLUETOOTH_CONTROLLER_WORKER_PRIO 6 if SOC_SERIES_NRF52X
|
|
|
|
default 0
|
|
|
|
help
|
|
|
|
The interrupt priority for Ticker's Job (SWI4) IRQ. This value shall
|
|
|
|
be greater than or equal to the Ticker's Worker IRQ priority value.
|
|
|
|
|
2017-03-27 17:21:56 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_XTAL_ADVANCED
|
|
|
|
bool "Advanced event preparation"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Enables advanced event preparation offset ahead of radio tx/rx, taking
|
|
|
|
into account predictive processing time requirements in preparation to
|
|
|
|
the event, like control procedure handling and CPU execution speeds.
|
|
|
|
Crystal oscillator is retained between closely spaced consecutive
|
|
|
|
radio events to reduce the overall number of crystal settling current
|
|
|
|
consumptions.
|
|
|
|
|
|
|
|
This feature maximizes radio utilization in an average role event
|
|
|
|
timeslice when they are closely spaced by using a reduced offset
|
|
|
|
between preparation and radio event.
|
|
|
|
|
|
|
|
By disabling this feature, the controller will use a constant offset
|
|
|
|
between the preparation and radio event. The controller will toggle
|
|
|
|
crystal oscillator between two closely spaced radio events leading to
|
|
|
|
higher average current due to increased number of crystal settling
|
|
|
|
current consumptions.
|
|
|
|
|
|
|
|
config BLUETOOTH_CONTROLLER_XTAL_THRESHOLD
|
|
|
|
prompt "Crystal shutdown threshold in uS"
|
|
|
|
depends on BLUETOOTH_CONTROLLER_XTAL_ADVANCED
|
|
|
|
int
|
|
|
|
default 5168
|
|
|
|
help
|
|
|
|
Configure the optimal delta in micro seconds between two consecutive
|
|
|
|
radio events below which (active clock) crystal will be retained. This
|
|
|
|
value is board dependent. The value 5168 is based on crude calculation
|
|
|
|
for nRF51 current versus startup time of high frequency crystal.
|
|
|
|
|
2017-03-27 16:44:06 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_SCHED_ADVANCED
|
|
|
|
bool "Advanced scheduling"
|
|
|
|
depends on (BLUETOOTH_MAX_CONN != 0)
|
|
|
|
default y
|
|
|
|
default n if BLUETOOTH_PERIPHERAL && !BLUETOOTH_CENTRAL
|
|
|
|
help
|
|
|
|
Enable non-overlapping placement of observer, initiator and master
|
|
|
|
roles in timespace. Uses window offset in connection updates and uses
|
|
|
|
connection parameter request in slave role to negotiate
|
|
|
|
non-overlapping placement with active master roles to avoid slave
|
|
|
|
roles drifting into active master roles in the local controller.
|
|
|
|
|
|
|
|
This feature maximizes the average data transmission amongst active
|
|
|
|
concurrent master and slave connections while other observer,
|
|
|
|
initiator, master or slave roles are active in the local controller.
|
|
|
|
|
|
|
|
Disabling this feature will lead to overlapping role in timespace
|
|
|
|
leading to skipped events amongst active roles.
|
|
|
|
|
2016-12-30 13:51:17 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_FAST_ENC
|
|
|
|
bool "Fast Encryption Setup"
|
|
|
|
help
|
|
|
|
Enable connection encryption setup in 3 connection intervals.
|
|
|
|
Peripheral will respond to Encryption Request with Encryption Response
|
|
|
|
in the same connection interval, and also, will respond with Start
|
|
|
|
Encryption Response PDU in the 3rd connection interval, hence
|
|
|
|
completing encryption setup in 3 connection intervals. Encrypted data
|
|
|
|
would be transmitted as fast as in 3rd connection interval from the
|
|
|
|
connection establishment.
|
|
|
|
Maximum CPU time in Radio ISR will increase if this feature is
|
|
|
|
selected.
|
|
|
|
|
2016-12-30 00:07:54 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_CONN_RSSI
|
|
|
|
bool "Connection RSSI"
|
|
|
|
help
|
|
|
|
Enable connection RSSI measurement.
|
|
|
|
|
2017-03-10 18:53:38 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_ADV_INDICATION
|
|
|
|
bool "Advertisement indications"
|
|
|
|
help
|
|
|
|
Generate events indicating on air advertisement events.
|
|
|
|
|
2017-03-28 06:25:14 +08:00
|
|
|
endmenu
|
|
|
|
|
2016-12-28 02:23:32 +08:00
|
|
|
comment "BLE Controller debug configuration"
|
|
|
|
|
2016-10-31 18:39:12 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_ASSERT_HANDLER
|
|
|
|
bool "Bluetooth Controller Assertion Handler"
|
2016-11-09 18:23:21 +08:00
|
|
|
depends on BLUETOOTH_HCI_RAW
|
2016-10-31 18:39:12 +08:00
|
|
|
help
|
|
|
|
This option enables an application-defined sink for the
|
|
|
|
controller assertion mechanism. This must be defined in
|
|
|
|
application code as void \"bt_controller_assert_handle(char \*, int)\"
|
|
|
|
and will be invoked whenever the controller code encounters
|
|
|
|
an unrecoverable error.
|
|
|
|
|
2016-12-28 02:23:32 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_PROFILE_ISR
|
|
|
|
bool "Profile radio ISR"
|
|
|
|
help
|
|
|
|
Turn on measurement of radio ISR latency, CPU usage and generation of
|
|
|
|
controller event with these profiling data. The controller event
|
|
|
|
contains current, minimum and maximum ISR entry latencies; and
|
|
|
|
current, minimum and maximum ISR CPU use in micro-seconds.
|
2016-10-31 18:39:12 +08:00
|
|
|
|
2017-02-21 17:29:39 +08:00
|
|
|
config BLUETOOTH_CONTROLLER_DEBUG_PINS
|
|
|
|
bool "Bluetooth Controller Debug Pins"
|
|
|
|
help
|
|
|
|
Turn on debug GPIO toggling for the BLE Controller. This is useful
|
|
|
|
when debugging with a logic analyzer or profiling certain sections of
|
|
|
|
the code. When enabled, pins P0.16 to P0.25 are taken over exclusively
|
|
|
|
by the controller and cannot be used outside of it.
|
|
|
|
|
2016-08-15 18:01:06 +08:00
|
|
|
endif # BLUETOOTH_CONTROLLER
|