cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F1 Cube MX with CAN stuff error

clonephone82
Associate III

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

2 REPLIES 2
S.Ma
Principal

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

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.