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.

MSP430 F5529 出现程序跑飞现象



在仿真执行程序的过程中出现跑飞现象,然后再运行出现:

Warning: CPU is OFF(Low Power Mode) and interrupts are disabled! Cannot excute Step/Go.

的弹出框警示,请问这种现象要从哪方面查原因?

谢谢!!

  • Alex,

      这个应该是你的MCU被设置成低功耗模式了,中断操作不能运行。你需要调整MCU的LPM的工作模式,让它工作在比较浅的LPM状态。

    方便的话,你可以上传一下你设置低功耗的语句,或是说看看你把MCU设置成什么样的工作模式。

    谢谢

  • Ken, 感谢你的快速回答。

    我一直工作在默认的功耗模式下,我处理下了中断后好像没有这个情况了,因为我这个项目有好几个中断,外部中断,PWM中断,TIMER CATCH中断,而且外部中断频率有时候是1M,所以中断我要再检查下。

    之后我会把我的程序贴给您帮忙REVIEW下。

    现在有个新的问题:我的程序里有个浮点运算,但是我一执行这个运算,在IAR仿真运行下就死了,IAR提示:Invalid parameter(s).

    浮点运算很简单的,如下,谢谢!

    double interStoreX[MWSPT_NSEC];
    double a =0;
    double b =0;
    double c =0;
    double d =0;
    double e =0;

    storeX[0] = storeX[1]; storeX[1] = storeX[2];storeX[2] = (double)freq2PCRED;

    for(j=0; j<MWSPT_NSEC; j++)interStoreX[j] = storeX[j];
    storeY[0] = storeY[1]; storeY[1] = storeY[2];
    a = 0.07295965726827*interStoreX[2];                               /*一开放这个就运行不了*/

    storeY[2] = a;

    for(j=0; j<MWSPT_NSEC; j++)interStoreX[j] = storeY[j];
    storeY[3] = storeY[4]; storeY[4] = storeY[5];
    a = interStoreX[2];
    c = -1*interStoreX[0];
    d = -1.848582372134*storeY[3+1];                        /*一开放这个就运行不了*/
    e = 0.8540806854635*storeY[3+0];                       /*一开放这个就运行不了*/
    storeY[5] = (a + c - d - e);                                          /*一开放这个就运行不了*/

  • Alex,

      建议还是把浮点数转化成整数,然后在去做乘法操作。这样应该会比较好一些。

    谢谢

  • Ken,您好!

    能说下原因吗? 有可能会出现的问题?

    如果要求的结果精度有很高的要求,化成整数来计算也是很麻烦的,太庞大的数据了。

    谢谢!

    Alex