Chapter 17 Flash Memory
MPC5602P Microcontroller Reference Manual, Rev. 4
312
Freescale Semiconductor
Throughout this discussion, bk
n
_ is used as a prefix to refer to two signals, each for each bank: bk0_ and
bk1_. Also, the nomenclature B
x
_P
y
_RegName is used to reference a program-visible register field
associated with bank “
x
” and port “
y
”.
17.2.6
Basic interface protocol
The platform Flash controller interfaces to the Flash array by driving addresses (bk
n
_fl_addr[23:0]) and
read or write enable signals (bk
n
_fl_rd_en, bk
n
_fl_wr_en).
The read or write enable signal (bk
n
_fl_rd_en, bk
n
_fl_wr_en) is asserted in conjunction with the reference
address for a single rising clock when a new access request is made.
Addresses are driven to the Flash array in a flow-through fashion to minimize array access time. When no
outstanding access is in progress, the platform Flash controller drives addresses and asserts bk
n
_fl_rd_en
or bk
n
_fl_wr_en and then may change to the next outstanding address in the next cycle.
Accesses are terminated under control of the appropriate read/write wait state control setting. Thus, the
access time of the operation is determined by the settings of the wait state control fields. Access timing
can be varied to account for the operating conditions of the device (frequency, voltage, temperature) by
appropriately setting the fields in the programming model for either bank.
The platform Flash controller also has the capability of extending the normal AHB access time by inserting
additional wait states for reads and writes. This capability is provided to allow emulation of other
memories that have different access time characteristics. The added wait state specifications are provided
by bit 28 to bit 24 of Flash address (haddr[28:24], see
). These wait states are
applied in addition to the normal wait states incurred for Flash accesses. Refer to
for more details.
Prefetching of next sequential page is blocked when haddr[28:24] is non-zero. Buffer hits are also blocked
as well, regardless of whether the access corresponds to valid data in one of the page read buffers. These
steps are taken to ensure that timing emulation is correct and that excessive prefetching is avoided. In
addition, to prevent erroneous operation in certain rare cases, the buffers are invalidated on any
non-sequential AHB access with a non-zero value on haddr[28:24].
17.2.7
Access protections
The platform Flash controller provides programmable configurable access protections for both read and
write cycles from masters via the Platform Flash Access Protection Register (PFAPR). It allows restriction
of read and write requests on a per-master basis. This functionality is described in
“Platform Flash Access Protection Register (PFAPR).
Detection of a protection violation results in an error
response from the platform Flash controller on the AHB transfer.
17.2.8
Read cycles — buffer miss
Read cycles from the Flash array are initiated by driving a valid access address on bk
n
_fl_addr[23:0] and
asserting bk
n
_fl_rd_en for the required setup (and hold) time before (and after) the rising edge of hclk.
The platform Flash controller then waits for the programmed number of read wait states before sampling
the read data on bk
n
_fl_rdata[127:0]. This data is normally stored in the least-recently updated page read