Skip to content

Commit 543f6a5

Browse files
authored
Merge pull request #46 from ABOSTM/UPDATE_BLE_1.14.1
Update BLE to Cube version 1.14.1
2 parents 54af742 + f4c2607 commit 543f6a5

17 files changed

+805
-617
lines changed

Diff for: extras/STM32Cube_FW/0001-chore-clean-up-and-adapt-STM32Cube_FW-sources-for-ST.patch

+106-102
Large diffs are not rendered by default.

Diff for: extras/STM32Cube_FW/0002-fix-include-a-timeout-when-waiting-for-the-cmd_resp.patch

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
From ac18897f0f9b87bb3196efb93ef47ccaaa0eff64 Mon Sep 17 00:00:00 2001
1+
From 979f153a4e6d5d616ddea616bcd732e32cb1773c Mon Sep 17 00:00:00 2001
22
From: Alexandre Bourdiol <[email protected]>
3-
Date: Mon, 6 Dec 2021 11:18:02 +0100
4-
Subject: [PATCH 2/4] fix: include a timeout when waiting for the cmd_resp
3+
Date: Tue, 30 Aug 2022 13:19:36 +0200
4+
Subject: [PATCH 2/3] fix: include a timeout when waiting for the cmd_resp
55

6-
Signed-off-by: Francois Ramu <[email protected]>
76
Signed-off-by: Alexandre Bourdiol <[email protected]>
87
---
98
src/utility/STM32Cube_FW/shci_tl.c | 11 +++++++----
109
1 file changed, 7 insertions(+), 4 deletions(-)
1110

1211
diff --git a/src/utility/STM32Cube_FW/shci_tl.c b/src/utility/STM32Cube_FW/shci_tl.c
13-
index ef403aa..6cccc5d 100644
12+
index d1a448d..678de84 100644
1413
--- a/src/utility/STM32Cube_FW/shci_tl.c
1514
+++ b/src/utility/STM32Cube_FW/shci_tl.c
1615
@@ -20,6 +20,8 @@
@@ -40,5 +39,5 @@ index ef403aa..6cccc5d 100644
4039
}
4140

4241
--
43-
2.31.1.windows.1
42+
2.33.0.windows.1
4443

Diff for: extras/STM32Cube_FW/0003-Added-support-for-custom-app_conf.h-35.patch renamed to extras/STM32Cube_FW/0003-Added-support-for-custom-app_conf.h.patch

