Aaron Linsdau

Floating point calcs on Kinetis CPU CW 10.1 MQX 3.7

Discussion created by Aaron Linsdau on Jun 21, 2011
Latest reply on Jun 22, 2011 by Aaron Linsdau



I am having a little challenge getting some basic floating point calculations to work with the K40 tower system.

HW: K40 tower system

CW Dev studio 1.0.0  Build Id: b15_2105-A22-A1

CW ver 10.1.5, build id 110204

MQX 3.7


In the debugger, I am stepping through my code and find that the floating point calculations are not working correctly.  Code like this:


float DG_const;

DG_const = 1023.0 / 21467.05;


DG_const reports back a value of 3.07e-44 in the variables window.


and the line

DG_denom = powf(255.0 , 1.8);

shows DG_denom = 0

in the variables window.  I have #include <math.h> in the header.  Is there a setting(s) that need to be added for f-p calculations to work?