ST10F269 5 - INTERNAL FLASH MEMORY
23/184
If the second command given is not an erase
confirm or if the coded cycles are wrong, the
instr uction aborts, and the device is reset to Read
Mode. It is not necessary to program the block
with 0000h as the EPC will do this automatically
before the erasing to FFFFh. Read operations
after the EPC has started, output the Flash Status
Register.
Durin g the execution of the erase by the EPC, the
device accepts only the Erase Suspend and
Read/Reset instructions. Data Polling bit FSB.7
returns ‘0’ while the erasure i s in progress, and ‘1’
when it has com pleted. The To ggle bit FSB.2 and
FSB.6 toggle during the erase operation. They
stop when erase is completed. After completion,
the Error bit FSB.5 returns ‘1’ if there has been an
erase failure because erasure has not completed
even after the maximum number of erase cycles
have been executed by the EPC, in this case, it
will be necessary to input a Read/Reset to the
Command Interface in order to reset the EPC.
Chip Erase (CE). This instruction uses six write
cycles. The Erase Enable command xx80h, must
be written at address 1554h after CI-Enable
cycles. The Ch ip Erase command xx10h m ust be
given on the sixth cycle after a second C I-Enabl e
sequence. An error in command sequence will
reset the CI to Read mode. It is NOT necessary to
pro gram the block with 00 00h as the EPC will do
this automatically before the erasing to FFFFh.
Read operations after the EPC has st arted output
the Flas h Status Register. During the execution of
the erase by the EPC, Data Polling bit FSB.7
returns ‘0’ while the erasure i s in progress, and ‘1’
when it has completed. The FSB.2 and FSB.6 bit
toggle during the erase operation. They stop when
erase is f inished. T he FSB .5 error bit r eturns "1" in
case of failure of the erase operation. The error
flag is set after the maximum number of erase
cycles have been executed by the EPC. In this
case, it will be necessary to input a Read/Reset to
the Comma nd Interface in order to reset the EPC.
Erase Suspend (ES). This instruction can be
used to suspend a Block Erase operation by
giving the command xxB0h without any specific
address. No CI-Enable cycles is required. Erase
Suspend operation allows reading of data from
another block and/or the program ming in another
block while erase is in progress. If this command
is given during t he t ime-out period, it will termi nate
the time-out period in addition to erase Suspend.
The Toggle bit FSB.6, when monitored at an
address that belongs to the block being erased,
stops togg ling when Erase Suspend Com mand is
effective, It happens between 0.1µs and 15µs
after the Erase Suspend Command has been
written. The Flash will then go in normal Read
Mode, and read from blocks not being erased is
valid, while read from block being erased will
output FSB.2 toggling. During a Suspend phase
the o nly instructions valid are Erase Resum e and
Program Word. A Read / Reset instruction d uring
Erase s uspend wi ll definitely abor t the E rase a nd
result in invalid data in the block being erased.
Erase Resume (ER). This instruction can be
given when the memory is in Erase Suspend
State. Erase can be resumed by writing the
command xx30h at any address without any
Cl-enable sequence .
Program during Erase Suspend. The Program
Word instructi on during Erase Suspend is allowed
only on bl oc ks that ar e not Er as e-suspended. This
instruction is the same than the Program Word
instruction.
Set Protection ( SP) . This inst ruction can be used
to enable both Block Protection (to protect each
block independently from accidental Erasing-Pro-
gramming Operation) and Code Protection (to
avoid code dump). The Set Protection Command
must be given after a speci al CI-Protection Enab le
cycles (see instruction table). The follow ing Write
cycle, will progr am the Protec tion Regi ster. To pr o-
tect the block x (x = 0 t o 6), the dat a bit x must be
at ‘0 ’. To protec t the code, bit 15 of the data must
be ‘0’. Enabling Block or Code Protection is per-
manent and can be cleared only by STM. Block
Temporary Unprotection and Code Temporary
Unprotec tion instruct ions are avai lable to allow the
customer to update the code.
Notes: 1. The new value programmed in
protection register w ill only becom e active
after a reset .
2. Bit that are already at ’0’ in protection
register must be confirmed at ’0’ also in
data latched during the 4th cycle of set
protection command, otherwise an error
may o ccu r.
Read Protection Status (RP). This instruction is
used to read the Block Protection status and the
Code Protection status. To read the protection
register (see Table 3), the CI-Protection Enable
cycles must be executed followed by the
command xx90h at address x2A54h. The
following Read Cycles at any odd word address
will output th e Block Protection Sta tus. The Read/
Reset command xxF0h must be written to reset
the protection interface.
Note: After a modification of protection register
(using Set Protection com mand), the Read