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.

CCS/TMS570LS20216: Not able to erase the flash

Part Number: TMS570LS20216
Other Parts Discussed in Thread: UNIFLASH, NOWECC, TMS570LS3137

Tool/software: Code Composer Studio

Hi,

I an not able to erase the flash for this controller using CCS5.4.0 and XDS560v2 USB debugger. I have tried the erase using DXL script which fails too often. Please suggest.
 Is there any way to increase the probability of erasing the flash success ?

Thanks

  • Hello Jerin,

    Can you provide further details on your setup? i.e., you stated that you are using CCS5.4.0 and XDS560v2 USB, but you also state that you are using the DXL script which is failing too often. I am not familiar with the DXL script that you mention. Are you using this script within the context of CCS5.4.0? or is this separate from CCS?

    CCS 5.4.0 has built in program and erase routines for the device if you are able to connect to it via the debug interface. Is this what you are seeing fail? Have you tried using Uniflash which is available for download at this link: www.ti.com/.../uniflash

    When you see a failure to erase, what is the error message provided by the tool? Is it unable to connect, is there a timeout, or does it state that it is unable to erase a specific sector or address location? Or does it fail blank check after erase?
  • Chuck Davenport said:
    Hello Jerin,

    Can you provide further details on your setup? i.e., you stated that you are using CCS5.4.0 and XDS560v2 USB, but you also state that you are using the DXL script which is failing too often. I am not familiar with the DXL script that you mention. Are you using this script within the context of CCS5.4.0? or is this separate from CCS?

    CCS 5.4.0 has built in program and erase routines for the device if you are able to connect to it via the debug interface. Is this what you are seeing fail? Have you tried using Uniflash which is available for download at this link: www.ti.com/.../uniflash

    When you see a failure to erase, what is the error message provided by the tool? Is it unable to connect, is there a timeout, or does it state that it is unable to erase a specific sector or address location? Or does it fail blank check after erase?

    Hi Dave,

    Sorry; Its DSS scripting/Java not the DSS. Its a typo.

    We are using the inbuilt erase program using DSS scripting. We get the message that the Sector<> Page<> erase failed. Also, we use Hercules nowECC 2.21.00 also for the .out file every time we generate the output file which is flashed. Below is the DSS script snippet used for erase:

    /* Details of the board configuration.  */
        board_configuration = {
            timeout: 60000,
            logFile: "Result.xsl",
        };
    /* Global handles to the debugger */
    var env = ScriptingEnvironment.instance();
    var server = env.getServer("DebugServer.1");

    // Create a log file in the current directory to log script execution
      env.traceBegin( BASE_LOCATION+"Arm20216CodeLoadLog.xml", "DefaultStylesheet.xsl");
      env.traceSetFileLevel(TraceLevel.ALL);

      /* Setting configuration */
      env.traceWrite("Setting configuration: "+CONFIGRATION_FILE);
      print("Setting configuration: "+CONFIGRATION_FILE);
      server.setConfig( CONFIGRATION_FILE );

      var session = server.openSession("*","*");

      /* Connect to target */
      env.traceWrite("Connecting to device...");
      print("Connecting to device...");

      session.target.connect();

      env.traceWrite("Connected.");
      print("Connected.");
     
        try{
            env.setScriptTimeout(board_configuration.timeout);
        } catch(err) {
            print("caught in timer...!!! "  + err);
        }
     
      /* Set flash properties  */

       env.traceWrite("Setting flash options...");
       print("Setting flash options...");

      /* Clock settings */
      session.flash.options.setString("FlashCrystalFreq","20.0");


      session.flash.options.setString("FlashVerifySetting","Verify");

       /* sectors to erase */
       session.flash.options.setString("FlashEraseSelection", "Entire Flash");

       /* flash operations */
       env.traceWrite("Erase flash...");
       print("Erase flash...\n");
       session.flash.erase();

  • Hi,

    Any updates on this issue ? Attaching the screenshot of the issue..

  • Hello Jerin,

    When you state that the erase fails "too often" does this imply that it works much of the time? Can you provide information on the failure rate? When it fails on a given device, are you able to run a second or third time and it works? Or, when it fails on a given device, does the specific device never work?

  • Hi Dave,

    Erase fails most of the times. We need to try 5 or more times to get a successful erase.

    I had an observation some times the build clean up helps for a successful erase. Also, introducing the timeout in the DSS script. After erasing, we used to load our code for debugging using DSS script, putting break points. Not sure, if this is causing any issues. We use the similar approach for TMS570LS3137 and these is not such issues.

    Regards,

    Jerin Antony