哪位大佬帮我看一下,到底我哪里设置错了,死也进不去中断
P3_MFP EQU 0x5000003C
P33 EQU 0X5000426C
P32 EQU 0x50004268
P3_IEN EQU 0x500040DC
P3_ISRC EQU 0x500040E0
Stack_Size EQU 0x00000200
AREA STACK, NOINIT, READWRITE, ALIGN=3
Stack_Mem SPACE Stack_Size
__initial_sp
; <h> Heap Configuration
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Heap_Size EQU 0x00000000
AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem SPACE Heap_Size
__heap_limit
PRESERVE8
THUMB
; Vector Table Mapped to Address 0 at Reset
AREA RESET, DATA, READONLY
EXPORT __Vectors
__Vectors DCD __initial_sp ; Top of Stack
DCD Reset_Handler ; Reset Handler
DCD 0 ; NMI Handler
DCD 0 ; Hard Fault Handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; SVCall Handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; PendSV Handler
DCD 0 ; SysTick Handler
; External Interrupts
; maximum of 32 External Interrupts are possible
DCD 0
DCD 0
DCD 0
DCD EINT1_IRQHandler
AREA |.text|, CODE, READONLY
; Reset Handler
ENTRY
Reset_Handler
EXPORT Reset_Handler [WEAK]
;EXPORT TABLE
;IMPORT SystemInit
;IMPORT main
LDR R0, =0x50000100
; Unlock Register
LDR R1, =0x59
STR R1, [R0]
LDR R1, =0x16
STR R1, [R0]
LDR R1, =0x88
STR R1, [R0]
; Init POR
LDR R2, =0x50000024;
LDR R1, =0x00005AA5
STR R1, [R2]
; Init Clock
LDR R2, =0x5000021C;CLKSEL2
LDR R1, =0x000000A8;
STR R1, [R2]
LDR R2, =0x50000200;PWRCON
LDR R1, =0x00000014;22M_OSC_EN
STR R1, [R2]
LDR R2, =0x50000210;CLKSEL0
LDR R1, =0x0000001A;HCLK from PLL
STR R1, [R2]
;LDR R2, =0x50000214;CLKSEL1
;LDR R1, =0x00000210
;STR R1,[R2];SPI Clock from PLL,TIMER0 Clock from HCLK
;LDR R2, =0x50000208;APBCLK
;LDR R1, =0x00001004;SPI0CLK_EN,TIMER0_EN
;STR R1, [R2]
LDR R2, =0x50000220;PLLCON
LDR R1, =0x0008D25F;48.25MHz
STR R1, [R2]
; Lock register
MOVS R1, #0
STR R1, [R0]
;TIME0 Init
;LDR R2,=0X40010000
;LDR R1,=0x70100010;TIME0-PUTOUT
;STR R1,[R2]
;LDR R2,=0X40010004
;LDR R1,=0x00000003;
;STR R1,[R2]
;System Init
;LDR R2,=0X50000034;P1_MFP
;LDR R1,=0x0000F000;SPI0 复用
;STR R1,[R2]
;LDR R2,=0X5000003C;P3_MFP
;LDR R1,=0x00004010;
;STR R1,[R2]
LDR R4,=P32
LDR R5,=P33
NVIC_INIT
; NVIC Init
LDR R2, =0xE000E100;
LDR R1, =0x00000008
STR R1, [R2]
LDR R2, =P3_IEN;EINT1_EN
LDR R1, =0x00100000
STR R1, [R2]
LDR R2, =P3_MFP;EINT1_EN
LDR R1, =0x00000010
STR R1, [R2]
;LDR R0, =SystemInit
;BLX R0
startloop
; IO Init
LDR R2, =0x500040C0;
LDR R1, =0x0000FF3F;
STR R1, [R2]
LDR R2, =P3_ISRC;
;LDR R1, =0x00000010
ldr R1, [R2]
MOVS R0,#0X00
MOVS R1,#0X01
MOVS R3,#0X16
MOVS R6,#0
STR R0,[R4]
B startloop
EINT1_IRQHandler
MOVS R0,#0X00
MOVS R1,#0X01
STR R1,[R4]
STR R0,[R4]
BL mainloop
END
main部分就不贴出来了,我调试的时候死也进不了中断,不知道什么原因 |
|