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.

FlashGainPump problem in Concerto M3

Other Parts Discussed in Thread: CONTROLSUITE

Dear support,

We perform properly flash m3/c28 programming on devices F28M35H52C1RFPT_YF19A5VRW G4,
DID0= 0x20400000,DID1= 0x1154804C .

Now we'get  devices F28M35H52C1RFPT_YFB_39C2VKW G4,
 DID0= 0x20400001,DID1= 0x11548044 .

 We perform programming during Flash API library and and our programming doesn't work at all. We don't manage to erase flash sectors om M3.

Uint32 EraseSector(Uint32 uiSectorStartAddress)
{
 Fapi_FlashStatusWordType   oFlashStatusWord;
 Log_info1("before Fapi_issueAsyncCommandWithAddress 0x%x", uiSectorStartAddress);
 Fapi_StatusType oReturnCheck = Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector,
   (uint32 *)uiSectorStartAddress);

 // Wait until FSM is done with erase sector operation
 while (Fapi_checkFsmForReady() != Fapi_Status_FsmReady){}

 // Verify that SectorG is erased.  The Erase step itself does a verify as
 // it goes.  This verify is a 2nd verification that can be done.
 Log_info1("before Fapi_doBlankCheck 0x%x", uiSectorStartAddress);
 oReturnCheck = Fapi_doBlankCheck((uint32 *)uiSectorStartAddress,
   Bzero_16KSector_u32length,
   &oFlashStatusWord);

 Log_info2("after  Fapi_doBlankCheck 0x%x return status = 0x%x", uiSectorStartAddress, oReturnCheck);
 if(oReturnCheck |= Fapi_Status_Success)
 {
  // Check Flash API documentation for possible errors
  // If Erase command fails, use Fapi_getFsmStatus() function to get
  // the FMSTAT register contents
  // to see if any of the EV bit, ESUSP bit, CSTAT bit or VOLTSTAT bit is
  // set (Refer to API documentation for more details)
  Fapi_FlashStatusType status = Fapi_getFsmStatus();

    FlashError(oReturnCheck);
 }
 return oReturnCheck;
}

for the sectors that we try to erase (A,B,C,D,E,F)we get  Fapi_getFsmStatus = 0x11.
Sometimes i can program device in the debugger(erase succeed), but can not do it without debugger at all. I uploaded symbolTtable from device to PC and see that Fapi_getFsmStatus = 0x11 after erase of all devices.

 our FlashConfiguration is the following:

void configFlashAPI(void)
{

 Fapi_StatusType            oReturnCheck;
 Fapi_FlashBankSectorsType  oFlashBankSectors;
 // Disable Protection
 HWREG(SYSCTL_MWRALLOW) =  0xA5A5A5A5;
 // Disable Protection

 DCSMUnlockZone1CSM (&Zone1KEY);
 DCSMUnlockZone2CSM (&Zone2KEY);

 // Gain flash pump semaphore
 // This function must reside in RAM
 FlashGainPump();
 oReturnCheck = Fapi_initializeAPI(F021_CPU0_BASE_ADDRESS, 75);
 do
 {
  if(oReturnCheck |= Fapi_Status_Success)
  {
   //Check Flash API documentation for possible errors
   FlashError(oReturnCheck);
   break;
  }
   Fapi_LibraryInfoType oLibInfo = Fapi_getLibraryInfo();

    HWREG(FLASH_CONFIG_BASE + FLASHCTRL_O_FRDCNTL) = (1 << FLASHCTRL_FRDCNTL_RWAIT_S);

 
  oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank0);
  if(oReturnCheck |= Fapi_Status_Success)
  {
      FlashError(oReturnCheck);
   break;
  }

  Fapi_DeviceInfoType info = Fapi_getDeviceInfo();
   oReturnCheck = Fapi_getBankSectors(Fapi_FlashBank0,&oFlashBankSectors);
  if(oReturnCheck |= Fapi_Status_Success)
  {
     FlashError(oReturnCheck);
   break;
  }
 }while(0);

 HWREG(FLASH_ERROR_BASE + FLASHERR_O_ECC_ENABLE) = 0x0;
 Fapi_flushPipeline();

 return;
}

what is the difference between two revisions that can influence on the M3 flash programming?
Could you please help us with this problem ASAP, becouse all our new devices that we'get could not be programmed.
 
C28 Programming work properly in both devices. 

Thanks,Sabina

  • Dear support,

    In additional to the above, I tryed again the example from C:\ti\controlSUITE\libs\utilities\flash_api\f28m35x\v100\example\m3\ccs. I changed a code that it will not erase flash in the end of the program:
    Comment "Erase sectorsL" an// Erase Sector // Erase Sector K ".
    The 1st time programm run good and erase all sectors, after iI reload the program from CCS (in debug mode) i get the error in SectorK erased.

    could you please repeat this scenario?

    thanks,Sabina

     

  • Sabina,

    Please make sure to not remove the contents of Fapi_StatusType Fapi_setupBankSectorEnable(void)function in Fapi_UserDefinedFunctions.c file when you compile.  This is needed to allow erase operation for Flash sectors.

    Looks like the latest Flash API reference guide mentions that this function is not applicable for Concerto devices which is not correct.  This function is needed.  We will correct the documentation.

    Thanks and regards,
    Vamsi

  • Hi Vamsi,

    We added Fapi_StatusType Fapi_setupBankSectorEnable() function calling in configFlashAPI() and now it work good. Thanks for help.

    we use Flash API ver 1.53, but function Fapi_getLibraryInfo() return version 1.52 (the same as for ver 1.52).
    Do you forgot to change the versionNumber or I miss something here?

    Thanks, Sabina

  • Sabina,

    Good that it worked.

    On your API version question:  Reason we moved from V1.52 to V1.53 is to add the F2837xD Flash API libraries which will return the version number as 1.53.  For F28M35x and F28M36x Flash API libraries, the version number would still be V1.52 because we did not make any changes or fixes to those libraries.  You are correct that F28M35x and F28M36x libraries return the version number as V1.52.  I can add this detail in the API reference guide to remove the confusion.  

    Thanks and best regards,

    Vamsi