STM32H735xx HAL User Manual
Functions
Peripheral Control functions
FMAC Exported Functions

Control functions. More...

Functions

HAL_StatusTypeDef HAL_FMAC_FilterConfig (FMAC_HandleTypeDef *hfmac, FMAC_FilterConfigTypeDef *pConfig)
 Configure the FMAC filter.
HAL_StatusTypeDef HAL_FMAC_FilterConfig_DMA (FMAC_HandleTypeDef *hfmac, FMAC_FilterConfigTypeDef *pConfig)
 Configure the FMAC filter.
HAL_StatusTypeDef HAL_FMAC_FilterPreload (FMAC_HandleTypeDef *hfmac, int16_t *pInput, uint8_t InputSize, int16_t *pOutput, uint8_t OutputSize)
 Preload the input (FIR, IIR) and output data (IIR) of the FMAC filter.
HAL_StatusTypeDef HAL_FMAC_FilterPreload_DMA (FMAC_HandleTypeDef *hfmac, int16_t *pInput, uint8_t InputSize, int16_t *pOutput, uint8_t OutputSize)
 Preload the input (FIR, IIR) and output data (IIR) of the FMAC filter.
HAL_StatusTypeDef HAL_FMAC_FilterStart (FMAC_HandleTypeDef *hfmac, int16_t *pOutput, uint16_t *pOutputSize)
 Start the FMAC processing according to the existing FMAC configuration.
HAL_StatusTypeDef HAL_FMAC_AppendFilterData (FMAC_HandleTypeDef *hfmac, int16_t *pInput, uint16_t *pInputSize)
 Provide a new input buffer that will be loaded into the FMAC input memory area.
HAL_StatusTypeDef HAL_FMAC_ConfigFilterOutputBuffer (FMAC_HandleTypeDef *hfmac, int16_t *pOutput, uint16_t *pOutputSize)
 Provide a new output buffer to be filled with the data computed by FMAC unit.
HAL_StatusTypeDef HAL_FMAC_PollFilterData (FMAC_HandleTypeDef *hfmac, uint32_t Timeout)
 Handle the input and/or output data in polling mode.
HAL_StatusTypeDef HAL_FMAC_FilterStop (FMAC_HandleTypeDef *hfmac)
 Stop the FMAC processing.

Detailed Description

Control functions.

  ==============================================================================
                      ##### Peripheral Control functions #####
  ==============================================================================
    [..]  This section provides functions allowing to:
      (+) Configure the FMAC peripheral: memory area, filter type and parameters,
          way to access to the input and output memory area (none, polling, IT, DMA).
      (+) Start the FMAC processing (filter).
      (+) Handle the input data that will be provided into FMAC.
      (+) Handle the output data provided by FMAC.
      (+) Stop the FMAC processing (filter).


Function Documentation

HAL_StatusTypeDef HAL_FMAC_AppendFilterData ( FMAC_HandleTypeDef hfmac,
int16_t *  pInput,
uint16_t *  pInputSize 
)

Provide a new input buffer that will be loaded into the FMAC input memory area.

