s32k312 erase/write flash cost time

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

s32k312 erase/write flash cost time

232 Views
vurtual
Contributor II

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:

            do
            {
                C40Status = C40_Ip_MainInterfaceWriteStatus()/C40_Ip_MainInterfaceSectorEraseStatus();
            }
            while (STATUS_C40_IP_BUSY == C40Status);
asynchronous mode not used the do-while.
0 Kudos
Reply
0 Replies