AnsweredAssumed Answered

Hard Fault on FFT

Question asked by salah_ud_din.osama on Mar 15, 2013
Latest reply on Mar 15, 2013 by Clive One
Hi,
I am trying to do 256pt-FFT on Audio data. The data is in stereo( LR) format. When I am doing FFT on only 1 channel data i.e Left then my system is running fine but as soon as I apply FFT on Right channel the system enters hard fault state. What seems to be the problem ?

Here is the code
/*ARM CMSIS variables*/
    arm_status armstatus;
  arm_cfft_radix4_instance_f32 cfft_instance1; /* CFFT Structure instance */
    arm_cfft_radix4_instance_f32 cfft_instance2; /* CFFT Structure instance */
    /* CFFT Structure instance pointer */
    arm_cfft_radix4_instance_f32 *cfft_instance_ptr1 = (arm_cfft_radix4_instance_f32*) &cfft_instance1;
    arm_cfft_radix4_instance_f32 *cfft_instance_ptr2 = (arm_cfft_radix4_instance_f32*) &cfft_instance2;
    
    /* Initialize the CFFT function to compute 256 point fft */  
    armstatus = arm_cfft_radix4_init_f32(cfft_instance_ptr1, _MAX_SS/2, 0, 1);
    armstatus = arm_cfft_radix4_init_f32(cfft_instance_ptr2, _MAX_SS/2, 0, 1);
   
/*Separate Right and Left Channels*/
    chan_sep(R_buffer2,L_buffer2,buffer2,_MAX_SS);
               
/* Transform input a[n] from time domain to frequency domain A[k] */
    arm_cfft_radix4_f32(cfft_instance_ptr1, (float32_t*)L_buffer2);
   //arm_cfft_radix4_f32(cfft_instance_ptr2, (float32_t*)R_buffer2);<--
Hard Fault occurs

Outcomes