![NXP Semiconductors LPC43Sxx Скачать руководство пользователя страница 638](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_1721827638.webp)
UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2015. All rights reserved.
User manual
Rev. 2.1 — 10 December 2015
638 of 1441
NXP Semiconductors
UM10503
Chapter 24: LPC43xx/LPC43Sxx SPI Flash Interface (SPIFI)
Because the SPIFI is an AHB device, software or a DMA channel can read bytes,
halfwords, or words from the flash region.
Reads from the flash region are delayed by deasserting HREADY when necessary, until
the requested bytes are available to be read.
In Memory mode, SPIFI prefetches sequential addresses in order to improve
performance.
If no AHB accesses have taken place for a period specified by the time-out (TO) field in
the Control register, the SPIFI will deassert CS. Once a new access occurs that requires a
new fetch of data, the SPIFI will reassert CS and send a new command to fetch the
required data. This is done in order to save power in the SPI flash device.
If software reads or writes more data from the Data Register than was configured in the
DataLen field of the Command register or reads or writes when no command was issued,
the SPIFI hardware issues an abort exception.
When the serial flash needs to be programmed or erased, software should not write to the
flash region of the address map. Instead, it should write the appropriate sequence of
commands to the Command, Address, and Data registers. When an actual erase or
program operation is under way in the serial flash device, software should write a Read
Status command (with the POLL bit set) to the Command register. Thereafter:
•
If INTEN in the Control register is 1, the SPIFI will interrupt the processor when the
erase or write operation (and thus the Read Status command) completes.
•
If not, software can continually or periodically read the Status register until it indicates
that the Read Status command is complete.
When erasing or programming completes, software can do further programming or
erasing, or return to normal (memory mode) operation.
24.7.3 Peripheral mode DMA operation
The SPIFI inserts wait states when necessary during read and write operations by the
core to maintain synchronization between core accesses and serial data transfer with the
serial flash. This mechanism is all that is needed for load and store accesses and for
memory-to-memory transfers by a DMA channel.
The peripheral mode is a mode that supports DMA transfers in which the SPIFI acts as a
peripheral and drives a request signal to the DMA channel to control data transfer. This
mode does not necessarily move data faster than memory-to-memory operation, but it
may be advantageous in systems in which software controls dynamic transfer of code
and/or data between the serial flash and RAM on an as-needed basis. The advantage is
that clock cycles are not lost to wait states, and thus the overall operation of the AHB is
more efficient.
The DMA controller should be programmed to present word operations at the fixed
address of the Data Register to have a burst size of one transfer. The SPIFI drives the
DMA request to the DMA controller.
To use this mode, software should write the Command register to start the command and
program a DMA channel as described above to transfer data between the Data register
and RAM. The SPIFI asserts the DMA request when: