Electronic Components Datasheet Search
  English  ▼

X  

AN2244 Datasheet(PDF) 11 Page - STMicroelectronics

Part # AN2244
Description  The ST10F27x MCUs provide 0.18關m embedded true Flash technology
PDF  17 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2244 Datasheet(HTML) 11 Page - STMicroelectronics

Back Button AN2244 Datasheet HTML 7Page - STMicroelectronics AN2244 Datasheet HTML 8Page - STMicroelectronics AN2244 Datasheet HTML 9Page - STMicroelectronics AN2244 Datasheet HTML 10Page - STMicroelectronics AN2244 Datasheet HTML 11Page - STMicroelectronics AN2244 Datasheet HTML 12Page - STMicroelectronics AN2244 Datasheet HTML 13Page - STMicroelectronics AN2244 Datasheet HTML 14Page - STMicroelectronics AN2244 Datasheet HTML 15Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 11 / 17 page
background image
AN2244
3 Application example: EEPROM emulation using ST10F27x Flash library
11/17
If the data to be written is different from 0xFFFFFFFF, we look for the last data equal to
0xFFFFFFFh (the following location should not contain 0x00000000) and the data is written
at this location.
The following diagram summarizes the write operation and treats the cases where written
data is equal to or different from 0xFFFFFFFF. This routine will return 0 on success,
VARIABLE_FULL if there isn’t enough memory for a variable update, or a Flash error code
indicating an operation failure (erase or program).
Figure 6.
WriteVerifyVariableFull routine flowchart
EepromSectorTransfer( ) routine
This routine transfers the most recent data (Last variable updates) plus the new one from a
full sector to an empty one. At the beginning, it determines the active sector which is the
sector that we want to transfer from. The new sector header field is defined and written (new
sector status is RECEIVE_DATA given that it is in the process of receiving data). When, the
data transfer is complete, the new sector header is marked VALID_SECTOR and the old
one TRANSFER_COMPLETE. At the end, the old sector is erased.
The transfer process is shown in the following figure:
Find Valid sector
Data=
0xFFFFFFFF?
status = FlashVerifyWord (address,0xFFFFFFFF)
Calculate the base address of the
status1 = FlashVerifyWord (address+4,0xFFFFFFFF)
status2 = FlashVerifyWord (address+4,0x00000000)
address=address+8
address=address+4
FlashProgramWord(address+4,0)
return 0
Write_request
status=0?
&&
status1=0?
Yes
No
No
status=0?
&&
status2=0?
Yes
Yes
No
variable in the valid sector address
FlashProgramWord(address, Data)
return 0



Html Pages

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


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