Skip to main content
DPiór.1
Associate III
September 1, 2025
Solved

issue with RTC Calendar alongside BLE on STM32WB

  • September 1, 2025
  • 1 reply
  • 353 views

Hello,

I’m working on a project with the STM32WB55 where I use BLE (which is working fine) and also want to use the RTC Calendar. The project was generated with STM32CubeMX, RTC is using LSE.

The problem:

  • The RTC calendar runs, but its time counting is incorrect.

  • Instead of incrementing one minute (60 seconds), it only increments 4 seconds per minute.

What I tried:

  • In app_conf.h, in the section with RTC-related macros, I modified CFG_RTCCLK_DIVIDER_CONF to different values (16, 8), but the issue remains the same.
  • In main.cpp, during RTC initialisation:

hrtc.Init.AsynchPrediv = CFG_RTC_ASYNCH_PRESCALER; 
hrtc.Init.SynchPrediv = CFG_RTC_SYNCH_PRESCALER;
I tried replacing these macros with explicit values (i.e. 127 and 255 which works on STM32L4), but the result did not change.

 

Has anyone experienced this before on STM32WB55? Any guidance or hints would be greatly appreciated.

 

Best answer by DPiór.1

Thanks for the info @STTwo-32 

Actually RTC Calendar is working good now :) I don't know why, I don't remember what I changed.

1 reply

STTwo-32
Technical Moderator
September 25, 2025

Hello @DPiór.1 

On the BLE context, Since the RTC is used for the HW timers. It may be some bad behaviors will using RTC Calendar modes. So, i may recomand you to use the Timer server utility for your application. Part 4.5 of the AN5289 Rev 18 may also help you.

Best Regards.

STTwo-32

DPiór.1
DPiór.1AuthorBest answer
Associate III
October 6, 2025

Thanks for the info @STTwo-32 

Actually RTC Calendar is working good now :) I don't know why, I don't remember what I changed.