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.

F28069 Flash API fails when not run in the debugger

Other Parts Discussed in Thread: CONTROLSUITE

using the Flash API to save some data in an unused sector.

Works fine when running from Code Composer. But when power cycled, the erase fails with error code 15. Don't know what that code is.

Any ideas?

  • error code was 0x15, 21 decimal which is documented. STATUS_FAIL_PRECONDITION. we were setting
    EALLOW;
    Flash_CPUScaleFactor = SCALE_FACTOR;
    EDIS;
    seems that we had some stuff commented out in F2806x_GlobalVariableDefs.c.
  • Hi Charles,

    Have you looked at the Flash programming example in controlSUITE?

    Did you initialize the Flash API with the correct clock speed? Is the Flash API running from RAM?

    sal
  • please see previous post.

    in F2806x_GlobalVariableDefs.c the following code was not included. it had #if0/#endif around it. A colleague thought it wasn't necessary. But including it resolved the issue.


    //----------------------------------------
    #ifdef __cplusplus
    #pragma DATA_SECTION("EmuKeyVar");
    #else
    #pragma DATA_SECTION(EmuKey,"EmuKeyVar");
    #endif
    Uint16 EmuKey;

    //----------------------------------------
    #ifdef __cplusplus
    #pragma DATA_SECTION("EmuBModeVar");
    #else
    #pragma DATA_SECTION(EmuBMode,"EmuBModeVar");
    #endif
    Uint16 EmuBMode;