BLE_HeartRateThreadX Application Description

How to use the Heart Rate profile as specified by the BLE SIG with ThreadX OS.

Notes

  1. Care must be taken when using HAL_Delay(), this function provides accurate delay (in milliseconds) based on variable incremented in TIM2 ISR. This implies that if HAL_Delay() is called from a peripheral ISR process, then the TIM2 interrupt must have higher priority (numerically lower) than the peripheral interrupt. Otherwise the caller ISR process will be blocked. To change the TIM2 interrupt priority you have to use HAL_NVIC_SetPriority() function.

  2. The application needs to ensure that the TIM2 time base is always set to 1 millisecond to have correct HAL operation.

  3. SysTick is used byt timebase by ThreadX OS.

Keywords

Connectivity, BLE, BLE protocol, BLE pairing, BLE profile, ThreadX

Directory contents

Hardware and Software environment

How to use it?

In order to make the program work, you must do the following: - Open IAR toolchain - Rebuild all files and flash the board with the executable file

On the android/ios device, enable the Bluetooth communications, and if not done before:

Power on the Nucleo board with the BLE_HeartRateThreadX application.