Skip to content

Commit c6082cd

Browse files
committed
chore: update with stm32wb
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 71cd1d1 commit c6082cd

File tree

7 files changed

+45
-10
lines changed

7 files changed

+45
-10
lines changed

.github/workflows/compile-examples.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
- STMicroelectronics:stm32:Eval:pnum=STEVAL_MKSBOX1V1,usb=CDCgen
2828
- STMicroelectronics:stm32:Nucleo_64:pnum=NUCLEO_L476RG
2929
- STMicroelectronics:stm32:Disco:pnum=B_L475E_IOT01A
30+
- STMicroelectronics:stm32:Nucleo_64:pnum=P_NUCLEO_WB55RG
31+
- STMicroelectronics:stm32:Nucleo_64:pnum=P_NUCLEO_WB55_USB_DONGLE
3032

3133
steps:
3234
- uses: actions/checkout@v4

.github/workflows/spell-check.yml

+7
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,10 @@ jobs:
2323

2424
- name: Spell check
2525
uses: codespell-project/actions-codespell@v2
26+
with:
27+
check_filenames: true
28+
check_hidden: true
29+
# In the event of a false positive, add the word in all lower case to this file:
30+
# ignore_words_file: ./extras/codespell-ignore-words-list.txt
31+
skip: src/utility/STM32_WPAN
32+
path: src

README.md

+27-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
# STM32duinoBLE
22

3-
This library is a fork of ArduinoBLE library to add the support of SPBTLE-RF, SPBTLE-1S, BLUENRG-M2SP, BLUENRG-LP and BLUENRG-M0 BLE modules.
3+
This library is a fork of ArduinoBLE library to add the support of STM32WB, SPBTLE-RF, SPBTLE-1S, BLUENRG-M2SP, BLUENRG-LP and BLUENRG-M0 BLE modules.
44

5-
It was successfully tested with the [X-NUCLEO-IDB05A2] or [X-NUCLEO-IDB05A1] or [X-NUCLEO-BNRG2A1] expansion board and a [NUCLEO-F401RE] or [NUCLEO-L476RG] or [NUCLEO-L053R8], with [B-L475E-IOT01A], [B-L4S5I-IOT01A], [STEVAL-MKSBOX1V1], [STEVAL-MKBOXPRO] and with [STM32L562E-DK].
5+
It was successfully tested with the [NUCLEO-WB15CC], [P-NUCLEO-WB55RG], [STM32WB5MM-DK], [X-NUCLEO-IDB05A2] or [X-NUCLEO-IDB05A1] or [X-NUCLEO-BNRG2A1] expansion board and a [NUCLEO-F401RE] or [NUCLEO-L476RG] or [NUCLEO-L053R8], with [B-L475E-IOT01A], [B-L4S5I-IOT01A], [STEVAL-MKSBOX1V1], [STEVAL-MKBOXPRO] and with [STM32L562E-DK].
6+
7+
- In order to use this library with SM32WBxx series, you need to update the STM32WB Copro Wireless Binaries with stm32wbxx_BLE_HCILayer_fw.bin depending of your mcu:
8+
9+
https://github.com/STMicroelectronics/STM32CubeWB/tree/master/Projects/STM32WB_Copro_Wireless_Binaries
10+
11+
Each subdirectories contains binaries and Release_Notes.html which explain how to update it.
612

713
- In order to use this library with [STEVAL-MKSBOX1V1], you need to update the firmware of the SPBTLE-1S BLE module mounted on that board as described in the following wiki page:
814

@@ -17,6 +23,14 @@ https://www.arduino.cc/en/Reference/ArduinoBLE
1723

1824
# Configuration
1925

26+
### STM32WB
27+
28+
STM32Cube_WPAN has several configuration options, which are set in the `app_conf.h`.
29+
This package has a default configuration named `app_conf_default.h`.
30+
The user can include the file `app_conf_custom.h` to customize the BLE application.
31+
Options wrapped in `#ifndef`, `#endif` in `app_conf_default.h` can be overwritten.
32+
Additional options can be added.
33+
2034
### Shield
2135

