思澈科技软件开发工具包  2.20

Data Structures

struct  __FFT_HandleTypeDef
 
struct  FFT_ConfigTypeDef
 

Macros

#define FFT1_LEN_MAX   (FFT_LEN_512)
 

Typedefs

typedef struct __FFT_HandleTypeDef FFT_HandleTypeDef
 

Enumerations

enum  HAL_FFT_StateTypeDef {
  HAL_FFT_STATE_RESET = 0x00U,
  HAL_FFT_STATE_READY = 0x01U,
  HAL_FFT_STATE_BUSY = 0x02U,
  HAL_FFT_STATE_ERROR = 0x03U,
  HAL_FFT_STATE_CDCT_REAL = 0x04U
}
 HAL FFT State structures definition. More...
 
enum  FFT_BitwidthTypeDef {
  FFT_BW_8BIT = 0,
  FFT_BW_16BIT = 1,
  FFT_BW_32BIT = 2,
  FFT_BW_MAX
}
 
enum  FFT_FFTLengthTypeDef {
  FFT_LEN_16 = 0,
  FFT_LEN_32 = 1,
  FFT_LEN_64 = 2,
  FFT_LEN_128 = 3,
  FFT_LEN_256 = 4,
  FFT_LEN_512 = 5,
  FFT_LEN_1024 = 6,
  FFT_LEN_2048 = 7,
  FFT_LEN_4096 = 8,
  FFT_LEN_TYPE_NUM
}
 

Functions

HAL_StatusTypeDef HAL_FFT_Init (FFT_HandleTypeDef *fft)
 Init FFT Accelerator. More...
 
HAL_StatusTypeDef HAL_FFT_DeInit (FFT_HandleTypeDef *fft)
 DeInit FFT Accelerator. More...
 
HAL_StatusTypeDef HAL_FFT_StartFFT (FFT_HandleTypeDef *fft, FFT_ConfigTypeDef *config)
 Start FFT in synchronous mode. More...
 
HAL_StatusTypeDef HAL_FFT_StartFFT_IT (FFT_HandleTypeDef *fft, FFT_ConfigTypeDef *config)
 Start FFT in asynchronous mode. More...
 
HAL_StatusTypeDef HAL_FFT_StartDCT (FFT_HandleTypeDef *fft, DCT_ConfigTypeDef *config)
 Start DCT in synchronous mode. More...
 
HAL_StatusTypeDef HAL_FFT_StartDCT_IT (FFT_HandleTypeDef *fft, DCT_ConfigTypeDef *config)
 Start DCT in asynchronous mode. More...
 
HAL_StatusTypeDef HAL_FFT_IRQHandler (FFT_HandleTypeDef *fft)
 

Detailed Description

Macro Definition Documentation

◆ FFT1_LEN_MAX

#define FFT1_LEN_MAX   (FFT_LEN_512)

FFT1 max length

Typedef Documentation

◆ FFT_HandleTypeDef

FFT handle structure definition

Enumeration Type Documentation

◆ FFT_BitwidthTypeDef

FFT Bitwidth Type Definition

◆ FFT_FFTLengthTypeDef

FFT Length Type Definition

◆ HAL_FFT_StateTypeDef

HAL FFT State structures definition.

Enumerator
HAL_FFT_STATE_RESET 

FFT not yet initialized or disabled

HAL_FFT_STATE_READY 

Peripheral Initialized and ready for use

HAL_FFT_STATE_BUSY 

An internal process is ongoing

HAL_FFT_STATE_ERROR 

FFT state error

HAL_FFT_STATE_CDCT_REAL 

CDCT real part calculation ongoing state

Function Documentation

◆ HAL_FFT_DeInit()

HAL_StatusTypeDef HAL_FFT_DeInit ( FFT_HandleTypeDef fft)

DeInit FFT Accelerator.

Return values
status

◆ HAL_FFT_Init()

HAL_StatusTypeDef HAL_FFT_Init ( FFT_HandleTypeDef fft)

Init FFT Accelerator.

Return values
status

◆ HAL_FFT_StartDCT()

HAL_StatusTypeDef HAL_FFT_StartDCT ( FFT_HandleTypeDef fft,
DCT_ConfigTypeDef *  config 
)

Start DCT in synchronous mode.

8bit DCT: input format is Q1.7, output format as follows

DCT Length Output Format
8 4.4
16 5.3
32 5.3
64 6.2
128 6.2
256 7.1

16bit DCT: input format is Q1.15, output format as follows

DCT Length Output Format
8 4.12
16 5.11
32 5.11
64 6.10
128 6.10
256 7.9

32bit DCT: input format is Q1.31, output format as follows

DCT Length Output Format
8 4.28
16 5.27
32 5.27
64 6.26
128 6.26
256 7.25
Parameters
[in]fftFFT handle
[in]configDCT config
Return values
status

◆ HAL_FFT_StartDCT_IT()

HAL_StatusTypeDef HAL_FFT_StartDCT_IT ( FFT_HandleTypeDef fft,
DCT_ConfigTypeDef *  config 
)

Start DCT in asynchronous mode.

CpltCallback is called after complete

Input and output data format is same as HAL_FFT_StartDCT

Parameters
[in]fftFFT handle
[in]configDCT config
Return values
status

◆ HAL_FFT_StartFFT()

HAL_StatusTypeDef HAL_FFT_StartFFT ( FFT_HandleTypeDef fft,
FFT_ConfigTypeDef config 
)

Start FFT in synchronous mode.

8bit FFT: input format is Q1.7, output format as follows, for FFT length greater than 128, output value needs to be upscaled accordingly further to match the FFT definition

FFT Length Output Format Upscale value
16 5.3 0
32 6.3 0
64 7.1 0
128 8.0 0
256 8.0 upscale by 2
512 8.0 upscale by 4
1024 8.0 upscale by 8
2048 8.0 upscale by 16
4096 8.0 upscale by 32

8bit IFFT: input format is Q1.7, output format is Q1.7

16bit FFT: input format is Q1.15, output format as follows

FFT Length Output Format
16 5.11
32 6.10
64 7.9
128 8.8
256 9.7
512 10.6
1024 11.5
2048 12.4
4096 13.3

16bit IFFT: input format is Q1.15, output format is Q1.15

32bit FFT: input format is Q1.31, output format as follows

FFT Length Output Format
16 5.27
32 6.26
64 7.25
128 8.24
256 9.23
512 10.22
1024 11.21
2048 12.20
4096 13.19

32bit IFFT: input format is Q1.31, output format is Q1.31

Parameters
[in]fftFFT handle
[in]configFFT config
Return values
status

◆ HAL_FFT_StartFFT_IT()

HAL_StatusTypeDef HAL_FFT_StartFFT_IT ( FFT_HandleTypeDef fft,
FFT_ConfigTypeDef config 
)

Start FFT in asynchronous mode.

CpltCallback is called after complete

Input and output data format is same as HAL_FFT_StartFFT

Parameters
[in]fftFFT handle
[in]configFFT config
Return values
status