flash erase/write of the S32K312, when using synchronous mode, takes very little time about 25S, but when using asynchronous mode, it takes a long time about 80S.They all use the following functions:erase flash:C40_Ip_MainInterfaceSectorEraseStatus(),C40_Ip_GetSectorNumberFromAddress(),C40_Ip_ClearLock(),C40_Ip_MainInterfaceSectorErase():erase 848K,C40_Ip_Compare():compare 848k. write flash:C40_Ip_MainInterfaceWriteStatus(),C40_Ip_ClearLock(),C40_Ip_MainInterfaceWrite():every time write 128Byte,C40_Ip_Compare():every time compare 4K
synchronous mode will use this code: