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.

[参考译文] CC1312R:如何启用/禁用 FPU

Guru**** 2555270 points
Other Parts Discussed in Thread: CC1312R

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

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/985115/cc1312r-how-to-enable-disable-the-fpu

器件型号:CC1312R

 在 https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/10-useful-tips-to-using-the-floating-point-unit-on-the-arm-cortex--m4-processor ARM 写入的文章中:

8.如果不使用 FPU,请关闭它

如果您的应用不需要处理任何浮点计算、则可以通过不定义__FPU_USed 宏来始终关闭 FPU。 这可以降低功耗。  在某些应用中、您可能只需要在短时间内使用 FPU、然后可以在 FPU 操作完成后再次将其关闭。  但是、在这种情况下、您应该创建一个 HardFault 或 UsageFault 处理程序来检查故障状态、并在 FPU 被禁用时意外执行任何浮点代码时重新启用 FPU。

我的应用仅在一个函数中使用 FPU、其他所有函数都是整数数学运算。 如何在应用程序启动时禁用 FPU 并在我的"特殊"中心点函数中局部启用 FPU?