We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
HI,I've inherited (the original author left the company) complex C code, to be compiled with Keil C V5, -o1, for a STM32F051R8. The problem: during Interrupts are FP calculations made. Timing dependent (very stringent) sometimes these FP calculations give wrong values, about a factor of 100. If I do dummy FP calculations in a routine which is called by the Interrupt routine - the FP values are of type 'volatile float' therefore the code is generated and not optimized away - and don't use these results, the above mentioned FP errors vanish.Has anybody an answer for such behavior? I don't like to include that 'fix' when I don't know how it works and cures the 'fix' the behavior for all timings?Any answer appreciated, HansPS: That was the reason for my last question about Interrupt enable/disable.