Showing results for 
Search instead for 
Did you mean: 

FFT magnitude calculation messes up the rest of the parts.

Associate II

I use the CMSIS-DSP library to calculate the Fourier transform, but when I want to calculate the magnitude, I run into a problem. This affects other data (a struct variables )and makes them 0 in the end, the whole program collapses. I don't understand what is the reason for this.

I used the function in the library(arm_cmplx_mag_f32) and wrote the function myself, and the result is the same for both cases.

I understand these in debugging mode

More precisely, for example, on a conversion with a length of 128, from the beginning of the calculation of the magnitude, the data of the other section will not be corrupted, but after the calculation of about 40 data magnitude, the other data(struct variables) will be corrupted and finally, the whole program will collapse.I want to know what happened, how can the use of a function and a series of variables affect the value of other variables?