aPPenDiX e iniTialiZaTiOn ROuTine
S1C17153 TeChniCal Manual
Seiko epson Corporation
aP-e-1
(Rev. 1.0)
Appendix E Initialization Routine
The following lists typical vector tables and initialization routines:
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 int05_handler
; 0x05 0x14 -
.long int06_handler
; 0x06 0x18 -
.long ct_handler
; 0x07 0x1c CT
.long rtc_handler
; 0x08 0x20 RTC
.long int09_handler
; 0x09 0x24 -
.long lcd_handler
; 0x0a 0x28 LCD
.long t16a2_0_handler
; 0x0b 0x2c T16A2 ch0
.long int0c_handler
; 0x0c 0x30 -
.long int0d_handler
; 0x0d 0x34 -
.long t8_0_handler
; 0x0e 0x38 T8 ch0
.long int0f_handler
; 0x0f 0x3c -
.long uart_0_handler
; 0x10 0x40 UART ch0
.long int11_handler
; 0x11 0x44 -
.long spi_0_handler
; 0x12 0x48 SPI ch0
.long int13_handler
; 0x13 0x4c -
.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, 0x0800
...(4)
; ----- Memory controller ----------------
Xld.a %r1, 0x54b0 ; ROMC register address
; Flash read wait cycle
Xld.a %r0, 0x00 ; No wait
ld.b [%r1], %r0 ; [0x54b0] <= 0x00
...(5)
; ===== Main routine =========================================
...