TMS320C31 Boot Loader Source Code
B-4
trap11 .word 809FEBh
trap12 .word 809FECh
trap13 .word 809FEDh
trap14 .word 809FEEh
trap15 .word 809FEFh
trap16 .word 809FF0h
trap17 .word 809FF1h
trap18 .word 809FF2h
trap19 .word 809FF3h
trap20 .word 809FF4h
trap21 .word 809FF5h
trap22 .word 809FF6h
trap23 .word 809FF7h
trap24 .word 809FF8h
trap25 .word 809FF9h
trap26 .word 809FFAh
trap27 .word 809FFBh
.word 809FFCh
.word 809FFDh
.word 809FFEh
.word 809FFFh
***************************************************************************
.space 5
check:
LDI
4040h,AR0
; load peripheral mem. map
LSH
9,AR0
; start addr. 808000h
LDI
404Ch,SP
; initialize stack pointer to
LSH
9,SP
; ram0 addr. 809800h
LDI
0,R0
; set start address flag off
intloop
TSTB
8,IF
; test for ext int3
BNZ
serial
; on int3 go to serial
LDI
8,AR1
; load 001000h / 2^9 –> AR1
TSTB
1,IF
; test for int0
BNZ
eprom_load
; branch to eprom_load if int0 = 1
LDI
2000h,AR1
; load 400000h / 2^9 –> AR1
TSTB
2,IF
; test for int1
BNZ
eprom_load
; branch to eprom_load if int1 = 1
LDI
7FF8h,AR1
; load FFF000h / 2^9 –> AR1
TSTB
4,IF
; test for int2
BZ
intloop
; if no intX go to intloop
eprom_load
LSH
9,AR1
; eprom address = AR1 * 2^9
LDI
*AR1++(1),R1
; load eprom mem. width
LDI
sub_w,AR3
; full–word size subroutine
; address –> AR3
LSH
26,R1
; test bit 5 of mem. width word
BN
load0
; if ’1’ start PGM loading
; (32 bits width)