This is a fork of mbed-os-example-ble-HeartRate maintained for Sequana compatibility. This application transmits a heart rate value using the Bluetooth SIG Heart Rate Profile. The heart rate value is provided by the application itself, not by a sensor, so that you don't have to get a sensor just to run the example. The canonical source for this example lives at https://github.com/ARMmbed/mbed-os-example-ble/tree/master/BLE_HeartRate
shields/TARGET_CORDIO_BLUENRG/README.md@0:b283842072f8, 2019-02-12 (annotated)
- Committer:
- lru
- Date:
- Tue Feb 12 14:03:29 2019 +0000
- Revision:
- 0:b283842072f8
Initial version.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lru | 0:b283842072f8 | 1 | # Cordio BLE-X-NUCLEO-IDB0XA1 |
lru | 0:b283842072f8 | 2 | |
lru | 0:b283842072f8 | 3 | BLE_API wrapper Library for X-NUCLEO-IDB05A1 BlueNRG (Bluetooth Low Energy) Expansion Board. It uses ARM Cordio stack instead of the ST BlueNRG stack. |
lru | 0:b283842072f8 | 4 | |
lru | 0:b283842072f8 | 5 | ## Introduction |
lru | 0:b283842072f8 | 6 | |
lru | 0:b283842072f8 | 7 | This firmware package implements the port of BLE_API to STMicroelectronics' [X-NUCLEO-IDB05A1](https://developer.mbed.org/components/X-NUCLEO-IDB05A1-Bluetooth-Low-Energy/) Bluetooth Low Energy Nucleo Expansion Board. |
lru | 0:b283842072f8 | 8 | |
lru | 0:b283842072f8 | 9 | ### Arduino Connector Compatibility Warning |
lru | 0:b283842072f8 | 10 | |
lru | 0:b283842072f8 | 11 | X-NUCLEO-IDB05A1 is Arduino compatible with an exception: instead of using pin **D13** for the SPI clock, pin **D3** is used. |
lru | 0:b283842072f8 | 12 | The default configuration for this library is having the SPI clock on pin **D3**. |
lru | 0:b283842072f8 | 13 | |
lru | 0:b283842072f8 | 14 | To be fully Arduino compatible, X-NUCLEO-IDB05A1 needs a small HW patch. |
lru | 0:b283842072f8 | 15 | |
lru | 0:b283842072f8 | 16 | For X-NUCLEO-IDB05A1 this patch consists in removing zero resistor **R4** and instead soldering zero resistor **R6**. |
lru | 0:b283842072f8 | 17 | |
lru | 0:b283842072f8 | 18 | In case you patch your board, then you also have to configure this library to use pin **D13** to drive the SPI clock. To this aim you need to compile this driver with macro `BLUENRG_PIN_SPI_SCK=D13` defined. |
lru | 0:b283842072f8 | 19 | |
lru | 0:b283842072f8 | 20 | If you use pin **D13** for the SPI clock, please be aware that on STM32 Nucleo boards you may **not** drive the LED, otherwise you will get a conflict: the LED on STM32 Nucleo boards is connected to pin **D13**. |
lru | 0:b283842072f8 | 21 | |
lru | 0:b283842072f8 | 22 | Referring to the current list of tested platforms (see [X-NUCLEO-IDB05A1](https://developer.mbed.org/components/X-NUCLEO-IDB05A1-Bluetooth-Low-Energy/) page), the patch is required by [ST-Nucleo-F103RB](https://developer.mbed.org/platforms/ST-Nucleo-F103RB/); [ST-Nucleo-F302R8](https://developer.mbed.org/platforms/ST-Nucleo-F302R8/); [ST-Nucleo-F411RE](https://developer.mbed.org/platforms/ST-Nucleo-F411RE/); [ST-Nucleo-F446RE](https://developer.mbed.org/platforms/ST-Nucleo-F446RE/); and [FRDM-K64F](https://developer.mbed.org/platforms/FRDM-K64F/). |
lru | 0:b283842072f8 | 23 | |
lru | 0:b283842072f8 | 24 | |
lru | 0:b283842072f8 | 25 | ### Driver configuration |
lru | 0:b283842072f8 | 26 | |
lru | 0:b283842072f8 | 27 | In order to use the BlueNRG-MS module together with other targets, you need to set the macros defined in file [bluenrg_targets.h](https://github.com/ARMmbed/ble-x-nucleo-idb0xa1/blob/master/bluenrg/bluenrg_targets.h). Please, update the [mbed_lib.json](https://github.com/ARMmbed/ble-x-nucleo-idb0xa1/blob/master/mbed_lib.json) to include the list of extra macros that configure the driver for your target. |
lru | 0:b283842072f8 | 28 | |
lru | 0:b283842072f8 | 29 | ## Target Configuration |
lru | 0:b283842072f8 | 30 | |
lru | 0:b283842072f8 | 31 | To use that library, the target requires some extra configuration in the application `mbed_app.json`. In the `target_overides` section: |
lru | 0:b283842072f8 | 32 | |
lru | 0:b283842072f8 | 33 | * BLE feature has to be enabled for the target using the BlueNRG module |
lru | 0:b283842072f8 | 34 | |
lru | 0:b283842072f8 | 35 | ```json |
lru | 0:b283842072f8 | 36 | "target.features_add": ["BLE"] |
lru | 0:b283842072f8 | 37 | ``` |
lru | 0:b283842072f8 | 38 | |
lru | 0:b283842072f8 | 39 | * Extra labels have to be defined to include the cordio stack and this library: |
lru | 0:b283842072f8 | 40 | |
lru | 0:b283842072f8 | 41 | ```json |
lru | 0:b283842072f8 | 42 | "target.extra_labels_add": ["CORDIO", "CORDIO_BLUENRG"] |
lru | 0:b283842072f8 | 43 | ``` |
lru | 0:b283842072f8 | 44 | |
lru | 0:b283842072f8 | 45 | As an example, the target overide section for the `NUCLEO_F401RE` would be: |
lru | 0:b283842072f8 | 46 | |
lru | 0:b283842072f8 | 47 | ```json |
lru | 0:b283842072f8 | 48 | "NUCLEO_F401RE": { |
lru | 0:b283842072f8 | 49 | "target.features_add": ["BLE"], |
lru | 0:b283842072f8 | 50 | "target.extra_labels_add": ["CORDIO", "CORDIO_BLUENRG"] |
lru | 0:b283842072f8 | 51 | } |
lru | 0:b283842072f8 | 52 | ``` |