Skip to content

Commit

Permalink
nimble: add sysconfig for enabling additional PHYs
Browse files Browse the repository at this point in the history
Three new configs are introduced: BLE_ADDITIONAL_PHY that enables
additional PHY and two configs that specify what additional PHY shall be
enabled (2M or CODED)
  • Loading branch information
KKopyscinski committed Oct 23, 2023
1 parent cfe8b1b commit cb70800
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 20 deletions.
6 changes: 4 additions & 2 deletions .github/targets/nordic_pca10095_blehci/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@

syscfg.vals:
BLE_MAX_CONNECTIONS: 4
BLE_ADDITIONAL_PHY: 1
BLE_PHY_2M: 1
BLE_PHY_CODED: 1


BLE_LL_CFG_FEAT_DATA_LEN_EXT: 1
BLE_LL_CFG_FEAT_LE_2M_PHY: 1
BLE_LL_CFG_FEAT_LE_CODED_PHY: 1
BLE_LL_CFG_FEAT_LL_PRIVACY: 1
BLE_LL_CONN_INIT_MAX_TX_BYTES: 251
BLE_LL_CONN_INIT_SLOTS: 4
Expand Down
5 changes: 3 additions & 2 deletions .github/test_build_apps_syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ syscfg.vals:
BLE_SM_SC: 1
BLE_STORE_MAX_BONDS: 5
BLE_EATT_CHAN_NUM: 2
BLE_ADDITIONAL_PHY: 1
BLE_PHY_2M: 1
BLE_PHY_CODED: 1

# controller
BLE_LL_CFG_FEAT_LE_2M_PHY: 1
BLE_LL_CFG_FEAT_LE_CODED_PHY: 1
BLE_LL_CFG_FEAT_LL_PRIVACY: 1
BLE_LL_CONN_INIT_MAX_TX_BYTES: 251
BLE_LL_DTM: 1
Expand Down
7 changes: 5 additions & 2 deletions apps/blestress/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,14 @@ syscfg.vals:
# L2CAP COC SDU buffers in RX endpoint
BLE_L2CAP_COC_SDU_BUFF_COUNT: 1

# Enable additional PHYs
BLE_ADDITIONAL_PHY: 1

# Enable 2M PHY
BLE_LL_CFG_FEAT_LE_2M_PHY: 1
BLE_PHY_2M: 1

# Enable CODED PHY
BLE_LL_CFG_FEAT_LE_CODED_PHY: 1
BLE_PHY_CODED: 1

# Whether to save data to sys/config, or just keep it in RAM.
BLE_STORE_CONFIG_PERSIST: 0
6 changes: 4 additions & 2 deletions apps/dtm/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ syscfg.vals:
CONSOLE_HISTORY: ram
CONSOLE_HISTORY_RAM_HISTORY_SIZE: 50

BLE_ADDITIONAL_PHY: 1
BLE_PHY_2M: 1
BLE_PHY_CODED: 1

BLE_LL_DTM: 1
BLE_LL_DTM_EXTENSIONS: 1
BLE_LL_CFG_FEAT_LE_2M_PHY: 1
BLE_LL_CFG_FEAT_LE_CODED_PHY: 1
4 changes: 3 additions & 1 deletion babblesim/targets/edtthci/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@ syscfg.vals:
BLE_LL_CFG_FEAT_DATA_LEN_EXT: 1
BLE_LL_CFG_FEAT_LL_PRIVACY: 1
BLE_LL_CFG_FEAT_LE_CSA2: 1
BLE_LL_CFG_FEAT_LE_2M_PHY: 1
# BLE_LL_CFG_FEAT_LE_CODED_PHY: 1 # not modeled in bsim
BLE_LL_CFG_FEAT_LL_EXT_ADV: 1
BLE_LL_CFG_FEAT_LL_PERIODIC_ADV: 1
BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_TRANSFER: 1
BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL: 1
BLE_LL_CFG_FEAT_LL_SCA_UPDATE: 1

BLE_ADDITIONAL_PHY: 1
BLE_PHY_2M: 1

BLE_ROLE_CENTRAL: 1
BLE_ROLE_PERIPHERAL: 1
BLE_ROLE_BROADCASTER: 1
Expand Down
4 changes: 2 additions & 2 deletions nimble/controller/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,12 @@ syscfg.defs:
BLE_LL_CFG_FEAT_LE_2M_PHY:
description: >
This option is used to enable/disable support for the 2Mbps PHY.
value: '0'
value: MYNEWT_VAL(BLE_PHY_2M)

BLE_LL_CFG_FEAT_LE_CODED_PHY:
description: >
This option is used to enable/disable support for the coded PHY.
value: '0'
value: MYNEWT_VAL(BLE_PHY_CODED)

