APPENDIX E INITIALIZE ROUTINE
AP-38
EPSON
S1C17704 TECHNICAL MANUAL
Appendix E Initialize Routine
This section shows a sample vector table and an initialize routine.
boot.s
.org 0x8000
.section
.rodata
...
(1)
; ======================================================================
; Vector table
; ======================================================================
; interrupt vector interrupt
; number offset source
.long BOOT ; 0x00 0x00 reset
...
(2)
.long unalign_handler ; 0x01 0x04 unalign
.long nmi_handler ; 0x02 0x08 NMI
.long int03_handler ; 0x03 0x0c -
.long p0_handler ; 0x04 0x10 P0 port
.long p1_handler ; 0x05 0x14 P1 port
.long swt_handler ; 0x06 0x18 SWT
.long ct_handler ; 0x07 0x1c CT
.long t8osc1_handler ; 0x08 0x20 T8OSC1
.long int09_handler ; 0x09 0x24 SVD
.long lcd_handler ; 0x0a 0x28 LCD
.long t16e_handler ; 0x0b 0x2c T16E
.long t8f_handler ; 0x0c 0x30 T8F
.long t16_0_handler ; 0x0d 0x34 T16 ch0
.long t16_1_handler ; 0x0e 0x38 T16 ch1
.long t16_2_handler ; 0x0f 0x3c T16 ch2
.long uart_handler ; 0x10 0x40 UART
.long remc_handler ; 0x11 0x44 REMC
.long spi_handler ; 0x12 0x48 SPI
.long i2c_handler ; 0x13 0x4c I2C
.long int14_handler ; 0x14 0x50 -
.long int15_handler ; 0x15 0x54 -
.long int16_handler ; 0x16 0x58 -
.long int17_handler ; 0x17 0x5c -
.long int18_handler ; 0x18 0x60 -
.long int19_handler ; 0x19 0x64 -
.long int1a_handler ; 0x1a 0x68 -
.long int1b_handler ; 0x1b 0x6c -
.long int1c_handler ; 0x1c 0x70 -
.long int1d_handler ; 0x1d 0x74 -
.long int1e_handler ; 0x1e 0x78 -
.long int1f_handler ; 0x1f 0x7c -
; ======================================================================
; Program code
; ======================================================================
.text
...
(3)
.align 1
BOOT:
; ===== Initialize ===========================================
; ----- Stack pointer --------------------
Xld.a %sp, 0x0f00
...
(4)
; ----- Memory controller ----------------
Xld.a %r1, 0x5320 ; MISC register base address
; FLASHC
Xld.a %r0, 0x04 ; 1 cycle access, under 6 MHz system clock
ld.b [%r1], %r0 ; [0x5320] <= 0x04
...
(5)
; SRAMC
Xld.a %r0, 0x00 ; 2 cycle access
ext 0x01
ld.b [%r1], %r0 ; [0x5321] <= 0x01
...
(6)
Содержание S1C17704
Страница 1: ...TECHNICAL MANUAL S1C17704 CMOS 16 BIT SINGLE CHIP MICROCOMPUTER ...
Страница 22: ...1 OVERVIEW 1 10 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 42: ...3 MEMORY MAP BUS CONTROL 3 12 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 82: ...6 INTERRUPT CONTROLLER ITC 6 26 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 108: ...8 CLOCK GENERATOR CLG 8 8 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 112: ...9 PRESCALER PSC 9 4 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 138: ...10 I O PORTS P 10 26 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 156: ...11 16 BIT TIMERS T16 11 18 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 208: ...14 8 BIT OSC1 TIMER T8OSC1 14 16 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 234: ...16 STOPWATCH TIMER SWT 16 14 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 242: ...17 WATCHDOG TIMER WDT 17 8 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 264: ...18 UART 18 22 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 300: ...20 I2C 20 20 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 320: ...21 REMOTE CONTROLLER REMC 21 20 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 360: ...24 ON CHIP DEBUGGER DBG 24 6 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 362: ...25 BASIC EXTERNAL WIRING DIAGRAM 25 2 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...