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.
您好!
我有一个为 CLA 任务编写的 C 代码。 我还希望编写 ASM 指令。
我想切换作为电源转换器门信号的 GPIO。 为了实现延迟、我想在 CLA C 代码中包含 asm ("MNOP")指令、以便在两次 GPIO 切换(有效实现死区控制)之间添加计时延迟(以 ns 为单位)。
这样做是否有任何我应该意识到的影响。
第二个问题与时序要求有关-
我在 CLA C 代码中执行浮点计算。 就执行速度而言、是否值得尝试使用汇编语言进行相同的计算?
提前感谢。
此致、
阿努拉格
您好 Anurag、
您可以在 C 语言中混合汇编代码。这应该不是问题
在第二个问题上、我建议您用 C 编写 ASM 代码、查看编译器生成的 ASM 文件并根据需要进行优化、而不是直接编写 ASM 代码。 您还可以使用 CLAMath 库
此致、
维纳