Skip to content

Commit b232c9a

Browse files
authored
Merge pull request #48 from fpistm/updateWB
chore: update STM32Cube_FW from Cube version v1.15.0
2 parents 777b4a4 + daa8475 commit b232c9a

File tree

12 files changed

+147
-147
lines changed

12 files changed

+147
-147
lines changed

Diff for: .editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ indent_style = space
55
indent_size = 2
66
trim_trailing_whitespace = true
77

8+
[*.md]
9+
trim_trailing_whitespace = false
10+
811
[*.sh]
912
# like -i=2
1013
indent_style = space

Diff for: .github/workflows/codespell.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ jobs:
2424
check_hidden: true
2525
# In the event of a false positive, add the word in all lower case to this file:
2626
# ignore_words_file: ./extras/codespell-ignore-words-list.txt
27-
path: src
27+
skip: src/utility/STM32Cube_FW
28+
path: src

Diff for: README.md

+14-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
# STM32duinoBLE
22

3-
This library is a fork of ArduinoBLE library to add the support of SPBTLE-RF and SPBTLE-1S BLE modules.
4-
It was successfully tested with the X-NUCLEO-IDB05A2 or X-NUCLEO-IDB05A1 or X-NUCLEO-BNRG2A1 expansion board and a NUCLEO-F401RE
5-
or NUCLEO-L476RG or NUCLEO-L053R8, with B-L475E-IOT01A and with STEVAL-MKSBOX1V1.
6-
In order to use this library with STEVAL-MKSBOX1V1, you need to update the firmware of the SPBTLE-1S BLE module
7-
mounted on that board as described in the following wiki page:
8-
3+
This library is a fork of ArduinoBLE library to add the support of STM32WBxx, SPBTLE-RF and SPBTLE-1S BLE modules.
4+
It was successfully tested with the P-NUCELO_WB55RG, STM32WB5MM-DK, X-NUCLEO-IDB05A2 or X-NUCLEO-IDB05A1 or
5+
X-NUCLEO-BNRG2A1 expansion board and a NUCLEO-F401RE or NUCLEO-L476RG or NUCLEO-L053R8, with B-L475E-IOT01A
6+
and with STEVAL-MKSBOX1V1.
7+
8+
- In order to use this library with SM32WBxx series, you need to update the STM32WB Copro Wireless Binaries
9+
with stm32wbxx_BLE_HCILayer_fw.bin depending of your mcu:
10+
https://github.com/STMicroelectronics/STM32CubeWB/tree/master/Projects/STM32WB_Copro_Wireless_Binaries
11+
Each subdirectories contains binaries and Release_Notes.html which explain how to update it.
12+
13+
- In order to use this library with STEVAL-MKSBOX1V1, you need to update the firmware of the SPBTLE-1S BLE module
14+
mounted on that board as described in the following wiki page:
915
https://github.com/stm32duino/wiki/wiki/STM32duinoBLE#stm32duinoble-with-steval_mksbox1v1
1016

11-
In order to use this library with X-NUCLEO-BNRG2A1, you need to update the firmware of the BLUENRG-M2SP BLE module
12-
mounted on that expansion board as described in the following wiki page:
13-
17+
- In order to use this library with X-NUCLEO-BNRG2A1, you need to update the firmware of the BLUENRG-M2SP BLE module
18+
mounted on that expansion board as described in the following wiki page:
1419
https://github.com/stm32duino/wiki/wiki/STM32duinoBLE#stm32duinoble-with-x-nucleo-bnrg2a1
1520

1621
For more information about ArduinoBLE library please visit the official web page at:

