AnsweredAssumed Answered

STM32F407 Matrix Computation

Question asked by yu.shanglin on Apr 30, 2015
Latest reply on May 3, 2015 by yu.shanglin
Hello, 
     I use STM32F407  discovery board and keil uvision4.
        I want to do matrix communication but I meet the following weird problems.
        My code is as below.

     float Num[2]= {0.000144962712488309, -0.000602215526678967};
        float Den[2]= {1, -5.62630205892449};   

        float ACCd[2];

        printf("ACC 3 \n");
        for (int i=0; i<2; i++)
        {
              ACCd[i]=Num[i]*Den[i];
        }
      printf("ACC 4 \n");


      It can compile but I can't see any result even the print of  ACC 3 .

    When I modified the code to 

     float Num[2]= {0.000144962712488309, -0.000602215526678967};
   
  float Den[2]= {1, -5.62630205892449};   
      float ACCd[2];

        printf("ACC 3 \n");
       ACCd[0]=Num[0]*Den[0];
       ACCd[1]=Num[1]*Den[1];
      printf("ACC 4 \n");


       And it can work fine. Do I miss some constraints about the ST?
Thanks

Outcomes