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.

6657的IPC中断只执行一次???



核0主程序:

void main()

{

    IER= 0;

    //eanble TSC Initialize Time stamp counter to measure cycles

    TSC_init();

    for(;;)

    {

       IssueInterruptToNextCore();//往核1发IPC中断

       TSC_delay_ms(3);

    }

}

核0 的IPC发

void IssueInterruptToNextCore()

{

   uint32_t interruptInfo=0;

   interruptInfo +=16;

    // Unlock Config

    //KICK0 = KICK0_UNLOCK;

    //KICK1 = KICK1_UNLOCK;

 

   *(volatile uint32_t *) iIPCGRInfo[1] = interruptInfo;

   *(volatile uint32_t *) iIPCGRInfo[1] |= 1;

 

    // lock Config

    //KICK0 = KICK_LOCK;

    //KICK1 = KICK_LOCK;

 

    interruptNumber0++;

}

核1主程序:

void main()

{

    IER= 0;

    //eanble TSC Initialize Time stamp counter to measure cycles

    TSC_init();

    GPIO_init();            //GPIO初始化

    IPC_Interrupts_Init(); //IPC中断初始化

 

    //clear DSP core interrupt flag

    ICR= IFR;

    /*Interrupt Service Table Pointer to begining of LL2 memory*/

    ISTP= 0x11800000;

    //enable NMIE&中断

    IER = 3|(1<<4);

    //enable GIE Enables all interrupts.

    TSR = TSR|1;

 

    while(1)

    {

 

        //DOG0();

 

    }

}

核1 的IPC中断

void IPC_ISR()

{

    volatile uint32_t read_ipcgr;

 

    read_ipcgr = *(volatile Uint32 *) iIPCGRInfo[1];

 

    *(volatile uint32_t *) iIPCARInfo[1] = read_ipcgr; //clear the related source info

 

    interruptNumber1++;

}

核1 的IPC中断初始化

void IPC_Interrupts_Init(void)

{

    //Contains the number of the event that maps to DSPINTnn

    gpCGEM_regs->INTMUX1 = 0;

    gpCGEM_regs->INTMUX2 = 0;

    gpCGEM_regs->INTMUX3 = 0;

 

    //map local timer interrupt to INT13

gpCGEM_regs->INTMUX1 |= (CSL_GEM_IPC_LOCAL<<CSL_CGEM_INTMUX1_INTSEL4_SHIFT);

}

现在的问题是 如果把核1主程序while(1)中的DOG0()屏蔽掉 那么双核间的中断就是正常的 核0发多少次 核1就响应多少次!

如果把核1主程序while(1)中的DOG0())不屏蔽 那么双核间的中断就不正常 核0发很多次 核1只响应一次!

 

试了多次 总结出的规律就是:

核1主程序while(1)中不能执行其他语句,只能空跑!!!

 

那个大神解释下 完整例程在附件!!!

0412.IPC1.rar6215.IPC0.rar