Hi,
this must be solved on application level. The solution is to start program/erase operation and then continue your regular program flow. Do not wait until the operation is completed. Check the result of operation later somewhere in your program flow. This solution expects that you do not need to access the partition which is being erased/programmed. If it is necessary, you would have to suspend/resume the operation.
It is the principle of asynchronous flash drivers. SSD flash drivers for new MPC57xx family use this approach - FlashProgram function is used to start the program operation but the function does not wait for result. It is necessary to use FlashCheckStatus function to get the result (and initiate next sub-operations).
SSD flash drivers for MPC56xx are synchronous, so the functions wait until the operation is completed.
Regards,
Lukas