2236
The user can include the file `ble_spi_conf.h` to define which shield and configuration to use from the following list:
@@ -70,6 +84,12 @@ This is equivalent to the below configuration using the `CUSTOM_BLE_SPI`:
7084
#define BLE_RESET D7
7185
```
7286
87+
#### Using a SPI BLE module on STM32WB
88+
89+
If required, user can use a compatible BLE module over SPI.
90+
91+
In the `ble_spi_conf.h`, define `USE_BLE_SPI`.
92+
7393
## License
7494
7595
```
@@ -91,14 +111,18 @@ License along with this library; if not, write to the Free Software
91111
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
92112
```
93113
114+
94115
B-L475E-IOT01A: https://www.st.com/en/evaluation-tools/b-l475e-iot01a.html
95116
B-L4S5I-IOT01A: https://www.st.com/en/evaluation-tools/b-l4s5i-iot01a.html
96117
NUCLEO-F401RE: https://www.st.com/en/evaluation-tools/nucleo-f401re.html
97118
NUCLEO-L053R8: https://www.st.com/en/evaluation-tools/nucleo-l053r8.html
98119
NUCLEO-L476RG: https://www.st.com/en/evaluation-tools/nucleo-l476rg.html
120+
NUCLEO-WB15CC: https://www.st.com/en/evaluation-tools/nucleo-wb15cc.html
121+
P-NUCLEO-WB55RG: https://www.st.com/en/evaluation-tools/p-nucleo-wb55.html
99122
STEVAL-MKSBOX1V1: https://www.st.com/en/evaluation-tools/steval-mksbox1v1.html
100123
STEVAL-MKBOXPRO: https://www.st.com/en/evaluation-tools/steval-mkboxpro.html
101124
STM32L562E-DK: https://www.st.com/en/evaluation-tools/stm32l562e-dk.html
125+
STM32WB5MM-DK: https://www.st.com/en/evaluation-tools/stm32wb5mm-dk.html
102126
X-NUCLEO-BNRG2A1: https://www.st.com/en/ecosystems/x-nucleo-bnrg2a1.html
103127
X-NUCLEO-IDB05A2: https://www.st.com/en/ecosystems/x-nucleo-idb05a2.html
104-
X-NUCLEO-IDB05A1: https://www.st.com/en/ecosystems/x-nucleo-idb05a1.html
128+
X-NUCLEO-IDB05A1: https://www.st.com/en/ecosystems/x-nucleo-idb05a1.html

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name=STM32duinoBLE
22
version=1.4.0
33
author=Arduino, SRA
44
maintainer=stm32duino
5-
sentence=Fork of ArduinoBLE library to add the support of SPBTLE-RF, SPBTLE-1S, BLUENRG-M2SP, BLUENRG-LP and BLUENRG-M0 BLE modules.
5+
sentence=Fork of ArduinoBLE library to add the support of STM32WB, SPBTLE-RF, SPBTLE-1S, BLUENRG-M2SP, BLUENRG-LP and BLUENRG-M0 BLE modules.
66
paragraph=This library supports creating a Bluetooth® Low Energy peripheral & central mode.
77
category=Communication
88
url=https://github.com/stm32duino/STM32duinoBLE

src/utility/HCISharedMemTransport.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
License along with this library; if not, write to the Free Software
1717
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1818
*/
19-
#if defined(STM32WBxx)
19+
#if defined(STM32WBxx) && !defined(USE_BLE_SPI)
2020

2121
#include "HCISharedMemTransport.h"
2222
#include "STM32_WPAN/hw.h"
@@ -778,4 +778,4 @@ int HCISharedMemTransportClass::bt_ipm_set_power(void)
778778
}
779779

780780
HCITransportInterface& HCITransport = HCISharedMemTransport;
781-
#endif /* STM32WBxx */
781+
#endif /* STM32WBxx && !USE_BLE_SPI */

src/utility/HCISpiTransport.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@
1717
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1818
*/
1919

20+
#if !defined(STM32WBxx) || defined(USE_BLE_SPI)
2021
#include "HCISpiTransport.h"
2122

22-
#if __has_include("ble_spi_conf.h")
23-
#include "ble_spi_conf.h"
24-
#endif
25-
2623
#if defined(CUSTOM_BLE_SPI)
2724
SPIClass SpiHCI(BLE_SPI_MOSI, BLE_SPI_MISO, BLE_SPI_CLK);
2825
HCISpiTransportClass HCISpiTransport(SpiHCI, BLE_CHIP_TYPE, BLE_SPI_CS, BLE_SPI_IRQ, BLE_RESET, BLE_SPI_FREQ, BLE_SPI_MODE);
@@ -1404,3 +1401,4 @@ void HCISpiTransportClass::wait_for_set_address()
14041401
}
14051402

14061403
HCITransportInterface& HCITransport = HCISpiTransport;
1404+
#endif // !STM32WBxx || USE_BLE_SPI

src/utility/HCITransport.h

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222

2323
#include <Arduino.h>
2424

25+
#if __has_include("ble_spi_conf.h")
26+
#include "ble_spi_conf.h"
27+
#endif
28+
2529
class HCITransportInterface {
2630
public:
2731
virtual int begin() = 0;

0 commit comments

Comments
 (0)