STM32H735xx HAL User Manual
Functions
FMAC Private Functions
FMAC

Functions

static HAL_StatusTypeDef FMAC_Reset (FMAC_HandleTypeDef *hfmac)
 ============================================================================== ##### FMAC Private Functions ##### ==============================================================================
static void FMAC_ResetDataPointers (FMAC_HandleTypeDef *hfmac)
 Reset the data pointers of the FMAC unit.
static void FMAC_ResetInputStateAndDataPointers (FMAC_HandleTypeDef *hfmac)
 Reset the input data pointers of the FMAC unit.
static void FMAC_ResetOutputStateAndDataPointers (FMAC_HandleTypeDef *hfmac)
 Reset the output data pointers of the FMAC unit.
static HAL_StatusTypeDef FMAC_FilterConfig (FMAC_HandleTypeDef *hfmac, FMAC_FilterConfigTypeDef *pConfig, uint8_t PreloadAccess)
 Configure the FMAC filter.
static HAL_StatusTypeDef FMAC_FilterPreload (FMAC_HandleTypeDef *hfmac, int16_t *pInput, uint8_t InputSize, int16_t *pOutput, uint8_t OutputSize, uint8_t PreloadAccess)
 Preload the input (FIR, IIR) and output data (IIR) of the FMAC filter.
static void FMAC_WritePreloadDataIncrementPtr (FMAC_HandleTypeDef *hfmac, int16_t **ppData, uint8_t Size)
 Write data into FMAC internal memory through WDATA and increment input buffer pointer.
static HAL_StatusTypeDef FMAC_WaitOnStartUntilTimeout (FMAC_HandleTypeDef *hfmac, uint32_t Tickstart, uint32_t Timeout)
 Handle FMAC Function Timeout.
static HAL_StatusTypeDef FMAC_AppendFilterDataUpdateState (FMAC_HandleTypeDef *hfmac, int16_t *pInput, uint16_t *pInputSize)
 Register the new input buffer, update DMA configuration if needed and change the FMAC state.
static HAL_StatusTypeDef FMAC_ConfigFilterOutputBufferUpdateState (FMAC_HandleTypeDef *hfmac, int16_t *pOutput, uint16_t *pOutputSize)
 Register the new output buffer, update DMA configuration if needed and change the FMAC state.
static void FMAC_ReadDataIncrementPtr (FMAC_HandleTypeDef *hfmac, uint16_t MaxSizeToRead)
 Read available output data until Y EMPTY is set.
static void FMAC_WriteDataIncrementPtr (FMAC_HandleTypeDef *hfmac, uint16_t MaxSizeToWrite)
 Write available input data until X1 FULL is set.
static void FMAC_DMAHalfGetData (DMA_HandleTypeDef *hdma)
 DMA FMAC Input Data process half complete callback.
static void FMAC_DMAGetData (DMA_HandleTypeDef *hdma)
 DMA FMAC Input Data process complete callback.
static void FMAC_DMAHalfOutputDataReady (DMA_HandleTypeDef *hdma)
 DMA FMAC Output Data process half complete callback.
static void FMAC_DMAOutputDataReady (DMA_HandleTypeDef *hdma)
 DMA FMAC Output Data process complete callback.
static void FMAC_DMAFilterConfig (DMA_HandleTypeDef *hdma)
 DMA FMAC Filter Configuration process complete callback.
static void FMAC_DMAFilterPreload (DMA_HandleTypeDef *hdma)
 DMA FMAC Filter Configuration process complete callback.
static void FMAC_DMAError (DMA_HandleTypeDef *hdma)
 DMA FMAC communication error callback.

Function Documentation

static HAL_StatusTypeDef FMAC_AppendFilterDataUpdateState ( FMAC_HandleTypeDef hfmac,
int16_t *  pInput,
uint16_t *  pInputSize 
) [static]

Register the new input buffer, update DMA configuration if needed and change the FMAC state.

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 2054 of file stm32h7xx_hal_fmac.c.

