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.

Loading flash from emulator

Other Parts Discussed in Thread: SM320F28335-EP, CONTROLSUITE, TMS320F28335

I am using a SM320F28335-EP

I can load internal ram, but cannot load internal flash from the jtag connection.

I am using a Digital Spectrum xds200 series device, do you know of any compatibility

issue between this device and the emulator. 

Is this the best emulator to use for this DSP, using code composer 6.0.

  • Can load internal ram of SM320F28335-EP, when I try to load the same program into internal flash.

    CCS states  "C28xx:  Flash operation timed out waiting for the algorithm to complete, operation canceled".

    Tried cycling power same result.

    CCS appears to hang for a while “Erasing Sector A” without ever moving on to the other flash sectors but it does eventually try to program the .cinit section of memory and then immediately aborts.

     

    Repeated without cycling power and received a different error message.

    "C28xx: Flash Programmer: Error encountered when writing to flash memory"

  • Hi Mike,

    The above emulator very well supports the device. Is you code configured for flash execution?

    Regards,
    Gautam
  • Michael,

    As Gautam pointed out, C28x architecture is supported by the XDS200 emulator and based on the error messages, the problem is not the emulator.  The error messages that you are seeing are the error messages from the C28x Flash API functions that are attempting to erase and write flash locations during the CCS load process.  Just as a point of due diligence, let's remove a variable and re-test.

    Below is a known-working .out file that is built from an included baseline demo in ControlSUITE.  Establish a connection to the CPU via the XDS200 and manually load the below .out file, following the directions on this wiki page.  Make sure that your emulator and processor selection reflect what you are using.  

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/171/FlashingLeds.out

    Please report back any errors that you experience in the form of screen captures and please send me your board schematic via email from our previous conversation.

  • Gautam,
    Thanks for your support, yes, our software engineer has verified the code is configured for flash execution.
    I have read about 'DEPLETION' and under operations in the flash plug in GUI there is a depletion recovery function.
    We are using CCS Version 6.0.1.00040 ,in the help tab it mentioned depletion but not sure how to access it.
    Is this something within this CCS version, or where do I find this function? Thanks once again for your help.
  • Michael,
    We did what you suggested above, the error is as follows:

    C28xx: Flash operation timed out waiting for the algorithm to complete. Operation cancelled.
    C28xx: GEL: File: C:\Users\mliebert\workspace_v6_0\FlashingLeds-F28335\F2833x_FLASH\FlashingLeds.out: Load failed.

    In the CCS General Window
    we leave the VARIANT empty
    and select the device as a TMS320F28335, the SM320F28335 is not listed, is there an issue with this?

    One other point , prior to running your above mentioned program, we checked the memory browser, and it showed the security locations with data as all 1's( 03XFF8 thru 03XFFF, [believe those are the locations off the top of my head]). wondering if this is valid ,if so could anyone hook up an emulator and browse those locations ? Getting off topic but wondering if somehow we locked up the flash. Spoke with our software developer he does not recall stopping the erase function while it was in process.

    Thanks
    Mike T.
  • Michael,

    To access depletion recovery, go back through the steps in the projectless debug link that I provided. Do not load the .out file but instead, go to Tools > On Chip Flash. Near the bottom of the newly opened window, there should be an option for "Depletion Recovery". Give it a go.

    In the CCS General Window
    we leave the VARIANT empty
    and select the device as a TMS320F28335, the SM320F28335 is not listed, is there an issue with this?


    No issue with that. The CPU is the same as far as the emulation connection is concerned.

    One other point , prior to running your above mentioned program, we checked the memory browser, and it showed the security locations with data as all 1's( 03XFF8 thru 03XFFF, [believe those are the locations off the top of my head]). wondering if this is valid ,if so could anyone hook up an emulator and browse those locations ? Getting off topic but wondering if somehow we locked up the flash. Spoke with our software developer he does not recall stopping the erase function while it was in process.


    By default, CCS triggers a GEL script that automatically goes through the dummy reads of the PW locations and writes the default passwords to the KEY registers. This is essentially an invisible operation as far as the user is concerned since the GEL file doesn't output anything during this script step. Could anyone browse to these locations? Yes, but only if the dummy read is performed and the correct passwords are written to the KEY registers.
  • Michael, 

    Brought up new CCA,  and have only loaded your   'Flashing led .out'  program,  loaded fine, went through all the steps, CCS displayed each sector of flash being erased. Ran .out file two successful times. 

    Going to try depletion process on problem CCA, but you mention a "projectless debug link that I provided"  Where exactly is that?

    Is it listed in your response from April 8th,2015/6:04pm

    Thanks

    Mike T

  • Michael S.
    Reran your 'wiki page' ,
    The result of selecting CONNECT TO DEVICE, the view disassembly window stated "No source available for '0x3ff9ce'(in red).
    When we selected Depletion Recovery code composer displayed revolving blue circle(showing it was doing something)
    then came back with error pop-up stating 'Error executing Flash operation'.

    Tried to load your .out file

    Erasing FLASH SECTOR POP-UP showed Erasing Sector A, never showed green line progressing and never moved on to the other sectors.
    Then the LOADING PROGRAM POP-UP showed .cint0 of 44 @0x33853f.... , never showed green line progressing .

    Also in red in the console window of CCS
    C28XX: dEPLETION rECOVERY STARTED.(IN BLACK)
    C28XX: Flash Programmer :Error when performing depletion recovery. Flash operation timed out waiting for the algorithm to complete; operation canceled(in red)
    c28xx; Flash operation timed out waiting for the algorithm to complete. operation failed(in red0
    c28xx: GEL: File C: states path : Load Failed

    Then the LOAD PROGRAM FAILEDPOP-UP stated , load failed.

    In addition we have two new DSP boards, powered up, loaded your .out file 30 times, turning off power between each of the last 5 programming cycles, and neither board had an issue. 60 successful loads to flash which ran properly.
    Same support hardware and CCS was used for all testing.

    We did capture screen shots for this but i did not know how to attach it.


    let me know what you think,
  • The result of selecting CONNECT TO DEVICE, the view disassembly window stated "No source available for '0x3ff9ce'(in red).


    This is normal. It means that you are connected and that the IDE does not have any knowledge of the debug symbols that correlate to the stored firmware image.

    When we selected Depletion Recovery code composer displayed revolving blue circle(showing it was doing something)
    then came back with error pop-up stating 'Error executing Flash operation'.


    If memory serves, there should be text output in the console window (view > console) from the flash API depletion recovery function call. Can you paste the console output in a reply?

    Edit - to post screen captures, click on 'Reply' and there should be an option to "use rich formatting".  Use this option and you get post formatting and attachment options.

  • Michael,

           Found a post with a problem that resembles our:

                                                                 e2e.ti.com/support/microcontrollers/c2000/f/171/t/368182

            We are using a 50 MHz external clock  in our design, so at reset our target clock will be set to 3.125 MHz correct.

    In the configuration setup /target, there are three Clock Configurations

    OSCCLK(mhz) :[which I will set to 50MHz]

    CLKINDIV:         [which give me three choices 1,2,4]

    PLLCR Value:   [which give me choices from 0 thru 10]

    Do I use the combination of both to get me to 3.125Mhz, so my target and code composer are in sync:

    OSCCLK(mhz) : 50MHz            50MHz

    CLKINDIV:        4                            2

    PLLCR Value:   4                          8

    1) How do these setting effect the flash download.

    2) I believe the OSCCLK needs to be set to the target clock speed.

    3) Can you explain the purpose of the CLLINDIV & PLLCR and what to set them to ?

    I read about PLLCR in section 3.6.1.2 in the data sheet, but if this is a syncing issue, why the inconsistency between evaluation  and designed card?

    Why is it working for a ram load and not a Flash Load on our design card?

    Still missing something , but getting closer.

     

    We are using a 50 Mhz external clk in our target DSP, so at reset our target clk will be set to 3.125Mhz correct.

  • Hi everybody,We have the same problem:CCS version: Version: 6.0.1.00040
    Load our "specific" software in RAM or Flash of "Experimenter Kit Delphino 28335" => OK
    Load our "specific" software (through BlackHawk USB100V2 or through integrated USB=>JTAG device of "Experimenter Kit Delphino 28335") to
    RAM of our "specific" board with a SM320F28335=> OK
    Load our "specific" software (through BlackHawk USB100V2 or through integrated USB=>JTAG device of "Experimenter Kit Delphino 28335") to
    FLASH of our "specific" board => error (same as Michael).
    Our specific board: SM320F28335, clock frequency : external oscillator of 50MHz.
    Did you found a solution?Thank you for your attention,Best regards,Emilien
  • e2e.ti.com/.../368182,
    we found our answer from this link,

    In summary we had to set the CCS Clock setting to represent the clock speed of our design
  • Please make sure the power supply to the device is good. The VDD3VFL must be connected as well. It is used for both program and erase of the flash.