I am working on bootloader for mpc5602p, I successfully did by using ram memory for storing all needed bootloading functions then erased complete flash and ran from ram to rewrite it. but while doing this power went off means the bootloading will fail. for that I want to try to keep two application in flash by separating flash memory to make it fail proof. for this any sample code or applications available?