CMSIS DSP in KDS 2.0.0

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CMSIS DSP in KDS 2.0.0

ソリューションへジャンプ
2,619件の閲覧回数
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 解決策
2,097件の閲覧回数
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 返答(返信)
2,098件の閲覧回数
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,097件の閲覧回数
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 件の賞賛
返信