We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi
I am using CMSIS 3.2 library in my Cortex-M4 based uc, In that I am using arm_cfft_f32(&arm_cfft_sR_f32_len16, testInput_f32_10khz, ifftFlag, doBitReverse); function present in arm_fft_bin_example_f32 which is present in CMSIS3.2 library(I reduced the size as it was overflowing the uc 's memory) In that when doBitReverse = 1 , The code hangs in the highlighted line of the following code which is present in the arm_cfft_f32.c . When doBitReverse = 0 , The code works except the bit reversal is not done. Kindly look into the issue
void arm_cfft_f32(
const arm_cfft_instance_f32 * S,
float32_t * p1,
uint8_t ifftFlag,
uint8_t bitReverseFlag)
{
uint32_t L = S->fftLen, l;
float32_t invL, * pSrc;
if(ifftFlag == 1u)
/* Conjugate input data */
pSrc = p1 + 1;
for(l=0; l<L; l++) {
*pSrc = -*pSrc;
pSrc += 2;
}
switch (L) {
case 16:
case 128:
case 1024:
arm_cfft_radix8by2_f32 ( (arm_cfft_instance_f32 *) S, p1);
break;
case 32:
case 256:
case 2048:
arm_cfft_radix8by4_f32 ( (arm_cfft_instance_f32 *) S, p1);
case 64:
case 512:
case 4096:
arm_radix8_butterfly_f32( p1, L, (float32_t *) S->pTwiddle, 1);
if( bitReverseFlag )
arm_bitreversal_32((uint32_t*)p1,S->bitRevLength,S->pBitRevTable);
invL = 1.0f/(float32_t)L;
/* Conjugate and scale output data */
pSrc = p1;
*pSrc++ *= invL ;
*pSrc = -(*pSrc) * invL;
pSrc++;
Kind Regards
Amit Kumar
Mabe this helps: Problem with arm_cfft_f32()
Hi frsc
Thanks for replying. I moved to CMSIS 4.0.1 and the same code worked fine so using CMSIS 4.0.1 library. I guess the Bug got fixed.