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多核中应用程序应该放在中断中还是MAIN函数中的问题?



请教一下,使用C6678,由CORE0向CORE1发送IPC中断,进行相应的处理,想问一下这两种处理到底哪种好点?

1 在CORE1的IPC中断服务程序中进行数据处理,即像

    void ISR_IPC_CORE1()

      {

       do_data_tackle();

      }

2   Uint32 flag=0;

    void ISR_IPC_CORE1()

      {

       flag =1;

      }

   void main()

 {

   if(flag==1)

    { 

     flag=0;

    do_data_tackle();

   }

  }

 

  • 2应该不能实现你想要的效果,因为if判断运行完一次之后main函数就结束退出了,你应该在if循环之外加一个while(1),让dsp不断轮询flag的值,然后在if循环内数据处理完成return