Use of the initialization function is optional. However, if the initialization function is used, then the instance structure cannot be placed into a const data section. To place an instance structure into a const data section, the instance structure should be manually initialized as follows:
*arm_rfft_instance_q31 S = {fftLenReal, fftLenBy2, ifftFlagR, bitReverseFlagR, twidCoefRModifier, pTwiddleAReal, pTwiddleBReal, pCfft};
*arm_rfft_instance_q15 S = {fftLenReal, fftLenBy2, ifftFlagR, bitReverseFlagR, twidCoefRModifier, pTwiddleAReal, pTwiddleBReal, pCfft};
where fftLenReal
is the length of the real transform; fftLenBy2
length of the internal complex transform. ifftFlagR
Selects forward (=0) or inverse (=1) transform. bitReverseFlagR
Selects bit reversed output (=0) or normal order output (=1). twidCoefRModifier
stride modifier for the twiddle factor table. The value is based on the FFT length; pTwiddleAReal
points to the A array of twiddle coefficients; pTwiddleBReal
points to the B array of twiddle coefficients; pCfft
points to the CFFT Instance structure. The CFFT structure must also be initialized. Refer to arm_cfft_radix4_f32() for details regarding static initialization of the complex FFT instance structure.