34
Data Sheet
FlashFlex51 MCU
SST89E52RD2/RD / SST89E54RD2/RD / SST89E58RD2/RD
SST89V52RD2/RD / SST89V54RD2/RD / SST89V58RD2/RD
©2006 Silicon Storage Technology, Inc. S71255-05-000 5/06
4.0 FLASH MEMORY PROGRAMMING
The device internal flash memory can be programmed or
erased using the In-Application Programming (IAP) mode.
4.1 Product Identification
The Read-ID command accesses the Signature Bytes that
identify the device and the manufacturer as SST. External
programmers primarily use these Signature Bytes in the
selection of programming algorithms.
4.2 In-Application Programming Mode
The device offers either 16/24/40 KByte of in-application
programmable flash memory. During in-application pro-
gramming, the CPU of the microcontroller enters IAP
mode. The two blocks of flash memory allow the CPU to
execute user code from one block, while the other is being
erased or reprogrammed concurrently. The CPU may also
fetch code from an external memory while all internal flash
is being reprogrammed. The mailbox registers (SFST,
SFCM, SFAL, SFAH, SFDT and SFCF) located in the spe-
cial function register (SFR), control and monitor the
device’s erase and program process.
Table 4-2 outline the commands and their associated mail-
box register settings.
4.2.1 In-Application Programming Mode Clock
Source
During IAP mode, both the CPU core and the flash control-
ler unit are driven off the external clock. However, an inter-
nal oscillator will provide timing references for Program and
Erase operations. The internal oscillator is only turned on
when required, and is turned off as soon as the flash oper-
ation is completed.
4.2.2 Memory Bank Selection for In-Application
Programming Mode
With the addressing range limited to 16 bit, only 64 KByte
of program address space is “visible” at any one time. The
bank selection (the configuration of EA# and SFCF[1:0]),
allows Block 1 memory to be overlaid on the lowest 8
KByte of Block 0 memory, making Block 1 reachable. The
same concept is employed to allow both Block 0 and Block
1 flash to be accessible to IAP operations. Code from a
block that is not visible may not be used as a source to pro-
gram another address. However, a block that is not “visible”
may be programmed by code from the other block through
mailbox registers.
The device allows IAP code in one block of memory to pro-
gram the other block of memory, but may not program any
location in the same block. If an IAP operation originates
physically from Block 0, the target of this operation is implic-
itly defined to be in Block 1. If the IAP operation originates
physically from Block 1, then the target address is implicitly
defined to be in Block 0. If the IAP operation originates from
external program space, then, the target will depend on the
address and the state of bank selection.
4.2.3 IAP Enable Bit
The IAP enable bit, SFCF[6], enables in-application pro-
gramming mode. Until this bit is set, all flash programming
IAP commands will be ignored.
4.2.4 In-Application Programming Mode
Commands
All of the following commands can only be initiated in the
IAP mode. In all situations, writing the control byte to the
SFCM register will initiate all of the operations. All com-
mands will not be enabled if the security locks are enabled
on the selected memory block.
The Program command is for programming new data into
the memory array. The portion of the memory array to be
programmed should be in the erased state, FFH. If the
memory is not erased, it should first be erased with an
appropriate Erase command. Warning: Do not attempt to
write (program or erase) to a block that the code is cur-
rently fetching from. This will cause unpredictable pro-
gram behavior and may corrupt program data.
TABLE 4-1: Product Identification
Address Data
Manufacturer’s ID 30H BFH
Device ID
SST89E52RD2/RD 31H 9DH
SST89V52RD2/RD 31H 9CH
SST89E54RD2/RD 31H 9FH
SST89V54RD2/RD 31H 9EH
SST89E58RD2/RD 31H 9BH
SST89V58RD2/RD 31H 9AH
T4-1.2 1255