cancel
Showing results for 
Search instead for 
Did you mean: 

RTC_AlarmIRQHandler not working in BLE applications on STM32WB MCUs

bechymar
Associate

Hello,

I am having issues with RTC Alarms in BLE applications on my STM32WB boards. If BLE isn't turned on, the alarms work correctly. When I turn BLE on, the alarms stop working. After some debugging, I found out that the RTC registers are set up correctly, and the alarms trigger their respective hardware interrupt flag, but for some reason RTC_AlarmIRQHandler doesn't get executed. This behavior happens in both my custom BLE application and the example BLE applications CubeMX can generate. Does anyone have any tips what the issue might be? Thanks.

Edit: Forgot to mention MCU types: one board has a WB50CGU, the other one a WB55CGU.

3 REPLIES 3
lizerd
Associate III

I have the same problem, the Alarm still wakes up the core1 from standby by the alarm (I can see this by checking if(__HAL_RTC_ALARM_GET_FLAG(&hrtc,RTC_FLAG_ALRAF) != RESET) ).

But RTC_AlarmIRQHandler doesn't get executed. Been trying for a long time not to figure out why but I have given up.

I use multiple WB35CE boards.

With and without BLE.

STM32Cube_FW_WB_V1.13.0

I wold be happy if this could be solved

Remy ISSALYS
ST Employee

Hi @bechymar​,

In Init_EXTI function, can you check there is an | and not an &, like this:

void Init_Exti( void )
{
 /* Enable IPCC(36), HSEM(38) wakeup interrupts on CPU1 */
 LL_EXTI_EnableIT_32_63( LL_EXTI_LINE_36 | LL_EXTI_LINE_38 );
 return;
}

Best Regards

Hello,

If system has been woken-up by an RTC alarm, a software event must be genarated to trigger the IT. NVIC and EXTI must be reconfigured properly before trigerring the event.

Best Regards