Where to read length of sleep time on RTC WUT
We are using the STM32L071RB, currently have the firmware set to go to sleep (stop mode) and wake up after ~5 minutes with the RTC WUT (see section 22.4.6 and A13.3 in RM0377). This works great, however this timer isn't the only wakeup source. If the device wakes up due to a external interrupt, the timer restarts back to another 5 minutes. So, for these external interrupt events we need to know how long it's already been asleep to compensate and have the periodic wakeup keep the same interval. My first thought was that we could just read the "wakeup timer" register to see how long it's been asleep, but can't find any information on where that is located... (RTC_WUTR is simply the reload register, so it doesn't change)
Does anyone know where the mcu is storing that counter/timer?
Alternatively we could set up with an alarm or store the RTC value before going to sleep and compare, but we are low on space and don't want to rewrite deployed code unless necessary

