After coming out of stop, I am unlocking watchdog and reconfiguring it in the very next line. However, while unlocking MCU gets a hard fault. How do I prevent hard fault from occurring?
After waking up from stop mode, I need to configure the watchdog refresh again. At this point, I am getting a hard fault. This isn't seen when I configure before entering stop mode.
Thanks for your reply. I understand what you mean. Could you please first test by disabling the watchdog code after waking up from stop mode? Can it work properly then? We're doing this to narrow down the issue and confirm whether it's a watchdog configuration problem.