code hanging in arm_bitreversal_32() function of CMSIS library

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

code hanging in arm_bitreversal_32() function of CMSIS library

1,833 次查看
Amit_Kumar1
Senior Contributor II

Hi

I am using CMSIS 3.2 library along with codewarrior 10.6, with FRDM-K20D50M board, 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++;

}

}

}

in the debug window I captured the following result

 

13017_13017.jpgbitreversal.jpg

entering the loop

13018_13018.jpgentered lop.jpg

hanged

13019_13019.jpgcodehanged.jpg

i/p to CFFT function

 

13021_13021.jpgip.jpg

 

The o/p of CFFT without bit reversal

 

13022_13022.jpgop.jpg

 

 

Kind Regards

Amit Kumar

Original Attachment has been moved to: K20-CMSIS-Test-30-06-2014.zip

标签 (1)
0 项奖励
回复
0 回复数