CMSIS-DSP Libraries: convert signed integer to q31 notation

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

CMSIS-DSP Libraries: convert signed integer to q31 notation

2,011 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by miccio on Fri Oct 16 11:16:37 MST 2015
Hello everyone,

My latest project requires some help from the DSP libraries (mostly for fast trigonometric functions and vector math). However, all of the data I acquire is in the form of int16_t.
How can this be converted into the q31_t used by the library functions (which is actually an int32_t)?
Also, once my variables are converted in q31_t, how can I perform normal math? Wikipedia explanation is pretty straightforward but very verbose nevertheless, so I wonder if the library had some helper functions.
By the way, I'm using an LPC1549 (Cortex M3 core).

Thanks in advance and have a nice weekend! :)
0 项奖励
回复
2 回复数

1,896 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Oct 20 04:13:37 MST 2015
Suggest you do some reading up on fixed point. Using your favourite search engine for something like "convert integer to fixed point" or similar should throw up plenty of hits. For example:


[list]
  [*]http://blogs.mathworks.com/seth/2008/12/14/representing-numbers-integers-and-fixed-point/
  [*]https://books.google.co.uk/books?id=h590cd_BagMC&pg=PA42&lpg=PA42&dq=convert+integer+to+q1.31&source...
[/list]

Regards,
LPCXpresso Support
0 项奖励
回复

1,896 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by miccio on Mon Oct 19 08:22:30 MST 2015
wow, no one with experience on CMSIS-DSP libraries? not even lpcxpresso-support? :(
0 项奖励
回复