[FL-2156] Switch to smaller radio stack. (#923)
* Switch to smaller radio stack. BleGlue: update params to match new stack. Update scripts * Git: set eol to lf
This commit is contained in:
parent
9e62f08e4d
commit
0c7a38b99f
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1 +1 @@
|
|||||||
* text=auto
|
* text=auto eol=lf
|
||||||
|
2
Makefile
2
Makefile
@ -71,7 +71,7 @@ endif
|
|||||||
|
|
||||||
.PHONY: flash_radio
|
.PHONY: flash_radio
|
||||||
flash_radio:
|
flash_radio:
|
||||||
@$(PROJECT_ROOT)/scripts/flash.py core2radio 0x080C7000 $(COPRO_DIR)/stm32wb5x_BLE_Stack_full_fw.bin
|
@$(PROJECT_ROOT)/scripts/flash.py core2radio 0x080D7000 $(COPRO_DIR)/stm32wb5x_BLE_Stack_light_fw.bin
|
||||||
@$(PROJECT_ROOT)/scripts/ob.py set
|
@$(PROJECT_ROOT)/scripts/ob.py set
|
||||||
|
|
||||||
.PHONY: flash_radio_fus
|
.PHONY: flash_radio_fus
|
||||||
|
@ -139,7 +139,7 @@
|
|||||||
/**
|
/**
|
||||||
* Maximum supported ATT_MTU size
|
* Maximum supported ATT_MTU size
|
||||||
*/
|
*/
|
||||||
#define CFG_BLE_MAX_ATT_MTU (489)
|
#define CFG_BLE_MAX_ATT_MTU (256+128+16+8+4+2)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Size of the storage area for Attribute values
|
* Size of the storage area for Attribute values
|
||||||
@ -211,14 +211,36 @@
|
|||||||
#define CFG_BLE_VITERBI_MODE 1
|
#define CFG_BLE_VITERBI_MODE 1
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LL Only Mode
|
* BLE stack Options flags to be configured with:
|
||||||
* 1 : LL Only
|
* - SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY
|
||||||
* 0 : LL + Host
|
* - SHCI_C2_BLE_INIT_OPTIONS_LL_HOST
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_NO_SVC_CHANGE_DESC
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_WITH_SVC_CHANGE_DESC
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_DEVICE_NAME_RO
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_DEVICE_NAME_RW
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_NO_EXT_ADV
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_CS_ALGO2
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_NO_CS_ALGO2
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_1
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_2_3
|
||||||
|
* which are used to set following configuration bits:
|
||||||
|
* (bit 0): 1: LL only
|
||||||
|
* 0: LL + host
|
||||||
|
* (bit 1): 1: no service change desc.
|
||||||
|
* 0: with service change desc.
|
||||||
|
* (bit 2): 1: device name Read-Only
|
||||||
|
* 0: device name R/W
|
||||||
|
* (bit 3): 1: extended advertizing supported [NOT SUPPORTED]
|
||||||
|
* 0: extended advertizing not supported [NOT SUPPORTED]
|
||||||
|
* (bit 4): 1: CS Algo #2 supported
|
||||||
|
* 0: CS Algo #2 not supported
|
||||||
|
* (bit 7): 1: LE Power Class 1
|
||||||
|
* 0: LE Power Class 2-3
|
||||||
|
* other bits: reserved (shall be set to 0)
|
||||||
*/
|
*/
|
||||||
#define CFG_BLE_LL_ONLY 0
|
#define CFG_BLE_OPTIONS (SHCI_C2_BLE_INIT_OPTIONS_LL_HOST | SHCI_C2_BLE_INIT_OPTIONS_WITH_SVC_CHANGE_DESC | SHCI_C2_BLE_INIT_OPTIONS_DEVICE_NAME_RW | SHCI_C2_BLE_INIT_OPTIONS_NO_EXT_ADV | SHCI_C2_BLE_INIT_OPTIONS_NO_CS_ALGO2 | SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_2_3)
|
||||||
/******************************************************************************
|
|
||||||
* Transport Layer
|
|
||||||
******************************************************************************/
|
|
||||||
/**
|
/**
|
||||||
* Queue length of BLE Event
|
* Queue length of BLE Event
|
||||||
* This parameter defines the number of asynchronous events that can be stored in the HCI layer before
|
* This parameter defines the number of asynchronous events that can be stored in the HCI layer before
|
||||||
|
@ -67,24 +67,28 @@ bool ble_app_init() {
|
|||||||
SHCI_C2_Ble_Init_Cmd_Packet_t ble_init_cmd_packet = {
|
SHCI_C2_Ble_Init_Cmd_Packet_t ble_init_cmd_packet = {
|
||||||
.Header = {{0,0,0}}, // Header unused
|
.Header = {{0,0,0}}, // Header unused
|
||||||
.Param = {
|
.Param = {
|
||||||
0, // pBleBufferAddress not used
|
.pBleBufferAddress = 0, // pBleBufferAddress not used
|
||||||
0, // BleBufferSize not used
|
.BleBufferSize = 0, // BleBufferSize not used
|
||||||
CFG_BLE_NUM_GATT_ATTRIBUTES,
|
.NumAttrRecord = CFG_BLE_NUM_GATT_ATTRIBUTES,
|
||||||
CFG_BLE_NUM_GATT_SERVICES,
|
.NumAttrServ = CFG_BLE_NUM_GATT_SERVICES,
|
||||||
CFG_BLE_ATT_VALUE_ARRAY_SIZE,
|
.AttrValueArrSize = CFG_BLE_ATT_VALUE_ARRAY_SIZE,
|
||||||
CFG_BLE_NUM_LINK,
|
.NumOfLinks = CFG_BLE_NUM_LINK,
|
||||||
CFG_BLE_DATA_LENGTH_EXTENSION,
|
.ExtendedPacketLengthEnable = CFG_BLE_DATA_LENGTH_EXTENSION,
|
||||||
CFG_BLE_PREPARE_WRITE_LIST_SIZE,
|
.PrWriteListSize = CFG_BLE_PREPARE_WRITE_LIST_SIZE,
|
||||||
CFG_BLE_MBLOCK_COUNT,
|
.MblockCount = CFG_BLE_MBLOCK_COUNT,
|
||||||
CFG_BLE_MAX_ATT_MTU,
|
.AttMtu = CFG_BLE_MAX_ATT_MTU,
|
||||||
CFG_BLE_SLAVE_SCA,
|
.SlaveSca = CFG_BLE_SLAVE_SCA,
|
||||||
CFG_BLE_MASTER_SCA,
|
.MasterSca = CFG_BLE_MASTER_SCA,
|
||||||
CFG_BLE_LSE_SOURCE,
|
.LsSource = CFG_BLE_LSE_SOURCE,
|
||||||
CFG_BLE_MAX_CONN_EVENT_LENGTH,
|
.MaxConnEventLength = CFG_BLE_MAX_CONN_EVENT_LENGTH,
|
||||||
CFG_BLE_HSE_STARTUP_TIME,
|
.HsStartupTime = CFG_BLE_HSE_STARTUP_TIME,
|
||||||
CFG_BLE_VITERBI_MODE,
|
.ViterbiEnable = CFG_BLE_VITERBI_MODE,
|
||||||
CFG_BLE_LL_ONLY,
|
.Options = CFG_BLE_OPTIONS,
|
||||||
0,
|
.HwVersion = 0,
|
||||||
|
.max_coc_initiator_nbr = 32,
|
||||||
|
.min_tx_power = 0,
|
||||||
|
.max_tx_power = 0,
|
||||||
|
.rx_model_config = 1,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
status = SHCI_C2_BLE_Init(&ble_init_cmd_packet);
|
status = SHCI_C2_BLE_Init(&ble_init_cmd_packet);
|
||||||
|
@ -139,7 +139,7 @@
|
|||||||
/**
|
/**
|
||||||
* Maximum supported ATT_MTU size
|
* Maximum supported ATT_MTU size
|
||||||
*/
|
*/
|
||||||
#define CFG_BLE_MAX_ATT_MTU (489)
|
#define CFG_BLE_MAX_ATT_MTU (256+128+16+8+4+2)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Size of the storage area for Attribute values
|
* Size of the storage area for Attribute values
|
||||||
@ -211,14 +211,36 @@
|
|||||||
#define CFG_BLE_VITERBI_MODE 1
|
#define CFG_BLE_VITERBI_MODE 1
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LL Only Mode
|
* BLE stack Options flags to be configured with:
|
||||||
* 1 : LL Only
|
* - SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY
|
||||||
* 0 : LL + Host
|
* - SHCI_C2_BLE_INIT_OPTIONS_LL_HOST
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_NO_SVC_CHANGE_DESC
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_WITH_SVC_CHANGE_DESC
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_DEVICE_NAME_RO
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_DEVICE_NAME_RW
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_NO_EXT_ADV
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_CS_ALGO2
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_NO_CS_ALGO2
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_1
|
||||||
|
* - SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_2_3
|
||||||
|
* which are used to set following configuration bits:
|
||||||
|
* (bit 0): 1: LL only
|
||||||
|
* 0: LL + host
|
||||||
|
* (bit 1): 1: no service change desc.
|
||||||
|
* 0: with service change desc.
|
||||||
|
* (bit 2): 1: device name Read-Only
|
||||||
|
* 0: device name R/W
|
||||||
|
* (bit 3): 1: extended advertizing supported [NOT SUPPORTED]
|
||||||
|
* 0: extended advertizing not supported [NOT SUPPORTED]
|
||||||
|
* (bit 4): 1: CS Algo #2 supported
|
||||||
|
* 0: CS Algo #2 not supported
|
||||||
|
* (bit 7): 1: LE Power Class 1
|
||||||
|
* 0: LE Power Class 2-3
|
||||||
|
* other bits: reserved (shall be set to 0)
|
||||||
*/
|
*/
|
||||||
#define CFG_BLE_LL_ONLY 0
|
#define CFG_BLE_OPTIONS (SHCI_C2_BLE_INIT_OPTIONS_LL_HOST | SHCI_C2_BLE_INIT_OPTIONS_WITH_SVC_CHANGE_DESC | SHCI_C2_BLE_INIT_OPTIONS_DEVICE_NAME_RW | SHCI_C2_BLE_INIT_OPTIONS_NO_EXT_ADV | SHCI_C2_BLE_INIT_OPTIONS_NO_CS_ALGO2 | SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_2_3)
|
||||||
/******************************************************************************
|
|
||||||
* Transport Layer
|
|
||||||
******************************************************************************/
|
|
||||||
/**
|
/**
|
||||||
* Queue length of BLE Event
|
* Queue length of BLE Event
|
||||||
* This parameter defines the number of asynchronous events that can be stored in the HCI layer before
|
* This parameter defines the number of asynchronous events that can be stored in the HCI layer before
|
||||||
|
@ -67,24 +67,28 @@ bool ble_app_init() {
|
|||||||
SHCI_C2_Ble_Init_Cmd_Packet_t ble_init_cmd_packet = {
|
SHCI_C2_Ble_Init_Cmd_Packet_t ble_init_cmd_packet = {
|
||||||
.Header = {{0,0,0}}, // Header unused
|
.Header = {{0,0,0}}, // Header unused
|
||||||
.Param = {
|
.Param = {
|
||||||
0, // pBleBufferAddress not used
|
.pBleBufferAddress = 0, // pBleBufferAddress not used
|
||||||
0, // BleBufferSize not used
|
.BleBufferSize = 0, // BleBufferSize not used
|
||||||
CFG_BLE_NUM_GATT_ATTRIBUTES,
|
.NumAttrRecord = CFG_BLE_NUM_GATT_ATTRIBUTES,
|
||||||
CFG_BLE_NUM_GATT_SERVICES,
|
.NumAttrServ = CFG_BLE_NUM_GATT_SERVICES,
|
||||||
CFG_BLE_ATT_VALUE_ARRAY_SIZE,
|
.AttrValueArrSize = CFG_BLE_ATT_VALUE_ARRAY_SIZE,
|
||||||
CFG_BLE_NUM_LINK,
|
.NumOfLinks = CFG_BLE_NUM_LINK,
|
||||||
CFG_BLE_DATA_LENGTH_EXTENSION,
|
.ExtendedPacketLengthEnable = CFG_BLE_DATA_LENGTH_EXTENSION,
|
||||||
CFG_BLE_PREPARE_WRITE_LIST_SIZE,
|
.PrWriteListSize = CFG_BLE_PREPARE_WRITE_LIST_SIZE,
|
||||||
CFG_BLE_MBLOCK_COUNT,
|
.MblockCount = CFG_BLE_MBLOCK_COUNT,
|
||||||
CFG_BLE_MAX_ATT_MTU,
|
.AttMtu = CFG_BLE_MAX_ATT_MTU,
|
||||||
CFG_BLE_SLAVE_SCA,
|
.SlaveSca = CFG_BLE_SLAVE_SCA,
|
||||||
CFG_BLE_MASTER_SCA,
|
.MasterSca = CFG_BLE_MASTER_SCA,
|
||||||
CFG_BLE_LSE_SOURCE,
|
.LsSource = CFG_BLE_LSE_SOURCE,
|
||||||
CFG_BLE_MAX_CONN_EVENT_LENGTH,
|
.MaxConnEventLength = CFG_BLE_MAX_CONN_EVENT_LENGTH,
|
||||||
CFG_BLE_HSE_STARTUP_TIME,
|
.HsStartupTime = CFG_BLE_HSE_STARTUP_TIME,
|
||||||
CFG_BLE_VITERBI_MODE,
|
.ViterbiEnable = CFG_BLE_VITERBI_MODE,
|
||||||
CFG_BLE_LL_ONLY,
|
.Options = CFG_BLE_OPTIONS,
|
||||||
0,
|
.HwVersion = 0,
|
||||||
|
.max_coc_initiator_nbr = 32,
|
||||||
|
.min_tx_power = 0,
|
||||||
|
.max_tx_power = 0,
|
||||||
|
.rx_model_config = 1,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
status = SHCI_C2_BLE_Init(&ble_init_cmd_packet);
|
status = SHCI_C2_BLE_Init(&ble_init_cmd_packet);
|
||||||
|
@ -14,7 +14,7 @@ MANIFEST_TEMPLATE = {
|
|||||||
"fus": {"version": {"major": 1, "minor": 2, "sub": 0}, "files": []},
|
"fus": {"version": {"major": 1, "minor": 2, "sub": 0}, "files": []},
|
||||||
"radio": {
|
"radio": {
|
||||||
"version": {
|
"version": {
|
||||||
"type": 1,
|
"type": 3,
|
||||||
"major": 1,
|
"major": 1,
|
||||||
"minor": 13,
|
"minor": 13,
|
||||||
"sub": 0,
|
"sub": 0,
|
||||||
@ -88,8 +88,8 @@ class Copro:
|
|||||||
# BLE Full Stack
|
# BLE Full Stack
|
||||||
self.addFile(
|
self.addFile(
|
||||||
manifest["copro"]["radio"]["files"],
|
manifest["copro"]["radio"]["files"],
|
||||||
"stm32wb5x_BLE_Stack_full_fw.bin",
|
"stm32wb5x_BLE_Stack_light_fw.bin",
|
||||||
address="0x080C7000",
|
address="0x080D7000",
|
||||||
)
|
)
|
||||||
# Save manifest to
|
# Save manifest to
|
||||||
json.dump(manifest, open(manifest_file, "w"))
|
json.dump(manifest, open(manifest_file, "w"))
|
||||||
|
Loading…
Reference in New Issue
Block a user