Best way to "shut down" CPU after watchdog has been enabled, 32F417/437
I realise one cannot disable the watchdog, short of a full reset.
One method would be to leave a "magic number" somewhere, say in one of the RTC locations, do a reboot, and if that is found at power-up, you don't enable the watchdog and you perform a shutdown, using the WFI etc method.
But that's not really the point, and it is not safe.
I wonder what would be the most effective thing possible. The watchdog will still be tripping so probably the best way would be to select slowest clock (I have a 25MHz external xtal and a 32768Hz external RTC xtal) and stay in a loop pulsing the watchdog. What is the best way to do this? Perhaps switching to the 16MHz internal oscillator and setting the PLL for the slowest clock?
Any tips much appreciated.
