我在我的程序中绑定了两个中断:interrrupt 4和interrupt 5。其中interrrupt 4可以生效,interrupt 5不能生效。
有两点是可以确认的:
1.触发每个中断的事件是都产生了的
2.INTMUX1中设置的值是对的
以下是interrupt vector table 的创建,想请教下有什么思路来定位这个问题?多谢!
;create interrupt vector table for C6000 DSP
;————————————————————–
;This file can be modified to add Interrupt Service Routine(ISR)
;for an interrupt, the steps are:
;1,reference to the externally defined ISR, for example
; .ref EDMA_ISR
;2,modify the corresponding entry in the interrupt vector table.
; For example, if interrupt 8 is used for EDMA, then you should
; modify the entry number 8 like below:
; VEC_ENTRY EDMA_ISR ;interrupt 8
;————————————————————–
;Author: Brighton
;Created on 2011-8-10
;————————————————————–
;reference to the externally defined ISR
.ref _c_int00
.ref packetRcvIsr
.ref packetTxIsr
.global vectors
;————————————————————–
;create interrupt vector for reset (interrupt 0)
VEC_RESET .macro addr
MVKL addr,B0
MVKH addr,B0
B B0
MVC PCE1,B0
MVC B0,ISTP
NOP 3
.align 32
.endm
;create interrupt vector for other used interrupts
VEC_ENTRY .macro addr
STW B0,*–B15
MVKL addr,B0
MVKH addr,B0
B B0
LDW *B15++,B0
NOP 4
.align 32
.endm
;create interrupt vector for unused interrupts
VEC_DUMMY .macro
unused_int?:
B unused_int? ;dead loop for unused interrupts
NOP 5
.align 32
.endm
;————————————————————–
;interrupt vector table
.sect "vecs"
.align 1024
vectors:
VEC_RESET _c_int00 ;RESET
VEC_DUMMY ;NMI/Exception
VEC_DUMMY ;RSVD
VEC_DUMMY ;RSVD
VEC_ENTRY packetRcvIsr;interrupt 4
VEC_ENTRY packetTxIsr;RSVD
VEC_DUMMY ;RSVD
VEC_DUMMY ;RSVD
VEC_DUMMY ;interrupt 8
VEC_DUMMY ;interrupt 9
VEC_DUMMY ;interrupt 10
VEC_DUMMY ;interrupt 11
VEC_DUMMY ;interrupt 12
VEC_DUMMY ;interrupt 13
VEC_DUMMY ;interrupt 14
VEC_DUMMY ;interrupt 15
.end
user1871791:
楼主是如何去顶中断不生效的?是否选择正确的触发源?
是否清楚了相应的 标志位,使得后面的中断继续发生?
James Li2:
可以看一下IER(中断使能寄存器)中是不是中断4和5对应的比特都enable了