AnsweredAssumed Answered

Vector interrupt generation problem

Question asked by sent888 on Feb 27, 2012
Latest reply on Apr 19, 2012 by DeepV

I am working on tiger sharc ts201 multiprocessor board. I am trying to generate vector interrupt in processors 1 to 7 by writting address into respective VIRPT register from processor 0. On writting the address into virpt register, interrupt is generated but execution control is not transferred to written address. I can observe on writting the address into virpt register, the respective bit in ILATH,IMASK registers is set. But the program counter is not changing to the written address after the interrupt generation.

 

/* Here is the code */

 

asm("xR0 = IMASKH;;xR1 = 0x10010000;;xR2 = R1 or R0;;IMASKH = xR2;;");

 

TMP_VAL = __builtin_sysreg_read(__SQCTL);

TMP_VAL |= (SQCTL_NMOD | SQCTL_TRCBEN | SQCTL_GIE);

pReg_scon_b = (unsigned int*)(BCST_OFFSET_LOC + SQCTL_LOC);

*pReg_scon_b = TMP_VAL;

 

PROC_ID = __builtin_sysreg_read(__SYSTAT) & 0x7;

FG0_ON = 0x1F,FG0_OFF = 0x0F;

 

TMP_VAL =  __builtin_sysreg_read(__SYSCON);

TMP_VAL = TMP_VAL^(SYSCON_MEM_WID64 | SYSCON_MP_WID64);

pReg_scon_b = (unsigned int*)(BCST_OFFSET_LOC + SYSCON_LOC);

*pReg_scon_b = TMP_VAL;

 

if(PROC_ID == 0)

{

          delay(1);

          for(pCnt = 0;pCnt < 7;pCnt++)

          {

                    blink();

                    pReg_vir = (unsigned int*)(pAddrSpace[pCnt] + VIRPT_LOC);

                    pReg_ilat = (unsigned int*)(pAddrSpace[pCnt] + ILATH_LOC);

                    *pReg_vir = 0x500;

                    RegVal = *pReg_ilat;

                    if(RegVal & INT_VIRPT)

                    {

                              RdCnt++;

                    }

                    delay(1);

          }

}

Outcomes