|
1 | 1 | /* USER CODE BEGIN Header */ |
2 | 2 | /** |
3 | 3 | ****************************************************************************** |
4 | | - * @file app_conf_default.h |
| 4 | + * @file app_conf.h |
5 | 5 | * @author MCD Application Team |
6 | | - * @brief Default application configuration file for STM32WPAN Middleware. |
| 6 | + * @brief Application configuration file for STM32WPAN Middleware. |
7 | 7 | ****************************************************************************** |
8 | 8 | * @attention |
9 | 9 | * |
|
19 | 19 | /* USER CODE END Header */ |
20 | 20 |
|
21 | 21 | /* Define to prevent recursive inclusion -------------------------------------*/ |
22 | | -#ifndef APP_CONF_DEFAULT_H |
23 | | -#define APP_CONF_DEFAULT_H |
| 22 | +#ifndef APP_CONF_H |
| 23 | +#define APP_CONF_H |
24 | 24 |
|
25 | | -#if 0 |
26 | 25 | #include "hw.h" |
27 | 26 | #include "hw_conf.h" |
28 | 27 | #include "hw_if.h" |
29 | 28 | #include "ble_bufsize.h" |
30 | | -#endif |
31 | 29 |
|
32 | 30 | /****************************************************************************** |
33 | 31 | * Application Config |
34 | 32 | ******************************************************************************/ |
35 | 33 |
|
36 | | -/**< generic parameters ******************************************************/ |
37 | | -/* HCI related defines */ |
38 | | - |
39 | | -#define ACI_HAL_SET_TX_POWER_LEVEL 0xFC0F |
40 | | -#define ACI_WRITE_CONFIG_DATA_OPCODE 0xFC0C |
41 | | -#define ACI_READ_CONFIG_DATA_OPCODE 0xFC0D |
42 | | -#define MAX_HCI_ACL_PACKET_SIZE (sizeof(TL_PacketHeader_t) + 5 + 251) |
43 | | -#define HCI_RESET 0x0C03 |
44 | | - |
45 | | -#ifndef BLE_SHARED_MEM_BYTE_ORDER |
46 | | - #define BLE_SHARED_MEM_BYTE_ORDER MSBFIRST |
47 | | -#endif |
48 | | -#define BLE_MODULE_SHARED_MEM_BUFFER_SIZE 128 |
49 | | - |
50 | | -/** |
51 | | - * Define Tx Power |
52 | | - */ |
53 | | -#ifndef CFG_TX_POWER |
54 | | - #define CFG_TX_POWER (0x18) /* -0.15dBm */ |
55 | | -#endif |
56 | | - |
57 | | -#if 0 |
58 | 34 | /** |
59 | 35 | * Define Secure Connections Support |
60 | 36 | */ |
|
128 | 104 | #define CFG_FW_SUBVERSION (1) |
129 | 105 | #define CFG_FW_BRANCH (0) |
130 | 106 | #define CFG_FW_BUILD (0) |
131 | | -#endif |
132 | 107 |
|
133 | 108 | /****************************************************************************** |
134 | 109 | * BLE Stack |
|
137 | 112 | * Maximum number of simultaneous connections that the device will support. |
138 | 113 | * Valid values are from 1 to 8 |
139 | 114 | */ |
140 | | -#ifndef CFG_BLE_NUM_LINK |
141 | | -#ifdef STM32WB15xx |
142 | | - #define CFG_BLE_NUM_LINK 3 |
143 | | -#else |
144 | | - #define CFG_BLE_NUM_LINK 8 |
145 | | -#endif |
146 | | -#endif |
| 115 | +#define CFG_BLE_NUM_LINK 8 |
147 | 116 |
|
148 | 117 | /** |
149 | 118 | * Maximum number of Services that can be stored in the GATT database. |
150 | 119 | * Note that the GAP and GATT services are automatically added so this parameter should be 2 plus the number of user services |
151 | 120 | */ |
152 | | -#ifndef CFG_BLE_NUM_GATT_SERVICES |
153 | | -#ifdef STM32WB15xx |
154 | | - #define CFG_BLE_NUM_GATT_SERVICES 4 |
155 | | -#else |
156 | | - #define CFG_BLE_NUM_GATT_SERVICES 8 |
157 | | -#endif |
158 | | -#endif |
| 121 | +#define CFG_BLE_NUM_GATT_SERVICES 8 |
159 | 122 |
|
160 | 123 | /** |
161 | 124 | * Maximum number of Attributes |
|
164 | 127 | * Note that certain characteristics and relative descriptors are added automatically during device initialization |
165 | 128 | * so this parameters should be 9 plus the number of user Attributes |
166 | 129 | */ |
167 | | -#ifndef CFG_BLE_NUM_GATT_ATTRIBUTES |
168 | | -#ifdef STM32WB15xx |
169 | | - #define CFG_BLE_NUM_GATT_ATTRIBUTES 30 |
170 | | -#else |
171 | | - #define CFG_BLE_NUM_GATT_ATTRIBUTES 68 |
172 | | -#endif |
173 | | -#endif |
| 130 | +#define CFG_BLE_NUM_GATT_ATTRIBUTES 68 |
174 | 131 |
|
175 | 132 | /** |
176 | 133 | * Maximum supported ATT_MTU size |
|
206 | 163 | /** |
207 | 164 | * Enable or disable the Extended Packet length feature. Valid values are 0 or 1. |
208 | 165 | */ |
209 | | -#ifndef CFG_BLE_DATA_LENGTH_EXTENSION |
210 | | - #define CFG_BLE_DATA_LENGTH_EXTENSION 1 |
211 | | -#endif |
| 166 | +#define CFG_BLE_DATA_LENGTH_EXTENSION 1 |
212 | 167 |
|
213 | 168 | /** |
214 | 169 | * Sleep clock accuracy in Peripheral mode (ppm value) |
215 | 170 | */ |
216 | | -#ifndef CFG_BLE_PERIPHERAL_SCA |
217 | | - #define CFG_BLE_PERIPHERAL_SCA 500 |
218 | | -#endif |
| 171 | +#define CFG_BLE_PERIPHERAL_SCA 500 |
219 | 172 |
|
220 | 173 | /** |
221 | 174 | * Sleep clock accuracy in Central mode |
|
228 | 181 | * 6 : 21 ppm to 30 ppm |
229 | 182 | * 7 : 0 ppm to 20 ppm |
230 | 183 | */ |
231 | | -#ifndef CFG_BLE_CENTRAL_SCA |
232 | | - #define CFG_BLE_CENTRAL_SCA 0 |
233 | | -#endif |
| 184 | +#define CFG_BLE_CENTRAL_SCA 0 |
234 | 185 |
|
235 | 186 | /** |
236 | 187 | * LsSource |
|
239 | 190 | * - bit 1: 1: STM32WB5M Module device 0: Other devices as STM32WBxx SOC, STM32WB1M module |
240 | 191 | * - bit 2: 1: HSE/1024 Clock config 0: LSE Clock config |
241 | 192 | */ |
242 | | -#ifndef CFG_BLE_LS_SOURCE |
243 | | - #if defined(STM32WB5Mxx) |
244 | | - #define CFG_BLE_LS_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LS_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LS_MOD5MM_DEV | SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_LSE) |
245 | | - #else |
246 | | - #define CFG_BLE_LS_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LS_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LS_OTHER_DEV | SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_LSE) |
247 | | - #endif |
| 193 | +#if defined(STM32WB5Mxx) |
| 194 | + #define CFG_BLE_LS_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LS_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LS_MOD5MM_DEV | SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_LSE) |
| 195 | +#else |
| 196 | + #define CFG_BLE_LS_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LS_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LS_OTHER_DEV | SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_LSE) |
248 | 197 | #endif |
249 | 198 |
|
250 | 199 | /** |
251 | 200 | * Start up time of the high speed (16 or 32 MHz) crystal oscillator in units of 625/256 us (~2.44 us) |
252 | 201 | */ |
253 | | -#ifndef CFG_BLE_HSE_STARTUP_TIME |
254 | | - #define CFG_BLE_HSE_STARTUP_TIME 0x148 |
255 | | -#endif |
| 202 | +#define CFG_BLE_HSE_STARTUP_TIME 0x148 |
256 | 203 |
|
257 | 204 | /** |
258 | 205 | * Maximum duration of the connection event when the device is in Peripheral mode in units of 625/256 us (~2.44 us) |
259 | 206 | */ |
260 | | -#ifndef CFG_BLE_MAX_CONN_EVENT_LENGTH |
261 | | - #define CFG_BLE_MAX_CONN_EVENT_LENGTH (0xFFFFFFFF) |
262 | | -#endif |
| 207 | +#define CFG_BLE_MAX_CONN_EVENT_LENGTH (0xFFFFFFFF) |
263 | 208 |
|
264 | 209 | /** |
265 | 210 | * Viterbi Mode |
|
305 | 250 | * 0: LE Power Class 2-3 |
306 | 251 | * other bits: complete with Options_extension flag |
307 | 252 | */ |
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) |
| 253 | +#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_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) |
309 | 254 |
|
310 | 255 | /** |
311 | 256 | * BLE stack Options_extension flags to be configured with: |
|
328 | 273 |
|
329 | 274 | #define CFG_BLE_MAX_TX_POWER (6) |
330 | 275 |
|
| 276 | +/** |
| 277 | +* BLE stack Maximum number of created Enhanced ATT bearers to be configured |
| 278 | +* in addition to the number of links |
| 279 | +* - Range: 0 .. 4 |
| 280 | +*/ |
| 281 | +#define CFG_BLE_MAX_ADD_EATT_BEARERS (4) |
| 282 | + |
331 | 283 | /** |
332 | 284 | * BLE Rx model configuration flags to be configured with: |
333 | 285 | * - SHCI_C2_BLE_INIT_RX_MODEL_AGC_RSSI_LEGACY |
|
347 | 299 | * This parameter is considered by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV flag set |
348 | 300 | */ |
349 | 301 |
|
350 | | -#if defined(STM32WB15xx) |
351 | | - #define CFG_BLE_MAX_ADV_SET_NBR (3) |
352 | | -#else |
353 | | - #define CFG_BLE_MAX_ADV_SET_NBR (8) |
354 | | -#endif |
| 302 | +#define CFG_BLE_MAX_ADV_SET_NBR (8) |
355 | 303 |
|
356 | 304 | /* Maximum advertising data length (in bytes) |
357 | 305 | * Range: 31 .. 1650 with limitation: |
|
360 | 308 | * This parameter is considered by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV flag set |
361 | 309 | */ |
362 | 310 |
|
363 | | -#if defined(STM32WB15xx) |
364 | | - #define CFG_BLE_MAX_ADV_DATA_LEN (414) |
365 | | -#else |
366 | | - #define CFG_BLE_MAX_ADV_DATA_LEN (207) |
367 | | -#endif |
| 311 | +#define CFG_BLE_MAX_ADV_DATA_LEN (207) |
368 | 312 |
|
369 | 313 | /* RF TX Path Compensation Value (16-bit signed integer). Units: 0.1 dB. |
370 | 314 | * Range: -1280 .. 1280 |
|
387 | 331 |
|
388 | 332 | #define CFG_BLE_CORE_VERSION (SHCI_C2_BLE_INIT_BLE_CORE_5_4) |
389 | 333 |
|
390 | | -#if 0 |
391 | 334 | /****************************************************************************** |
392 | 335 | * Transport Layer |
393 | 336 | ******************************************************************************/ |
@@ -724,5 +667,4 @@ typedef enum |
724 | 667 |
|
725 | 668 | #define CFG_OTP_END_ADRESS OTP_AREA_END_ADDR |
726 | 669 |
|
727 | | -#endif |
728 | | -#endif /*APP_CONF_DEFAULT_H */ |
| 670 | +#endif /*APP_CONF_H */ |
0 commit comments