2025-08-13 5:35 PM
Hello everyone.
Why does the behavior of the while loop I wrote differ from the one generated by STM32CubeMX? Since the code generated by STM32CubeMX is highly abstracted, is it possible that even the same while loop behaves differently due to internal processing? Where can I learn about such rules? I'm a beginner, so I would really appreciate any guidance. If anyone knows, I would be grateful for your help.
Here are the details of the issue.
1. When code is written inside the while loop generated by STM32CubeIDE
Code:
Result: It doesn't work correctly. It seems that something inside the while loop isn't functioning properly.
2. When code is written inside the while loop wrote by myself.
Code:
Result: It works correctly
2025-08-13 5:54 PM
Probably due to the unconditional while loop that it gets stuck in. It never makes it to the other code.