AnsweredAssumed Answered

Double Calculations causing hard fault

Question asked by i.philip on Mar 7, 2013
Latest reply on Mar 8, 2013 by i.philip
Hi,
Im trying to do some calculations on a STM32F4 discovery board and I keep getting hard faults when I try to run the code. The is being ported over from a PC application but the lines that are causing the issues are simple multiplications.

One of the lines

double phi = aircraftRotation[0] * PI/180.0;
aircraftRotation[0] = 0.0
PI = 3.141592654;
I have stepped through the assembly for this line of code and the assembly that its crashing on is the multiplcation
BL     __aeabi_dul 

Im using IAR and the code is C++, is there anything I can do to fix this?

Thanks
Phil

Outcomes