cancel
Showing results for 
Search instead for 
Did you mean: 

Troubleshooting RTC_WKUP_IRQ_Handler in STM32WB BLE Applications

JR2963
Senior

Hi,

I am using BLE with FreeRTOS on STM32WB (dual core). I noticed that for BLE functionality, hw_timerserver.c is used, which is driven by the RTC timer. I have two questions about this:

1)  Since I am already running FreeRTOS, wouldn't it be better to replace this timerserver with osTimer - FreeRTOS timers? Or is there a specific reason why this is not a good idea?
2) I am not sure how the RTC is connected with the IRQ Handler, but very often my program ends up in an unexpected interrupt area. Later, I found out it is related to the RTC_WKUP_IRQ_Handler. It seems this IRQ handler is not connected to hw_timerserver.c (I couldn't find this handler in the code, I only found HW_TS_RTC_Wakeup_Handler() and HAL_RTCEx_WakeUpTimerIRQHandler, but it seems the code never reaches these.

Thank you!

1 REPLY 1
STTwo-32
ST Employee

Hello @JR2963 

1) The use of the hardware timerserver driven by the RTC timer in STM32WB BLE applications, as seen in the context, is a design choice made by the developers. So, changing to osTimer - FreeRTOS timers may be a good idea but we can't guarantee if it will work correctly or if it has any side effect on the project.

2) To resolve the issue, you would need to review the NVIC configuration and ensure that the interrupt handlers are correctly mapped and prioritized according to the system's requirements.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.