CMSIS DSP in KDS 2.0.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CMSIS DSP in KDS 2.0.0

Jump to solution
1,730 Views
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

Labels (1)
Tags (3)
0 Kudos
Reply
1 Solution
1,208 Views
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

View solution in original post

0 Kudos
Reply
2 Replies
1,209 Views
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 Kudos
Reply
1,208 Views
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 Kudos
Reply