数据端口是16BIT的SDRAM,CPU是MCF5271,SDRAM的初始化如下:
; (1) Power-Up Sequence
writemem.w 0x40000040 0x022A ; DCR
writemem.l 0x40000048 0x00001220 ; DACR0:base=0x00000000
writemem.l 0x4000004C 0x007C0001 ; DMR:8M enabled
; (2) Precharge Sequence
writemem.l 0x40000048 0x00001228 ; Set DACR0[IP]
;writemem.l 0x00000000 0x00000000 ; Execute PALL command
writemem.w 0x00000000 0x0000
; (3) Refresh Sequence
writemem.l 0x40000048 0x00009228 ; DACR0: Set DACR0[re]enable refresh
DELAY 100 ;Delay for Refresh
; (4) Mode Register Initialization Sequence
writemem.l 0x40000048 0x00009268 ;DACR0: Initiate Mode Register Set Command
;writemem.l 0x00000000 0x00000000 ;Execute MRS command
writemem.w 0x00000800 0x0000
初始化执行到第三步就执行不下去了最后读寄存器0x40000048的内容是0x00001220.但是SDRAM可以运行,也能读写. |