2014-11-19 02:58 PM
Having some trouble getting my motor to start.. The code is getting stuck in the R3_4_F30X_TurnOnLowSides function. It enters the timer GetFlagStatus where it should be returning bitStatus = SET but instead is returning RESET. Any ideas on what I'm doing wrong?
Screenshots from debug: #foc-library-stm32 #foc-lib-4.0Solved! Go to Solution.
2015-03-13 02:09 AM
Hi Alex,
try to disable all optimizations for the C compiler when debugging. The standard setting for the supplied projects includes full optimizations, which makes debugging almost impossible because infomration is stored in CPU registers instead of a variable, and code is reordered. Disabling optimizations may cause other problems, because the code becomes much slower. But problems here are a good indication that you run out of resources anyhow. Regards Frank2014-12-12 03:20 AM
Ciao Alex
Trying to debug in this way is not easy. Did you make some modifications in the code respect to the released version? If not please share the WB file you are using to configure the FW library and I'll try to replicate the issue. If you made also some code modification I suggest you to test with the original version to verify if the issue is still present. Ciao Gigi2015-03-13 02:09 AM
Hi Alex,
try to disable all optimizations for the C compiler when debugging. The standard setting for the supplied projects includes full optimizations, which makes debugging almost impossible because infomration is stored in CPU registers instead of a variable, and code is reordered. Disabling optimizations may cause other problems, because the code becomes much slower. But problems here are a good indication that you run out of resources anyhow. Regards Frank