Hi everybody,
such a simple question but i have no idea why this don´t work at my System (KDS2.0.0, KSDK1.1.0, FRDM-K64F):
i want to get the sqrt of a q15 or q31 value with:
outBuffer =0;
...
arm_sqrt_q15( ((q15_t)0x09) , (q15_t*)&outBuffer );
The result in outBuffer is 543 :-(
I have done the steps in this tutorial Tutorial: Using the ARM CMSIS Library | MCU on Eclipse
Thanks for help
Menko Oldewurtel
Solved! Go to Solution.
Hi Menko,
I added header "arm_math.h" to my test file and following to my project Properties->C/C++ Build->Settings-> Cross ARM C++ Link->Miscellaneous Other objects window:
"C:\Freescale\KSDK_1.1.0\platform\CMSIS\Lib\GCC\libarm_cortexM4lf_math.a"
The test code was:
arm_status astatus; | |
q15_t outBuffer; | |
arm_sqrt_q15( ((q15_t)0x4000) , (q15_t*)&outBuffer ); |
outBuffer returned as 0x5A82 which matches this external link:
Voltamp Media | Imagine. Design. Launch. | Phoenix, Arizona
Regards,
David
Hi Menko,
I added header "arm_math.h" to my test file and following to my project Properties->C/C++ Build->Settings-> Cross ARM C++ Link->Miscellaneous Other objects window:
"C:\Freescale\KSDK_1.1.0\platform\CMSIS\Lib\GCC\libarm_cortexM4lf_math.a"
The test code was:
arm_status astatus; | |
q15_t outBuffer; | |
arm_sqrt_q15( ((q15_t)0x4000) , (q15_t*)&outBuffer ); |
outBuffer returned as 0x5A82 which matches this external link:
Voltamp Media | Imagine. Design. Launch. | Phoenix, Arizona
Regards,
David
Hi David,
thank you for your answer I failed with the q15_t data Type. The result in out Buffer is right in q15_t but I interpreted it as an signed int.....
Best Regards
Menko