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
Ok, so now I have the whole thing pretty clear. Unfortunately yesterday I found out that I'm still too slow to process the 40msps stream in continuous mode, but this design provided a huge improve compared to the float-ing approach that i described in my previous post. Now I'm gonna update that post!
Thanks again Dan for your support,Abet