BLE_LL_CFG_FEAT_LL_EXT_ADV:
description: >
Expand Down
19 changes: 19 additions & 0 deletions nimble/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,25 @@ syscfg.defs:
This enables LE Connection Subrating feature
value: 0

BLE_ADDITIONAL_PHY:
description: >
This enables support for addtitional PHY (2M or CODED)
value: 0

BLE_PHY_2M:
description: >
This enables support for addtitional 2M PHY
value: 0
restrictions:
- 'BLE_ADDITIONAL_PHY if 1'

BLE_PHY_CODED:
description: >
This enables support for addtitional CODED PHY
value: 0
restrictions:
- 'BLE_ADDITIONAL_PHY if 1'

# Allow periodic sync transfer only if 5.1 or higher
syscfg.restrictions:
- "'BLE_PERIODIC_ADV_SYNC_TRANSFER == 0' || 'BLE_VERSION >= 51'"
Expand Down
4 changes: 2 additions & 2 deletions targets/dialog_cmac/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ syscfg.vals:
BLE_MULTI_ADV_INSTANCES: 4
BLE_MAX_PERIODIC_SYNCS: 4
BLE_MAX_CONNECTIONS: 4
BLE_ADDITIONAL_PHY: 1
BLE_PHY_2M: 1
BLE_LL_CFG_FEAT_DATA_LEN_EXT: 1
BLE_LL_CFG_FEAT_LE_2M_PHY: 1
BLE_LL_CFG_FEAT_LE_CODED_PHY: 0
BLE_LL_CFG_FEAT_LL_PRIVACY: 1
BLE_LL_CFG_FEAT_LL_SCA_UPDATE: 1
BLE_LL_CFG_FEAT_LL_ENHANCED_CONN_UPDATE: 1
Expand Down
5 changes: 3 additions & 2 deletions targets/nordic_pca10095_net-blehci/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ syscfg.vals:
MSYS_1_BLOCK_COUNT: 12
MSYS_1_BLOCK_SIZE: 292
BLE_LL_CFG_FEAT_DATA_LEN_EXT: 1
BLE_LL_CFG_FEAT_LE_2M_PHY: 1
BLE_LL_CFG_FEAT_LE_CODED_PHY: 1
BLE_ADDITIONAL_PHY: 1
BLE_PHY_2M: 1
BLE_PHY_CODED: 1
BLE_LL_CFG_FEAT_LL_PRIVACY: 1
BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL: 1
BLE_LL_CONN_INIT_MAX_TX_BYTES: 251
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

syscfg.vals:
BLE_LL_CFG_FEAT_DATA_LEN_EXT: 1
BLE_LL_CFG_FEAT_LE_2M_PHY: 1
BLE_ADDITIONAL_PHY: 1
BLE_PHY_2M: 1
BLE_LL_HCI_VS_EVENT_ON_ASSERT: 1
MSYS_1_BLOCK_COUNT: 80
MSYS_1_BLOCK_SIZE: 308
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
#

syscfg.vals:
BLE_ADDITIONAL_PHY: 1
BLE_PHY_2M: 1
BLE_LL_CFG_FEAT_DATA_LEN_EXT: 1
BLE_LL_CFG_FEAT_LE_2M_PHY: 1
BLE_LL_HCI_VS_EVENT_ON_ASSERT: 1
BLE_TRANSPORT_HS: usb
USBD_VID: 0xDCAB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

syscfg.vals:
BLE_LL_CFG_FEAT_DATA_LEN_EXT: 1
BLE_LL_CFG_FEAT_LE_2M_PHY: 1
BLE_ADDITIONAL_PHY: 1
BLE_PHY_2M: 1
BLE_LL_HCI_VS_EVENT_ON_ASSERT: 1
BLE_TRANSPORT_HS: usb
USBD_VID: 0xDCAB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ syscfg.vals:
IPC_NRF5340_BUF_SZ: 3072

BLE_LL_CFG_FEAT_DATA_LEN_EXT: 1
BLE_LL_CFG_FEAT_LE_2M_PHY: 1
BLE_ADDITIONAL_PHY: 1
BLE_PHY_2M: 1
BLE_LL_HCI_VS_EVENT_ON_ASSERT: 1
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ syscfg.vals:
BLE_LL_SCA: 50
OS_CRASH_FILE_LINE: 1

BLE_ADDITIONAL_PHY: 1
BLE_PHY_2M: 1

BLE_LL_CFG_FEAT_DATA_LEN_EXT: 1
BLE_LL_CFG_FEAT_LE_2M_PHY: 1
BLE_LL_HCI_VS_EVENT_ON_ASSERT: 1

BLE_TRANSPORT_ACL_COUNT: 80
Expand Down

0 comments on commit cb70800

Please sign in to comment.