References FMAC_BUFFER_ACCESS_DMA, FMAC_DMAError(), FMAC_DMAGetData(), FMAC_DMAHalfGetData(), HAL_DMA_Start_IT(), HAL_FMAC_STATE_BUSY_WR, __FMAC_HandleTypeDef::hdmaIn, __FMAC_HandleTypeDef::InputAccess, __FMAC_HandleTypeDef::InputCurrentSize, __FMAC_HandleTypeDef::Instance, __FMAC_HandleTypeDef::pInput, __FMAC_HandleTypeDef::pInputSize, __FMAC_HandleTypeDef::WrState, __DMA_HandleTypeDef::XferCpltCallback, __DMA_HandleTypeDef::XferErrorCallback, and __DMA_HandleTypeDef::XferHalfCpltCallback.

Referenced by HAL_FMAC_AppendFilterData().

static HAL_StatusTypeDef FMAC_ConfigFilterOutputBufferUpdateState ( FMAC_HandleTypeDef hfmac,
int16_t *  pOutput,
uint16_t *  pOutputSize 
) [static]

Register the new output buffer, update DMA configuration if needed and change the FMAC state.

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 2098 of file stm32h7xx_hal_fmac.c.

References FMAC_BUFFER_ACCESS_DMA, FMAC_BUFFER_ACCESS_NONE, FMAC_DMAError(), FMAC_DMAHalfOutputDataReady(), FMAC_DMAOutputDataReady(), HAL_DMA_Start_IT(), HAL_FMAC_STATE_BUSY_RD, HAL_FMAC_STATE_READY, __FMAC_HandleTypeDef::hdmaOut, __FMAC_HandleTypeDef::Instance, __FMAC_HandleTypeDef::OutputAccess, __FMAC_HandleTypeDef::OutputCurrentSize, __FMAC_HandleTypeDef::pOutput, __FMAC_HandleTypeDef::pOutputSize, __FMAC_HandleTypeDef::RdState, __DMA_HandleTypeDef::XferCpltCallback, __DMA_HandleTypeDef::XferErrorCallback, and __DMA_HandleTypeDef::XferHalfCpltCallback.

Referenced by HAL_FMAC_ConfigFilterOutputBuffer(), and HAL_FMAC_FilterStart().

static void FMAC_DMAError ( DMA_HandleTypeDef hdma) [static]
static void FMAC_DMAFilterConfig ( DMA_HandleTypeDef hdma) [static]
static void FMAC_DMAFilterPreload ( DMA_HandleTypeDef hdma) [static]
static void FMAC_DMAGetData ( DMA_HandleTypeDef hdma) [static]

DMA FMAC Input Data process complete callback.

Parameters:
hdmaDMA handle.
Return values:
None

Definition at line 2292 of file stm32h7xx_hal_fmac.c.

References FMAC_ResetInputStateAndDataPointers(), __FMAC_HandleTypeDef::GetDataCallback, and HAL_FMAC_GetDataCallback().

Referenced by FMAC_AppendFilterDataUpdateState().

static void FMAC_DMAHalfGetData ( DMA_HandleTypeDef hdma) [static]

DMA FMAC Input Data process half complete callback.

Parameters:
hdmaDMA handle.
Return values:
None

Definition at line 2275 of file stm32h7xx_hal_fmac.c.

References HAL_FMAC_HalfGetDataCallback(), and __FMAC_HandleTypeDef::HalfGetDataCallback.

Referenced by FMAC_AppendFilterDataUpdateState().

static void FMAC_DMAHalfOutputDataReady ( DMA_HandleTypeDef hdma) [static]

DMA FMAC Output Data process half complete callback.

Parameters:
hdmaDMA handle.
Return values:
None

Definition at line 2312 of file stm32h7xx_hal_fmac.c.

References HAL_FMAC_HalfOutputDataReadyCallback(), and __FMAC_HandleTypeDef::HalfOutputDataReadyCallback.

Referenced by FMAC_ConfigFilterOutputBufferUpdateState().

static void FMAC_DMAOutputDataReady ( DMA_HandleTypeDef hdma) [static]

DMA FMAC Output Data process complete callback.

Parameters:
hdmaDMA handle.
Return values:
None

Definition at line 2329 of file stm32h7xx_hal_fmac.c.

