Stm32 RTC wakeup from standby
The assumption about CK_SPRE being 1 Hz is caused by the fact that this is essential for correct timekeeping.

What you are missing are the wakeup counters (below wakeup clock in your screen). That is - the RTC counts the clock pulses (say coming from CK_SPRE) and only wakes you up when the count reaches the value set in wakeup counter. Assuming CK_SPRE is at 1 Hz this gives you a maximum wakeup period of 36 hours (as stated in the reference manual).

Now, where did those 48 days come from? Either the author somehow mistakenly multiplied the period by 2 ** 5 or he assumed that CK_SPRE is 1/32 Hz (which wrecks timekeeping).

There are two workarounds to this:


software counter
alarms


Software counters - simply use a variable in your code and do something like this in your main:

int i = 0;
while(true) {
    sleep(WFE); // forgot exact code
    ++i;
    if(i % 10 != 0)
        continue;

    // your stuff goes here
}


Use RTC alarms (which are just before wakeup counters in your book):


wake up (same WFE)
get current time from RTC
add N days to this time
set next alarm
do your stuff.