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.

TMS320F28377D: Flash API hangs on Flash Fapi_setActiveFlashBank execution when ECC enabled

Part Number:

Dear all,

I'm developing a project which writes settings into flash using Flash API on TMS320F28377D.

I have followed the instructions provided by TI documents and TI E2E Community.

  1. Power up
  2. Copy interrupts and functions in F021_API_F2837xD_FPU32.lib from flash to .TI.ramfunc using memcpy
  3. Execute InitFlash
  4. Gain pump access 
  5. Execute Fapi_InitializeAPI
  6. Execute Fapi_setActiveFlashBank
  7. Fapi_issueProgrammingCommand

Everyting goes fine when debugging but hangs on Step 6 when release.

I add

EALLOW;
Flash0EccRegs.ECC_ENABLE.bit.ENABLE = 0x00;
EDIS;

to close ECC of flash after Step 3 which fixed the problem.

Could anybody tell me how to fix the problem while ECC is enabled?

Best regards,

Bill

  • Dear all,

    I did another experiment. Added 

    // Disable ECC of flash
    EALLOW;
    Flash0EccRegs.ECC_ENABLE.bit.ENABLE = 0x00;
    EDIS;

    before step 6 and added 

    // Enable ECC of flash
    EALLOW;
    Flash0EccRegs.ECC_ENABLE.bit.ENABLE = 0x0A;
    EDIS;

    after step 6 which made an delicious sandwich.

    Everyting goes well also.

    Could anybody tell me why step 6 can not run while ECC of flash is enabled?

    Best regards,

    Bill

     

    user3970314 said:

    Part Number: TMS320F28377D

    Dear all,

    I'm developing a project which writes settings into flash using Flash API on TMS320F28377D.

    I have followed the instructions provided by TI documents and TI E2E Community.

    1. Power up
    2. Copy interrupts and functions in F021_API_F2837xD_FPU32.lib from flash to .TI.ramfunc using memcpy
    3. Execute InitFlash
    4. Gain pump access 
    5. Execute Fapi_InitializeAPI
    6. Execute Fapi_setActiveFlashBank
    7. Fapi_issueProgrammingCommand

    Everyting goes fine when debugging but hangs on Step 6 when release.

    I add

    EALLOW;
    Flash0EccRegs.ECC_ENABLE.bit.ENABLE = 0x00;
    EDIS;

    to close ECC of flash after Step 3 which fixed the problem.

    Could anybody tell me how to fix the problem while ECC is enabled?

    Best regards,

    Bill

  • Bill,

    Please search for "Why is a NMI (due to double bit errors) occurring when Fapi_setActiveFlashBank() is called on F2837xD CPU2?" in Flash wiki at http://processors.wiki.ti.com/index.php/C2000_Flash_FAQ 

    Thanks and regards,

    Vamsi

  • Thanks a lot. It's all I want.