Content originally posted in LPCWare by djukazg on Thu Jan 15 12:52:23 MST 2015 Hi,
I have a problem with arm_std_q31 function from DSP cortex M0 library. The function always returns 0 although the numbers in the array sent to the function are totaly different. For example: w[0]int32_t488 w[1]int32_t327 w[2]int32_t172 w[3]int32_t68 w[4]int32_t44 w[5]int32_t39 w[6]int32_t34 w[7]int32_t249 w[8]int32_t132 w[9]int32_t7
The function arm_mean_q31 works OK (returns 156 in the upper case).
Version of LPCXpresso is 7.3.0, on Linux Fedora MCU is LPC1114
Content originally posted in LPCWare by starblue on Fri Jan 16 02:28:17 MST 2015 Your numbers are too small. According to the documentation the lower 8 bits are discarded: