VI SDRAM CONTROLLER BLOCK: SDRAM INTERFACE
S1C33L03 FUNCTION PART
EPSON
B-VI-2-33
A-1
B-VI
SDRAM
Examples of SDRAM Controller Initialization Program
The following shows examples of the initialization program for using SDRAM.
Example of initialization routine for 2M words
×
16 bits
×
4 banks (16MB) of SDRAM
INIT_SDRAM_16MB:
;;;----------------------- SDRAM access configuration -----------------------------------
;;;*****************************************************************
;;;***************** C33 macro setting part ************************
;;;*****************************************************************
;;; set CEFUNC to use #CE13/14 (upper area)
... 1 (See "SDRAM Controller Configuration".)
xld.w %r0,0x48131
bset [%r0],0x1
;;; set area 6,13,14 to internal access
... 2, 5, B-1
xld.w %r0,0x48132
xld.w %r1,0x2200
ld.h [%r0], %r1
;;; area 6 -> output disable 0.5, wait 2
... 3
xld.w %r0,0x4812A
xld.w %r1,0x0237
ld.h [%r0],%r1
;;; available #WAIT
... 4
xld.w %r0,0x04812E
bset [%r0],0x0
;;; area 13,14 -> 16bit device, output disable 2.5, wait 0
... B-2, B-3, B-4
xld.w %r0,0x048122
xld.w %r1,0x30
ld.h [%r0],%r1
;;;*****************************************************************
;;;************** SDRAM Controller REG setting part ****************
;;;*****************************************************************
;;;-------------------------------------------------
;;;area13 0x2000000 - 0x2FFFFFF(16MB)
;;;area14 0x3000000 - 0x3FFFFFF(16MB)
;;;-------------------------------------------------
;///////////////////////////////////////////
;;; SDRAM area configuration register
... (note 1)
xld.w %r0,0x39FFC0 ;
xld.w %r1,0x88 ; set area13 to SDRAM area, #SDCE0(#CE13) available
ld.b [%r0],%r1 ; (16MB area available)
;///////////////////////////////////////////
;;; SDRAM control register
;;; xld.w %r0,0x39FFC1 ;
;;; xld.w %r1,0xff ; SDRAM self-refresh -> disable, initial sequence ->PRE REF MRS
;;; ld.b %r0],%r1 ; Little endian
;///////////////////////////////////////////
;;; SDRAM address configuration register
... (note 2)
xld.w %r0,0x39FFC2 ;
xld.w %r1,0x26 ; col 512 / row 4K / bank 4 -> 128Mb[16MB] available
ld.b [%r0],%r1 ;
;///////////////////////////////////////////
;;; SDRAM mode set-up register
xld.w %r0,0x39FFC3 ;
xld.w %r1,0x40 ; 2 CAS Latency ,burst length = 1
ld.b [%r0],%r1 ;
;///////////////////////////////////////////
;;; SDRAM timing set-up register 1
xld.w %r0,0x39FFC4 ;
xld.w %r1,0x4A ; Tras=2,Trp=1,Trc=2
... Recommended setting to operate with
ld.b [%r0],%r1 ;
25 MHz clock in x1 speed mode
;///////////////////////////////////////////
;;; SDRAM timing set-up register 2
xld.w %r0,0x39FFC5 ;
xld.w %r1,0x48 ; Trcd=1,Trsc=2,Trrd=1
ld.b [%r0],%r1 ;
;///////////////////////////////////////////
;;; SDRAM auto refresh count low-order register
;;; xld.w %r0,0x39FFC6 ;
;;; xld.w %r1,0xff ;
;;; ld.b [%r0],%r1 ;
;///////////////////////////////////////////
Summary of Contents for CMOS 32-Bit Single Chip Microcomputer S1C33L03
Page 4: ......
Page 14: ......
Page 15: ...S1C33L03 PRODUCT PART ...
Page 16: ......
Page 147: ...S1C33L03 FUNCTION PART ...
Page 148: ......
Page 149: ...S1C33L03 FUNCTION PART I OUTLINE ...
Page 150: ......
Page 152: ...I OUTLINE INTRODUCTION B I 1 2 EPSON S1C33L03 FUNCTION PART THIS PAGE IS BLANK ...
Page 162: ...I OUTLINE LIST OF PINS B I 3 8 EPSON S1C33L03 FUNCTION PART THIS PAGE IS BLANK ...
Page 163: ...S1C33L03 FUNCTION PART II CORE BLOCK ...
Page 164: ......
Page 166: ...II CORE BLOCK INTRODUCTION B II 1 2 EPSON S1C33L03 FUNCTION PART THIS PAGE IS BLANK ...
Page 172: ...II CORE BLOCK CPU AND OPERATING MODE B II 2 6 EPSON S1C33L03 FUNCTION PART THIS PAGE IS BLANK ...
Page 176: ...II CORE BLOCK INITIAL RESET B II 3 4 EPSON S1C33L03 FUNCTION PART THIS PAGE IS BLANK ...
Page 224: ...II CORE BLOCK BCU Bus Control Unit B II 4 48 EPSON S1C33L03 FUNCTION PART THIS PAGE IS BLANK ...
Page 262: ...II CORE BLOCK DBG Debug Unit B II 7 2 EPSON S1C33L03 FUNCTION PART THIS PAGE IS BLANK ...
Page 263: ...S1C33L03 FUNCTION PART III PERIPHERAL BLOCK ...
Page 264: ......
Page 266: ...III PERIPHERAL BLOCK INTRODUCTION B III 1 2 EPSON S1C33L03 FUNCTION PART THIS PAGE IS BLANK ...
Page 322: ...III PERIPHERAL BLOCK WATCHDOG TIMER B III 5 4 EPSON S1C33L03 FUNCTION PART THIS PAGE IS BLANK ...
Page 415: ...S1C33L03 FUNCTION PART IV ANALOG BLOCK ...
Page 416: ......
Page 418: ...IV ANALOG BLOCK INTRODUCTION B IV 1 2 EPSON S1C33L03 FUNCTION PART THIS PAGE IS BLANK ...
Page 434: ...IV ANALOG BLOCK A D CONVERTER B IV 2 16 EPSON S1C33L03 FUNCTION PART THIS PAGE IS BLANK ...
Page 435: ...S1C33L03 FUNCTION PART V DMA BLOCK ...
Page 436: ......
Page 438: ...V DMA BLOCK INTRODUCTION B V 1 2 EPSON S1C33L03 FUNCTION PART THIS PAGE IS BLANK ...
Page 492: ...V DMA BLOCK IDMA Intelligent DMA B V 3 18 EPSON S1C33L03 FUNCTION PART THIS PAGE IS BLANK ...
Page 493: ...S1C33L03 FUNCTION PART VI SDRAM CONTROLLER BLOCK ...
Page 494: ......
Page 531: ...S1C33L03 FUNCTION PART VII LCD CONTROLLER BLOCK ...
Page 532: ......
Page 579: ...S1C33L03 FUNCTION PART Appendix I O MAP ...
Page 580: ......