+42-43
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
From a771c9e9a12d085fc240a45f68ca5aafb8b42006 Mon Sep 17 00:00:00 2001
1+
From d3ae98b9073e5f1e48efb32b1ef4d318814228fe Mon Sep 17 00:00:00 2001
22
From: Alexandre Bourdiol <[email protected]>
3-
Date: Mon, 6 Dec 2021 18:59:38 +0100
4-
Subject: [PATCH 3/4] Added support for custom app_conf.h (#35)
3+
Date: Tue, 30 Aug 2022 13:31:31 +0200
4+
Subject: [PATCH 3/3] Added support for custom app_conf.h
55

6+
Signed-off-by: Alexandre Bourdiol <[email protected]>
67
---
7-
src/utility/STM32Cube_FW/app_conf_default.h | 75 ++++++++++++++-------
8-
1 file changed, 49 insertions(+), 26 deletions(-)
8+
src/utility/STM32Cube_FW/app_conf_default.h | 71 ++++++++++++++-------
9+
1 file changed, 47 insertions(+), 24 deletions(-)
910

1011
diff --git a/src/utility/STM32Cube_FW/app_conf_default.h b/src/utility/STM32Cube_FW/app_conf_default.h
11-
index 4f300e0..9f8e085 100644
12+
index 54f824a..91672ac 100644
1213
--- a/src/utility/STM32Cube_FW/app_conf_default.h
1314
+++ b/src/utility/STM32Cube_FW/app_conf_default.h
1415
@@ -1,8 +1,8 @@
@@ -47,34 +48,29 @@ index 4f300e0..9f8e085 100644
4748

4849
/******************************************************************************
4950
* BLE Stack
50-
@@ -53,32 +52,41 @@
51+
@@ -53,13 +52,17 @@
5152
* Maximum number of simultaneous connections that the device will support.
5253
* Valid values are from 1 to 8
5354
*/
54-
-#define CFG_BLE_NUM_LINK 2
55+
-#define CFG_BLE_NUM_LINK 8
5556
+#ifndef CFG_BLE_NUM_LINK
56-
+ #define CFG_BLE_NUM_LINK 2
57+
+ #define CFG_BLE_NUM_LINK 8
5758
+#endif
5859

5960
/**
6061
* Maximum number of Services that can be stored in the GATT database.
61-
- * Note that the GAP and GATT services are automatically added so this parameter should be 2 plus the number of user services
62-
+ * Note that the GAP and GATT services are automatically added so this parameter should be 2 plus the number of user
63-
+ * services
62+
* Note that the GAP and GATT services are automatically added so this parameter should be 2 plus the number of user services
6463
*/
64+
-#define CFG_BLE_NUM_GATT_SERVICES 8
6565
+#ifndef CFG_BLE_NUM_GATT_SERVICES
66-
#define CFG_BLE_NUM_GATT_SERVICES 8
66+
+ #define CFG_BLE_NUM_GATT_SERVICES 8
6767
+#endif
6868

6969
/**
7070
* Maximum number of Attributes
71-
- * (i.e. the number of characteristic + the number of characteristic values + the number of descriptors, excluding the services)
72-
- * that can be stored in the GATT database.
73-
- * Note that certain characteristics and relative descriptors are added automatically during device initialization
74-
- * so this parameters should be 9 plus the number of user Attributes
75-
+ * (i.e. the number of characteristic + the number of characteristic values + the number of descriptors, excluding the
76-
+ * services) that can be stored in the GATT database. Note that certain characteristics and relative descriptors are
77-
+ * added automatically during device initialization so this parameters should be 9 plus the number of user Attributes
71+
@@ -68,13 +71,17 @@
72+
* Note that certain characteristics and relative descriptors are added automatically during device initialization
73+
* so this parameters should be 9 plus the number of user Attributes
7874
*/
7975
-#define CFG_BLE_NUM_GATT_ATTRIBUTES 68
8076
+#ifndef CFG_BLE_NUM_GATT_ATTRIBUTES
@@ -83,7 +79,7 @@ index 4f300e0..9f8e085 100644
8379

8480
/**
8581
* Maximum supported ATT_MTU size
86-
* This parameter is ignored by the CPU2 when CFG_BLE_OPTIONS is set to 1"
82+
* This parameter is ignored by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY flag set
8783
*/
8884
-#define CFG_BLE_MAX_ATT_MTU (156)
8985
+#ifndef CFG_BLE_MAX_ATT_MTU
@@ -92,23 +88,18 @@ index 4f300e0..9f8e085 100644
9288

9389
/**
9490
* Size of the storage area for Attribute values
95-
- * This value depends on the number of attributes used by application. In particular the sum of the following quantities (in octets) should be made for each attribute:
96-
+ * This value depends on the number of attributes used by application. In particular the sum of the following
97-
+ * quantities (in octets) should be made for each attribute:
98-
* - attribute value length
99-
* - 5, if UUID is 16 bit; 19, if UUID is 128 bit
100-
* - 2, if server configuration descriptor is used
101-
@@ -87,14 +95,18 @@
91+
@@ -87,14 +94,18 @@
10292
* The total amount of memory needed is the sum of the above quantities for each attribute.
103-
* This parameter is ignored by the CPU2 when CFG_BLE_OPTIONS is set to 1"
93+
* This parameter is ignored by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY flag set
10494
*/
95+
-#define CFG_BLE_ATT_VALUE_ARRAY_SIZE (1344)
10596
+#ifndef CFG_BLE_ATT_VALUE_ARRAY_SIZE
106-
#define CFG_BLE_ATT_VALUE_ARRAY_SIZE (1344)
97+
+ #define CFG_BLE_ATT_VALUE_ARRAY_SIZE (1344)
10798
+#endif
10899

109100
/**
110101
* Prepare Write List size in terms of number of packet
111-
* This parameter is ignored by the CPU2 when CFG_BLE_OPTIONS is set to 1"
102+
* This parameter is ignored by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY flag set
112103
*/
113104
// #define CFG_BLE_PREPARE_WRITE_LIST_SIZE BLE_PREP_WRITE_X_ATT(CFG_BLE_MAX_ATT_MTU)
114105
-#define CFG_BLE_PREPARE_WRITE_LIST_SIZE (0x3A)
@@ -118,7 +109,7 @@ index 4f300e0..9f8e085 100644
118109

119110
/**
120111
* Number of allocated memory blocks
121-
@@ -106,12 +118,16 @@
112+
@@ -106,12 +117,16 @@
122113
/**
123114
* Enable or disable the Extended Packet length feature. Valid values are 0 or 1.
124115
*/
@@ -137,7 +128,7 @@ index 4f300e0..9f8e085 100644
137128

138129
/**
139130
* Sleep clock accuracy in Master mode
140-
@@ -124,24 +140,32 @@
131+
@@ -124,7 +139,9 @@
141132
* 6 : 21 ppm to 30 ppm
142133
* 7 : 0 ppm to 20 ppm
143134
*/
@@ -147,14 +138,22 @@ index 4f300e0..9f8e085 100644
147138
+#endif
148139

149140
/**
150-
* Source for the low speed clock for RF wake-up
151-
* 1 : external high speed crystal HSE/32/32
152-
* 0 : external low speed crystal ( no calibration )
141+
* LsSource
142+
@@ -132,21 +149,27 @@
143+
* - bit 0: 1: Calibration for the RF system wakeup clock source 0: No calibration for the RF system wakeup clock source
144+
* - bit 1: 1: STM32W5M Module device 0: Other devices as STM32WBxx SOC, STM32WB1M module
153145
*/
154-
-#define CFG_BLE_LSE_SOURCE 0
146+
-#if defined(STM32WB5Mxx)
147+
- #define CFG_BLE_LSE_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LSE_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LSE_MOD5MM_DEV)
148+
-#else
149+
- #define CFG_BLE_LSE_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LSE_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LSE_OTHER_DEV)
155150
+#ifndef CFG_BLE_LSE_SOURCE
156-
+ #define CFG_BLE_LSE_SOURCE 0
157-
+#endif
151+
+ #if defined(STM32WB5Mxx)
152+
+ #define CFG_BLE_LSE_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LSE_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LSE_MOD5MM_DEV)
153+
+ #else
154+
+ #define CFG_BLE_LSE_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LSE_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LSE_OTHER_DEV)
155+
+ #endif
156+
#endif
158157

159158
/**
160159
* Start up time of the high speed (16 or 32 MHz) crystal oscillator in units of 625/256 us (~2.44 us)
@@ -174,13 +173,13 @@ index 4f300e0..9f8e085 100644
174173

175174
/**
176175
* Viterbi Mode
177-
@@ -199,5 +223,4 @@
176+
@@ -234,5 +257,5 @@
178177

179-
#define CFG_BLE_RX_MODEL_CONFIG SHCI_C2_BLE_INIT_RX_MODEL_AGC_RSSI_LEGACY
178+
#define CFG_BLE_RX_PATH_COMPENS (0)
180179

181-
-
182180
-#endif /*APP_CONF_H */
183181
+#endif /* APP_CONF_DEFAULT_H */
182+
184183
--
185-
2.31.1.windows.1
184+
2.33.0.windows.1
186185

0 commit comments

Comments
 (0)