References FMAC_ResetOutputStateAndDataPointers(), HAL_FMAC_OutputDataReadyCallback(), and __FMAC_HandleTypeDef::OutputDataReadyCallback.

Referenced by FMAC_ConfigFilterOutputBufferUpdateState().

static HAL_StatusTypeDef FMAC_FilterConfig ( FMAC_HandleTypeDef hfmac,
FMAC_FilterConfigTypeDef pConfig,
uint8_t  PreloadAccess 
) [static]

Configure the FMAC filter.

Note:
The configuration is done according to the parameters specified in the FMAC_FilterConfigTypeDef structure.
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.
PreloadAccessaccess mode used for the preload (polling or DMA).
Return values:
HAL_StatusTypeDefHAL status

Definition at line 1646 of file stm32h7xx_hal_fmac.c.

References assert_param, FMAC_FilterConfigTypeDef::Clip, FMAC_FilterConfigTypeDef::CoeffASize, FMAC_FilterConfigTypeDef::CoeffBaseAddress, FMAC_FilterConfigTypeDef::CoeffBSize, FMAC_FilterConfigTypeDef::CoeffBufferSize, __FMAC_HandleTypeDef::ErrorCode, FMAC_FilterConfigTypeDef::Filter, __FMAC_HandleTypeDef::FilterParam, FMAC_BUFFER_ACCESS_DMA, FMAC_BUFFER_ACCESS_IT, FMAC_DMAError(), FMAC_DMAFilterConfig(), FMAC_FUNC_CONVO_FIR, FMAC_FUNC_IIR_DIRECT_FORM_1, FMAC_FUNC_LOAD_X2, FMAC_GET_START_BIT, FMAC_GET_X1_SIZE, FMAC_GET_X2_SIZE, FMAC_GET_Y_SIZE, FMAC_IT_OVFLIEN, FMAC_IT_UNFLIEN, FMAC_THRESHOLD_NO_VALUE, FMAC_WaitOnStartUntilTimeout(), FMAC_WritePreloadDataIncrementPtr(), HAL_DMA_Start_IT(), HAL_FMAC_ERROR_TIMEOUT, HAL_FMAC_STATE_BUSY, HAL_FMAC_STATE_READY, HAL_FMAC_STATE_TIMEOUT, HAL_FMAC_TIMEOUT_VALUE, HAL_GetTick(), __FMAC_HandleTypeDef::hdmaPreload, __FMAC_HandleTypeDef::InputAccess, FMAC_FilterConfigTypeDef::InputAccess, FMAC_FilterConfigTypeDef::InputBaseAddress, FMAC_FilterConfigTypeDef::InputBufferSize, __FMAC_HandleTypeDef::InputCurrentSize, FMAC_FilterConfigTypeDef::InputThreshold, __FMAC_HandleTypeDef::Instance, IS_FMAC_BUFFER_ACCESS, IS_FMAC_CLIP_STATE, IS_FMAC_FILTER_FUNCTION, IS_FMAC_PARAM_P, IS_FMAC_PARAM_Q, IS_FMAC_PARAM_R, IS_FMAC_THRESHOLD, IS_FMAC_THRESHOLD_APPLICABLE, __FMAC_HandleTypeDef::OutputAccess, FMAC_FilterConfigTypeDef::OutputAccess, FMAC_FilterConfigTypeDef::OutputBaseAddress, FMAC_FilterConfigTypeDef::OutputBufferSize, FMAC_FilterConfigTypeDef::OutputThreshold, FMAC_FilterConfigTypeDef::P, FMAC_FilterConfigTypeDef::pCoeffA, FMAC_FilterConfigTypeDef::pCoeffB, __FMAC_HandleTypeDef::pInput, PRELOAD_ACCESS_POLLING, FMAC_FilterConfigTypeDef::Q, FMAC_FilterConfigTypeDef::R, __FMAC_HandleTypeDef::State, __DMA_HandleTypeDef::XferCpltCallback, __DMA_HandleTypeDef::XferErrorCallback, and __DMA_HandleTypeDef::XferHalfCpltCallback.

