AnsweredAssumed Answered

Problem with applying dsplib functions (arm_cfft_f32)!!

Question asked by saleh barkhori on Aug 21, 2017

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

 

#include "stm32f4xx_hal.h"
#include "arm_math.h"
#include <arm_const_structs.h>
#define arm_cfft_f32
#define arm_cmplx_mag_f32

uint32_t fftSize = 1024;
uint32_t ifftFlag = 0;
uint32_t doBitReverse = 1;
uint32_t refIndex = 213, testIndex = 0;
#ifdef __GNUC__
    #define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
    #else
    #define PUTCHAR_PROTOTYPE int fputc(int ch,FILE *f)
    #endif
    
    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

Outcomes