Dear all I have sampled some data using a 16bit ADC the data is in short(16-bit int) format, now I want to use the Cortex CMSIS DSP library to do some calculations like calculating rms values.I have used the arm_rms_q15 function, but the input to this function is in q15 format. How can I convert the short and other int types to the data that has been used in this library? Any ideas are welcome.
"Suppose I the ADC has filled the buffer data with these values."
What are "these values"?
You have posted the exact same code again, with the only difference that you have renamed some of your variables.
I asked you where "float" got into the picture, since your ADC most probably did not produce any float. Why did you ignore that question but reposted your source code a second time?
The answer should be 5.049752469 But I’m getting 0.353485
Exactly how do you think any reader of your posts could relate to your figures? What information have you given, that would allow us to reproduce the same calculations?
Have you spent as little time trying to figure out what Q15 numbers are, as you have spent figuring out what information you must supply when asking a question on this forum?