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.
工具与软件:
大家好、团队成员:
我在 F2800137上测试了该程序、它运行良好。 但当代码在 F2800132上运行时(由于小闪存、需要打开优化)、 非常奇怪:
PWM_value 应等于50、但等于3。 我不能为什么 会导致这种情况,开放优化会导致错误?
此致、
Zane
尊敬的 Zane:
您是否能够尝试将这些运算拆分成不同的代码行、这样您就可以逐步进行并看看哪个操作出错了? 此外、为了验证、当您单步执行它时、PWM_value 保持在3、对吧?
此致、
Delaney
尊敬的 Delaney:
我想我找到了这个问题的根源。 它应该使用 (100000000 .0 /capCountArr[3]+0.5)而不是 ((100000000/CapCountArr[3])+0.5) 。
此致、
Zane