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.

Trouble porting Concerto C28 F021 flash example to my project

Other Parts Discussed in Thread: F28M35H52C

I'm having trouble adding the F021 Flash API to my C28 project. 
( F021 Flash API Version 1.51 is working well for the ARM Cortex-M3 part )

I'm using F28M35H52C

*C28x core - running everyting in RAM ( started fromm blinky example build in RAM )

* F021 Flash API 1.50
- F021_API_C28x_FPU32.lib

I can setup the Flash API and I'm able to call "oLibInfo = Fapi_getLibraryInfo();"
it is returning:
oLibInfo.u8ApiTechnologyType = 0x0020
oLibInfo.u8ApiMajorVersion = 0x0001
oLibInfo.u8ApiMinorVersion = 0x0032
But the code will crash as soon as I call "oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank0);
It sounds like the same: "Trouble porting Concerto M3 f021 flash example to my project"
  • I tested also Flash API  1.52 - same result on function call "Fapi_setActiveFlashBank(Fapi_FlashBank0);"

    Call of "oLibInfo = Fapi_getLibraryInfo();" is returninf those values.
    oLibInfo.u8ApiTechnologyType = 0x0020
    oLibInfo.u8ApiMajorVersion = 0x0001
    oLibInfo.u8ApiMinorVersion = 0x0032
    Any ideas ???
  • What types of checks / other calls are happing within the function: Fapi_setActiveFlashBank(Fapi_FlashBank0);

    that could course the application to crash?

  • Edwin,

    Did you look at the errata item below?

    Advisory — Flash ECC: C28x 'Flash Uncorrectable' Error Generated When Executing F021 Flash API Functions with Flash ECC Enabled

    Thanks and regards,

    Vamsi

  • Yes,  I'm able to execute the function.

    I'm also able to program the Flash by using the follwong command.

                        oReturnCheck = Fapi_issueProgrammingCommand( pProgMemAddress, buf16, 8,    0,    0, Fapi_AutoEccGeneration);

    BUT, I'm not able to erase the Flash - Using Erase_Bank or Erase_Sector, same result.

                        pProgMemAddress = (uint32*)Bzero_SectorN_start;

                        oReturnCheck = Fapi_issueAsyncCommandWithAddress(Fapi_EraseBank, pProgMemAddress);

                        oFlashStatus = Fapi_getFsmStatus();

    The resurn value is "2" = Fapi_Status_FsmReady

    The Fapi_FlashStatusType       oFlashStatus = 0

    But the Flash memory is unchanged.

    F021 - version 1.52 - C28x - CCS: Version: 4.2.5.00005

    What  do I miss to Bank erase the Flash?

  • should I go back to version 1.50 of F021 Flash API for the C28x part of the concerto device?

  • Edwin,

    Do you execute EALLOW before you erase?

    Did you program anything in Flash password locations?  If yes, did you unlock before you erase Flash?

    Thanks and regards,
    Vamsi

  • Vamsi,

    Yes, I'm using the "EALLOW" command for Erase, as I use it also for Programming.

    The sector with the Flash password is not programmed at all, all 0xFF.

    Erase is always returning "2"

  • Edwin,

    Because of the way the Flash bank is architected, it is conceivable that the Fapi_EraseBank command may yield unpredictable results at some corner cases.  However, Fapi_EraseSector command has been tested to work in all corner cases.  Hence we have decided to not support Fapi_EraseBank command.  Please use Fapi_EraseSector command instead.  Documentation is being updated to reflect the same.

    Thanks and regards,

    Vamsi