Tool/software: Code Composer Studio
Hi,
I try to erase and program data for Flash Memory (TMS570LS3137) with F021 API,
However both operations don't success.
I want to erase and program data to "FlashBank1 Sector0".
My code looks like as follows.
What's the wrong with my code?
// Erase Phase
Fapi_initializeFlashBanks(50);
Fapi_setActiveFlashBank(Fapi_FlashBank1);
Fapi_enableMainBankSectors(Fapi_FlashSector0);
Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, (uint32_t *)0x00180000U);
while(Fapi_Status_FsmBusy == Fapi_checkFsmForReady());
// Program Phase
Fapi_initializeFlashBanks(50);
Fapi_setActiveFlashBank(Fapi_FlashBank1);
Fapi_enableMainBankSectors(Fapi_FlashSector0);
Fapi_issueProgrammingCommand((uint32_t *)0x00180000U,
pu8DataBuffer,
u8DataBufferSizeInBytes,
0,
0,
Fapi_AutoEccGeneration);
while(Fapi_Status_FsmBusy == Fapi_checkFsmForReady());