I am facing a very strange behaviour of my S12XEP based board (some prototype board).
There is a bootloader and some main application in P-Flash memory.
I store startup address of main app in D-Flash so when the uC starts, it enters into bootloader code, reads the address from D-Flash memory and performes jump to that address (where main app is).
The strange thing is that from time to time the uC does not start the main app.
The first inspection shows that the bootloader is working ok, but is not able to jump to the main app.
I have had no time to examine it more deeply yet but I suppose the main app code is still there (it is in the same memory type as bootloader) but the D-Flash is erased. If so then the bootloader would not make jump.
Today it happened when I disconnected DB9 plug connecting USB CAN interface and board cable harness.
Tried to repeat that several times with no effects.
Any ideas? Anyone facing something similar? The only thing I can think of now is some ESD.
It already happened several times.