Diff for: src/utility/HCISharedMemTransport.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ int HCISharedMemTransportClass::stm32wb_start_ble(void)
644644
CFG_BLE_MAX_ATT_MTU,
645645
CFG_BLE_SLAVE_SCA,
646646
CFG_BLE_MASTER_SCA,
647-
CFG_BLE_LSE_SOURCE,
647+
CFG_BLE_LS_SOURCE,
648648
CFG_BLE_MAX_CONN_EVENT_LENGTH,
649649
CFG_BLE_HSE_STARTUP_TIME,
650650
CFG_BLE_VITERBI_MODE,
@@ -654,11 +654,11 @@ int HCISharedMemTransportClass::stm32wb_start_ble(void)
654654
CFG_BLE_MIN_TX_POWER,
655655
CFG_BLE_MAX_TX_POWER,
656656
CFG_BLE_RX_MODEL_CONFIG,
657-
CFG_BLE_MAX_ADV_SET_NBR,
658-
CFG_BLE_MAX_ADV_DATA_LEN,
659-
CFG_BLE_TX_PATH_COMPENS,
660-
CFG_BLE_RX_PATH_COMPENS
661-
657+
CFG_BLE_MAX_ADV_SET_NBR,
658+
CFG_BLE_MAX_ADV_DATA_LEN,
659+
CFG_BLE_TX_PATH_COMPENS,
660+
CFG_BLE_RX_PATH_COMPENS,
661+
CFG_BLE_CORE_VERSION
662662
};
663663
/**
664664
* Starts the BLE Stack on CPU2

Diff for: src/utility/STM32Cube_FW/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
## Source
33

4-
[STMicroelectronics/STM32CubeWB Release v1.14.0](https://github.com/STMicroelectronics/STM32CubeWB/releases/tag/v1.14.0)
5-
- Application: [BLE_TransparentMode](https://github.com/STMicroelectronics/STM32CubeWB/tree/v1.14.0/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_TransparentMode)
4+
[STMicroelectronics/STM32CubeWB Release vv1.15.0](https://github.com/STMicroelectronics/STM32CubeWB/releases/tag/vv1.15.0)
5+
- Application: [BLE_TransparentMode](https://github.com/STMicroelectronics/STM32CubeWB/tree/vv1.15.0/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_TransparentMode)
66

Diff for: src/utility/STM32Cube_FW/app_conf_default.h

+37-13
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* Define Tx Power
4343
*/
4444
#ifndef CFG_TX_POWER
45-
#define CFG_TX_POWER (0x18) /* -0.15dBm */
45+
#define CFG_TX_POWER (0x18) /* -0.15dBm */
4646
#endif
4747

4848
/******************************************************************************
@@ -80,7 +80,7 @@
8080
* This parameter is ignored by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY flag set
8181
*/
8282
#ifndef CFG_BLE_MAX_ATT_MTU
83-
#define CFG_BLE_MAX_ATT_MTU (156)
83+
#define CFG_BLE_MAX_ATT_MTU (156)
8484
#endif
8585

8686
/**
@@ -104,7 +104,7 @@
104104
*/
105105
// #define CFG_BLE_PREPARE_WRITE_LIST_SIZE BLE_PREP_WRITE_X_ATT(CFG_BLE_MAX_ATT_MTU)
106106
#ifndef CFG_BLE_PREPARE_WRITE_LIST_SIZE
107-
#define CFG_BLE_PREPARE_WRITE_LIST_SIZE (0x3A)
107+
#define CFG_BLE_PREPARE_WRITE_LIST_SIZE (0x3A)
108108
#endif
109109

110110
/**
@@ -118,14 +118,14 @@
118118
* Enable or disable the Extended Packet length feature. Valid values are 0 or 1.
119119
*/
120120
#ifndef CFG_BLE_DATA_LENGTH_EXTENSION
121-
#define CFG_BLE_DATA_LENGTH_EXTENSION 1
121+
#define CFG_BLE_DATA_LENGTH_EXTENSION 1
122122
#endif
123123

124124
/**
125125
* Sleep clock accuracy in Slave mode (ppm value)
126126
*/
127127
#ifndef CFG_BLE_SLAVE_SCA
128-
#define CFG_BLE_SLAVE_SCA 500
128+
#define CFG_BLE_SLAVE_SCA 500
129129
#endif
130130

131131
/**
@@ -140,35 +140,36 @@
140140
* 7 : 0 ppm to 20 ppm
141141
*/
142142
#ifndef CFG_BLE_MASTER_SCA
143-
#define CFG_BLE_MASTER_SCA 0
143+
#define CFG_BLE_MASTER_SCA 0
144144
#endif
145145

146146
/**
147147
* LsSource
148148
* Some information for Low speed clock mapped in bits field
149149
* - bit 0: 1: Calibration for the RF system wakeup clock source 0: No calibration for the RF system wakeup clock source
150-
* - bit 1: 1: STM32W5M Module device 0: Other devices as STM32WBxx SOC, STM32WB1M module
150+
* - bit 1: 1: STM32WB5M Module device 0: Other devices as STM32WBxx SOC, STM32WB1M module
151+
* - bit 2: 1: HSE/1024 Clock config 0: LSE Clock config
151152
*/
152-
#ifndef CFG_BLE_LSE_SOURCE
153+
#ifndef CFG_BLE_LS_SOURCE
153154
#if defined(STM32WB5Mxx)
154-
#define CFG_BLE_LSE_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LSE_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LSE_MOD5MM_DEV)
155+
#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)
155156
#else
156-
#define CFG_BLE_LSE_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LSE_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LSE_OTHER_DEV)
157+
#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)
157158
#endif
158159
#endif
159160

