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.

How can I run two CPU in the same time in DM6446

Hi,I am using product developped by Seed-DTK6446。

But,I can not get two cpu run together.

For example, I wrote codes followed in arm:

void main( void )
{
    /* Initialize BSL */
    DAVINCIEVM_init( );
 
 i = 0;
 j = 'a';


 while(1)
 {
  i++;
  if(i == 1000000)
  {
   printf("Hello world %c\n",j);
   j = j+1;
   i = 0;
  }
 }
}

Then, I wrote codes followed in dsp:

void waitall()
{
 for(;;)
 {}
}

The result is that the codes work well only if I run arm alone and if I run both, it will stop printing.

WHY? Hope your help a lot 

  • Hi,

    This might not be the best answer but printf() for embeded processors to my opinion needs to be used sparely for debug purposes and need to be turned off in a release version. It consumes so much CPU cycles and have seen peripherals operating unstable just because of this. This is true for most if not all embeded processors.

    I suggest you use somekind of a variable that you modify at a regular basis and may be use your printf() sparingly and see if that solves your problem.

    Best regards, Zegeye

  • Thank you for your answer. But my purpose is to test whether these two CPU can work in the same time and the outcoming proves that there issomething wrong because they cannot work in the same time.

  • Hi,

    They do work at the same time. They work independent of each other. They share resources and can be synchronized at the system level.

    Best regards, Zegeye