Ok, let me to explain my application:
Our product is a control panel (buttons, LCD, some inputs - outputs etc.) We were buying a core module (with on-board processor, RAM, Flash, RTC, and many I/O). And we designed our own core module by using MC9S12D64 and 512KB RAM (by using external bus feature) and RTC instead of old core module.
We use the same pin configuration with old core module. Our purpose was to use new core instead of old core without changing anything in control panel.
For certification we must pass some EMC tests. We passed these tests with old core module. We passed many of them with new module. But failed at ESD test. In this test applied our control panel 8kV (air) and 6kV contact (at the metal surface of panel). Under this test condition MC9S12D64 is getting master clear reset.
I think about first improving core module's PCB two layers to four layers. And some other improvements PCB design. What would you advice me additional? (I think that one of the most critical part of the core is external RAM signals. Especially chip enables, address - data buses. What kind of configuration do you advice me? And I am planning to do all of the unused I/Os configuring output. Do you think that I must tied them to VDD or VSS?)
And for defensive software how can I fill unused program memory area with jump to known place (I saw at AN1263). Thanks...