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.

  • Resolved

[FAQ] F05 Flash: What is depletion?

Guru 70165 points

Replies: 1

Views: 858

Q: The flash API has a depletion recovery algorithm. How does depletion occur and how can I avoid it?  

Lori Heustess
C2000 Software Engineering

  • A:

    Note: This answer applies to devices with F05 flash.  Refer to:  [FAQ] F05 Flash: Which C2000 devices have "F05 flash"?

    If the erase operation is interrupted and not allowed to complete, the device may become depleted. When this happens, the device may then begin to fail to erase. The erase algorithm should not be stopped, as this can also affect the CSM passwords. The Flash API has a depletion recovery function to try to recover flash that has been "over-erased". If the flash programming process was interrupted during the erase stage, it is possible that the timed loops that do the erasing process were disturbed.

    The CCS On Chip Flash Programmer does have support for the depletion recovery function. You will see it listed in the as one of the options that can be selected under "Operations" in the flash plug-in GUI. You can get additional information on this by clicking on the "Help" button, go to the search tab and enter "depletion".

    The depletion recovery also looks for sectors that are in depletion and attempts to recover them. All sectors on the device are checked.

    The current maximum timeout for the algorithm is approx 35 seconds per sector that is in depletion. Typically, only one sector would be in depletion unless erase has been called multiple times on multiple sectors without running to completion. If a longer timeout can be tolerated, the depletion recovery can be used multiple times.

    There is no guarantee that this algorithm will be able to bring a sector out of depletion within a reasonable amount of time. The deeper in depletion the part is, the longer it will take to recover. The Flash API erase function has been implemented to erase the flash in such a manner that it is not put into deep depletion. However, if the CPU is halted during an erase pulse for a long period of time, the part can be put into a deep depletion that may not be recoverable in an acceptable time period.

    This algorithm cannot recover the part if the flash passwords are unknown. For example, if power is lost during the erase of sector A, where the CSM passwords are located, then the device may be permanently locked and the recovery algorithm cannot operate on the flash.

    If the depletion recovery step fails then replacement is the only option.

    For more F05 related FAQs refer to [FAQ] F05 Flash: Frequently Asked Questions

    Lori Heustess
    C2000 Software Engineering

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.