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.
Replies: 6
Views: 7774
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
Do, click "This Resolved my issue", if any of my replies helps solve your problem. For Tiva ARM Forum, see links below.
TM4C123 NMI unlock - To those who want to use PF0 and PD7, be reminded that these pins default as NMI ! ! !
JTAG Communication Failures
Blog: https://markelthinkslearnscreates.wordpress.com/
Featured Blog Projects: Create Bluetooth Projects using TI CC2640R2F Launchpad Online Course, Adding Bluetooth Connectivity to DPS3005 Programmable Power Supply using TI CC2640R2F BLE MCU, Bluetooth Low energy Point Of Sale using TI CC2652RB Simplelink™ Crystal-less BAW Wireless MCU, TI CC2640R2F Eddystone Beacon, Bluetooth Low Energy Game Controller, Bluetooth Low Energy Power Bank, Secure Internet Of Things Humidifier
Company Projects: FOBO Tag - World’s 1st Patented Bluetooth 5 Tracker
In reply to Markel Robregado:
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 WordEEPROMProgram(&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 WordEEPROMRead(&RdBuffer, EEPROM_WORD, EEPROM_COUNT);
Regards
Amit
Regards,
Amit Ashara
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
In reply to Amit Ashara:
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 ?
In reply to sri ram1:
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.
sri ram1what 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.