160161
/**
161162
* Start up time of the high speed (16 or 32 MHz) crystal oscillator in units of 625/256 us (~2.44 us)
162163
*/
163164
#ifndef CFG_BLE_HSE_STARTUP_TIME
164-
#define CFG_BLE_HSE_STARTUP_TIME 0x148
165+
#define CFG_BLE_HSE_STARTUP_TIME 0x148
165166
#endif
166167

167168
/**
168169
* Maximum duration of the connection event when the device is in Slave mode in units of 625/256 us (~2.44 us)
169170
*/
170171
#ifndef CFG_BLE_MAX_CONN_EVENT_LENGTH
171-
#define CFG_BLE_MAX_CONN_EVENT_LENGTH (0xFFFFFFFF)
172+
#define CFG_BLE_MAX_CONN_EVENT_LENGTH (0xFFFFFFFF)
172173
#endif
173174

174175
/**
@@ -190,8 +191,16 @@
190191
* - SHCI_C2_BLE_INIT_OPTIONS_NO_EXT_ADV
191192
* - SHCI_C2_BLE_INIT_OPTIONS_CS_ALGO2
192193
* - SHCI_C2_BLE_INIT_OPTIONS_NO_CS_ALGO2
194+
* - SHCI_C2_BLE_INIT_OPTIONS_REDUC_GATTDB_NVM
195+
* - SHCI_C2_BLE_INIT_OPTIONS_FULL_GATTDB_NVM
196+
* - SHCI_C2_BLE_INIT_OPTIONS_GATT_CACHING_USED
197+
* - SHCI_C2_BLE_INIT_OPTIONS_GATT_CACHING_NOTUSED
193198
* - SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_1
194199
* - SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_2_3
200+
* - SHCI_C2_BLE_INIT_OPTIONS_APPEARANCE_WRITABLE
201+
* - SHCI_C2_BLE_INIT_OPTIONS_APPEARANCE_READONLY
202+
* - SHCI_C2_BLE_INIT_OPTIONS_ENHANCED_ATT_SUPPORTED
203+
* - SHCI_C2_BLE_INIT_OPTIONS_ENHANCED_ATT_NOTSUPPORTED
195204
* which are used to set following configuration bits:
196205
* (bit 0): 1: LL only
197206
* 0: LL + host
@@ -203,8 +212,16 @@
203212
* 0: extended advertizing not supported
204213
* (bit 4): 1: CS Algo #2 supported
205214
* 0: CS Algo #2 not supported
215+
* (bit 5): 1: Reduced GATT database in NVM
216+
* 0: Full GATT database in NVM
217+
* (bit 6): 1: GATT caching is used
218+
* 0: GATT caching is not used
206219
* (bit 7): 1: LE Power Class 1
207220
* 0: LE Power Class 2-3
221+
* (bit 8): 1: appearance Writable
222+
* 0: appearance Read-Only
223+
* (bit 9): 1: Enhanced ATT supported
224+
* 0: Enhanced ATT not supported
208225
* other bits: reserved (shall be set to 0)
209226
*/
210227
#define CFG_BLE_OPTIONS (SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY)
@@ -257,5 +274,12 @@
257274

258275
#define CFG_BLE_RX_PATH_COMPENS (0)
259276

260-
#endif /* APP_CONF_DEFAULT_H */
277+
/* BLE core version (16-bit signed integer).
278+
* - SHCI_C2_BLE_INIT_BLE_CORE_5_2
279+
* - SHCI_C2_BLE_INIT_BLE_CORE_5_3
280+
* which are used to set: 11(5.2), 12(5.3).
281+
*/
282+
283+
#define CFG_BLE_CORE_VERSION (SHCI_C2_BLE_INIT_BLE_CORE_5_3)
261284

285+
#endif /* APP_CONF_DEFAULT_H */

Diff for: src/utility/STM32Cube_FW/ble_bufsize.h

+15-15
Original file line numberDiff line numberDiff line change
@@ -84,47 +84,47 @@
8484

