
ST52F510/F513/F514
35/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 ByteReadand 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 next data, the Master generates a
Start condition followed by the Slave Address
with the R/W byte set to 0 (10100000). The
device receives the Slave Address and ac-
knowledges it.
The sequence restarts from point 3 until there
is data to be read.
6.
7.
8.
9.
Remark:
for the same reasons explained in
Section 4.2.4 the Option Bytes cannot be read 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
(*) Block address is specified by the 3 most significative bits of the whole given address (less significative bits are don’t care)
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
BlockErase
A
Block Address (*)
A
Command
.....