Arm-Math, функция DSP - PullRequest
       112

Arm-Math, функция DSP

0 голосов
/ 03 августа 2020

Я хочу использовать библиотеки DSP. Я использую библиотеку arm-math. и запустите эту функцию:

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;

MCU печатает 1, 2 и 3 строки. но застрял после этого (в этой функции: arm_cmplx_mag_f32 (Input, Output, FFT_SIZE);). Я использую Keil, я пробовал использовать среду CubeIDE, и она работает без проблем. Может быть, мои конфигурации не подходят?

Кстати, если я добавлю к компилятору «GNU Extensions», у меня будет 5 новых предупреждений:

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...

те, которые приводят к этим ошибкам : ссылка

...