This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

code hanging in arm_bitreversal_32() function of CMSIS library

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);

break;

case 64:

case 512:

case 4096:

arm_radix8_butterfly_f32( p1, L, (float32_t *) S->pTwiddle, 1);

break;

}

if( bitReverseFlag )

arm_bitreversal_32((uint32_t*)p1,S->bitRevLength,S->pBitRevTable);

if(ifftFlag == 1u)

{

invL = 1.0f/(float32_t)L;

/*  Conjugate and scale output data */

pSrc = p1;

for(l=0; l<L; l++) {

*pSrc++ *= invL ;

*pSrc = -(*pSrc) * invL;

pSrc++;

}

}

}

Kind Regards

Amit Kumar

0