AnsweredAssumed Answered

STM32 freezing

Question asked by pavelm on Oct 3, 2011
Latest reply on Oct 6, 2011 by Andrew Neil
Hello
I got implementation of the cosine function, it works correctly, but sometimes, randomly, it hangs processor.
I dont know exact reason, it could be some memory corruption or just weird loop.
Input for variable x is 360° = 720; 1° = 2. Output is from -10000 to 10000.
Here it is http://pastebin.com/ggajpE76
I just calling it with some values (angle) obtained from sensor, but I dont know, why it randomly freezing, even when there are additional conditions (if). Somebody know, where could be a problem ?
It seems it is not OK even when this function is compiled and I dont call it - it could be called when some other variable enable it during execution.

Thanks

Outcomes