We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi to you all,I've another post on the forum (here's the link Process ADC data, moved by DMA, using CMSIS DSP: what's the right way? ), but since I think I made some small steps forward I felt I could be a little more specific. I hope this won't be a problem.
Actually I'm trying to extract the MAX from a q31_t (Note that: typedef int32_t q31_t) array filled by the ADCHS in my LPC4370 lpc link2 board, using the arm_max_q31 function (here for reference: Maximum). The problem is that the 12bit ADC supplies data in Two's Complement format, but the library is misunderstanding it (ora at least I think so). For instance:
111111111111
Should be
-1
but actually is read by the CMSIS Function as
4095
and therefore is always recognized as the MAX value.
Do I need to manually convert all the samples one-by-one? This seems to be extremely slow, and since I've some real-time requirements I need the fastest way to do this maths.Any help would be highly appreciated since I'm stuck here.
Thanks,Andrea
Hi Andrea,
Although you are now exploring fixed-point fractional data types, I'll reply in your previous post Process ADC data, moved by DMA, using CMSIS DSP: what's the right way?. My reply in that thread is pertaining to floating-point data format. I hope it is still useful, just in case you will again use or refer to floating point data.
Regards,
Goodwin