hi,iva,
in my project,the K60F120 is used,in MQX ,i have add some define in the user_conf.h.
#define MQXCFG_ENABLE_FP 1
#define MQX_INCLUDE_FLOATING_POINT_IO 1
#define MQXCFG_ENABLE_DSP 1
and the PSP_HAS_FPU is defined in kinetis.h defaultly.
based this MQX config, i do some test for the fpu function.the code is :
| _time_get (&time_rtc); | |
| printf("unsigned calculate starrting:the second is:%d,the ms is:%d \n",time_rtc.SECONDS,time_rtc.MILLISECONDS); |
| for(i=0;i<CAL_TIMES;i++) |
| { |
| result1 = oper1*oper2; | |
| result2 = oper3/result1; | |
| } |
| _time_get (&time_rtc); | | |
| printf("unsigned calculate ending:the second is:%d,the ms is:%d \n",time_rtc.SECONDS,time_rtc.MILLISECONDS); | | ; |
| |
where the CAL_TIMES is 100000; the oper data is unsigned int or float defined in the test program
in the MQX_template_list,i define the task between MQX_AUTO_START_TASK|MQX_FLOATING_POINT_TASK|MQX_DSP_TASK and MQX_AUTO_START_TASK,
in the two different tast set, result is almost same,the time gap is about 20ms.
now my question is :
1,is my test program can call the FPU to work?if not,how to change it?
2,in my test,the FPU is working? if it is working,it have no usage for float calculate?