Quad Serial Peripheral Interface (QuadSPI)
MPC5606S Microcontroller Reference Manual, Rev. 7
Freescale Semiconductor
1049
30.5.3.2
Flash Programming
In all cases the memory sector to be written needs to be erased first. The programming sequence itself is
then initiated in the following way:
1. Check that the TX Buffer is empty. If the QSPI_SFMSR[TXNE] bit is set the TX Buffer must be
cleared by writing 1 into the QSPI_MCR[CLR_TXF] bit.
2. Program the address related to the command in the QSPI_SFAR register. Optionally one can clear
the QSPI_TBSR[TRCTR] field by writing 1 into QSPI_MCR[CLR_TXF].
3. Provide initial data for the program command into the circular buffer via register TX Buffer Data
Register (QSPI_TBDR). At least one word of data must be written into the TX Buffer.
4. Program the required instruction code options (i.e. size of data) into the QSPI_ICR[ICO] register.
5. Trigger the IP Command to program the serial flash device by writing the instruction code into the
QSPI_ICR[IC] register.
6. Depending from the amount of data required step 3 must be repeated until all the required data have
been written into the QSPI_TBDR register. At any time the QSPI_TBDR[TRCTR] field can be
read to check how many words have been written actually into the TX Buffer.
Steps 4 and 5 may be executed together.
Upon writing the QSPI_ICR[IC] field (refer to step 5) the QuadSPI module will start to execute the
command by transferring instruction code, address and then data to the external device. The data are
fetched from the TX Buffer. It consists of 15 entries with 32-bit and is organized as a circular FIFO, whose
read pointer is incremented after each fetch. When all data are transmitted, the QuadSPI module will return
from ‘busy’ to ‘idle’. However, this is not true for the external device since the internal programming is
still ongoing. It is up to the user to monitor the relevant status information available from the serial flash
device and to ensure that the programming is finished properly.
30.5.3.3
Flash Read
Host access to the data stored in the external serial flash device is done in two steps: First the data must be
read into the internal buffers and in the second step these internal buffers can be read by the host.
30.5.3.3.1
Reading Serial Flash Data into the QuadSPI Module
Read access to the external serial flash device can be triggered in two different ways:
•
IP Command Read
: For
flash read via the register interface
the user must provide the required
components of a SFM command to the QSPI_SFAR and the QSPI_ICR registers. All available read
commands supported by the external serial flash are possible.
Optionally it is possible to clear the RX Buffer pointer prior to triggering the IP Command by
writing a 1 into the QSPI_MCR[CLR_RXF] bit.
From these inputs the complete transaction is built when the QSPI_ICR[IC] field is written. The
transaction related to the read access starts and the requested number of bytes is fetched from the
external serial flash device into the RX Buffer. Since the read access is triggered via the register
interface the IP_ACC status bit is set driving in turn the BUSY bit (both are located in the
QSPI_SFMSR register).
Содержание MPC5602S
Страница 76: ...Overview MPC5606S Microcontroller Reference Manual Rev 7 74 Freescale Semiconductor...
Страница 82: ...Memory Map MPC5606S Microcontroller Reference Manual Rev 7 80 Freescale Semiconductor...
Страница 112: ...Signal Description MPC5606S Microcontroller Reference Manual Rev 7 110 Freescale Semiconductor...
Страница 166: ...Analog to Digital Converter ADC MPC5606S Microcontroller Reference Manual Rev 7 164 Freescale Semiconductor...
Страница 182: ...Boot Assist Module BAM MPC5606S Microcontroller Reference Manual Rev 7 180 Freescale Semiconductor...
Страница 234: ...Clock Description MPC5606S Microcontroller Reference Manual Rev 7 232 Freescale Semiconductor...
Страница 286: ...Crossbar Switch XBAR MPC5606S Microcontroller Reference Manual Rev 7 284 Freescale Semiconductor...
Страница 470: ...e200z0h Core MPC5606S Microcontroller Reference Manual Rev 7 468 Freescale Semiconductor...
Страница 524: ...Enhanced Direct Memory Access eDMA MPC5606S Microcontroller Reference Manual Rev 7 522 Freescale Semiconductor...
Страница 546: ...Error Correction Status Module ECSM MPC5606S Microcontroller Reference Manual Rev 7 544 Freescale Semiconductor...
Страница 669: ...Flash Memory MPC5606S Microcontroller Reference Manual Rev 7 Freescale Semiconductor 667...
Страница 670: ...Flash Memory MPC5606S Microcontroller Reference Manual Rev 7 668 Freescale Semiconductor...
Страница 716: ...FlexCAN MPC5606S Microcontroller Reference Manual Rev 7 714 Freescale Semiconductor...
Страница 882: ...LIN Controller LINFlex MPC5606S Microcontroller Reference Manual Rev 7 880 Freescale Semiconductor...
Страница 901: ...Memory Protection Unit MPU MPC5606S Microcontroller Reference Manual Rev 7 Freescale Semiconductor 899...
Страница 902: ...Memory Protection Unit MPU MPC5606S Microcontroller Reference Manual Rev 7 900 Freescale Semiconductor...
Страница 955: ...Mode Entry Module MC_ME MPC5606S Microcontroller Reference Manual Rev 7 Freescale Semiconductor 953...
Страница 956: ...Mode Entry Module MC_ME MPC5606S Microcontroller Reference Manual Rev 7 954 Freescale Semiconductor...
Страница 1072: ...Quad Serial Peripheral Interface QuadSPI MPC5606S Microcontroller Reference Manual Rev 7 1070 Freescale Semiconductor...
Страница 1096: ...Reset Generation Module MC_RGM MPC5606S Microcontroller Reference Manual Rev 7 1094 Freescale Semiconductor...
Страница 1106: ...Real Time Clock RTC API MPC5606S Microcontroller Reference Manual Rev 7 1104 Freescale Semiconductor...
Страница 1186: ...Stepper Stall Detect SSD MPC5606S Microcontroller Reference Manual Rev 7 1184 Freescale Semiconductor...
Страница 1213: ...System Integration Unit Lite SIUL MPC5606S Microcontroller Reference Manual Rev 7 Freescale Semiconductor 1211...
Страница 1214: ...System Integration Unit Lite SIUL MPC5606S Microcontroller Reference Manual Rev 7 1212 Freescale Semiconductor...
Страница 1238: ...Voltage Regulators and Power Supplies MPC5606S Microcontroller Reference Manual Rev 7 1236 Freescale Semiconductor...
Страница 1252: ...Wakeup Unit WKPU MPC5606S Microcontroller Reference Manual Rev 7 1250 Freescale Semiconductor...
Страница 1258: ...Registers Under Protection MPC5606S Microcontroller Reference Manual Rev 7 1256 Freescale Semiconductor...
Страница 1323: ...Register Map MPC5606S Microcontroller Reference Manual Rev 7 Freescale Semiconductor 1321...
Страница 1324: ...Register Map MPC5606S Microcontroller Reference Manual Rev 7 1322 Freescale Semiconductor...