1- From d7d18d20b957f52810315147d671c1976a18c1d2 Mon Sep 17 00:00:00 2001
1+ From 81472cc135126cb46701a058647de2cf82160fb9 Mon Sep 17 00:00:00 2001
22From: Frederic Pillon <frederic.pillon@st.com>
33Date: Mon, 12 Dec 2022 17:29:27 +0100
44Subject: [PATCH 3/3] chore: add support for customize app_conf_default.h
55
66Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
77---
8- src/utility/STM32Cube_FW/app_conf_default.h | 58 +++++++++++++++- -----
9- 1 file changed, 42 insertions(+), 16 deletions(-)
8+ src/utility/STM32Cube_FW/app_conf_default.h | 88 ++++++++++++++++ -----
9+ 1 file changed, 68 insertions(+), 20 deletions(-)
1010
1111diff --git a/src/utility/STM32Cube_FW/app_conf_default.h b/src/utility/STM32Cube_FW/app_conf_default.h
12- index cc8c3e8..57f1027 100644
12+ index cc8c3e8..35cad34 100644
1313--- a/src/utility/STM32Cube_FW/app_conf_default.h
1414+++ b/src/utility/STM32Cube_FW/app_conf_default.h
1515@@ -41,7 +41,9 @@
@@ -23,13 +23,17 @@ index cc8c3e8..57f1027 100644
2323
2424 /******************************************************************************
2525 * BLE Stack
26- @@ -50,13 +52,17 @@
26+ @@ -50,13 +52,25 @@
2727 * Maximum number of simultaneous connections that the device will support.
2828 * Valid values are from 1 to 8
2929 */
3030- #define CFG_BLE_NUM_LINK 8
3131+ #ifndef CFG_BLE_NUM_LINK
32+ + #ifdef STM32WB15xx
33+ + #define CFG_BLE_NUM_LINK 3
34+ + #else
3235+ #define CFG_BLE_NUM_LINK 8
36+ + #endif
3337+ #endif
3438
3539 /**
@@ -38,18 +42,26 @@ index cc8c3e8..57f1027 100644
3842 */
3943- #define CFG_BLE_NUM_GATT_SERVICES 8
4044+ #ifndef CFG_BLE_NUM_GATT_SERVICES
45+ + #ifdef STM32WB15xx
46+ + #define CFG_BLE_NUM_GATT_SERVICES 4
47+ + #else
4148+ #define CFG_BLE_NUM_GATT_SERVICES 8
49+ + #endif
4250+ #endif
4351
4452 /**
4553 * Maximum number of Attributes
46- @@ -65,13 +71,17 @@
54+ @@ -65,13 +79,21 @@
4755 * Note that certain characteristics and relative descriptors are added automatically during device initialization
4856 * so this parameters should be 9 plus the number of user Attributes
4957 */
5058- #define CFG_BLE_NUM_GATT_ATTRIBUTES 68
5159+ #ifndef CFG_BLE_NUM_GATT_ATTRIBUTES
52- + #define CFG_BLE_NUM_GATT_ATTRIBUTES 68
60+ + #ifdef STM32WB15xx
61+ + #define CFG_BLE_NUM_GATT_ATTRIBUTES 30
62+ + #else
63+ + #define CFG_BLE_NUM_GATT_ATTRIBUTES 68
64+ + #endif
5365+ #endif
5466
5567 /**
@@ -63,13 +75,17 @@ index cc8c3e8..57f1027 100644
6375
6476 /**
6577 * Size of the storage area for Attribute values
66- @@ -84,14 +94,18 @@
78+ @@ -84,14 +106,22 @@
6779 * The total amount of memory needed is the sum of the above quantities for each attribute.
6880 * This parameter is ignored by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY flag set
6981 */
7082- #define CFG_BLE_ATT_VALUE_ARRAY_SIZE (1344)
7183+ #ifndef CFG_BLE_ATT_VALUE_ARRAY_SIZE
84+ + #ifdef STM32WB15xx
85+ + #define CFG_BLE_ATT_VALUE_ARRAY_SIZE (1290)
86+ + #else
7287+ #define CFG_BLE_ATT_VALUE_ARRAY_SIZE (1344)
88+ + #endif
7389+ #endif
7490
7591 /**
@@ -84,7 +100,7 @@ index cc8c3e8..57f1027 100644
84100
85101 /**
86102 * Number of allocated memory blocks
87- @@ -103,12 +117 ,16 @@
103+ @@ -103,12 +133 ,16 @@
88104 /**
89105 * Enable or disable the Extended Packet length feature. Valid values are 0 or 1.
90106 */
@@ -103,7 +119,7 @@ index cc8c3e8..57f1027 100644
103119
104120 /**
105121 * Sleep clock accuracy in Master mode
106- @@ -121,7 +139 ,9 @@
122+ @@ -121,7 +155 ,9 @@
107123 * 6 : 21 ppm to 30 ppm
108124 * 7 : 0 ppm to 20 ppm
109125 */
@@ -114,7 +130,7 @@ index cc8c3e8..57f1027 100644
114130
115131 /**
116132 * LsSource
117- @@ -130,21 +150 ,27 @@
133+ @@ -130,21 +166 ,27 @@
118134 * - bit 1: 1: STM32WB5M Module device 0: Other devices as STM32WBxx SOC, STM32WB1M module
119135 * - bit 2: 1: HSE/1024 Clock config 0: LSE Clock config
120136 */
@@ -148,6 +164,34 @@ index cc8c3e8..57f1027 100644
148164
149165 /**
150166 * Viterbi Mode
167+ @@ -224,8 +266,11 @@
168+ * on Max Extended advertising configuration supported.
169+ * This parameter is considered by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV flag set
170+ */
171+ -
172+ - #define CFG_BLE_MAX_ADV_SET_NBR (8)
173+ + #if defined(STM32WB15xx)
174+ + #define CFG_BLE_MAX_ADV_SET_NBR (3)
175+ + #else
176+ + #define CFG_BLE_MAX_ADV_SET_NBR (8)
177+ + #endif
178+
179+ /* Maximum advertising data length (in bytes)
180+ * Range: 31 .. 1650 with limitation:
181+ @@ -233,8 +278,11 @@
182+ * on Max Extended advertising configuration supported.
183+ * This parameter is considered by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV flag set
184+ */
185+ -
186+ - #define CFG_BLE_MAX_ADV_DATA_LEN (207)
187+ + #if defined(STM32WB15xx)
188+ + #define CFG_BLE_MAX_ADV_DATA_LEN (414)
189+ + #else
190+ + #define CFG_BLE_MAX_ADV_DATA_LEN (207)
191+ + #endif
192+
193+ /* RF TX Path Compensation Value (16-bit signed integer). Units: 0.1 dB.
194+ * Range: -1280 .. 1280
151195- -
1521962.38.0.windows.1
153197
0 commit comments