Can you write values to the RTC counter registers(RTC_CNTL/RTC_CNTH) after you've set them to an intial value?
I've been trying to implement a clock and calendar into my solar tracker project(using an stm32f103) so that I can set at which time it should go to sleep ( and for how long) , but every time the board goes into standby the counter -unfortunately- gets reset. To counter act that, I tried writing the values of the counter register into the backup registers (which worked just fine) writing these values back to the counter registers turned out to be quite a hassle however, and it just never seemed to work for me. I did disable the write protection and enabled the CNF bit mind you, but their values just wouldn't change .