English
Language : 

UPSD33XX Datasheet, PDF (150/231 Pages) STMicroelectronics – Fast 8032 MCU with Programmable Logic
uPSD33xx
If all the Flash memory sectors selected for era-
sure are protected, DQ6 toggles to ’0’ for about
100µs, then returns value of D6 of the previously
addressed byte.
Error Flag (DQ5). During a normal program or
erase operation, the Error Flag Bit (DQ5) is to ’0’.
This bit is set to ’1’ when there is a failure during
Flash memory byte program, sector erase, or bulk
erase operations.
In the case of Flash memory programming, DQ5
Bit indicates an attempt to program a Flash mem-
ory bit from the programmed state of 0, to the
erased state of 1, which is not valid. DQ5 may also
indicate a particular Flash cell is damaged and
cannot be programmed.
In case of an error in a Flash memory sector erase
or byte program operation, the Flash memory sec-
tor in which the error occurred or to which the pro-
grammed byte belongs must no longer be used.
Other Flash memory sectors may still be used.
DQ5 is reset after a Reset Flash instruction se-
quence.
Erase Time-out Flag (DQ3). The Erase Time-
out Flag Bit (DQ3) reflects the time-out period al-
lowed between two consecutive sector erase in-
struction sequence bytes. If multiple sector erase
commands are desired, the additional sector
erase commands (30h) must be sent by the 8032
within 80us after the previous sector erase com-
mand. DQ3 is 0 before this time period has ex-
pired, indicating it is OK to issue additional sector
erase commands. DQ3 will go to logic ’1’ if the time
has been longer than 80µs since the previous sec-
tor erase command (time has expired), indication
that is not OK to send another sector erase com-
mand. In this case, the 8032 must start a new sec-
tor erase instruction sequence (unlock and
command) beginning again after the current sec-
tor erase operation has completed.
Programming Flash Memory. When a byte of
Flash memory is programmed, individual bits are
programmed to logic '0.' The user cannot program
a bit in Flash memory to a logic ’1’ once it has been
programmed to a logic '0.' A bit must be erased to
logic ’1’, and programmed to logic '0.' That means
Flash memory must be erased prior to being pro-
grammed. A byte of Flash memory is erased to all
1s (FFh). The 8032 may erase the entire Flash
memory array all at once, or erase individual sec-
tor-by-sector, but not erase byte-by-byte. Howev-
er, even though the Flash memories cannot be
erased byte-by-byte, the 8032 may program Flash
memory byte-by-byte. This means the 8032 does
not need to program group of bytes (64, 128, etc.)
at one time, like some Flash memories.
Each Flash memory requires the 8032 to send an
instruction sequence to program a byte or to erase
sectors (see Table 80., page 148).
If the byte to be programmed is in a protected
Flash memory sector, the instruction sequence is
ignored.
IMPORTANT: It is mandatory that a chip-select
signal is active for the Flash sector where a pro-
gramming instruction sequence is targeted. Make
sure that the correct chip-select equation, FSx, or
CSBOOTx specified in PSDsoft Express matches
the address range that the 8032 firmware is ac-
cessing, otherwise the instruction sequence will
not be recognized by the Flash array. If memory
paging is used, be sure that the 8032 firmware
sets the page register to the correct page number
before issuing an instruction sequence to the
Flash memory segment on a particular memory
page, otherwise the correct sector select signal
will not become active.
Once the 8032 issues a Flash memory program or
erase instruction sequence, it must check the sta-
tus bits for completion. The embedded algorithms
that are invoked inside a Flash memory array pro-
vide several ways to give status to the 8032. Sta-
tus may be checked using any of three methods:
Data Polling, Data Toggle, or Ready/Busy (pin
PC3).
Table 81. Flash Memory Status Bit Definition
Functional Block FSx, or CSBOOTx
DQ7 DQ6 DQ5
Flash Memory
Active (the desired
Data Toggle Error
segment is selected) Polling Flag Flag
Note: 1. X = Not guaranteed value, can be read either '1' or '0.'
2. DQ7-DQ0 represent the 8032 Data Bus Bits, D7-D0.
DQ4
X
DQ3
Erase
Time-
out
DQ2
X
DQ1
X
DQ0
X
150/231