There is an example entitled 'PWR_STOP_RTC'. Itshows how to enter Stop mode and wake up from this mode by using the RTC wakeup timer event connected to an interrupt.
You can refer to this exampleto figure out if you are missing something in your configuration.