Professional Documents
Culture Documents
Application benefits
NAND
controller
signals
• RAM extension
SDRAM
SDRAM
memory
signals • Flash memory extension
controller
• Parallel interface (Intel 8080 / Motorola 6800)
Overview 3
DECODE
NAND
controller
signals
ADDR
SDRAM Device
memory
SDRAM
controller signals
DATA CONTROL
Key features 5
• Flexible configuration
• FMC external access frequency is up to HCLK/2
• Programmable timings to support a wide range of devices
• 8- ,16- or 32-bit data bus
• External asynchronous wait control
• Extended mode (read timings and protocol different to write timings)
• Supports burst mode access to synchronous devices (NOR Flash and PSRAM)
• Write FIFO with 16 x32-bit depth
Supported devices 6
• SDRAM memory
• Interfaces with Synchronous DRAM (SDRAM) memory-mapped
FMC Bank memory mapping 7
0x6FFF FFFF
Bank 1 – Chip Select 4
0x63FF FFFF
Bank 1 – Chip Select 1 Load
26 25 24 23 0x6000 0000 64MBytes
NOR/PSRAM address mapping 10
0x6FFF FFFF
Bank 1 – Chip Select 4
0x63FF FFFF
Bank 1 – Chip Select 1 Load
26 25 24 23 0x6000 0000 64MBytes
NOR/PSRAM address mapping 10
0x6FFF FFFF
Bank 1 – Chip Select 4
0x63FF FFFF
Bank 1 – Chip Select 1 Load
26 25 24 23 0x6000 0000 64MBytes
NOR/PSRAM address mapping 10
0x6FFF FFFF
Bank 1 – Chip Select 4
0x63FF FFFF
Bank 1 – Chip Select 1 Load
26 25 24 23 0x6000 0000 64MBytes
NOR/PSRAM interface signals with SRAM 14
FMC Address
[18:0]
FMC_NE[4:1] 512K
FMC_NL (or NADV)
NOR/PSRAM FMC_NBL[2:0]
Data X
memory 16-bit
controller
FMC_CLK [15:0]
=
FMC_A[25:0]
FMC_D[31:0] 1MByte
FMC_NOE
NAND
memory FMC_NWE
controller FMC_NWAIT
SDRAM
memory
controller
CubeMX Configuration for SRAM Connection 15
CubeMX Configuration for SRAM Connection 15
CubeMX Configuration for SRAM Connection 15
CubeMX Configuration for SRAM Connection 15
CubeMX Configuration for SRAM Connection 15
CubeMX Configuration for SRAM Connection 15
NOR/PSRAM Interface Protocol and Timing 21
For READ
For WRITE
CubeMX FSMC Configuration for SRAM 30
For READ
For WRITE
About NOR Flash Memory 34
Address
FMC
[22:0]
Data
FMC_NE[4:1]
[15:0]
FMC_NL (or NADV)
NOR/PSRAM FMC_NBL[2:0]
memory
controller
FMC_CLK
8M x 16-bit
FMC_A[25:0]
FMC_D[31:0] =
FMC_NOE 16MByte
NAND
memory FMC_NWE
controller FMC_NWAIT
SDRAM
memory
controller
CubeMX Configuration for NOR Connection 36
CubeMX Configuration for NOR Connection 36
CubeMX Configuration for NOR Connection 36
CubeMX FSMC Configuration for NOR 39
CubeMX FSMC Configuration for NOR 39
CubeMX FSMC Configuration for NOR 39
CubeMX FSMC Configuration for NOR 39
CubeMX FSMC Configuration for NOR 39
CubeMX FSMC Configuration for NOR 39
NOR Flash Memory HAL Code Example 45
NOR Flash Memory Command Sequence 46
… … …
0 A04 A04 A04
1 A03 A03 A03 0 Address
• Memory0Command
A02 A02 bus)
(16-bit A02 1 Decoder
1 A01 A01 A01 0
0 A00 A00 A00 1
Write 0xA Recv. 0b0101
NOR Flash Memory Command Sequence 46
… … …
0 A04 A04 A03 0
1 A03 A03 A02 1 Address
• Memory0Command
A02 A02 bus)
(16-bit A01 0 Decoder
1 A01 A01 A00 1
0 A00 A00 A-1
Write 0xA Recv. 0b0101
NOR Flash Memory Polling Sequence 50
0xDFFF FFFF
Bank 6
0xD000 0000 256 Mbytes
0xCFFF FFFF
Bank 5
256 Mbytes Bank 6 – SDRAM Bank 2 0xDFFF FFFF
0xC000 0000
256MBytes 0xD000 0000
0x9FFF FFFF
Bank 4
0x9000 0000 Reserved
Bank 5 – SDRAM Bank 1 0xCFFF FFFF
0x8FFF FFFF
Bank 3 256MBytes 0xC000 0000
0x8000 0000 256 Mbytes
0x7FFF FFFF
Bank 2
0x7000 0000
Reserved
0x6FFF FFFF
Bank 1
0x6000 0000 4 x 64 Mbytes
SDRAM address mapping 51
0xDFFF FFFF
Bank 6
0xD000 0000 256 Mbytes
Reserved
0xCFFF FFFF
Bank 5
0xC000 0000
4256
x 64Mbytes
Mbytes
0x9FFF FFFF
Bank 4
0x9000 0000 Reserved
0x8FFF FFFF
Bank 3
0x8000 0000 256 Mbytes
Bank 2 – SDRAM Bank 2 0x7FFF FFFF
0x7FFF FFFF
Bank 2 256MBytes 0x7000 0000
0x7000 0000 256 Mbytes
0x6FFF FFFF 0x6FFF FFFF
Bank 1 – SDRAM Bank 1
Bank 1
256MBytes 0x6000 0000
0x6000 0000 256 Mbytes
SDRAM interface signals 52
• SDRAM Memory
• Synchronous
Address
• Dynamic [11:0]
• Random Access
Data
FMC [31:0]
NOR/PSRAM
FMC_A[11:0]
memory
controller FMC_D[31:0]
FMC_BA[1:0]
FMC_NBL[3:0]
NAND
memory
controller
FMC_SDCLK
SDRAM FMC_SDCKE[1:0]
memory FMC_SDNE[1:0]
controller FMC_SDNWE
FMC_NRAS
FMC_NCAS
About SDRAM Memory 54
BA[n]
BANK 0
ROW Decoder
BANKCell
DRAM 1 Array
BANKCell
DRAM 2 Array
A[n] BANKCell
DRAM 4 Array
DRAM Cell Array
COLUMN Decoder
About SDRAM Memory 54
BA[n]
BANK 0
ROW Decoder
BANKCell
DRAM 1 Array
BANKCell
DRAM 2 Array
A[n] BANK
DRAM
Copied Row 4Buffer
Cell Array
DRAM Cell Array
COLUMN Decoder
About SDRAM Memory 54
BA[n]
BANK 0
ROW Decoder
BANKCell
DRAM 1 Array
BANKCell
DRAM 2 Array
A[n] BANK
DRAM
Copied Row 4Buffer
Cell Array
DRAM Cell Array
COLUMN Decoder
About SDRAM Memory 54
BA[n]
BANK 0
ROW Decoder
BANKCell
DRAM 1 Array
BANKCell
DRAM 2 Array DQ[n]
A[n] BANK
DRAM
Copied Row 4Buffer
Cell Array DAT
DRAM Cell Array
COLUMN Decoder
About SDRAM Memory 54
BA[n]
BANK 0
ROW Decoder
BANKCell
DRAM 1 Array
BANKCell
DRAM 2 Array DQ[n]
A[n] BANK
DRAM
Copied Row 4Buffer
Cell Array DAT
DRAM Cell Array
COLUMN Decoder
• SDRAM Memory
• Synchronous
• Dynamic Address
[11:0] Data
• Random Access
[31:0]
FMC
A(2+12+8)
NOR/PSRAM
X 32-bit
memory =
controller FMC_A[11:0]
FMC_D[31:0] 16Mbytes
FMC_BA[1:0]
NAND
memory FMC_NBL x 4
controller
FMC_SDCLK
SDRAM FMC_SDCKE
memory FMC_SDNE
controller FMC_SDNWE
FMC_NRAS
FMC_NCAS
SDRAM Commands 60
SDRAM State Diagram 61
BANK AUTO
PRECHARGE MODE
CLOCK REFRESH
ALL REGISTER
EN
IDLE REFRESH
AUTOMATIC
(by FMC)
READ WRITE
READ ACTIVE WRITE
CMD CMD
CMD (BANK/ROW) CMD
READ WRITE
w/ AP w/ AP
READ WRITE
WRITE
(READ) PRECHG
CMD
PRECHG PRECHG
PRECHARGE
(DEACTIVE)
SDRAM READ Operation 62
ACTIVE READ
BANK
CLOCK
EN
PRECHARGE
ALL
AUTO
REFRESH
MODE
REGISTER
IDLE
SDRAM Initialize Sequence 70
BANK
CLOCK
EN
PRECHARGE
ALL
AUTO
REFRESH
MODE
REGISTER
IDLE
SDRAM Initialize Sequence 70
BANK
CLOCK
EN
SELF AUTO
REFRESH IDLE REFRESH
PRECHARGE
ALL
Self running Automatically
for Dormant (FMC)
AUTO
REFRESH
MODE
REGISTER
IDLE
SDRAM Initialize Sequence 70
BANK
CLOCK
EN
SELF AUTO
REFRESH IDLE REFRESH
PRECHARGE
ALL
Self running Automatically
for Dormant (FMC)
AUTO
REFRESH
SELF
REFRESH IDLE
Self running
for Dormant
About NAND Flash Memory 75
page (512byte)
Y: byte
X: 512
About NAND Flash Memory Structure 76
page
page (512byte)
(512byte) Z: block count (32)
page
page (512byte)
(512byte)
page
page (512byte)
(512byte)
page (512byte)
Y: byte
X: 512
About NAND Flash Memory Structure 76
page
page (512byte)
(512byte)
page
page (512byte)
(512byte)
page
page (512byte)
(512byte)
page (512byte) block (x32 page)
page
page (512byte)
(512byte)
page
page (512byte)
(512byte)
page
page (512byte)
(512byte) Z: block count (32)
page
page (512byte)
(512byte)
page
page (512byte)
page (512byte)
(512byte)
Y: byte
X: 512
About NAND Flash Memory Structure 76
page
page (512byte)
(512byte)
page
page (512byte)
(512byte)
page
page (512byte)
(512byte)
page (512byte) block (x32 page)
page
page (512byte)
(512byte)
page
page (512byte)
(512byte)
page
page (512byte)
(512byte) Z: block count (32)
page
page (512byte)
(512byte)
page
page (512byte)
page (512byte)
(512byte)
Y: byte
X: 512
page buffer
External interfacing
About NAND Flash Memory Structure 76
About NAND Flash Interface Protocol 81
DECODER
page
page (512byte)
page (512byte)
page (512byte)
page (512byte)
(512byte)
CMD(READ) page
page (512byte)
page (512byte)
page buffer
About NAND Flash Interface Protocol 81
DECODER
page
page (512byte)
page (512byte)
page (512byte)
page (512byte)
(512byte)
A[15:8] page
page (512byte)
page (512byte)
page buffer
About NAND Flash Interface Protocol 81
DECODER
page
page (512byte)
page (512byte)
page (512byte)
page (512byte)
(512byte)
A[7:0] page
page (512byte)
page (512byte)
page buffer
About NAND Flash Interface Protocol 81
DECODER
page
page (512byte)
page (512byte)
page (512byte)
page (512byte)
page (512byte)
page (512byte)
page (512byte)
page(512byte)
page buffer
About NAND Flash Interface Protocol 81
DECODER
page
page (512byte)
(512byte)
page (512byte)
page (512byte)
page (512byte)
(512byte)
Page data page
page (512byte)
page (512byte)
Page data
page(512byte)
page buffer
About NAND Flash Interface Protocol 81
Command Strobe
DECODER
page
page (512byte)
(512byte)
page (512byte)
page (512byte)
page (512byte)
page (512byte)
page (512byte)
page (512byte)
page(512byte)
page buffer
About NAND Flash Interface Protocol 81
DECODER
page
page (512byte)
(512byte)
page (512byte)
page (512byte)
page (512byte)
page (512byte)
Address Strobe page (512byte)
page (512byte)
page(512byte)
page buffer
About NAND Flash Interface Protocol 81
DECODER
page
page (512byte)
(512byte)
page (512byte)
page (512byte)
page (512byte)
page (512byte)
page (512byte)
page (512byte)
page(512byte)
page buffer
NAND interface signals 89
Address
A16, A17 Data
FMC
[7:0]
FMC_A[25:0]
NOR/PSRAM FMC_D[31:0]
memory FMC_NOE
controller
FMC_NWE
FMC_NWAIT
NAND FMC_NCE
memory
controller FMC_INT
SDRAM
memory
controller
NAND interface signals 89
Address
A16, A17 Data
FMC
[7:0]
FMC_A[25:0]
NOR/PSRAM FMC_D[31:0]
memory FMC_NOE
controller
FMC_NWE
FMC_NWAIT
NAND FMC_NCE
memory
controller FMC_INT
SDRAM
memory
controller
NAND interface signals 89
Address
A16, A17 Data
FMC
[7:0]
FMC_A[25:0]
NOR/PSRAM FMC_D[31:0]
memory FMC_NOE
controller
FMC_NWE
FMC_NWAIT
0x3FFFF Address
A17:16 [0b1x]
NAND FMC_NCE
0x20000 Section
memory
controller FMC_INT 0x1FFFF
A17:16 [0b01] Command
0x10000 Section
SDRAM
memory
controller A17:16 [0b00]
0x0FFFF Data
0x00000 Section
NAND address mapping 92
0x83FF FFFF
Common
64MBytes 0x8000 0000
NAND address mapping 92
0x83FF FFFF
Common
64MBytes 0x8000 0000
NAND address mapping 92
0x83FF FFFF
Common
64MBytes 0x8000 0000
NAND address mapping 92
• Access two flashes in parallel with the same frame format and the
same instruction (8-bit par cycle)
QUADSPI
Registers
Shift Register QSPI Flash
& Control
CLK
CLK
BK1_IO0/SO
Q0/SI
BK1_IO1/SI
FIFO BK1_IO2
Q1/SO
Q2/nWP
BK1_IO3
Q3/nHOLD
BK1_nCS
AHB nCS
Clock
Management
Quad-SPI Overview 112
• Access two flashes in parallel with the same frame format and the
same instruction (8-bit par cycle)
QUADSPI
Registers
Shift Register QSPI Flash
& Control
CLK
CLK
BK1_IO0/SO
Q0/SI
BK1_IO1/SI
FIFO BK1_IO2
Q1/SO
Q2/nWP
BK1_IO3
Q3/nHOLD
BK1_nCS
AHB nCS
• Access two flashes in parallel with the same frame format and the
same instruction (8-bit par cycle)
QUADSPI
Registers
Shift Register QSPI Flash
& Control
CLK
CLK
BK1_IO0/SO
Q0/SI
BK1_IO1/SI
FIFO BK1_IO2
Q1/SO
Q2/nWP
BK1_IO3
Q3/nHOLD
BK1_nCS
AHB nCS
• Access two flashes in parallel with the same frame format and the
same instruction (8-bit par cycle)
QUADSPI
Registers
Shift Register QSPI Flash
& Control
CLK
CLK
BK1_IO0/SO
Q0/SI
BK1_IO1/SI
FIFO BK1_IO2
Q1/SO
Q2/nWP
BK1_IO3
Q3/nHOLD
BK1_nCS
AHB nCS
• Access two flashes in parallel with the same frame format and the
same instruction (8-bit par cycle)
QUADSPI
Registers
Shift Register QSPI Flash
& Control
CLK
CLK
BK1_IO0/SO
Q0/SI
BK1_IO1/SI
FIFO BK1_IO2
Q1/SO
Q2/nWP
BK1_IO3
Q3/nHOLD
BK1_nCS
AHB nCS
• Access two flashes in parallel with the same frame format and the
same instruction (8-bit par cycle)
QUADSPI
Registers
Shift Register QSPI Flash
& Control
CLK
CLK
BK1_IO0/SO
Q0/SI
BK1_IO1/SI
FIFO BK1_IO2
Q1/SO
Q2/nWP
BK1_IO3
Q3/nHOLD
BK1_nCS
AHB nCS
• Access two flashes in parallel with the same frame format and the
same instruction (8-bit par cycle)
QUADSPI
Registers
Shift Register QSPI Flash
& Control
CLK
CLK
BK1_IO0/SO
Q0/SI
BK1_IO1/SI
FIFO BK1_IO2
Q1/SO
Q2/nWP
BK1_IO3
Q3/nHOLD
BK1_nCS
AHB nCS
nCS
SCLK
IO0 7 6 5 4 3 2 1 0 4 0 4 0 4 0 4 0 4 0
IO1 5 1 5 1 5 1 5 1 5 1
IO2 6 2 6 2 6 2 6 2 6 2
IO3 7 3 7 3 7 3 7 3 7 3
A23-A16 A15-A8 A7-A0 M7-M0 Data
Byte
IO switch from
output to input
CubeMX Configuration for QSPI Connection 120
CubeMX QUADSPI Configuration 121
CubeMX QUADSPI Configuration 121
CubeMX QUADSPI Configuration 121
CubeMX QUADSPI Configuration 121
CubeMX QUADSPI Configuration 121
INDIRECT MODE
STATUS(1byte)
MASK (0x1)
Automatic Status Polling using QSPI HAL 131
INTERRUPT!
MCU QSPI QSPI Device
AND: Match!
STATUS(1byte)
MASK (0x1)
QSPI Memory Mapped Mode 135
• Up to 256Mbytes spaces
END