cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with applying dsplib functions (arm_cfft_f32)!!

saleh barkhori
Associate II
Posted on August 21, 2017 at 15:19

Hi all

I have  Problem with applying dsplib functions while working on keil software and stm32f407

I write these codes and  add an array of input data  with the length of 2048

&sharpinclude 'stm32f4xx_hal.h'

&sharpinclude 'arm_math.h'

&sharpinclude <arm_const_structs.h>

&sharpdefine arm_cfft_f32

&sharpdefine arm_cmplx_mag_f32

uint32_t fftSize = 1024;

uint32_t ifftFlag = 0;

uint32_t doBitReverse = 1;

uint32_t refIndex = 213, testIndex = 0;

&sharpifdef __GNUC__

    &sharpdefine PUTCHAR_PROTOTYPE int __io_putchar(int ch)

    &sharpelse

    &sharpdefine PUTCHAR_PROTOTYPE int fputc(int ch,FILE *f)

    &sharpendif

    

    PUTCHAR_PROTOTYPE

    {

    HAL_UART_Transmit(&huart2,(uint8_t*)&ch,1,100);

        return ch;   

    }

arm_cfft_f32(&arm_cfft_sR_f32_len1024, testInput_f32_10khz, ifftFlag, doBitReverse);

arm_cmplx_mag_f32(testInput_f32_10khz, testOutput, fftSize);

for (j=0;j<=1023;j++){

    printf('%2f\r\n',testOutput[j]);

  HAL_Delay(100);

    }

I want to understand What is the correctness of the output so I use usart2 to print the output  in hercules terminal ,but unfortunately the output is zero!!As I change the input the output is still zero..

I also tried lcd but it dosnot show any thing!

what did I miss??thanks very much

#stm32f4
0 REPLIES 0