cancel
Showing results for 
Search instead for 
Did you mean: 

Hint: DAC Problem with Keil / Optimise Levels

ingwmeier
Senior
Posted on March 03, 2012 at 11:01

we had a growing application, at one seat, we developed using Keil 4.13, on the other 4.23

No problems at start (HW=STM32 Value Line Eval Board), after adding more and more interrupt handlers etc, DAC stopped working at our V4.23 environment. After many tests, we found, that the ST library file misc.c had to be compiled with optimize level 0, then everything was ok again. ST examples for Keil are set to optimize level 3..

Hope this helps somebody else running into the same trap.

Werner
1 REPLY 1
Posted on March 07, 2012 at 20:59

This almost certainly indicates that there is a flaw in your code and/or the ST library, and changing the optimisation level is just masking the symptoms - not fixing the cause.

One of the commonest such flaws is failure to use volatile where necessary...