|
21 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ |
22 | 22 | #ifndef APP_CONF_DEFAULT_H |
23 | 23 | #define APP_CONF_DEFAULT_H |
| 24 | + |
24 | 25 | #if 0 |
25 | 26 | #include "hw.h" |
26 | 27 | #include "hw_conf.h" |
27 | 28 | #include "hw_if.h" |
28 | 29 | #include "ble_bufsize.h" |
29 | 30 | #endif |
| 31 | + |
30 | 32 | /****************************************************************************** |
31 | 33 | * Application Config |
32 | 34 | ******************************************************************************/ |
|
49 | 51 | * Define Tx Power |
50 | 52 | */ |
51 | 53 | #ifndef CFG_TX_POWER |
52 | | - #define CFG_TX_POWER (0x18) /* -0.15dBm */ |
| 54 | + #define CFG_TX_POWER (0x18) /* -0.15dBm */ |
53 | 55 | #endif |
54 | 56 |
|
55 | 57 | #if 0 |
|
83 | 85 | #define CFG_GAP_DEVICE_NAME_LENGTH (8) |
84 | 86 |
|
85 | 87 | /** |
86 | | -* Identity root key used to derive LTK and CSRK |
| 88 | +* Identity root key used to derive IRK and DHK(Legacy) |
87 | 89 | */ |
88 | | -#define CFG_BLE_IRK {0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0} |
| 90 | +#define CFG_BLE_IR {0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0} |
89 | 91 |
|
90 | 92 | /** |
91 | | -* Encryption root key used to derive LTK and CSRK |
| 93 | +* Encryption root key used to derive LTK(Legacy) and CSRK |
92 | 94 | */ |
93 | | -#define CFG_BLE_ERK {0xFE, 0xDC, 0xBA, 0x09, 0x87, 0x65, 0x43, 0x21, 0xFE, 0xDC, 0xBA, 0x09, 0x87, 0x65, 0x43, 0x21} |
| 95 | +#define CFG_BLE_ER {0xFE, 0xDC, 0xBA, 0x09, 0x87, 0x65, 0x43, 0x21, 0xFE, 0xDC, 0xBA, 0x09, 0x87, 0x65, 0x43, 0x21} |
94 | 96 |
|
95 | 97 | /** |
96 | 98 | * SMPS supply |
|
127 | 129 | #define CFG_FW_BRANCH (0) |
128 | 130 | #define CFG_FW_BUILD (0) |
129 | 131 | #endif |
| 132 | + |
130 | 133 | /****************************************************************************** |
131 | 134 | * BLE Stack |
132 | 135 | ******************************************************************************/ |
|
163 | 166 | */ |
164 | 167 | #ifndef CFG_BLE_NUM_GATT_ATTRIBUTES |
165 | 168 | #ifdef STM32WB15xx |
166 | | - #define CFG_BLE_NUM_GATT_ATTRIBUTES 30 |
| 169 | + #define CFG_BLE_NUM_GATT_ATTRIBUTES 30 |
167 | 170 | #else |
168 | | - #define CFG_BLE_NUM_GATT_ATTRIBUTES 68 |
| 171 | + #define CFG_BLE_NUM_GATT_ATTRIBUTES 68 |
169 | 172 | #endif |
170 | 173 | #endif |
171 | 174 |
|
172 | 175 | /** |
173 | 176 | * Maximum supported ATT_MTU size |
174 | 177 | * This parameter is ignored by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY flag set |
175 | 178 | */ |
176 | | -#ifndef CFG_BLE_MAX_ATT_MTU |
177 | | - #define CFG_BLE_MAX_ATT_MTU (156) |
178 | | -#endif |
| 179 | +#define CFG_BLE_MAX_ATT_MTU (156) |
179 | 180 |
|
180 | 181 | /** |
181 | 182 | * Size of the storage area for Attribute values |
|
188 | 189 | * The total amount of memory needed is the sum of the above quantities for each attribute. |
189 | 190 | * This parameter is ignored by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY flag set |
190 | 191 | */ |
191 | | -#ifndef CFG_BLE_ATT_VALUE_ARRAY_SIZE |
192 | | -#ifdef STM32WB15xx |
193 | | - #define CFG_BLE_ATT_VALUE_ARRAY_SIZE (1290) |
194 | | -#else |
195 | | - #define CFG_BLE_ATT_VALUE_ARRAY_SIZE (1344) |
196 | | -#endif |
197 | | -#endif |
| 192 | +#define CFG_BLE_ATT_VALUE_ARRAY_SIZE (1344) |
198 | 193 |
|
199 | 194 | /** |
200 | 195 | * Prepare Write List size in terms of number of packet |
201 | 196 | * This parameter is ignored by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY flag set |
202 | 197 | */ |
203 | | -// #define CFG_BLE_PREPARE_WRITE_LIST_SIZE BLE_PREP_WRITE_X_ATT(CFG_BLE_MAX_ATT_MTU) |
204 | | -#ifndef CFG_BLE_PREPARE_WRITE_LIST_SIZE |
205 | | - #define CFG_BLE_PREPARE_WRITE_LIST_SIZE (0x3A) |
206 | | -#endif |
| 198 | +#define CFG_BLE_PREPARE_WRITE_LIST_SIZE BLE_PREP_WRITE_X_ATT(CFG_BLE_MAX_ATT_MTU) |
207 | 199 |
|
208 | 200 | /** |
209 | 201 | * Number of allocated memory blocks |
210 | 202 | * This parameter is overwritten by the CPU2 with an hardcoded optimal value when the parameter CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY flag set |
211 | 203 | */ |
212 | | -//#define CFG_BLE_MBLOCK_COUNT (BLE_MBLOCKS_CALC(CFG_BLE_PREPARE_WRITE_LIST_SIZE, CFG_BLE_MAX_ATT_MTU, CFG_BLE_NUM_LINK)) |
213 | | -#define CFG_BLE_MBLOCK_COUNT (0x79) |
| 204 | +#define CFG_BLE_MBLOCK_COUNT (BLE_MBLOCKS_CALC(CFG_BLE_PREPARE_WRITE_LIST_SIZE, CFG_BLE_MAX_ATT_MTU, CFG_BLE_NUM_LINK)) |
214 | 205 |
|
215 | 206 | /** |
216 | 207 | * Enable or disable the Extended Packet length feature. Valid values are 0 or 1. |
|
220 | 211 | #endif |
221 | 212 |
|
222 | 213 | /** |
223 | | - * Sleep clock accuracy in Slave mode (ppm value) |
| 214 | + * Sleep clock accuracy in Peripheral mode (ppm value) |
224 | 215 | */ |
225 | | -#ifndef CFG_BLE_SLAVE_SCA |
226 | | - #define CFG_BLE_SLAVE_SCA 500 |
| 216 | +#ifndef CFG_BLE_PERIPHERAL_SCA |
| 217 | + #define CFG_BLE_PERIPHERAL_SCA 500 |
227 | 218 | #endif |
228 | 219 |
|
229 | 220 | /** |
230 | | - * Sleep clock accuracy in Master mode |
| 221 | + * Sleep clock accuracy in Central mode |
231 | 222 | * 0 : 251 ppm to 500 ppm |
232 | 223 | * 1 : 151 ppm to 250 ppm |
233 | 224 | * 2 : 101 ppm to 150 ppm |
|
237 | 228 | * 6 : 21 ppm to 30 ppm |
238 | 229 | * 7 : 0 ppm to 20 ppm |
239 | 230 | */ |
240 | | -#ifndef CFG_BLE_MASTER_SCA |
241 | | - #define CFG_BLE_MASTER_SCA 0 |
| 231 | +#ifndef CFG_BLE_CENTRAL_SCA |
| 232 | + #define CFG_BLE_CENTRAL_SCA 0 |
242 | 233 | #endif |
243 | 234 |
|
244 | 235 | /** |
|
264 | 255 | #endif |
265 | 256 |
|
266 | 257 | /** |
267 | | - * Maximum duration of the connection event when the device is in Slave mode in units of 625/256 us (~2.44 us) |
| 258 | + * Maximum duration of the connection event when the device is in Peripheral mode in units of 625/256 us (~2.44 us) |
268 | 259 | */ |
269 | 260 | #ifndef CFG_BLE_MAX_CONN_EVENT_LENGTH |
270 | 261 | #define CFG_BLE_MAX_CONN_EVENT_LENGTH (0xFFFFFFFF) |
|
314 | 305 | * 0: LE Power Class 2-3 |
315 | 306 | * other bits: complete with Options_extension flag |
316 | 307 | */ |
317 | | -#define CFG_BLE_OPTIONS (SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY) |
| 308 | +#define CFG_BLE_OPTIONS (SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY | SHCI_C2_BLE_INIT_OPTIONS_WITH_SVC_CHANGE_DESC | SHCI_C2_BLE_INIT_OPTIONS_DEVICE_NAME_RW | SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV | SHCI_C2_BLE_INIT_OPTIONS_CS_ALGO2 | SHCI_C2_BLE_INIT_OPTIONS_FULL_GATTDB_NVM | SHCI_C2_BLE_INIT_OPTIONS_GATT_CACHING_NOTUSED | SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_2_3) |
318 | 309 |
|
319 | 310 | /** |
320 | 311 | * BLE stack Options_extension flags to be configured with: |
|
390 | 381 | /* BLE core version (16-bit signed integer). |
391 | 382 | * - SHCI_C2_BLE_INIT_BLE_CORE_5_2 |
392 | 383 | * - SHCI_C2_BLE_INIT_BLE_CORE_5_3 |
393 | | - * which are used to set: 11(5.2), 12(5.3). |
| 384 | + * - SHCI_C2_BLE_INIT_BLE_CORE_5_4 |
| 385 | + * which are used to set: 11(5.2), 12(5.3), 13(5.4). |
394 | 386 | */ |
395 | 387 |
|
396 | | -#define CFG_BLE_CORE_VERSION (SHCI_C2_BLE_INIT_BLE_CORE_5_3) |
| 388 | +#define CFG_BLE_CORE_VERSION (SHCI_C2_BLE_INIT_BLE_CORE_5_4) |
397 | 389 |
|
398 | 390 | #if 0 |
399 | 391 | /****************************************************************************** |
@@ -559,13 +551,13 @@ typedef enum |
559 | 551 | * Debug |
560 | 552 | ******************************************************************************/ |
561 | 553 | /** |
562 | | - * When set, this resets some hw resources to set the device in the same state than the power up |
563 | | - * The FW resets only register that may prevent the FW to run properly |
| 554 | + * When set, this resets some hw resources to put the device in the same state as at power up. |
| 555 | + * It resets only register that may prevent the FW to run properly. |
564 | 556 | * |
565 | 557 | * This shall be set to 0 in a final product |
566 | 558 | * |
567 | 559 | */ |
568 | | -#define CFG_HW_RESET_BY_FW 1 |
| 560 | +#define CFG_HW_RESET_BY_FW 0 |
569 | 561 |
|
570 | 562 | /** |
571 | 563 | * keep debugger enabled while in any low power mode when set to 1 |
|
0 commit comments