Full Firmware Package for the STM32WB series: HAL+LL drivers, CMSIS, BSP, MW, plus a set of Projects (examples and demos) running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits).
I'm working on a custom board, trying to adapt the BLE_HeartRateFreeRTOS to work on a STM32WB55CEU6. So far i have been able to discover and connect to the MCU and call the characteristics in the Heart Rate service:
Body Sensor Location
Heart Rate Control point
As well as the generic and device services.
I can see the MCU does receive the HRS_NOTIFICATION_ENABLED/DISABLED notifications, as I'm able to toggle an LED in this callback.
It seems like the HW-timer does not run properly.
NOTE: the MCU does not crash, it just doesn't notify the client.
Describe the set-up
MCU: STM32WB55CEU6
Code generated with CubeMX 6.2.1
Toolchain: Makefile
Additional context
Below is the void HRS_Notification(HRS_App_Notification_evt_t *pNotification) implementation:
void HRS_Notification(HRS_App_Notification_evt_t *pNotification) {
/* USER CODE BEGIN HRS_Notification_1 */
/* USER CODE END HRS_Notification_1 */
switch (pNotification->HRS_Evt_Opcode) {
/* USER CODE BEGIN HRS_Notification_HRS_Evt_Opcode */
/* USER CODE END HRS_Notification_HRS_Evt_Opcode */
#if (BLE_CFG_HRS_ENERGY_EXPENDED_INFO_FLAG != 0)
case HRS_RESET_ENERGY_EXPENDED_EVT:
/* USER CODE BEGIN HRS_RESET_ENERGY_EXPENDED_EVT */
HRSAPP_Context.MeasurementvalueChar.EnergyExpended = 0;
HRSAPP_Context.ResetEnergyExpended = 1;
/* USER CODE END HRS_RESET_ENERGY_EXPENDED_EVT */
break;
#endif
case HRS_NOTIFICATION_ENABLED:
/* USER CODE BEGIN HRS_NOTIFICATION_ENABLED */
/**
* It could be the enable notification is received twice without the disable notification in between
*/
HW_TS_Stop(HRSAPP_Context.TimerMeasurement_Id);
HW_TS_Start(HRSAPP_Context.TimerMeasurement_Id, HRSAPP_MEASUREMENT_INTERVAL);
led1_blink_delay = 100;
/* USER CODE END HRS_NOTIFICATION_ENABLED */
break;
case HRS_NOTIFICATION_DISABLED:
/* USER CODE BEGIN HRS_NOTIFICATION_DISABLED */
led1_blink_delay = 500;
HW_TS_Stop(HRSAPP_Context.TimerMeasurement_Id);
/* USER CODE END HRS_NOTIFICATION_DISABLED */
break;
#if (BLE_CFG_OTA_REBOOT_CHAR != 0)
case HRS_STM_BOOT_REQUEST_EVT:
/* USER CODE BEGIN HRS_STM_BOOT_REQUEST_EVT */
*(uint32_t *)SRAM1_BASE = *(uint32_t *)pNotification->DataTransfered.pPayload;
NVIC_SystemReset();
/* USER CODE END HRS_STM_BOOT_REQUEST_EVT */
break;
#endif
default:
/* USER CODE BEGIN HRS_Notification_Default */
/* USER CODE END HRS_Notification_Default */
break;
}
/* USER CODE BEGIN HRS_Notification_2 */
/* USER CODE END HRS_Notification_2 */
return;
}
Screenshots
Screenshot of clock config (sorry for poor resolution):
Dear ST
I'm working on a custom board, trying to adapt the BLE_HeartRateFreeRTOS to work on a STM32WB55CEU6. So far i have been able to discover and connect to the MCU and call the characteristics in the
Heart Rate
service:I can see the MCU does receive the
HRS_NOTIFICATION_ENABLED/DISABLED
notifications, as I'm able to toggle an LED in this callback. It seems like the HW-timer does not run properly. NOTE: the MCU does not crash, it just doesn't notify the client.Describe the set-up
Additional context Below is the
void HRS_Notification(HRS_App_Notification_evt_t *pNotification)
implementation:Screenshots Screenshot of clock config (sorry for poor resolution):
Regards.