In my project I want to set the configuration of the RTC based on the reset source. If a reset is done via hardware reset NRST, the RTC shall be set to zero.
If there was a reset due to wake up from standby or shutdown mode, then the RTC configuration should not be erased. (I think, in that case I have a software reset of the core). This can be achieved via RCC register which stores if the reason of the reset.
How can I detect whether the controller was reset via SWD Debugger?
The debugger should not reset the RTC in my case. I found nothing about that in the reference manual. My specific model is the STM32G071, but I think that question might apply to most of the STM32.