@@ -15,6 +15,61 @@ https://github.com/stm32duino/Arduino_Core_STM32/wiki/STM32duinoBLE#stm32duinobl
15
15
For more information about ArduinoBLE library please visit the official web page at:
16
16
https://www.arduino.cc/en/Reference/ArduinoBLE
17
17
18
+ # Configuration
19
+
20
+ ### Shield
21
+
22
+ The user can include the file ` ble_spi_conf.h ` to define which shield and configuration to use from the following list:
23
+
24
+ * [ X-NUCLEO-IDB05A2]
25
+ * ` IDB05A2_SPI_CLOCK_D3 ` : SPI clock on D3
26
+ * ` IDB05A2_SPI_CLOCK_D13 ` SPI clock on D13
27
+ * [ X-NUCLEO-IDB05A1]
28
+ * ` IDB05A1_SPI_CLOCK_D3 ` : SPI clock on D3
29
+ * ` IDB05A1_SPI_CLOCK_D13 ` : SPI clock on D13
30
+ * [ X-NUCLEO-BNRG2A1]
31
+ * ` BNRG2A1_CLOCK_D3 ` : SPI clock on D3
32
+ * ` BNRG2A1_CLOCK_D13 ` : SPI clock on D13
33
+ * ` CUSTOM_BLE_SPI ` : define a custom configuration, it requires below definition:
34
+ * ` BLE_SPI_MISO ` : SPI MISO pin
35
+ * ` BLE_SPI_MOSI ` : SPI MOSI pin
36
+ * ` BLE_SPI_CLK ` : SPI CLocK pin
37
+ * ` BLE_SPI_CS ` : SPI Chip Select pin
38
+ * ` BLE_SPI_IRQ ` : SPI IRQ pin
39
+ * ` BLE_SPI_FREQ ` : SPI bus frequency
40
+ * ` BLE_SPI_MODE ` : can be one of the below ` SPIMode ` :
41
+ * ` SPI_MODE0 `
42
+ * ` SPI_MODE1 `
43
+ * ` SPI_MODE2 `
44
+ * ` SPI_MODE0 `
45
+ * ` BLE_CHIP_TYPE ` : can be one of the below ` BLEChip_t ` :
46
+ * ` SPBTLE_RF `
47
+ * ` SPBTLE_1S `
48
+ * ` BLUENRG_M2SP `
49
+ * ` BLUENRG_M0 `
50
+ * ` BLUENRG_LP `
51
+ * ` BLE_RESET ` : BLE reset pin
52
+
53
+ #### Examples
54
+
55
+ To use the [ X-NUCLEO-IDB05A2] with SPI clock on D3, define in ` ble_spi_conf.h ` :
56
+ ``` C
57
+ #define IDB05A2_SPI_CLOCK_D3
58
+ ```
59
+ This is equivalent to the below configuration using the ` CUSTOM_BLE_SPI ` :
60
+ ``` C
61
+ #define CUSTOM_BLE_SPI
62
+ #define BLE_SPI_MISO D12
63
+ #define BLE_SPI_MOSI D11
64
+ #define BLE_SPI_CLK D3
65
+ #define BLE_SPI_CS A1
66
+ #define BLE_SPI_IRQ A0
67
+ #define BLE_SPI_FREQ 8000000
68
+ #define BLE_SPI_MODE SPI_MODE0
69
+ #define BLE_CHIP_TYPE BLUENRG_M0
70
+ #define BLE_RESET D7
71
+ ```
72
+
18
73
## License
19
74
20
75
```
0 commit comments