English
Language : 

UPSD3354DV-40U6 Datasheet, PDF (173/272 Pages) STMicroelectronics – fast 8032 MCU with programmable logic
UPSD33xx
Figure 53. PSDsoft Express memory mapping
PSD module
Obsolete Product(s) - Obsolete Product(s) 27.2.4
EEPROM emulation
EEPROM emulation is needed if it is desired to repeatedly change only a small number of
bytes of data in Flash memory. In this case EEPROM emulation is needed because
although Flash memory can be written byte-by-byte, it must be erased sector-by-sector, it is
not erasable byte-by-byte (unlike EEPROM which is written AND erased byte-by-byte). So
changing one or two bytes in Flash memory typically requires erasing an entire sector each
time only one byte is changed within that sector.
However, two of the 8 Kbyte sectors of secondary Flash memory may be used to emulate
EEPROM by using a linked-list software technique to create a small data set that is
maintained by alternating between the two Flash sectors. For example, a data set of 128
bytes is written and maintained by software in a distributed fashion across one 8 Kbyte
sector of secondary Flash memory until it becomes full. Then the writing continues on the
other 8 Kbyte sector while erasing the first 8 Kbyte sector. This process repeats
continuously, bouncing back and forth between the two 8 Kbyte sectors. This creates a
wear-leveling effect, which increases the effective number of erase cycles for a data set of
128 bytes to many times more than the base 100K erase cycles of the Flash memory.
EEPROM emulation in Flash memory is typically faster than writing to actual EEPROM
memory, and more reliable because the last known value in a data set is maintained even if
a WRITE cycle is corrupted by a power outage. The EEPROM emulation function can be
called by the firmware, making it appear that the user is writing a single byte, or data record,
thus hiding all of the data management that occurs within the two 8 Kbyte Flash sectors.
EEPROM emulation firmware for the UPSD33xx is available from www.st.com/mcu.
Doc ID 9685 Rev 7
173/272