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/TM4C129DNCPDT: how to read write SRAM in tm4c129

Part Number: TM4C129DNCPDT

Tool/software: Code Composer Studio

hi everyone,

i need to access SRAM and FLASH of TM4c129dncpdt for my project for storing variables. but i am unable to read/write and erase. 

when i erase flash then it will return error. how can i do ?? 

  • Hi,

      Your description of the problem is not descriptive enough. Are you having problem loading the program using either the CCS or LM Flash Programmer into the flash? Or are you trying to read and write to the flash in your program using the driverlib? If you are reading/writing using the driverlib then what errors did you get? When you said it does not work including the SRAM, I kind of find it surprising. Please elaborate your problem. 

  • HI Charles,

    i just need to read the stored variables from internal flash at location 0x00004000 to 0x000040A8;

    Thanking you.
  • How are you connected to the TM4C? Do you have a JTAG connection? Is the part on a TI development board,  Launchpad or a custom board? Do you know how to use Code Composer Studio?

  • i have jtag connection with tm4c launchpad and i know about code composer studio. i know by using code composer i read the value stored in flash but i need to get variables in program which is stored in tm4c flash.
  • Perhaps I do not understand your question. If this does not answer your question, please try asking again.

    With code composer connected to your device you can see the contents of flash memory by selecting "View" -> "Memory Browser" and then entering the starting flash address as shown below:

  • HI Bob,
    i resolved my issue for reading and writing in flash.

    i just know that is i am writing in flash some data and suddenly power supply disconneced then what happen ??

    also how much times i write and erase flash ?? means erase cycle.
    is there any option to update flash data without erase??
  • If you loose power when programming the flash, the bits may be in a "indeterminate" state. They may read as 1 or 0 and may flip between those values. The actual programming time is very short, so this does not happen often. It is more common to loose power during an erase operation because the erase takes longer. You can program 1's to 0's without erase. You cannot change a 0 back to a 1 without erase. The flash supports a minimum of 100,000 erase cycles.

  • Hi Bob,

    Thanks for reply, i also read datasheet for this.
    actually write/erase cycles is back to back for every transation and if it support only 1M cycles then this will not enough for me.

    what i do next ??

    SRAM is better then flash?? and after power off SRAM will keep data or not ??

    how i can write/erase/read data to sram ??

  • You are referring to the EEPROM emulation memory then instead of the program flash. Here is the write erase spec for that memory on the TM4C129DNCPDT: