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.

Compiler/TMS320F28379D: Basic question about flash memory usage.

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE, UNIFLASH

Tool/software: TI C/C++ Compiler

1) Program data and code looks like it can be directly run from flash memory, i.e. treated like ram.  Correct?

2) When program data and code is run from flash memory, via the linker command file designations, is it automatically stored as non-volatile memory?

3) From the literature the flash memory is about as fast as the volatile memory, but run less efficiently.  Correct?

Kindly,

Graham

  • Graham,

    Your questions are a little confusing.  I tried to answer based on what I understood.  Please let me know if you need further clarification.  

    1) Are you asking whether you can execute the code from Flash or not?  If yes, you can execute the code from Flash.  Make sure you initialize the Flash correctly from RAM.  Please check flash initialization routine provided in C2000Ware.  It configures Flash bank/pump power mode, Flash wait-states, Flash ECC etc.

    2) After you map your code/data to Flash in linker command file and compile it, you need to load the code to Flash by using TI's CCS Flash Plugin or UniFlash or other 3rd party Flash tools. 

    3) Flash memory is not as fast as volatile memory.  That is the reason wait-states are introduced.

    Thanks and regards,
    Vamsi

  • Thanks Vamsi,

    1) Is the routine to initialize flash the InitFlash() function provided in F2837xD_GlobalPrototypes.h?

    2) Is there a HowTo or example on setting up the CCS Flash Plugin?

    3) Is there a reason to prefer either the CCS Flash Plugin or Uniflash?

    4) Can code/data actually run directly from flash or does it need load into volatile RAM in order to execute?  The documentation is confusing in this regard.   

    Kindly,

    Graham 

  • Graham,

    1) Yes.

    2) For all normal purposes, you should be able to simply load your executable file like how you do for a RAM based project.
    Meaning, CCS Debug -> Run menu -> Load -> Load Program.
    CCS loader will automatically invoke CCS Flash Plugin if your executable has sections mapped to Flash.
    However, note that your executable should have all the initialized sections mapped to Flash when you use a Flash linker based project. If you have any initialized sections mapped to RAM, they may not get loaded.

    You can view the CCS On-chip Flash Plugin at CCS Debug view -> Tools menu -> On-Chip Flash.

    3) UniFlash is standalone Flash programming solution which does not include development/debug environment like CCS.

    Thanks and regards,
    Vamsi
  • Graham,

    Looks like you edited and added another question after I replied.

    #4. It depends on the functionality and the performance requirement of the code.
    Examples:
    (i) Flash initialization code and Flash API library functions should always be copied to RAM and executed from RAM in this device.
    (ii) If there is any time sensitive ISR that your application needs a 0-wait state performance, you can copy/execute from RAM.

    Thanks and regards,
    Vamsi