ELEC3300 10-Memory Interface
ELEC3300 10-Memory Interface
Topic 10
Memory, Interfacing to Memory, Memory Timing,
and Applications
Prof. Tim Woo
Microcontroller Structure
A/D Port
Buffering and
Serial Port Direct Memory Access
CPU (DMA)
External Memory Port
Memory,
Interfacing to Memory,
External Interrupt Port
Memory Timing
Interrupt and applications
External Timer Port Interfacing LCD
Organization Timer and
Counter Simple I/O Port
Motor Interfacing
In this course, STM32 is used as a driving vehicle for delivering the concepts.
To be covered In progress Done
7
2
6
4
4 7
6
5
2
(1 bit)
(RAS = 0, CAS = 1)
(RAS = 1, CAS = 0)
(1 bit)
ELEC 3300 : Spring 17/18 Tim Woo 10
Basic DRAM Operation
Step 1
Step 3 Step 4
• Refresh: read out the voltage of each cell, amplify it, charge the capacitor
back to the original voltage
• All cells in a row are refreshed in parallel
• The entire DRAM is refreshed by providing each possible row address in
sequence by a counter to increment the row address at each refresh cycle
• For a 4Mx1-bit DRAM, 2048 refresh cycles are needed
ELEC 3300 : Spring 17/18 Tim Woo 14
STM32: Interfacing to DRAM
STM32 PA.0-PA.7
PB.0-PB.8
PC.0
PC.1
PC.2
9-bit Row Address Decoder: A0 -A8: Row0 - Row7, Col9
9-bit decoder
Row 0 – 7 ,
Col 9
Delay2
Block 0
Block 1
Block 2
Block 0
Block 1
Block 2
• Operations
– Read
– Write or Program : Change state from 1 to 0
– Erase : Change state from 0 to 1
Erase
Write / Program
• Unit
– Page (sector) : management or program unit
– Block : erase unit
MCU MCU
SDRAM
SDRAM High (Data)
(Data) speed
(Code)
NOR Slow
NOR
(Code) speed (Code)
High
High cost
(Boot Code)
cost
EPROM replacement
Code is copied into high speed SDRAM
Support dynamically code update
Sometime, codes in NOR flash is stored in
Execute-In-Place (XIP): allows the system to a compressed format, and uncompressed
execute code directly from NOR flash into the SDRAM prior to execution
• NAND Shadowing
MCU
SDRAM
(Data) Use a small amount of NOR / ERPOM
for holding the bootstrap code and the
(Code) OS image
NOR / EPROM
(Boot Code)
• NAND XIP
– Interface conversion from NAND to SRAM / NOR
• Boot image loading
• Error detection and correction coding (EDC/ECC)
• Level 2 Cache (SRAM): Code prefetching, Data preloading
– Use NAND flash memory as the backing storage for Swap in / out
on demand
demand paging
NAND
– Advantages (Data)
• Space utilization
(Code)
• Power consumption
• Flexible
– Requires MMU (Memory Management Unit) NOR / EPROM
(Boot Code)
Code execution
Microcontroller Structure
A/D Port
Buffering and
Serial Port Direct Memory Access
CPU (DMA)
External Memory Port
Memory,
Interfacing to Memory,
External Interrupt Port
Memory Timing
Interrupt and applications
External Timer Port Interfacing LCD
Organization Timer and
Counter Simple I/O Port
Motor Interfacing
In this course, STM32 is used as a driving vehicle for delivering the concepts.
To be covered In progress Done