Skip to main content
clonephone82
Associate III
January 15, 2019
Question

STM32F1 Cube MX with CAN stuff error

  • January 15, 2019
  • 2 replies
  • 685 views

Hi,

I tried a simple example today with STM32 Nucleo F103RB and CAN. I only generate Code with CubeMX. I do not add any line. I get a stuff error on my peak CAN if I change the 

"ProjectManager.CompilerOptimize=6" to "ProjectManager.CompilerOptimize=0"

=> 0 means no optimization.

So if I use the default value everything works fine so I did not get any stuff error. Dose someone confirm that? Is there anything wrong in the HAL

many thanks

cheers

mathias

This topic has been closed for replies.

2 replies

S.Ma
Principal
January 15, 2019

Usually degrading the compiler optimisation helps debugging as the code is "unfolded". Its time and latency degrades while its memory needs increase. If there are some critical timings in interrupts which are no longer fullfilled when optimisation is off, only way to prove this would be to increase SYSCLK frequency for example.

clonephone82
Associate III
January 16, 2019

I do not add any Code. It is only the Code from The HAL. So I clearly know what you mean but that is not my problem I think.