Electronic Components Datasheet Search
  English  ▼

X  

AN2077 Datasheet(PDF) 14 Page - STMicroelectronics

Part # AN2077
Description  EEPROM Emulation with STR71x
PDF  19 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2077 Datasheet(HTML) 14 Page - STMicroelectronics

Back Button AN2077 Datasheet HTML 10Page - STMicroelectronics AN2077 Datasheet HTML 11Page - STMicroelectronics AN2077 Datasheet HTML 12Page - STMicroelectronics AN2077 Datasheet HTML 13Page - STMicroelectronics AN2077 Datasheet HTML 14Page - STMicroelectronics AN2077 Datasheet HTML 15Page - STMicroelectronics AN2077 Datasheet HTML 16Page - STMicroelectronics AN2077 Datasheet HTML 17Page - STMicroelectronics AN2077 Datasheet HTML 18Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 14 / 19 page
background image
14/19
EEPROM Emulation with STR71x
4.2.1 EEPROM_Init
This function must be called only once at the beginning of the user code or when a full erase
is required.
This function initializes the Flash, erases the two correspondent sectors and marks the first as
valid by writing 0x600D in the last word of this sector.
The EEPROM_Init function is called as follows:
/* Initialize the EEPROM */
EEPROM_Init();
4.2.2 EEPROM_DataRead
This function allows the user to read the valid Data (the last Data-Set). This function returns
the following status messages:
– EEPROM_FULL_ERASE_REQUIRED: To indicate if a full erase is required,
– EEPROM_NO_VALID_DATA: To indicate if there is no valid data to be read,
– EEPROM_SUCCESSFUL_DATA_READ: To indicate if the data is read successfully.
It uses two internal functions:
– EEPROM_GetValidSector: This function returns the valid sector,
– EEPROM_ValidDataSet: This function returns the offset of the valid Data-set (if it exists).
For this function, use the following as an example:
/* Declaration */
u32 Read_Status; /* The status of the read operation */
u32 Data_Read; /* The valid Data-set */
/* Read the valid data from valid sector */
Read_Status = EEPROM_DataRead(&Data_Read);
4.2.3 EEPROM_DataWrite
This function allows the user to write a new Data-set to the valid sector without overwriting the
old Data-set and then updates the corresponding status bit.
When the valid sector is full, the function performs the following operations:
1) copies the last Data-set to the second sector,
2) writes the new Data-set,
3) updates the Status bits,
4) marks the second sector as valid,
5) and finally erases the first sector.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com