 Most embedded systems have a watchdog timer.This watchdog should be external to the microcontroller so that it is likely to be immune to any plausible electromagnetic interference.It should reset the power supply, briefly switching it off.