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.

TMS320F28069: Cannot erase flash

Part Number: TMS320F28069
Other Parts Discussed in Thread: UNIFLASH, C2000WARE, CONTROLSUITE

I am not sure what lead up to this but i was debugging code using the flashAPI. At some point i lost the ability to erase sectors. 

The program was working well as it was mostly from the "Example_2806xFlashProgramming" example. 

I have checked the passwords in sector A and all are 0xFFFF. I Have verified this by loading only symbols in CCS and reviewing them in UniFlash.

I have also attempted the Depletion Recovery in UniFlash but it times out while waiting for algorithm to complete.

All sectors fail erase since I attempted to erase then respectively. 

Any other ideas would be appreciated.

thanks 

  • Regi,

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

    How does depletion occur?

    A: 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.

    Regards,

    Manoj

  • I have a new controlCard and was able to load the example project fine.
    When I tried to load my suspect project it ruined the new card as well.

    I removed all flash writing from my project and yet it still made it unusable.
    Is there a project setting that may be causing this? i really don't want to ruin another card but need to recover my code.
    Are there any other ways it can get depleted other than within the application code?
    Thanks
  • So I have a 3rd card!
    I am running the project "Example_2806xFlashProgramming". Out of the box the the first erase of all sectors fails.
    It returns an error code 23 STATUS_FAIL_COMPACT or 24 PRECOMPACT.
    First failed address is 0x003E4000 (sector E) with either error.
    I worry I am on the path to another bad board.

    I don't want to try my code again till I understand the problem. I cannot ruin any more boards.
    Any other advice would be helpful.

    Are there any other areas to look at that could cause this corruption?
  • Regis,

    There is no way flash sectors can be depleted without device being interrupted in the middle of Flash API Erase operation.

    Please check your application project.

    Regards,
    Manoj
  • Did you check your VDDIO / VDD vitals on your board? BOR trip will also trip the device causing a interruption in flash api erase operation.

    Regards,
    Manoj
  • Thank you for the additional ideas. I do believe it is the hardware now.
    Depletion has happened again using only the example code "Example_2806xFlashProgramming" on another new control card. (the last one I have)
    I am checking the hardware now.
  • Please close this thread by marking "Verify Answer" on the threads which answered your question. This will be very helpful for other community members.

    -Manoj
  • 5 cards ruined so far. I did not find any voltages out of spec or glitches during flash erase.

  • I did find that no matter what sector I attempted to erase it always reported the first bad sector was 0x003E4000 (sector E).
  • I found this example in the utils folders:

    //###########################################################################
    //
    // FILE: Example_Flash2806x_API.c
    //
    // TITLE: F28069 Flash API Example
    //
    // NOTE: This example runs from Flash. First program the example
    // into flash. The code will then copy the API's to RAM and
    // modify the flash.
    //
    //
    //###########################################################################
    // $TI Release: F2806x Flash API Release V1.00 $
    // $Release Date: MArch 31, 2011 $

    I hoped for better results but again the Flash_Erase depletes my flash.


    // SECTORA-SECTORH are defined in Flash2806x_API_Library.h
    Status = Flash_Erase((SECTORB|SECTORC),&FlashStatus);
    if(Status != STATUS_SUCCESS)
    {
    Example_Error(Status);
    }

    It returns that sector B is the first failed address. checking sector B its all F's. not sure why that is a problem.

    is there any alternative to using this flashAPI. i need to get this working.

  • Regis,

    Can you try erasing the flash using Flash plugin in CCS (or) Uniflash? I expect to see the same failure reported in CCS.

    Also, take a new controlcard, try erasing the flash using Flash plugin (or) Uniflash. Once, you are able to erase / program using Uniflash. Then move over to running Flash API. This will confirm that your application code calling Flash API is problem.

    Regards,
    Manoj
  • Previously, I have tried to erase depleted cards using uni-flash and it reports the exact same error.

    On your recommendation...

    I have a new non-isolated control card. I used uni-flash to erase the part and it was successful. 

  • I have programmed the new part with the GPIO test and erased it without error.
  • Regis,

    Okay. This confirms that the part is working fine. Now, before running your suspect project, please make sure to check API do and don'ts in Pg 7 of Flash2806x_API_Readme.pdf

    I hope you are trying to erase / program using the same hardware setup. When executing Flash Erase command in API try erasing one sector at a time.

    Regards,
    Manoj
  • I will review the document carefully.

    I have attempted to limit the erase to one sector (sector B) and it resulted in the depletion as well. Also strangely, it returned that the first problem sector was sector G.

    I am using both windows CCS 7 and Linux CCS 6.2 systems with the same results.

     Perhaps someone could run the example to confirm there are no issues then send it to me to run. 

    Thanks

  • Manoj,
    I have had an email conversation with Regis today (I just picked up his company as their Analog Field Applications Engineer), and he does have the additional support request:

    I have used CCS version 7 on Windows and CCS 6.2 on Linux.
    Running the example code on both platforms results in the same issue; depleted flash.

    I have also used UniFlash on windows to attempt to recover.
    Yesterday I was able to get another new board and erase it with UniFlash confirming it’s in the project.

    I was hoping someone could confirm the example project works. Maybe then zip it up and send it to me.

    Thanks!
  • I found the API readme document and am going through it carefully now. I am verifying every step of the example code.
    Thanks all.
  • Mark,

    Did you try running the example project in your setup and see depleted flash? (or) are you just reporting what customer said?

    Regards,
    Manoj
  • Manoj - Thanks for asking, but I will let my customer (Regis) answer this question.
  • This was my correspondence to Mark.
  • Regis,

    So, just to confirm you saying the unmodified example available in C2000Ware isn't working.

    Can you send us the complete path of project you are working?

    Regards,
    Manoj
  • C:\ti\controlSUITE\libs\utilities\flash_api\2806x\v100\example
    and
    C:\ti\C2000Ware_1_00_01_00\libraries\flash_api\f2806x\Example_Flash2806x_API

    tried both.

    i am using the F28069 control card non-isolated.
    thanks
  • Regis_W,

    Looks like you are using old example. Please update C2000Ware and try the latest example.

    Regards,
    Manoj
  • I am now running the toggle test with C2000ware 1.00.04.00.
    WIth the default config, the toggle test read 8.8KHz.

    I updated the CPU_RATE from 11.11L to 12.500L and I now get 10KHz.
  • Also this is on my Liunx system using CCS 6.2
  • I'm confused. Is this problem resolved when you ran the latest C2000Ware example?

    -Manoj
  • This morning I ran the newest version after verifying the timing was correct and i did work with out error.

    I assume the latest version did the trick for me.

    I appreciate the help with it.

  • Is there a change log i can review, Id like to know what was happening. The clock settings int he old version were not resulting in the correct timing.

  • Sorry, we don't have that feature.

    -Manoj
  • Regis,

    I believe I have answered all your question. Can I close this thread? Hope the issue is resolved.

    Please mark the posts which answered your questions. It will be very helpful for other people who have similar questions.

    Regards,
    Manoj
  • the new version resolved my issue. thanks. I marked the post above as resolved. 

  • Thanks I'm closing this ticket