поискавой системы для электроныых деталей
  Russian  ▼
ALLDATASHEETRU.COM

X  

AN2540 датащи(PDF) 13 Page - STMicroelectronics

номер детали AN2540
подробное описание детали  EEPROM emulation in STR91xFxx devices
PDF  25 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  STMICROELECTRONICS [STMicroelectronics]
домашняя страница  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2540 датащи(HTML) 13 Page - STMicroelectronics

Back Button AN2540 Datasheet HTML 9Page - STMicroelectronics AN2540 Datasheet HTML 10Page - STMicroelectronics AN2540 Datasheet HTML 11Page - STMicroelectronics AN2540 Datasheet HTML 12Page - STMicroelectronics AN2540 Datasheet HTML 13Page - STMicroelectronics AN2540 Datasheet HTML 14Page - STMicroelectronics AN2540 Datasheet HTML 15Page - STMicroelectronics AN2540 Datasheet HTML 16Page - STMicroelectronics AN2540 Datasheet HTML 17Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 13 / 25 page
background image
AN2540 - Application note
Implementing the EEPROM emulation
13/25
The procedure of updating a variable entry in the EEPROM is shown in Figure 4.
Figure 4.
1st method: WriteVariable flowchart
If the data to be written is equal to 0xFFFF, it is necessary to find the last data equal to
0xFFFF and to write 0x0000 into the next location to indicate that 0xFFFF represents data
and not a blank location. If the data to be written is different from 0xFFFF, it is then written to
the last location that contains 0xFFFFh (the following location should not contain 0x0000).
This function returns 0 on success, VARIABLE_FULL if there is not enough memory space
for a variable update, or a Flash error code indicating an operation failure (erase or
program).
Table 6.
WriteVerifyVariableFull
Function Name
WriteVerifyVariableFull
Function Prototype u16 WriteVerifyVariableFull(u8 index, u32 *T, u16Data);
Behavior
Description
If a write operation takes place, the write process must either update a variable,
or create the first instance of a variable.
Input Parameter
– variable index, in the demonstration example provided: (0 for A, 1 for B or 2
for C).
– T: variable Array
– 16-bit data to be written
Return Parameter
Returns 1 on success or 0x80 if variable is full or Flash error code
Called functions
FindValidSector,FMI_ReadWord,FMI_WriteHalfWord
Add element request
full
current record
Add new element at
the 1st empty element
place in the current
record of active sector
Erase previous active sector
End
End
Change the active sector
Find Valid sector
Yes
No
FindValidSector()
WriteVerifyVariableFull()
Copy each latest element of
each available record by
reading from bottom taking
into account the new
updated element.
EepromSectorTransfer()
ReadVariable()
Function call
ai14088



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25


датащи скачать

Go To PDF Page


ссылки URL



Вашему бизинису помогли Аллдатащит?  [ DONATE ] 

Что такое Аллдатащит   |   реклама   |   контакт   |   Конфиденциальность   |   Ссылка на техническое описание    |   обмен ссыками   |   поиск по производителю
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