请教:进不去中断的问题
用的是TMS320C6457的DSP芯片,在软仿的情况下,通过将相应的system event置1,能够正常进入中断并跳转到中断服务程序,但是在相同条件下,硬仿的时候进进不去中断,也跳转不到中断服务程序,请问可能的原因是什么?代码如下:
空间分配:
MEMORY
{
VECTORS:
o = 0x00800000 l = 0x00000400
/*vectors*/
L2RAM: o = 0x00800400 l = 0x001FFC00 /* 2MB L2 Internal SRAM */
L1PRAM: o = 0x00E00000 l = 0x00008000 /* 32kB L1 Program SRAM/CACHE */
L1DRAM: o = 0x00F00000 l = 0x00008000 /* 32kB L1 Data SRAM/CACHE */
EMIFA_CE2: o = 0xA0000000 l = 0x00800000 /* 8MB EMIFA CE2 */
EMIFA_CE3: o = 0xB0000000 l = 0x00800000 /* 8MB EMIFA CE2 */
EMIFA_CE4: o = 0xC0000000 l = 0x00800000 /* 8MB EMIFA CE2 */
EMIFA_CE5: o = 0xD0000000 l = 0x00800000 /* 8MB EMIFA CE2 */
DDR2_CE0: o = 0xE0000000 l = 0x20000000 /* 512MB EMIFB CE0 */
}
中断向量表:
.sect".vecs"
.ref _c_int00
.ref _c_int04 ;ref the function defined in C file
.align 1024
_vectors:
_vector0: VEC_ENTRY _c_int00 ;RESET中断
_vector1: VEC_ENTRY _vec_dummy ;NMI不可屏蔽中断
_vector2: VEC_ENTRY _vec_dummy ;保留中断1
_vector3: VEC_ENTRY _vec_dummy ;保留中断2
_vector4: VEC_ENTRY _c_int04 ;对应于c_int04 ISR
_vector5: VEC_ENTRY _vec_dummy ;外部中断INT5
_vector6: VEC_ENTRY _vec_dummy ;外部中断INT6
_vector7: VEC_ENTRY _vec_dummy ;外部中断INT7
_vector8: VEC_ENTRY _vec_dummy ;外部中断INT8
_vector9: VEC_ENTRY _vec_dummy ;JTAGRTDX中断
_vector10: VEC_ENTRY _vec_dummy ;EMIF_SDRAM_Timer中断
_vector11: VEC_ENTRY _vec_dummy ;McBSP_0_Receive中断
_vector12: VEC_ENTRY _vec_dummy ;McBSP_1_Transmit中断
_vector13: VEC_ENTRY _vec_dummy ;Host_Port_Host_to_DSP中断
_vector14: VEC_ENTRY _vec_dummy ;Timer0中断
_vector15: VEC_ENTRY _vec_dummy ;Timer1中断
中断初始化:
void InitInterrupt(void)
{
unsigned int temp;
*IECRH = 0xFFFFFFFF; // IECRH (disable high interrupts enable)
*EECRH = 0xFFFFFFFF; // EECRH (disable high events enable)
*ICRH = 0xFFFFFFFF; // ICRH (clear high interrupts pending)
*ECRH = 0xFFFFFFFF; // ECRH (clear high events pending)
*IECR = 0xFFFFFFFF; // IECR (disable low interrupts enable)
*EECR = 0xFFFFFFFF; // EECR (disable low events enable)
*EICR = 0xFFFFFFFF; // ICR (clear low interrupts pending)
*ECR = 0xFFFFFFFF; // ECR (clear low events pending)
*EVTMASK0 = 0xffffffff;//disable combine
*EVTMASK1 = 0xffffffff;
*EVTMASK2 = 0xffffffff;
*EVTMASK3 = 0xffffffff;
*EVTCLR0 |= 0xfffffff;
*EVTCLR1 |= 0xfffffff;
*EVTCLR2 |= 0xfffffff;//clear all event(including 66) flag before the new interrupt come
*EVTCLR3 |= 0xfffffff;
temp = *EVTFLAG2;
ICR = 0xfffffffe;
//clear IFR
asm( " NOP");
asm( " NOP");
//
*INTMUX1 |= 0x00000037;//55对应到INT04
//
*INTMUX1 &= 0xffff0037;
*INTMUX1 |= 0x00000042;//INT04 responding to event 66,GPIO 15
*INTMUX1 &= 0xffff0042;
IER |= 0x00000012; // IE4=1,NMIE=1
ISTP = 0x00800080;
//
*EVTSET1 |= 0x00800000;//55
*EVTSET2 |= 0x00000004;//set interrupt 66,only for test,zdx
CSR |= 0x00000001;
// enable GIE
//*EVTSET2=0x0000;
} |