TI E2E™ 设计支持论坛将于 5 月 30 日至 6 月 1 日进行维护。如果您在此期间需要技术支持,请联系 TI 的客户支持中心寻求帮助。

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.

[参考译文] TM4C123GH6PM:在 Tiva 中使用余弦函数

Guru**** 2048030 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/773510/tm4c123gh6pm-use-of-cosine-function-in-tiva

器件型号:TM4C123GH6PM

我已经制作了一个代码,它从 cos 和 sin 函数中获取输入。不幸的是,代码运行异常,我使用了 math.h 和 stdlib,代码在 c 中运行良好,但在 tm4c123ghpm 中运行良好。

sig->Real =a * sine (w*i + phase);

当我执行该行代码时、停止、但当我注释此代码时、效果良好。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好、Muhammad、

    使用数学库时、您可能遇到堆栈问题、您的项目中分配了多少堆栈?

    您可以通过依次转到"Project Properties"->"CCS Build"->"ARM Linker"->"Basic Options"、然后查找"Set C system stack size"值来看到这一点。

    我希望它将是512或1024字节、如果是这样、请尝试2048或甚至3072字节、并查看问题是否可以通过任一设置解决。