This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS570LC4357: After erase the bank of flash, the data in flash is not all 0xFF

Part Number: TMS570LC4357

Tool/software: Code Composer Studio

Hello sir

the following is my erase function code:

enum e_flash_status Flash_EraseBanks(Fapi_FlashBankType oNewFlashBank)
{
    int num = 0;
    Fapi_StatusType oReturnCheck = Fapi_Status_Success;

    num = find_sector(oNewFlashBank, 0);

    /* Initialize flash bank for API operations */
    oReturnCheck = Fapi_initializeFlashBanks(150);
    if ((oReturnCheck == Fapi_Status_Success) && (FLASH_CONTROL_REGISTER->FmStat.FMSTAT_BITS.BUSY != Fapi_Status_FsmBusy))
    {
        /* Set Flash Bank Activate */
       oReturnCheck = Fapi_setActiveFlashBank(oNewFlashBank);
       if ((oNewFlashBank == Fapi_FlashBank0) || (oNewFlashBank == Fapi_FlashBank1))
       {
           oReturnCheck = Fapi_enableMainBankSectors( 0xFFFF );
       }
       else if( oNewFlashBank == Fapi_FlashBank7 )
       {
           oReturnCheck = Fapi_enableEepromBankSectors(0xFFFFFFFF, 0x0);
       }
       while(FLASH_CONTROL_REGISTER->FmStat.FMSTAT_BITS.BUSY == Fapi_Status_FsmBusy);

       oReturnCheck = Fapi_issueAsyncCommandWithAddress(Fapi_EraseBank, (uint32_t*)(gSector_List[num].low_addr));
       /* Place specific example code here */
       /* Wait for FSM to finish */
       while(FLASH_CONTROL_REGISTER->FmStat.FMSTAT_BITS.BUSY == Fapi_Status_FsmBusy);
       /* Check the FSM Status to see if there were no errors */
       if (FLASH_CONTROL_REGISTER->FmStat.u32Register != 0)
       {
           /* Put Error handling code here */
           return flash_failure;
       }
    }
    return flash_succeed;
}

according to step to debug, I find every API of F021 return success.

but the data in flash is not all 0xFF, as following picture