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

Arm-Math, DSP function

I am not sure if this is the right forum, if not, please tell me what forum will be more appropriate.

I want to use DSP libraries. I use arm-math library. and run this function:

void startFFT (void)
{
    printf("1 \r\n");
    arm_cfft_radix4_init_f32(&S, FFT_SIZE, 0, 1);                       // Initialize the CFFT/CIFFT module, intFlag = 0, doBitReverse = 1// @@@@@@@@@@@@@@@@ need to be added to Init in main area in the ANC code @@@@@@@@@@@
    // @@@@@@@@@@@@@@@@@@@@@ need to add sin to "Input" argument @@@@@@@@@@@@@@@@@@@@@
    printf("2 \r\n");
    arm_cfft_radix4_f32(&S, Input);                                                 // Process the data through the CFFT/CIFFT module // @@@@@@@@@@@ Doing FFT on the input, and save it their (?) // print the result of real and imag for checking    
    printf("3 \r\n");
    arm_cmplx_mag_f32(Input, Output, FFT_SIZE);                         // Process the data through the Complex Magniture Module for calculating the magnitude at each bin
    printf("4 \r\n");
    arm_max_f32(Output, FFT_SIZE, &maxValue, &maxIndex);        // Calculates maxValue and returns corresponding value
    printf("5 \r\n");
    return;

The MCU printing 1, 2, and 3 lines. but stuck after that (at this function: arm_cmplx_mag_f32(Input, Output, FFT_SIZE); ). I am using Keil, I tried use CubeIDE environment, and it run without problem. Maybe my configurations aren't good?

BTW, if i add a"GNU Extensions" to the compiler, I have a 5 new warnings:

compiling main.c...
..\Inc\arm_math.h(293): warning:  #2803-D: unrecognized GCC pragma
  #pragma GCC diagnostic push
..\Inc\arm_math.h(294): warning:  #2803-D: unrecognized GCC pragma
  #pragma GCC diagnostic ignored "-Wsign-conversion"
..\Inc\arm_math.h(295): warning:  #2803-D: unrecognized GCC pragma
  #pragma GCC diagnostic ignored "-Wconversion"
..\Inc\arm_math.h(296): warning:  #2803-D: unrecognized GCC pragma
  #pragma GCC diagnostic ignored "-Wunused-parameter"
..\Inc\arm_math.h(7146): warning:  #2803-D: unrecognized GCC pragma
  #pragma GCC diagnostic pop
../Src/main.c: 5 warnings, 0 errors
compiling stm32l4xx_hal_i2c.c...
compiling stm32l4xx_hal_rcc.c...
compiling stm32l4xx_hal_dma_ex.c...
compiling stm32l4xx_hal_flash_ramfunc.c...
compiling stm32l4xx_hal_flash.c...
compiling stm32l4xx_hal_exti.c...
compiling stm32l4xx_hal_cortex.c...
compiling stm32l4xx_hal_pwr.c...
compiling stm32l4xx_hal_dma.c...
compiling stm32l4xx_hal_gpio.c...
compiling stm32l4xx_hal_flash_ex.c...
compiling stm32l4xx_hal_pwr_ex.c...
compiling stm32l4xx_hal_rcc_ex.c...
compiling system_stm32l4xx.c...
linking...

those warning leading to those errors: