Dears,
I have a problem on TMS320C6457 interrupt,。
what i want to do is:
1.trigger a GPIO interrupt by GPIO 15
2.Jump to my ISR
and the emulation result is:
1.GPIO configuration is right
2.IFR, EVTFLAG, IER, CSR are all right
but the problem is:
1.The ISTP doesn't change to the valve which i expect, what i expect is 0x00800080, but it is 0x00800000
2.Program doesn't jump to the my ISR
so my question is:
1. Am i wrong with the use of ISTP? In SPRU732J, it said that the ISTB's maximum value is 0x3ffff, but the 6457's minimun memory address is 0x00800000, i am puzzled.
2. Are there other problems with my program?
My program is as follow: _c_int04 is the ISR i expect jump to
Memory allocation:
MEMORY
{
VECTORS: o = 0x00800000 l = 0x00000400
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 */
}
IST defination:
.align 1024
_vectors:
_vector0: VEC_ENTRY _c_int00 ;RESET
_vector1: VEC_ENTRY _vec_dummy ;NMI
_vector2: VEC_ENTRY _vec_dummy ;
_vector3: VEC_ENTRY _vec_dummy ;
_vector4: VEC_ENTRY _c_int04 ;c_int04 ISR,this is my ISR
_vector5: VEC_ENTRY _vec_dummy
_vector6: VEC_ENTRY _vec_dummy
_vector7: VEC_ENTRY _vec_dummy
_vector8: VEC_ENTRY _vec_dummy
_vector9: VEC_ENTRY _vec_dummy
_vector10: VEC_ENTRY _vec_dummy
_vector11: VEC_ENTRY _vec_dummy
_vector12: VEC_ENTRY _vec_dummy
_vector13: VEC_ENTRY _vec_dummy
_vector14: VEC_ENTRY _vec_dummy
_vector15: VEC_ENTRY _vec_dummy
Interrupt init:
void InitInterrupt(void)
{
*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 |= 0x00000042;//INT04 responding to event 66,GPIO 15
*INTMUX1 &= 0xffff0042;
IER |= 0x00000012; // IE4=1,NMIE=1
ISTP = 0x00800080; //point to my ISR , _c_int04
//*EVTSET2 |= 0x00000004;
CSR |= 0x00000001; // enable GIE
}