APPENDIX E INITIALIZATION ROUTINE
S1C17M20/M21/M22/M23/M24/M25
Seiko Epson Corporation
AP-E-1
TECHNICAL MANUAL (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 svd3_handler
; 0x04 0x10 SVD3
.long pport_handler
; 0x05 0x14 PPORT
.long int06_handler
; 0x06 0x18 -
.long clg_handler
; 0x07 0x1c CLG
.long rtca_handler
; 0x08 0x20 RTCA
.long t16_0_handler
; 0x09 0x24 T16 ch0
.long uart3_0_handler
; 0x0a 0x28 UART3 ch0
.long t16_1_handler
; 0x0b 0x2c T16 ch1
.long spia_0_handler
; 0x0c 0x30 SPIA ch0
.long i2c_handler
; 0x0d 0x34 I2C
.long t16b_0_handler
; 0x0e 0x38 T16B ch0
.long t16b_1_handler
; 0x0f 0x3c T16B ch1
.long uart3_1_handler
; 0x10 0x40 UART3 ch1
.long snda_handler
; 0x11 0x44 SNDA
.long remc3_handler
; 0x12 0x48 REMC3
.long int13_handler
; 0x13 0x4c -
.long rfc_0_handler
; 0x14 0x50 RFC ch0
.long rfc_1_handler
; 0x15 0x54 RFC ch1
.long t16_2_handler
; 0x16 0x58 T16 ch2
.long spia_1_handler
; 0x17 0x5c SPIA ch1
.long t16_3_handler
; 0x18 0x60 T16 ch3
.long adc12a_handler
; 0x19 0x64 ADC12A
.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, 0x7c0
...
(4)
; ----- Memory controller ----------------
Xld.a %r1, 0x41b0 ; FLASHC register address
; Flash read wait cycle
Xld.a %r0, 0x00 ; 0x00 = No wait
ld.b [%r1], %r0 ; [0x41b0] <= 0x00
...
(5)
; ===== Main routine =========================================
...