I am designing migration process for S12XE based application.
The old one is storing data directly into D-Flash.
The new one is to be using EEEPROM.
We have a CAN bootloader to update firmware.
Freescale application notes AN3490 and AN3743 together with reference manual say D-Flash is required to be fully erased before performing Partition D-Flash command.
As there is only 4k RAM it may be difficult to backup all D-Flash data (> 4k) for the time of partitioning process (and to risky due to volatile nature of RAM). Copying that data into P-Flash is not a best option for us neither...
So I did some tests and found no problems partitioning non-erased D-Flash with Partition D-Flash command.
New application was uploaded into S12XE in place of the old one and did partitioning on its first run.
No error flags had been set, the process seemed to be succesfull, old data was left unchanged.
All D-Flash data is stored outside EEE NVM region of D-Flash so it is safe in this aspect.
I was not able to find explanaitions why D-Flash is to be in fully erased state before Partitioning...
The EEEPROM seems to be a very elegant solution overally and I would really make sure I am safe partitioning D-Flash without erasing it first. I can erase EEE NVM region if it is required but it would be great to leave the rest of D-Flash part untouched.
Why D-Flash to be erased before partitioning?
Am I safe othervise?