I'm not sure how the ILO/IMO can "hang". Perhaps you can elaborate on the problem or if possible attach the project.
It will help us understand the issue better.
Unexpected behaviour can come from a number of sources -
1) Code based.
2) Transient voltages outside specification limits.
3) External clock hiccups.
4) System noise.
Tracking down -
1) For code based errors, disable specific modules of code, one at a time, and see if problem
disappears. Plant a heartbeat monitor in sections of code, a pulsing led, and look for any module
that stays active after the hang, knowing whats running can also be a clue.
2) Set a scope up, DC trigger, and look for pin violations interfaced to externals. Same with
Vdd. If you get a trigger, say set for 6V on Vdd, or - 1 V on a pin, find the source and cure.
3) Using a scope, if external clock, set scope trigger for runt pulse detection. Also use scope
on xtal pins (FET probe) and look for voltage violations as discussed earlier.
4) Use a scope on infinite persistence and look at external pins, Vdd, Vss, for excessive
Just some suggestions, regards, Dana.
Of course a keyboard is a classic static problem environment.
Scope again set to trigger on V or T violations a big help. Note scopes can also be triggered
on pattern violations for multi channel scopes.