Referenced by HAL_FMAC_FilterConfig(), and HAL_FMAC_FilterConfig_DMA().

static HAL_StatusTypeDef FMAC_FilterPreload ( FMAC_HandleTypeDef hfmac,
int16_t *  pInput,
uint8_t  InputSize,
int16_t *  pOutput,
uint8_t  OutputSize,
uint8_t  PreloadAccess 
) [static]

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.
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.
PreloadAccessaccess mode used for the preload (polling or DMA).
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 1859 of file stm32h7xx_hal_fmac.c.

References __HAL_FMAC_GET_FLAG, __FMAC_HandleTypeDef::ErrorCode, __FMAC_HandleTypeDef::FilterParam, FMAC_DMAError(), FMAC_DMAFilterPreload(), FMAC_FLAG_OVFL, FMAC_FLAG_SAT, FMAC_FLAG_UNFL, FMAC_FUNC_LOAD_X1, FMAC_FUNC_LOAD_Y, FMAC_GET_START_BIT, FMAC_GET_X1_SIZE, FMAC_GET_Y_SIZE, FMAC_WaitOnStartUntilTimeout(), FMAC_WritePreloadDataIncrementPtr(), HAL_DMA_Start_IT(), HAL_FMAC_ERROR_NONE, HAL_FMAC_ERROR_OVFL, HAL_FMAC_ERROR_SAT, HAL_FMAC_ERROR_TIMEOUT, HAL_FMAC_ERROR_UNFL, HAL_FMAC_STATE_BUSY, HAL_FMAC_STATE_READY, HAL_FMAC_STATE_TIMEOUT, HAL_FMAC_TIMEOUT_VALUE, HAL_GetTick(), __FMAC_HandleTypeDef::hdmaPreload, __FMAC_HandleTypeDef::InputCurrentSize, __FMAC_HandleTypeDef::Instance, __FMAC_HandleTypeDef::pInput, PRELOAD_ACCESS_POLLING, __FMAC_HandleTypeDef::State, __DMA_HandleTypeDef::XferCpltCallback, __DMA_HandleTypeDef::XferErrorCallback, and __DMA_HandleTypeDef::XferHalfCpltCallback.

Referenced by HAL_FMAC_FilterPreload(), and HAL_FMAC_FilterPreload_DMA().

static void FMAC_ReadDataIncrementPtr ( FMAC_HandleTypeDef hfmac,
uint16_t  MaxSizeToRead 
) [static]

Read available output data until Y EMPTY is set.

Parameters:
hfmacFMAC handle.
MaxSizeToReadMaximum number of data to read (this serves as a timeout if FMAC continuously writes into the output buffer).
Return values:
None

Definition at line 2152 of file stm32h7xx_hal_fmac.c.

References FMAC_GET_THRESHOLD_FROM_WM, FMAC_GET_Y_EMPTY_WM, __FMAC_HandleTypeDef::Instance, __FMAC_HandleTypeDef::OutputCurrentSize, __FMAC_HandleTypeDef::pOutput, and __FMAC_HandleTypeDef::pOutputSize.

Referenced by HAL_FMAC_IRQHandler(), and HAL_FMAC_PollFilterData().

static HAL_StatusTypeDef FMAC_Reset ( FMAC_HandleTypeDef hfmac) [static]

============================================================================== ##### FMAC Private Functions ##### ==============================================================================

Perform a reset of the FMAC unit.

Parameters:
hfmacFMAC handle.
Return values:
HAL_StatusTypeDefHAL status

Definition at line 1574 of file stm32h7xx_hal_fmac.c.

References __FMAC_HandleTypeDef::ErrorCode, HAL_FMAC_ERROR_NONE, HAL_FMAC_ERROR_TIMEOUT, HAL_FMAC_RESET_TIMEOUT_VALUE, HAL_GetTick(), and __FMAC_HandleTypeDef::Instance.

Referenced by HAL_FMAC_FilterStop(), and HAL_FMAC_Init().

static void FMAC_ResetDataPointers ( FMAC_HandleTypeDef hfmac) [static]

Reset the data pointers of the FMAC unit.

Parameters:
hfmacFMAC handle.
Return values:
None

