AnsweredAssumed Answered

K20 FLOATING COPROCESSOR

Question asked by Koorosh Hajiani on Jun 6, 2016
Latest reply on Jun 14, 2016 by ZhangJennie

Hello,

I'm not certain if K20 has a floating coprocessor .

I've the following line in the code:

 

 

ad_result2_word=(float)DAC2_prev*((float)result_1/(float)result_2);

where:

ad_result2_word,DAC2_prev are uint32_t and result_1,result_2 are uint16_t

when I single step through the code I can verify the result as correct however when I let it run for awhile and stop it the result are bogus values.

I'm using KDS for the project .

I'M NOT SURE IF I'M DOING THIS MULTIPICATION CORRECTLY OR IF KDS IS USING SOME FLOATING LIBRARY OR EVEN IF K20 HAS A FPU.

 

Any ideas?

 

Thanks,

Koorosh Hajiani

248-778-6396

Outcomes