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.

Internal EEPROM access in TM4C

Other Parts Discussed in Thread: EK-TM4C123GXL, TM4C123

I am new to microcontrollers .. I recently finished an introductory course in embedded systems using TM4C.

I learnt about using interrupts, dac,adc, pll,UART etc ..

Now for a project ,I would like to access the internal eeprom of the TM4C. I need to know how read write and erase are done on an internal EEPROM. the datasheet says it has 2Kb internal eeprom .

I googled to find any relevant resources but found that TM4C does not have much of a community support base unlike arduino.

So please tell me how read/write/erase functions are carried out ..

regards

ram   

  • Hi Sri,

         What is that TM4CXXX part that you intend to use? What Tiva kit do you intend to use?

         You can find Tiva EEPROM C API's and example program at the Tivaware Peripheral Drivers Library User's Guide.

          From the link below, download the workbook pdf, there is a portion that discusses how to write to EEPROM. However, that is for Tiva Connected Launchpad.

       http://processors.wiki.ti.com/index.php/Creating_IoT_Solutions_with_the_TM4C1294XL_Connected_LaunchPad_Workshop

    -kel

  • Hello Sri,

    The EEPROM has to be treated as a regular peripheral of TM4C

    1. Enable the Clock

    SysCtlPeripheralEnable(SYSCTL_PERIPH_EEPROM0);

    2. Initalize EEPROM Module

    EEPROMInit();

    3. To Write a Word
    EEPROMProgram(&WrBuffer, EEPROM_WORD, EEPROM_COUNT);

    where EEPROM WORD is one of the 2KB locations at word boundary and EEPROM Count is number of words in byte notation

    3. To Read a Word
    EEPROMRead(&RdBuffer, EEPROM_WORD, EEPROM_COUNT);

    where EEPROM WORD is one of the 2KB locations at word boundary and EEPROM Count is number of words in byte notation

    Regards

    Amit

  • hi mark,

    I am using EK-TM4C123Gxl ....I am programming in keil . I got that as a part of online course in edx .

    what do you mean by what tiva kit you intend to use ?

    thanks and regards

    ram

  • Hi Amit,

    Is it safe to assume that the enable clock and EEPROMInit ,EEPROMProgram are built in eeprom.c ??

    2)if so , can I use the same eeprom.c for my Ek-TM4C123Gxl in keil compiler without and any compatibility issues?

    3)can you explain more elaborately about syntax and usage of EEPROMProgram ?

    I downloaded the pdf  Getting Started with the TIVA™ C Series TM4C123G Launchpad thing ...will it be of any use ?

    thanks and regards

    ram

  • Hello Sri

    It is not safe to assume.

    1. The Enable clock is done in sysctl.c while EEPROM functions are handled by eeprom.c

    2. The EEPROM can be used on both TM4C129 and TM4C123 parts,

    3. Before going to program, please do look at EEPROMInit return values as if an Error is returned then there is a clean up action that SW needs to perform

    4. Please do read the EEPROM Section of the data sheet as well, since it will make it way too clearer when using the EEPROMProgram

    However still, the EEPROMProgram programs an array of WORDS, to the specified location. The syntax involves poiting to the address of the first element of this array followed by EEPROM Word Location where you want to program this array, followed by the number of WORDS (it has to be done as Number of Words*4) that need to be programmed.

    Regards

    Amit

  • sri ram1 said:
    what do you mean by what tiva kit you intend to use ?

    You, already answered that. I am just asking as there are several variants of Tiva kit. Details, are relevant when asking for help. See, post below.

    Information to provide when asking for help

    The workbook pdf from the link I provided, provides EEPROM code explanation.

    -kel