EasyManua.ls Logo

Lattice Semiconductor MachXO2 - Reading Flash Pages

Lattice Semiconductor MachXO2
57 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
MachXO2 Programming and Configuration Usage Guide
53
Reading Flash Pages
Reading the Configuration Flash and the User Flash Memory pages requires a specific procedure. The Configura-
tion Flash and UFM pages are accessible from any of the MachXO2’s configuration ports. The JTAG, Slave SPI,
and the WISHBONE configuration ports all behave identically when performing read operations. The I
2
C port
requires a modified access protocol. A high-level representation of the data flow, by port, is shown in Figure 22.
All ports start the read process in the same way, by sending a Read Flash/Read UFM Flash command. The
MachXO2 begins the read process once the command byte has been accepted by the configuration logic. The
Page Address Pointer determines the first page returned from the MachXO2. For the first returned page to be valid
(e.g. for single-page read operations), a Retrieval delay of 240 ns for 2K and bigger devices or 360 ns for 1K and
smaller devices must be observed. The Retrieval delay time is from the end of the Command byte transmission to
the end of the first Operand byte transmission See Figure 21. Note that for slower interface clock rates, 240 ns or
360 ns may be consumed entirely by the normal transmission of the first Operand and no additional delay may be
necessary.
Figure 21. Retrieval Delay Timing Requirement for Single-Page Reads
Figure 22. Flash Page Command and Data Sequence
Figure 22 shows a multiple page read sequence. The Read Page, or Read UFM Page command is transmitted to
the MachXO2. As can be seen in Figure 22, all interfaces return the page at the Page Address Pointer immediately.
For single-page read operations, all configuration ports are allowed to terminate the read immediately following the
transfer of the final byte of the first page. The I
2
C interface differs only in the Read Flash/Read UFM Flash operand
bytes.
Reading more than one page requires special handling. The multiple page read duplicates the page selected by
the Page Address Pointer. The result of this behavior is that the page count must be one greater than the desired
number of pages. For example, reading two pages requires the page count supplied in the Read Flash/Read UFM
Flash command to be assigned a value of 3. If the Page Address Pointer is 0000, the MachXO2 will return three
pages, Page 0, Page 0, and Page 1. A restriction must be observed when using the WISHBONE interface to read
the configuration flash or UFM. When reading 13 or more pages, the page count must be set to the maximum
(16383 decimal or 0x3FFF). The user logic is not required to read this number of pages and may safely truncate
the read operation after the desired number of pages have been read.
CMD OP1 OP2 OP3
240 ns or 360 ns
min.
CMD +
OPS
P(n)
P(n) P(n)
4
dummy
bytes
JTAG/SPI
WISHBONE RX Data
1
JTAG/SPI/I
2
C/
WISHBONE Tx Data
Notes:
1. JTAG/SSPI must transmit data in order to read data back. The data sent by the JTAG/SSPI
master is not specified (i.e. don’t care).
2. The I
2
C must use RESTART between sending the CMD and reading the data. (Issuing a STOP
terminates a CMD and resets the I
2
C state machine.)
CMD + OPS = Read Flash or Read UFM Flash command byte + 3 operand bytes.
I
2
C RX Data
2
)m(P)n(P P(n+1)
P(n+1) P(n+2)
P(n+2) P(n+3)
4
dummy
bytes
P(m)
1 page
undefined
data

Other manuals for Lattice Semiconductor MachXO2

Related product manuals