Parameters:
hfmacpointer to a FMAC_HandleTypeDef structure that contains the configuration information for FMAC module.
pInputNew input vector (additional input data).
pInputSizeSize of the input vector (if all the data can't be written, it will be updated with the number of data read from FMAC).
Return values:
HAL_StatusTypeDefHAL status

Definition at line 971 of file stm32h7xx_hal_fmac.c.

References FMAC_AppendFilterDataUpdateState(), FMAC_BUFFER_ACCESS_NONE, FMAC_GET_START_BIT, HAL_FMAC_STATE_READY, __FMAC_HandleTypeDef::InputAccess, __FMAC_HandleTypeDef::InputCurrentSize, __FMAC_HandleTypeDef::pInputSize, and __FMAC_HandleTypeDef::WrState.

HAL_StatusTypeDef HAL_FMAC_ConfigFilterOutputBuffer ( FMAC_HandleTypeDef hfmac,
int16_t *  pOutput,
uint16_t *  pOutputSize 
)

Provide a new output buffer to be filled with the data computed by FMAC unit.

Parameters:
hfmacpointer to a FMAC_HandleTypeDef structure that contains the configuration information for FMAC module.
pOutputNew output vector.
pOutputSizeSize of the output vector (if the vector can't be entirely filled, pOutputSize will be updated with the number of data read from FMAC).
Return values:
HAL_StatusTypeDefHAL status

Definition at line 1027 of file stm32h7xx_hal_fmac.c.

References FMAC_BUFFER_ACCESS_NONE, FMAC_ConfigFilterOutputBufferUpdateState(), FMAC_GET_START_BIT, HAL_FMAC_STATE_READY, __FMAC_HandleTypeDef::OutputAccess, __FMAC_HandleTypeDef::OutputCurrentSize, __FMAC_HandleTypeDef::pOutputSize, and __FMAC_HandleTypeDef::RdState.

HAL_StatusTypeDef HAL_FMAC_FilterConfig ( FMAC_HandleTypeDef hfmac,
FMAC_FilterConfigTypeDef pConfig 
)

Configure the FMAC filter.

Note:
The configuration is done according to the parameters specified in the FMAC_FilterConfigTypeDef structure. The provided data will be loaded using polling mode.
Parameters:
hfmacpointer to a FMAC_HandleTypeDef structure that contains the configuration information for FMAC module.
pConfigpointer to a FMAC_FilterConfigTypeDef structure that contains the FMAC configuration information.
Return values:
HAL_StatusTypeDefHAL status

Definition at line 803 of file stm32h7xx_hal_fmac.c.

References FMAC_FilterConfig(), and PRELOAD_ACCESS_POLLING.

HAL_StatusTypeDef HAL_FMAC_FilterConfig_DMA ( FMAC_HandleTypeDef hfmac,
FMAC_FilterConfigTypeDef pConfig 
)

Configure the FMAC filter.

Note:
The configuration is done according to the parameters specified in the FMAC_FilterConfigTypeDef structure. The provided data will be loaded using DMA.
Parameters:
hfmacpointer to a FMAC_HandleTypeDef structure that contains the configuration information for FMAC module.
pConfigpointer to a FMAC_FilterConfigTypeDef structure that contains the FMAC configuration information.
Return values:
HAL_StatusTypeDefHAL status

Definition at line 819 of file stm32h7xx_hal_fmac.c.

References FMAC_FilterConfig(), and PRELOAD_ACCESS_DMA.

HAL_StatusTypeDef HAL_FMAC_FilterPreload ( FMAC_HandleTypeDef hfmac,
int16_t *  pInput,
uint8_t  InputSize,
int16_t *  pOutput,
uint8_t  OutputSize 
)

Preload the input (FIR, IIR) and output data (IIR) of the FMAC filter.

Note:
The set(s) of data will be used by FMAC as soon as HAL_FMAC_FilterStart is called. The provided data will be loaded using polling mode.
Parameters:
hfmacpointer to a FMAC_HandleTypeDef structure that contains the configuration information for FMAC module.
pInputPreloading of the first elements of the input buffer (X1). If not needed (no data available when starting), it should be set to NULL.
InputSizeSize of the input vector. As pInput is used for preloading data, it cannot be bigger than the input memory area.
pOutput[IIR] Preloading of the first elements of the output vector (Y). If not needed, it should be set to NULL.
OutputSizeSize of the output vector. As pOutput is used for preloading data, it cannot be bigger than the output memory area.
Note:
The input and the output buffers can be filled by calling several times HAL_FMAC_FilterPreload (each call filling partly the buffers). In case of overflow (too much data provided through all these calls), an error will be returned.
Return values:
HAL_StatusTypeDefHAL status

Definition at line 843 of file stm32h7xx_hal_fmac.c.

References FMAC_FilterPreload(), and PRELOAD_ACCESS_POLLING.

HAL_StatusTypeDef HAL_FMAC_FilterPreload_DMA ( FMAC_HandleTypeDef hfmac,
int16_t *  pInput,
uint8_t  InputSize,
int16_t *  pOutput,
uint8_t  OutputSize 
)

Preload the input (FIR, IIR) and output data (IIR) of the FMAC filter.

Note:
The set(s) of data will be used by FMAC as soon as HAL_FMAC_FilterStart is called. The provided data will be loaded using DMA.
Parameters:
hfmacpointer to a FMAC_HandleTypeDef structure that contains the configuration information for FMAC module.
pInputPreloading of the first elements of the input buffer (X1). If not needed (no data available when starting), it should be set to NULL.
InputSizeSize of the input vector. As pInput is used for preloading data, it cannot be bigger than the input memory area.
pOutput[IIR] Preloading of the first elements of the output vector (Y). If not needed, it should be set to NULL.
OutputSizeSize of the output vector. As pOutput is used for preloading data, it cannot be bigger than the output memory area.
Note:
The input and the output buffers can be filled by calling several times HAL_FMAC_FilterPreload (each call filling partly the buffers). In case of overflow (too much data provided through all these calls), an error will be returned.
Return values:
HAL_StatusTypeDefHAL status

Definition at line 868 of file stm32h7xx_hal_fmac.c.

References FMAC_FilterPreload(), and PRELOAD_ACCESS_DMA.

HAL_StatusTypeDef HAL_FMAC_FilterStart ( FMAC_HandleTypeDef hfmac,
int16_t *  pOutput,
uint16_t *  pOutputSize 
)

Start the FMAC processing according to the existing FMAC configuration.

Parameters:
hfmacpointer to a FMAC_HandleTypeDef structure that contains the configuration information for FMAC module.
pOutputpointer to buffer where output data of FMAC processing will be stored in the next steps. If it is set to NULL, the output will not be read and it will be up to an external IP to empty the output buffer.
pOutputSizepointer to the size of the output buffer. The number of read data will be written here.
Return values:
HAL_StatusTypeDefHAL status

Definition at line 886 of file stm32h7xx_hal_fmac.c.

References __FMAC_HandleTypeDef::FilterParam, FMAC_BUFFER_ACCESS_DMA, FMAC_BUFFER_ACCESS_IT, FMAC_ConfigFilterOutputBufferUpdateState(), FMAC_DMA_REN, FMAC_DMA_WEN, FMAC_GET_START_BIT, FMAC_IT_RIEN, FMAC_IT_WIEN, HAL_FMAC_STATE_BUSY, HAL_FMAC_STATE_READY, __FMAC_HandleTypeDef::InputAccess, __FMAC_HandleTypeDef::Instance, __FMAC_HandleTypeDef::OutputAccess, and __FMAC_HandleTypeDef::State.

HAL_StatusTypeDef HAL_FMAC_FilterStop ( FMAC_HandleTypeDef hfmac)
HAL_StatusTypeDef HAL_FMAC_PollFilterData ( FMAC_HandleTypeDef hfmac,
uint32_t  Timeout 
)

Handle the input and/or output data in polling mode.

Note:
This function writes the previously provided user's input data and fills the previously provided user's output buffer, according to the existing FMAC configuration (polling mode only). The function returns when the input data has been handled or when the output data is filled. The possible unused data isn't kept. It will be up to the user to handle it. The previously provided pInputSize and pOutputSize will be used to indicate to the size of the read/written data to the user.
Parameters:
hfmacpointer to a FMAC_HandleTypeDef structure that contains the configuration information for FMAC module.
Timeouttimeout value.
Return values:
HAL_StatusTypeDefHAL status

Definition at line 1088 of file stm32h7xx_hal_fmac.c.

References __FMAC_HandleTypeDef::ErrorCode, FMAC_BUFFER_ACCESS_POLLING, FMAC_GET_START_BIT, FMAC_ReadDataIncrementPtr(), FMAC_ResetInputStateAndDataPointers(), FMAC_ResetOutputStateAndDataPointers(), FMAC_WriteDataIncrementPtr(), HAL_FMAC_ERROR_TIMEOUT, HAL_FMAC_STATE_BUSY, HAL_FMAC_STATE_READY, HAL_GetTick(), __FMAC_HandleTypeDef::InputAccess, __FMAC_HandleTypeDef::InputCurrentSize, MAX_FILTER_DATA_SIZE_TO_HANDLE, __FMAC_HandleTypeDef::OutputAccess, __FMAC_HandleTypeDef::OutputCurrentSize, __FMAC_HandleTypeDef::pInput, __FMAC_HandleTypeDef::pInputSize, POLLING_DISABLED, POLLING_ENABLED, POLLING_NOT_STOPPED, POLLING_STOPPED, __FMAC_HandleTypeDef::pOutput, __FMAC_HandleTypeDef::pOutputSize, and __FMAC_HandleTypeDef::State.