HCS08-MC9S08GB32-Floating Points

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HCS08-MC9S08GB32-Floating Points

889 Views
sada
Contributor I
Dear Sir/Madam,
 
I am using Code worrior for 8 bit controller(MC9S08GB32),
I am new to the freescale controller.
I am facing a problen in using of floating points.
I included the IEEE32 bit while creating a Project.
 
But when i am debugging a program after ATD interrupt
 
          PTFDD = 0xFF;  //Battery 1 charging current;
          PTFD = PTFD&0xE3;
          ATD1SC=0x60; //ATD status Register,ATD interrupt is enabled,ATD0 selected;
         Delay200u();           
         chg1=((result*0.002442)+0.0125)*44.6;
         a[i]=chg1;
         sumchg1=sumchg1+a[i];
 
At the time of executing chg1 statement it hangs up in floting point routine.
 
Please help in this regard where is the mistake.

Labels (1)
0 Kudos
1 Reply

260 Views
peg
Senior Contributor IV
Hi sada,
Floating point calcs can take a long time.
Is it tripping the COP?
disable the COP as above and try again.
or remove the calculation and try again.
 
Regards David
 
0 Kudos