Re: microcontroller problem
Good programming practice says fill the unused areas with code that will *TRY* to recover the situation. For example, fill with NOP instructions so at least no harm is done and the program counter eventually rolls over back to the reset vector. A better way is to fill the space with instructions to jump to the reset vector but again, if the instruction is multi-byte, you could crash into the middle of the instruction and do something completely different.
Of course, there's no guarantee you crash into unused memory anyway, you could be running loops in your existing code or polling some hardware that will never respond.
In short, apart from a hardware watchdog AND suitably written code to reset it, there is no way to be sure of recovery.
Brian.