Skip to main content

"FLASH algorithm did not execute completely" error occured when programming or erasing a FLASH memory - Knowledgebase / Flash programming - Lauterbach Support

"FLASH algorithm did not execute completely" error occured when programming or erasing a FLASH memory

Authors list

Target-controlled FLASH programming algorithms run on the CPU itself. If execution of the FLASH algorithm is interrupted, TRACE32 displays the error message "FLASH algorithm did not execute completely".

This can have several causes:

  • Watchdog reset: The FLASH algorithm may be interrupted by a watchdog reset if the watchdog is enabled. TRACE32 demo scripts often contain command sequences to disable the watchdog. Otherwise, refer to the documentation for the target processor or board for information on how to disable the watchdog.

  • Data cache enabled: An enabled data cache can also cause this problem. If the data cache is enabled, disable it in the FLASH programming script.

  • FLASH algorithm overwritten: The loaded object file may contain data sections mapped to the same memory range in which the FLASH algorithm is loaded. In this case, the FLASH algorithm is overwritten when the object file is downloaded to the target.

    You can check the memory load map of the object file with:

    Data.LOAD.auto <object-file> /NoCODE
    sYmbol.List.MAP

    If this is the case, exclude the RAM from the object file download by specifying the FLASH memory range in the Data.LOAD command, for example:

    Data.LOAD.auto <object-file> <FLASH-memory-range>
  • The RAM used by the FLASH algorithm is not initialized.

    ;Initialize RAM address range reserved for the CODE FLASH algorithm 
     Data.Set FLASH.TARGET.CODERANGE() %Long 0x0
    
    ;Initialize RAM address range reserved for the DATA FLASH algorithm 
     Data.Set FLASH.TARGET.DATARANGE() %Long 0x0
  • Incorrect FLASH binary: Check that the correct FLASH programming binary is being used.
    Contact support@lauterbach.com for more details.

Please refer for more information to the document Tips to Solve NOR FLASH Programming Problems.


Helpful Unhelpful

4 of 9 people found this page helpful

Add a comment

ID-0
To prove you are a human, please tell us the text you see in the CAPTCHA image