2022-01-28 02:56 AM
Hello. I use STM32F207 MCU and CubeMX for code generation. I generate template for Keil.
Then I add little test code that drives LCD through FSMC bus. It's OK. I achieved at least 40fps in my LCD. This is fine.
But Keil requires a good price for license. For this reason I tried to generate my project for STM32CubeIDE. All steps the same as above with Keil. A add test code for LCD... But the hell happens. My LCD updates not faster than 10 fps. What the hell??
How can I research and fix this issue?? I turned off all optimization. But hex built with CubeIDE makes me confused.
2022-01-28 05:52 PM
The life is too short and your time is precious. Just pay them what they deserve? :)
/* and enjoy their fast professional support */
2022-01-29 07:30 AM
If you're going for speed, maybe turn optimization back on? Why is it off?
Hard to say without knowing what your code is doing.
2022-01-31 09:25 AM
Something is apparently running slower in CubeIDE. But what? Impossible to tell at this point...
Both CubeIDE and Keil should offer this tracing feature.
Now you will know where the CPU spends its cycles. Give it a try and see if you can narrow the problem down.
Please share your findings!
2022-02-01 05:43 AM
@mattias norlander could you explain how to use the PC sampling in CubeIDE to see which functions or parts of code consume most time?
2022-02-01 07:45 AM
Hello Pavel,
Have a look at this video: https://www.youtube.com/watch?v=BZKzwn5w1D8
SWV PC-sampling part is covered starting at 4:25 - 6:25.
You also have to enable SWV in the debug configuration before trace can work at all. This is described in the User Guide but should be easy! :)
2022-02-03 12:47 AM
If you manage to narrow the issue down to some call sequences you could also try to use a timer to set some time stamps when you enter and exit a call sequence to benchmark certain sequences of CubeIDE binaries vs Keil binaries.
2022-03-04 02:23 AM
Did you ever solve the issue. Any feedback to share?