This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

c6678 interrupt problem

hello:

my interrupt is:

void myIsr()

{

    if(DNUM != 0)

  {

    flag0=1;

cnt0++;

 }

else

{

 flag1= 1;

cnt1++;

}

}

when the interrrupt happen,and go to the Isr, and execute the  flag0=1; cnt0++; I find sometime, just cnt0++, flag0=1 not exectute, because flag0 is still 0,

I define flag0:

volatile int flag0 = 0; make it 128 byte Alignment;place it in LL2,  But sometimes   this Phenomenon will happen!

I don't know where is the problem.

Thanks

 

 

 

  • Is this all done on one CorePac are do you have flag0 in the LL2 of another CorePac (or the code executing is on another CorePac?)

    Have you confirmed the value of DNUM? Before hand?

    Was flag1 set to 1 when you saw flag0 as 0?

    Best Regards,

    Chad

  • hi,Chad

    I have one image loaded into all the CorePacs, and every CorePac will execute the ISR, when one CorePac appear this Phenomenon,all the other core too.

    All CorePac share the same code in DDR3, and all data is in LL2, make data private.

    The DNUM value is right.

     

    for core0,  flag0 is 0 default, in Isr, set it 1, Before process data, Set it 0.

    for other core, flag1 is 0 default, in Isr, set it 1, Before process data, Set it 0.

    All LL2, have flag0 and flag1, But core0 only use flag0, other core only use flag1.

    Best Regards

    Si

  • On CorePac0: What where the values of flag0, flag1, cnt0, cnt1 prior to the execution of the function myIsr and what were they after?  This must be viewed from CorePac0.

    Also, how are you calling this routine.  What you have above doesn't have the function defined as a interrupt, yet you refer to it as an interrupt.  Defining the function as a void isn't appropriate for an interrupt, it requires to be defined as interrupt.

    Best Regards,
    Chad