How to use both RTC and RTC alarm on STM32?
If you already set up the RTC to count seconds for your calendar and do not want to change that, then what you asking is not possible.

However, if you ready to change some stuff then you might be able to count milliseconds or 10 milliseconds, and setup the alarm irq to waking up your device from stop mode. Once your device is awake then you add the among of millisecond to your calendar and should work.