Definition at line 1603 of file stm32h7xx_hal_fmac.c.

References FMAC_ResetInputStateAndDataPointers(), and FMAC_ResetOutputStateAndDataPointers().

Referenced by HAL_FMAC_DeInit(), HAL_FMAC_FilterStop(), and HAL_FMAC_Init().

static void FMAC_ResetInputStateAndDataPointers ( FMAC_HandleTypeDef hfmac) [static]

Reset the input data pointers of the FMAC unit.

Parameters:
hfmacFMAC handle.
Return values:
None

Definition at line 1614 of file stm32h7xx_hal_fmac.c.

References HAL_FMAC_STATE_READY, __FMAC_HandleTypeDef::InputCurrentSize, __FMAC_HandleTypeDef::pInput, __FMAC_HandleTypeDef::pInputSize, and __FMAC_HandleTypeDef::WrState.

Referenced by FMAC_DMAGetData(), FMAC_ResetDataPointers(), HAL_FMAC_IRQHandler(), and HAL_FMAC_PollFilterData().

static void FMAC_ResetOutputStateAndDataPointers ( FMAC_HandleTypeDef hfmac) [static]

Reset the output data pointers of the FMAC unit.

Parameters:
hfmacFMAC handle.
Return values:
None

Definition at line 1627 of file stm32h7xx_hal_fmac.c.

References HAL_FMAC_STATE_READY, __FMAC_HandleTypeDef::OutputCurrentSize, __FMAC_HandleTypeDef::pOutput, __FMAC_HandleTypeDef::pOutputSize, and __FMAC_HandleTypeDef::RdState.

Referenced by FMAC_DMAOutputDataReady(), FMAC_ResetDataPointers(), HAL_FMAC_IRQHandler(), and HAL_FMAC_PollFilterData().

static HAL_StatusTypeDef FMAC_WaitOnStartUntilTimeout ( FMAC_HandleTypeDef hfmac,
uint32_t  Tickstart,
uint32_t  Timeout 
) [static]

Handle FMAC Function Timeout.

Parameters:
hfmacFMAC handle.
TickstartTick start value.
TimeoutTimeout duration.
Return values:
HAL_StatusTypeDefHAL status

Definition at line 2030 of file stm32h7xx_hal_fmac.c.

References __FMAC_HandleTypeDef::ErrorCode, HAL_FMAC_ERROR_TIMEOUT, HAL_GetTick(), and __FMAC_HandleTypeDef::Instance.

Referenced by FMAC_FilterConfig(), and FMAC_FilterPreload().

static void FMAC_WriteDataIncrementPtr ( FMAC_HandleTypeDef hfmac,
uint16_t  MaxSizeToWrite 
) [static]

Write available input data until X1 FULL is set.

Parameters:
hfmacFMAC handle.
MaxSizeToWriteMaximum number of data to write (this serves as a timeout if FMAC continuously empties the input buffer).
Return values:
None

Definition at line 2216 of file stm32h7xx_hal_fmac.c.

References FMAC_GET_THRESHOLD_FROM_WM, FMAC_GET_X1_FULL_WM, __FMAC_HandleTypeDef::InputCurrentSize, __FMAC_HandleTypeDef::Instance, __FMAC_HandleTypeDef::pInput, and __FMAC_HandleTypeDef::pInputSize.

Referenced by HAL_FMAC_IRQHandler(), and HAL_FMAC_PollFilterData().

static void FMAC_WritePreloadDataIncrementPtr ( FMAC_HandleTypeDef hfmac,
int16_t **  ppData,
uint8_t  Size 
) [static]

Write data into FMAC internal memory through WDATA and increment input buffer pointer.

Note:
This function is only used with preload functions.
Parameters:
hfmacpointer to a FMAC_HandleTypeDef structure that contains the configuration information for FMAC module.
ppDatapointer to pointer to the data buffer.
Sizesize of the data buffer.
Return values:
None

Definition at line 2011 of file stm32h7xx_hal_fmac.c.

References __FMAC_HandleTypeDef::Instance.

Referenced by FMAC_FilterConfig(), and FMAC_FilterPreload().