
ST52F510/F513/F514
34/106
Figure 4.3 Reading and Erasing Procedures
Fast Reading Procedure
4.3 Memory Verify
To verify the memory contents or just to read part
of data stored in memory, the ByteRead and the
ReadData command can be used. The first
instruction needs the specification of the address;
the second one allows the sequential reading of
consecutive memory locations.
Since the device is “Slave” for the I
2
C protocol,
after receiving a command for reading, it must be
configured as Slave Transmitter to send the data.
In order to do so, the Slave Address (1010000)
must be sent again with the R/W byte set to 1, as
stated by the communication protocol.
4.3.1 Fast read procedure.
The memory can be
read sequentially by using the following procedure:
1.
The Programming mode is entered with the
sequence described in Section 4.2.1
2.
The pointers address the memory location 0
3.
The ReadData command is sent and the de-
vice acknowledges it.
4.
The Master generates a Stop condition fol-
lowed by a Start condition
5.
The Slave Address with the R/W byte set to 1
(10100001) is sent. The device receives the
Slave Address and acknowledges it.
The device sends the data to be read in the
serial data line SDA. The current absolute ad-
dress is post-incremented.
The Master device doesn’t send the acknowl-
edge and generates a stop condition.
To read the nextdata, the Master generates a
Start condition followed by theSlave Address
with the R/W byte set to 0 (10100000). The
device receives the Slave Address and ac-
knowledges it.
The sequence restartsfrom point 3 until there
is data to be read.
6.
7.
8.
9.
Remark:
for the same reasons explained in
Section 4.2.4 theOption Bytescannot beread with
this procedure: they can be read with a direct
addressing procedure as the one explained in the
next section.
Random Byte Reading Procedure
Byte Erasing Procedure
Block Erasing Procedure
S=Start, P=Stop, A=Acknowledge, NA=Non-acknowledge
From Slave to Master
From Master to Slave
S
10100000
A
00000000
A
ReadData
A
P
S
1010000
1
A
Data read NA
P
.....
.....
S
10100000
A
ReadData
A
P
S
1010000
1
A
Data read NA
P
.....
Data read NA
P
.....
SetPage
A
Page Address
A
ByteRead
A
Byte Address
A
P
S
1010000
1
A
.....
.....
Data read NA
P
S
1010000
0
A
Command
.....
.....
SetPage
A
Page Address
A
ByteErase
A
Byte Address
A
Command
.....
.....
SetPage
A
Page Address
A
IncBlock
A
.....
IncBlock
A
BlockErase
A
Command
.....