On a MPC5554 chip, I erased the entire shadow area. Now, during debugging I found that the internal flash is disabled, how can I recover?
I am afraid your device is now censored.
Censorship is very sensitive thing. It is needed to use it very carefully, because an inappropriate usage can lead in making the device useless. If you accidentally erase shadow flash there is no chance to recover it (unless it had been though about before).
If your device is censored and you don’t have any pre-prepared recovery code located in the internal flash memory, there is no way how to unlock it and everything you can do is to order new sample, and re-solder it instead of the censored one.
So I would recommend to study following appnote:
You can try to play with BOOTCFG pins. If you switch to serial boot mode, debugger should work but internal flash is not accessible.
If shadow flash is erased on MPC5554 (MCU is censored), it behaves according following table:
SIU_RSR(BOOTCFG[0:1]) , boot mode, internal flash state, nexus state
00, internal boot, enabled, disabled
01, serial boot, disabled, enabled
10, external boot, disabled, enabled
11, external boot, disabled, enabled
Retrieving data ...