8585
/*
8686
* BLE_FIXED_BUFFER_SIZE_BYTES:
87-
* A part of the RAM, is dynamically allocated by initializing all the pointers
87+
* A part of the RAM, is dynamically allocated by initializing all the pointers
8888
* defined in a global context variable "mem_alloc_ctx_p".
8989
* This initialization is made in the Dynamic_allocator functions, which
9090
* assign a portion of RAM given by the external application to the above
9191
* mentioned "global pointers".
9292
*
9393
* The size of this Dynamic RAM is made of 2 main components:
9494
* - a part that is parameters-dependent (num of links, GATT buffers, ...),
95-
* and which value is defined by the following macro;
95+
* and which value is made explicit by the following macro;
9696
* - a part, that may be considered "fixed", i.e. independent from the above
9797
* mentioned parameters.
9898
*/
9999
#if (BEACON_ONLY != 0)
100-
#define BLE_FIXED_BUFFER_SIZE_BYTES 4076 /* Beacon only */
100+
#define BLE_FIXED_BUFFER_SIZE_BYTES 4092 /* Beacon only */
101101
#elif (LL_ONLY_BASIC != 0)
102-
#define BLE_FIXED_BUFFER_SIZE_BYTES 5692 /* LL only Basic*/
102+
#define BLE_FIXED_BUFFER_SIZE_BYTES 5788 /* LL only Basic*/
103103
#elif (LL_ONLY != 0)
104-
#define BLE_FIXED_BUFFER_SIZE_BYTES 5940 /* LL only Full */
104+
#define BLE_FIXED_BUFFER_SIZE_BYTES 6036 /* LL only Full */
105105
#elif (SLAVE_ONLY != 0)
106-
#define BLE_FIXED_BUFFER_SIZE_BYTES 6204 /* Peripheral only */
106+
#define BLE_FIXED_BUFFER_SIZE_BYTES 6292 /* Peripheral only */
107107
#elif (BASIC_FEATURES != 0)
108-
#define BLE_FIXED_BUFFER_SIZE_BYTES 6532 /* Basic Features */
108+
#define BLE_FIXED_BUFFER_SIZE_BYTES 6624 /* Basic Features */
109109
#else
110-
#define BLE_FIXED_BUFFER_SIZE_BYTES 7056 /* Full stack */
110+
#define BLE_FIXED_BUFFER_SIZE_BYTES 7144 /* Full stack */
111111
#endif
112112

113113
/*
114114
* BLE_PER_LINK_SIZE_BYTES: additional memory size used per link
115115
*/
116116
#if (BEACON_ONLY != 0)
117-
#define BLE_PER_LINK_SIZE_BYTES 128 /* Beacon only */
117+
#define BLE_PER_LINK_SIZE_BYTES 112 /* Beacon only */
118118
#elif (LL_ONLY_BASIC != 0)
119-
#define BLE_PER_LINK_SIZE_BYTES 260 /* LL only Basic */
119+
#define BLE_PER_LINK_SIZE_BYTES 244 /* LL only Basic */
120120
#elif (LL_ONLY != 0)
121-
#define BLE_PER_LINK_SIZE_BYTES 260 /* LL only Full */
121+
#define BLE_PER_LINK_SIZE_BYTES 244 /* LL only Full */
122122
#elif (SLAVE_ONLY != 0)
123-
#define BLE_PER_LINK_SIZE_BYTES 392 /* Peripheral only */
123+
#define BLE_PER_LINK_SIZE_BYTES 336 /* Peripheral only */
124124
#elif (BASIC_FEATURES != 0)
125-
#define BLE_PER_LINK_SIZE_BYTES 440 /* Basic Features */
125+
#define BLE_PER_LINK_SIZE_BYTES 412 /* Basic Features */
126126
#else
127-
#define BLE_PER_LINK_SIZE_BYTES 444 /* Full stack */
127+
#define BLE_PER_LINK_SIZE_BYTES 424 /* Full stack */
128128
#endif
129129

130130
/*
@@ -155,7 +155,7 @@
155155
* Valid values are from 31 to 1650.
156156
*/
157157
#define BLE_EXT_ADV_BUFFER_SIZE(set_nbr, data_len) \
158-
(2304 + ((892 + (DIVC(data_len, 207) * 244)) * (set_nbr)))
158+
(2512 + ((892 + (DIVC(data_len, 207) * 244)) * (set_nbr)))
159159

160160
/*
161161
* BLE_TOTAL_BUFFER_SIZE_GATT: this macro returns the amount of memory,

0 commit comments

Comments
 (0)