S32K144
S32 Design for Arm 2.2
Optimization Level (-O1)
After the Hall signal A is detected by the input capture function, it waits for about 6us before going to collect Hall signal B. I used a FOR loop to produce this 6us, so how do I prevent the compiler from optimizing away this FOR loop?
for(i=0; i<65535;i++)
{...}
已解决! 转到解答。
Yes, I have found it in certain presentation used following way:
davidtosenovjan_0-1704446616111.png
在原帖中查看解决方案
fanziyu_0-1704420071476.png
This method works well in S32K144 S32DS, is it theoretically applicable?