CMSIS DSP in KDS 2.0.0

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

CMSIS DSP in KDS 2.0.0

跳至解决方案
2,480 次查看
menkooldewurtel
Contributor II

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

标签 (1)
标记 (3)
0 项奖励
回复
1 解答
1,958 次查看
DavidS
NXP Employee
NXP Employee

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

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,959 次查看
DavidS
NXP Employee
NXP Employee

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

0 项奖励
回复
1,958 次查看
menkooldewurtel
Contributor II

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

0 项奖励
回复