English
Language : 

UPSD33XX Datasheet, PDF (151/231 Pages) STMicroelectronics – Fast 8032 MCU with Programmable Logic
uPSD33xx
Data Polling. Polling on the Data Polling Flag Bit
(DQ7) is a method of checking whether a program
or erase operation is in progress or has complet-
ed. Figure 61 shows the Data Polling algorithm.
When the 8032 issues a program instruction se-
quence, the embedded algorithm within the Flash
memory array begins. The 8032 then reads the lo-
cation of the byte to be programmed in Flash
memory to check status. The Data Polling Flag Bit
(DQ7) of this location becomes the compliment of
Bit D7 of the original data byte to be programmed.
The 8032 continues to poll this location, compar-
ing the Data Polling Flag Bit (DQ7) and monitoring
the Error Flag Bit (DQ5). When the Data Polling
Flag Bit (DQ7) matches Bit D7 of the original data,
then the embedded algorithm is complete. If the
Error Flag Bit (DQ5) is '1,' the 8032 should test the
Data Polling Flag Bit (DQ7) again since the Data
Polling Flag Bit (DQ7) may have changed simulta-
neously with the Error Flag Bit (DQ5) (see Figure
61).
The Error Flag Bit (DQ5) is set if either an internal
time-out occurred while the embedded algorithm
attempted to program the byte (indicating a bad
Flash cell) or if the 8032 attempted to program bit
to logic ’1’ when that bit was already programmed
to logic ’0’ (must erase to achieve logic ’1’).
It is suggested (as with all Flash memories) to read
the location again after the embedded program-
ming algorithm has completed, to compare the
byte that was written to the Flash memory with the
byte that was intended to be written.
When using the Data Polling method during an
erase operation, Figure 61 still applies. However,
the Data Polling Flag Bit (DQ7) is '0' until the erase
operation is complete. A ’1’ on the Error Flag Bit
(DQ5) indicates a time-out condition on the Erase
cycle, a ’0’ indicates no error. The 8032 can read
any location within the sector being erased to get
the Data Polling Flag Bit (DQ7) and the Error Flag
Bit (DQ5).
PSDsoft Express generates ANSI C code func-
tions for implementation of these Data Polling al-
gorithms.
Figure 61. Data Polling Flowchart
START
READ DQ5 & DQ7
at VALID ADDRESS
DQ7
=
YES
DATA
NO
NO DQ5
=1
YES
READ DQ7
DQ7
=
YES
DATA
NO
FAIL
PASS
AI01369B
151/231