Qdatasheet_Logo
Integrated circuits, Transistor, Semiconductors Search and Datasheet PDF Download Site

AN2077 View Datasheet(PDF) - STMicroelectronics

Part Name
Description
MFG CO.
AN2077
ST-Microelectronics
STMicroelectronics ST-Microelectronics
'AN2077' PDF : 19 Pages View PDF
EEPROM Emulation with STR71x
Figure 2. Software example concept
STR71x Flash Sector 0
Area for Data-set storage
Data-set-1
Data-set-2
Data-set-3
0xFFFFFFFF
STR71x Flash Sector1
0xFFFFFFFF
0xFFFFFFFF
0xFFFFFFFF
Area for Status bits
The last “0” corresponds
to the valid Data-set
Status bits for
valid Flash sector
0x600D: Valid sector
0xFFFF: Invalid sector
0xFFFFFFFF
0xFFFFFFFF
1 1 1 1 1 0 00
0x600D
1 1 1 1 1 1 11
0xFFFF
Switch between each sector
(Erase one when full)
In this example a sector is erased only when it is full and the last word on each sector indicates
the status of the corresponding sector:
– 0x600D (Good) indicates a valid sector,
– 0xFFFF (Default value after an erase operation) indicates an invalid sector.
This software implements also a status bit for each Data-set. When a new Data-set is written
to the Data-set area, the software will reset the corresponding bit in the status bits area.
Figure 2. shows an example of a mechanism for setting the status bits in the status bit area.
This figure shows that Data-Set-3 is the valid one because there is three ‘0’s in the status bit
area.
Note: This mechanism takes into account the case when the Data-Set value is 0xFFFFFFFF which is the
default value after an erase operation.
4.2 SOFTWARE OUTPUT FUNCTIONS
There are three output functions in the software as described below.
13/19
Share Link: GO URL

All Rights Reserved © qdatasheet.com  [ Privacy Policy ] [ Contact Us ]