Moved WWDG reset detection code to WWDG thread.