Hi, Daniel,
I have checked your code, the code is difficult to read. How do you know that the result is incorrect, what is your issue?
I have done FFT based on float type, I attach the code, hope it can help you. If you do want to develop FFT code based on q31 type data format, and have issue, pls update here, I will test.
BR
Xiangjun Rong