Hi, SaiDe,
Do you use CW tools or flash programmer tools?
This is the security procedure, after Reset, the address P:0x40c is copied to FTFL_FSEC register automatically, only when the SEC bits is 2b'10 can the chip is in unsecurity mode. When you execute "mass erase" instruction, all flash including 0x40C are 0xFFFF, but the MC56F84789 is still in Unsecurity mode, after power on reset, the 0xff is copied to FTFL_FSEC, the chip is in security mode.
can you tell the background of the error?
BR
Xiangjun rong