FMAC Exported Functions ¶
Initialization and de-initialization functions ¶
- group FMAC_Exported_Functions_Group1
-
This section provides a set of functions allowing to :
-
Initialize the selected device with the FMAC instance by calling HAL_FMAC_Init() .
-
De-Initialize and restore the default configuration of the selected FMACx peripheral by calling HAL_FMAC_DeInit() .
Functions
-
hal_status_t
HAL_FMAC_Init
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_t
instance
)
¶
-
Initialize the FMAC according to the associated handle.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
instance – HAL FMAC instance
-
- Return values :
-
-
HAL_INVALID_PARAM – HAL FMAC instance is NULL
-
HAL_OK – FMAC instance has been correctly initialized.
-
-
void
HAL_FMAC_DeInit
(
hal_fmac_handle_t
*
hfmac
)
¶
-
De-initialize the FMAC peripheral and restore the default configuration.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
- group FMAC_Exported_Functions_Group1
-
This section provides a set of functions allowing to :
-
Initialize the selected device with the FMAC instance by calling HAL_FMAC_Init() .
-
De-Initialize and restore the default configuration of the selected FMACx peripheral by calling HAL_FMAC_DeInit() .
Functions
-
hal_status_t
HAL_FMAC_Init
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_t
instance
)
-
Initialize the FMAC according to the associated handle.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
instance – HAL FMAC instance
-
- Return values :
-
-
HAL_INVALID_PARAM – HAL FMAC instance is NULL
-
HAL_OK – FMAC instance has been correctly initialized.
-
-
void
HAL_FMAC_DeInit
(
hal_fmac_handle_t
*
hfmac
)
-
De-initialize the FMAC peripheral and restore the default configuration.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
- group FMAC_Exported_Functions_Group1
-
This section provides a set of functions allowing to :
-
Initialize the selected device with the FMAC instance by calling HAL_FMAC_Init() .
-
De-Initialize and restore the default configuration of the selected FMACx peripheral by calling HAL_FMAC_DeInit() .
Functions
-
hal_status_t
HAL_FMAC_Init
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_t
instance
)
-
Initialize the FMAC according to the associated handle.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
instance – HAL FMAC instance
-
- Return values :
-
-
HAL_INVALID_PARAM – HAL FMAC instance is NULL
-
HAL_OK – FMAC instance has been correctly initialized.
-
-
void
HAL_FMAC_DeInit
(
hal_fmac_handle_t
*
hfmac
)
-
De-initialize the FMAC peripheral and restore the default configuration.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
FMAC configuration functions ¶
- group FMAC_Exported_Functions_Group2
-
This section provides a set of functions allowing to:
-
Configure the FMAC memory area in the internal 16-bit memory by calling HAL_FMAC_SetConfig() .
-
Get the FMAC memory area in the internal 16-bit memory configuration by calling HAL_FMAC_GetConfig() .
-
Set the FMAC watermark threshold for X1 by calling HAL_FMAC_SetX1FullWatermark() . Valuable in case of process managed by interrupt.
-
Get the FMAC watermark threshold for X1 by calling HAL_FMAC_GetX1FullWatermark() .
-
Set the FMAC watermark threshold for Y by calling HAL_FMAC_SetYEmptyWatermark() . Valuable in case of process managed by interrupt.
-
Get the FMAC watermark threshold for Y by calling HAL_FMAC_SetYEmptyWatermark()
-
Set the X2 base address by calling HAL_FMAC_SetX2BaseAddress() .
-
Enable the clip mode by calling HAL_FMAC_EnableClip() .
-
Disable the clip mode by calling HAL_FMAC_DisableClip() .
-
Get X1 write register address by calling HAL_FMAC_GetX1Address() . Valuable in case of process managed by another peripheral.
-
Get Y write register address by calling HAL_FMAC_GetYAddress() . Valuable in case of process managed by another peripheral.
Functions
-
hal_status_t
HAL_FMAC_SetConfig
(
hal_fmac_handle_t
*
hfmac
,
const
hal_fmac_config_t
*
p_config
)
¶
-
Allocate memory area for X1, X2 and Y in the FMAC internal 16-bit memory. All thresholds are reset.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_config – Pointer to the configuration
-
- Return values :
-
-
HAL_INVALID_PARAM – p_config is NULL
-
HAL_OK – Operation completed successfully
-
-
void
HAL_FMAC_GetConfig
(
const
hal_fmac_handle_t
*
hfmac
,
hal_fmac_config_t
*
p_config
)
¶
-
Retrieve the FMAC configuration.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_config – Pointer to the configuration
-
-
hal_status_t
HAL_FMAC_SetX1FullWatermark
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_watermark_threshold_t
threshold
)
¶
-
Configure the FMAC X1 full watermark threshold. Setting a threshold greater than 1 allows several data to be transferred under one interrupt. In case of DMA, it must be kept to the default value of HAL_FMAC_WATERMARK_THRESHOLD_1 . In case of Polling, a threshold value of HAL_FMAC_WATERMARK_THRESHOLD_2 avoids waiting for a delay of 3 clock cycles before the X1FULL flag goes high.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
threshold – Threshold value.
-
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_fmac_watermark_threshold_t
HAL_FMAC_GetX1FullWatermark
(
const
hal_fmac_handle_t
*
hfmac
)
¶
-
Get the FMAC X1 full watermark threshold.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_FMAC_WATERMARK_THRESHOLD_1 –
-
HAL_FMAC_WATERMARK_THRESHOLD_2 –
-
HAL_FMAC_WATERMARK_THRESHOLD_4 –
-
HAL_FMAC_WATERMARK_THRESHOLD_8 –
-
-
hal_status_t
HAL_FMAC_SetYEmptyWatermark
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_watermark_threshold_t
threshold
)
¶
-
Configure the FMAC Y empty watermark threshold. Setting a threshold greater than 1 allows several data to be transferred under one interrupt. In case of DMA, it must be kept to the default value of HAL_FMAC_WATERMARK_THRESHOLD_1 . In case of Polling, a threshold value of HAL_FMAC_WATERMARK_THRESHOLD_2 avoids waiting for a delay of 3 clock cycles before the YEMPTY flag goes high.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
threshold – Threshold value
-
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_fmac_watermark_threshold_t
HAL_FMAC_GetYEmptyWatermark
(
const
hal_fmac_handle_t
*
hfmac
)
¶
-
Get the FMAC Y empty watermark threshold.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_FMAC_WATERMARK_THRESHOLD_1 –
-
HAL_FMAC_WATERMARK_THRESHOLD_2 –
-
HAL_FMAC_WATERMARK_THRESHOLD_4 –
-
HAL_FMAC_WATERMARK_THRESHOLD_8 –
-
-
hal_status_t
HAL_FMAC_SetX2BaseAddress
(
hal_fmac_handle_t
*
hfmac
,
uint32_t
base_half_word
)
¶
-
Configure the FMAC X2 base address. It can be modified while START=1 for example to change coefficient values.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
base_half_word – Base address within the 16-bits internal memory (0x00 to 0xFF)
-
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_status_t
HAL_FMAC_EnableClip
(
hal_fmac_handle_t
*
hfmac
)
¶
-
Enable Clip. If clipping is enabled, then any value which exceeds the numeric range of the q1.15 output, is set to 1 - 2^-15 or -1, according to the sign.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_status_t
HAL_FMAC_DisableClip
(
hal_fmac_handle_t
*
hfmac
)
¶
-
Disable clip. If clipping is not enabled, the unused accumulator bits after applying the gain is simply truncated.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_fmac_clip_status_t
HAL_FMAC_IsEnabledClip
(
const
hal_fmac_handle_t
*
hfmac
)
¶
-
Check the FMAC clip status.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_FMAC_CLIP_ENABLED – Clip is enabled
-
HAL_FMAC_CLIP_DISABLED – Clip is disabled
-
-
volatile
uint32_t
*
HAL_FMAC_GetX1Address
(
const
hal_fmac_handle_t
*
hfmac
)
¶
-
Get the FMAC X1 write register address. Write data to X1 can be directly driven by a timer or other peripheral such as an ADC.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
FMAC – X1 write register address
-
volatile
uint32_t
*
HAL_FMAC_GetYAddress
(
const
hal_fmac_handle_t
*
hfmac
)
¶
-
Get the FMAC Y read register address. Read data from Y can be directly driven by a timer or other peripheral such as an DAC.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
FMAC – Y read register address
-
hal_status_t
HAL_FMAC_SetWriteX1DMA
(
hal_fmac_handle_t
*
hfmac
,
hal_dma_handle_t
*
hdma
)
¶
-
Link the Write X1 DMA handle to the FMAC handle.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
hdma – Pointer to a hal_dma_handle_t structure
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_SetReadYDMA
(
hal_fmac_handle_t
*
hfmac
,
hal_dma_handle_t
*
hdma
)
¶
-
Link the Read Y DMA handle to the FMAC handle.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
hdma – Pointer to a hal_dma_handle_t structure
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
- group FMAC_Exported_Functions_Group2
-
This section provides a set of functions allowing to:
-
Configure the FMAC memory area in the internal 16-bit memory by calling HAL_FMAC_SetConfig() .
-
Get the FMAC memory area in the internal 16-bit memory configuration by calling HAL_FMAC_GetConfig() .
-
Set the FMAC watermark threshold for X1 by calling HAL_FMAC_SetX1FullWatermark() . Valuable in case of process managed by interrupt.
-
Get the FMAC watermark threshold for X1 by calling HAL_FMAC_GetX1FullWatermark() .
-
Set the FMAC watermark threshold for Y by calling HAL_FMAC_SetYEmptyWatermark() . Valuable in case of process managed by interrupt.
-
Get the FMAC watermark threshold for Y by calling HAL_FMAC_SetYEmptyWatermark()
-
Set the X2 base address by calling HAL_FMAC_SetX2BaseAddress() .
-
Enable the clip mode by calling HAL_FMAC_EnableClip() .
-
Disable the clip mode by calling HAL_FMAC_DisableClip() .
-
Get X1 write register address by calling HAL_FMAC_GetX1Address() . Valuable in case of process managed by another peripheral.
-
Get Y write register address by calling HAL_FMAC_GetYAddress() . Valuable in case of process managed by another peripheral.
Functions
-
hal_status_t
HAL_FMAC_SetConfig
(
hal_fmac_handle_t
*
hfmac
,
const
hal_fmac_config_t
*
p_config
)
-
Allocate memory area for X1, X2 and Y in the FMAC internal 16-bit memory. All thresholds are reset.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_config – Pointer to the configuration
-
- Return values :
-
-
HAL_INVALID_PARAM – p_config is NULL
-
HAL_OK – Operation completed successfully
-
-
void
HAL_FMAC_GetConfig
(
const
hal_fmac_handle_t
*
hfmac
,
hal_fmac_config_t
*
p_config
)
-
Retrieve the FMAC configuration.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_config – Pointer to the configuration
-
-
hal_status_t
HAL_FMAC_SetX1FullWatermark
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_watermark_threshold_t
threshold
)
-
Configure the FMAC X1 full watermark threshold. Setting a threshold greater than 1 allows several data to be transferred under one interrupt. In case of DMA, it must be kept to the default value of HAL_FMAC_WATERMARK_THRESHOLD_1 . In case of Polling, a threshold value of HAL_FMAC_WATERMARK_THRESHOLD_2 avoids waiting for a delay of 3 clock cycles before the X1FULL flag goes high.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
threshold – Threshold value.
-
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_fmac_watermark_threshold_t
HAL_FMAC_GetX1FullWatermark
(
const
hal_fmac_handle_t
*
hfmac
)
-
Get the FMAC X1 full watermark threshold.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_FMAC_WATERMARK_THRESHOLD_1 –
-
HAL_FMAC_WATERMARK_THRESHOLD_2 –
-
HAL_FMAC_WATERMARK_THRESHOLD_4 –
-
HAL_FMAC_WATERMARK_THRESHOLD_8 –
-
-
hal_status_t
HAL_FMAC_SetYEmptyWatermark
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_watermark_threshold_t
threshold
)
-
Configure the FMAC Y empty watermark threshold. Setting a threshold greater than 1 allows several data to be transferred under one interrupt. In case of DMA, it must be kept to the default value of HAL_FMAC_WATERMARK_THRESHOLD_1 . In case of Polling, a threshold value of HAL_FMAC_WATERMARK_THRESHOLD_2 avoids waiting for a delay of 3 clock cycles before the YEMPTY flag goes high.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
threshold – Threshold value
-
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_fmac_watermark_threshold_t
HAL_FMAC_GetYEmptyWatermark
(
const
hal_fmac_handle_t
*
hfmac
)
-
Get the FMAC Y empty watermark threshold.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_FMAC_WATERMARK_THRESHOLD_1 –
-
HAL_FMAC_WATERMARK_THRESHOLD_2 –
-
HAL_FMAC_WATERMARK_THRESHOLD_4 –
-
HAL_FMAC_WATERMARK_THRESHOLD_8 –
-
-
hal_status_t
HAL_FMAC_SetX2BaseAddress
(
hal_fmac_handle_t
*
hfmac
,
uint32_t
base_half_word
)
-
Configure the FMAC X2 base address. It can be modified while START=1 for example to change coefficient values.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
base_half_word – Base address within the 16-bits internal memory (0x00 to 0xFF)
-
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_status_t
HAL_FMAC_EnableClip
(
hal_fmac_handle_t
*
hfmac
)
-
Enable Clip. If clipping is enabled, then any value which exceeds the numeric range of the q1.15 output, is set to 1 - 2^-15 or -1, according to the sign.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_status_t
HAL_FMAC_DisableClip
(
hal_fmac_handle_t
*
hfmac
)
-
Disable clip. If clipping is not enabled, the unused accumulator bits after applying the gain is simply truncated.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_fmac_clip_status_t
HAL_FMAC_IsEnabledClip
(
const
hal_fmac_handle_t
*
hfmac
)
-
Check the FMAC clip status.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_FMAC_CLIP_ENABLED – Clip is enabled
-
HAL_FMAC_CLIP_DISABLED – Clip is disabled
-
-
volatile
uint32_t
*
HAL_FMAC_GetX1Address
(
const
hal_fmac_handle_t
*
hfmac
)
-
Get the FMAC X1 write register address. Write data to X1 can be directly driven by a timer or other peripheral such as an ADC.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
FMAC – X1 write register address
-
volatile
uint32_t
*
HAL_FMAC_GetYAddress
(
const
hal_fmac_handle_t
*
hfmac
)
-
Get the FMAC Y read register address. Read data from Y can be directly driven by a timer or other peripheral such as an DAC.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
FMAC – Y read register address
-
hal_status_t
HAL_FMAC_SetWriteX1DMA
(
hal_fmac_handle_t
*
hfmac
,
hal_dma_handle_t
*
hdma
)
-
Link the Write X1 DMA handle to the FMAC handle.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
hdma – Pointer to a hal_dma_handle_t structure
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_SetReadYDMA
(
hal_fmac_handle_t
*
hfmac
,
hal_dma_handle_t
*
hdma
)
-
Link the Read Y DMA handle to the FMAC handle.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
hdma – Pointer to a hal_dma_handle_t structure
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
- group FMAC_Exported_Functions_Group2
-
This section provides a set of functions allowing to:
-
Configure the FMAC memory area in the internal 16-bit memory by calling HAL_FMAC_SetConfig() .
-
Get the FMAC memory area in the internal 16-bit memory configuration by calling HAL_FMAC_GetConfig() .
-
Set the FMAC watermark threshold for X1 by calling HAL_FMAC_SetX1FullWatermark() . Valuable in case of process managed by interrupt.
-
Get the FMAC watermark threshold for X1 by calling HAL_FMAC_GetX1FullWatermark() .
-
Set the FMAC watermark threshold for Y by calling HAL_FMAC_SetYEmptyWatermark() . Valuable in case of process managed by interrupt.
-
Get the FMAC watermark threshold for Y by calling HAL_FMAC_SetYEmptyWatermark()
-
Set the X2 base address by calling HAL_FMAC_SetX2BaseAddress() .
-
Enable the clip mode by calling HAL_FMAC_EnableClip() .
-
Disable the clip mode by calling HAL_FMAC_DisableClip() .
-
Get X1 write register address by calling HAL_FMAC_GetX1Address() . Valuable in case of process managed by another peripheral.
-
Get Y write register address by calling HAL_FMAC_GetYAddress() . Valuable in case of process managed by another peripheral.
Functions
-
hal_status_t
HAL_FMAC_SetConfig
(
hal_fmac_handle_t
*
hfmac
,
const
hal_fmac_config_t
*
p_config
)
-
Allocate memory area for X1, X2 and Y in the FMAC internal 16-bit memory. All thresholds are reset.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_config – Pointer to the configuration
-
- Return values :
-
-
HAL_INVALID_PARAM – p_config is NULL
-
HAL_OK – Operation completed successfully
-
-
void
HAL_FMAC_GetConfig
(
const
hal_fmac_handle_t
*
hfmac
,
hal_fmac_config_t
*
p_config
)
-
Retrieve the FMAC configuration.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_config – Pointer to the configuration
-
-
hal_status_t
HAL_FMAC_SetX1FullWatermark
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_watermark_threshold_t
threshold
)
-
Configure the FMAC X1 full watermark threshold. Setting a threshold greater than 1 allows several data to be transferred under one interrupt. In case of DMA, it must be kept to the default value of HAL_FMAC_WATERMARK_THRESHOLD_1 . In case of Polling, a threshold value of HAL_FMAC_WATERMARK_THRESHOLD_2 avoids waiting for a delay of 3 clock cycles before the X1FULL flag goes high.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
threshold – Threshold value.
-
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_fmac_watermark_threshold_t
HAL_FMAC_GetX1FullWatermark
(
const
hal_fmac_handle_t
*
hfmac
)
-
Get the FMAC X1 full watermark threshold.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_FMAC_WATERMARK_THRESHOLD_1 –
-
HAL_FMAC_WATERMARK_THRESHOLD_2 –
-
HAL_FMAC_WATERMARK_THRESHOLD_4 –
-
HAL_FMAC_WATERMARK_THRESHOLD_8 –
-
-
hal_status_t
HAL_FMAC_SetYEmptyWatermark
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_watermark_threshold_t
threshold
)
-
Configure the FMAC Y empty watermark threshold. Setting a threshold greater than 1 allows several data to be transferred under one interrupt. In case of DMA, it must be kept to the default value of HAL_FMAC_WATERMARK_THRESHOLD_1 . In case of Polling, a threshold value of HAL_FMAC_WATERMARK_THRESHOLD_2 avoids waiting for a delay of 3 clock cycles before the YEMPTY flag goes high.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
threshold – Threshold value
-
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_fmac_watermark_threshold_t
HAL_FMAC_GetYEmptyWatermark
(
const
hal_fmac_handle_t
*
hfmac
)
-
Get the FMAC Y empty watermark threshold.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_FMAC_WATERMARK_THRESHOLD_1 –
-
HAL_FMAC_WATERMARK_THRESHOLD_2 –
-
HAL_FMAC_WATERMARK_THRESHOLD_4 –
-
HAL_FMAC_WATERMARK_THRESHOLD_8 –
-
-
hal_status_t
HAL_FMAC_SetX2BaseAddress
(
hal_fmac_handle_t
*
hfmac
,
uint32_t
base_half_word
)
-
Configure the FMAC X2 base address. It can be modified while START=1 for example to change coefficient values.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
base_half_word – Base address within the 16-bits internal memory (0x00 to 0xFF)
-
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_status_t
HAL_FMAC_EnableClip
(
hal_fmac_handle_t
*
hfmac
)
-
Enable Clip. If clipping is enabled, then any value which exceeds the numeric range of the q1.15 output, is set to 1 - 2^-15 or -1, according to the sign.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_status_t
HAL_FMAC_DisableClip
(
hal_fmac_handle_t
*
hfmac
)
-
Disable clip. If clipping is not enabled, the unused accumulator bits after applying the gain is simply truncated.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_fmac_clip_status_t
HAL_FMAC_IsEnabledClip
(
const
hal_fmac_handle_t
*
hfmac
)
-
Check the FMAC clip status.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_FMAC_CLIP_ENABLED – Clip is enabled
-
HAL_FMAC_CLIP_DISABLED – Clip is disabled
-
-
volatile
uint32_t
*
HAL_FMAC_GetX1Address
(
const
hal_fmac_handle_t
*
hfmac
)
-
Get the FMAC X1 write register address. Write data to X1 can be directly driven by a timer or other peripheral such as an ADC.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
FMAC – X1 write register address
-
volatile
uint32_t
*
HAL_FMAC_GetYAddress
(
const
hal_fmac_handle_t
*
hfmac
)
-
Get the FMAC Y read register address. Read data from Y can be directly driven by a timer or other peripheral such as an DAC.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
FMAC – Y read register address
-
hal_status_t
HAL_FMAC_SetWriteX1DMA
(
hal_fmac_handle_t
*
hfmac
,
hal_dma_handle_t
*
hdma
)
-
Link the Write X1 DMA handle to the FMAC handle.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
hdma – Pointer to a hal_dma_handle_t structure
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_SetReadYDMA
(
hal_fmac_handle_t
*
hfmac
,
hal_dma_handle_t
*
hdma
)
-
Link the Read Y DMA handle to the FMAC handle.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
hdma – Pointer to a hal_dma_handle_t structure
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
Preload functions ¶
- group FMAC_Exported_Functions_Group3
-
This section provides a set of functions allowing to :
-
Preload X1 with sample by calling HAL_FMAC_PreloadX1() .
-
Preload Y in case of IIR by calling HAL_FMAC_PreloadY() .
-
Preload X2 with coefficients by calling HAL_FMAC_PreloadX2() .
-
Preload X1 with sample by calling HAL_FMAC_PreloadX1_DMA() .
-
Preload Y in case of IIR by calling HAL_FMAC_PreloadY_DMA() .
Functions
-
hal_status_t
HAL_FMAC_PreloadX1
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
¶
-
Preload X1 buffer.
Note
This function can be called several times, each call filling partly the buffers. In case of overflow (too much data provided through all these calls), an error is returned.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to data to preload to X1
-
size_half_word – Size in half word, it cannot be bigger than the X1 size in half word
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_PreloadY
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
¶
-
Preload Y buffer.
Note
This function can be called several times, each call filling partly the buffers. In case of overflow (too much data provided through all these calls), an error is returned.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to data to preload to Y
-
size_half_word – Size in half word, it cannot be bigger than the Y size in half word
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_PreloadX2
(
hal_fmac_handle_t
*
hfmac
,
const
hal_fmac_preload_x2_t
*
p_data
)
¶
-
Preload X2 buffer with Coeff A and/or B. If no Coeff A, hal_fmac_preload_x2_t::coeff_a_size_half_word must be set to 0. If no Coeff B, hal_fmac_preload_x2_t::coeff_b_size_half_word must be set to 0.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to data to preload
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_PreloadX1_DMA
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
¶
-
Preload X1 buffer with DMA.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to data to preload to X1
-
size_half_word – Size in half word, it cannot be bigger than the X1 size in half word
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_PreloadY_DMA
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
¶
-
Preload Y buffer with DMA.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to data to preload to Y
-
size_half_word – Size in half word, it cannot be bigger than the Y size in half word
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
- group FMAC_Exported_Functions_Group3
-
This section provides a set of functions allowing to :
-
Preload X1 with sample by calling HAL_FMAC_PreloadX1() .
-
Preload Y in case of IIR by calling HAL_FMAC_PreloadY() .
-
Preload X2 with coefficients by calling HAL_FMAC_PreloadX2() .
-
Preload X1 with sample by calling HAL_FMAC_PreloadX1_DMA() .
-
Preload Y in case of IIR by calling HAL_FMAC_PreloadY_DMA() .
Functions
-
hal_status_t
HAL_FMAC_PreloadX1
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
-
Preload X1 buffer.
Note
This function can be called several times, each call filling partly the buffers. In case of overflow (too much data provided through all these calls), an error is returned.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to data to preload to X1
-
size_half_word – Size in half word, it cannot be bigger than the X1 size in half word
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_PreloadY
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
-
Preload Y buffer.
Note
This function can be called several times, each call filling partly the buffers. In case of overflow (too much data provided through all these calls), an error is returned.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to data to preload to Y
-
size_half_word – Size in half word, it cannot be bigger than the Y size in half word
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_PreloadX2
(
hal_fmac_handle_t
*
hfmac
,
const
hal_fmac_preload_x2_t
*
p_data
)
-
Preload X2 buffer with Coeff A and/or B. If no Coeff A, hal_fmac_preload_x2_t::coeff_a_size_half_word must be set to 0. If no Coeff B, hal_fmac_preload_x2_t::coeff_b_size_half_word must be set to 0.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to data to preload
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_PreloadX1_DMA
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
-
Preload X1 buffer with DMA.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to data to preload to X1
-
size_half_word – Size in half word, it cannot be bigger than the X1 size in half word
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_PreloadY_DMA
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
-
Preload Y buffer with DMA.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to data to preload to Y
-
size_half_word – Size in half word, it cannot be bigger than the Y size in half word
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
- group FMAC_Exported_Functions_Group3
-
This section provides a set of functions allowing to :
-
Preload X1 with sample by calling HAL_FMAC_PreloadX1() .
-
Preload Y in case of IIR by calling HAL_FMAC_PreloadY() .
-
Preload X2 with coefficients by calling HAL_FMAC_PreloadX2() .
-
Preload X1 with sample by calling HAL_FMAC_PreloadX1_DMA() .
-
Preload Y in case of IIR by calling HAL_FMAC_PreloadY_DMA() .
Functions
-
hal_status_t
HAL_FMAC_PreloadX1
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
-
Preload X1 buffer.
Note
This function can be called several times, each call filling partly the buffers. In case of overflow (too much data provided through all these calls), an error is returned.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to data to preload to X1
-
size_half_word – Size in half word, it cannot be bigger than the X1 size in half word
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_PreloadY
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
-
Preload Y buffer.
Note
This function can be called several times, each call filling partly the buffers. In case of overflow (too much data provided through all these calls), an error is returned.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to data to preload to Y
-
size_half_word – Size in half word, it cannot be bigger than the Y size in half word
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_PreloadX2
(
hal_fmac_handle_t
*
hfmac
,
const
hal_fmac_preload_x2_t
*
p_data
)
-
Preload X2 buffer with Coeff A and/or B. If no Coeff A, hal_fmac_preload_x2_t::coeff_a_size_half_word must be set to 0. If no Coeff B, hal_fmac_preload_x2_t::coeff_b_size_half_word must be set to 0.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to data to preload
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_PreloadX1_DMA
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
-
Preload X1 buffer with DMA.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to data to preload to X1
-
size_half_word – Size in half word, it cannot be bigger than the X1 size in half word
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_PreloadY_DMA
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
-
Preload Y buffer with DMA.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to data to preload to Y
-
size_half_word – Size in half word, it cannot be bigger than the Y size in half word
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
Filter functions ¶
- group FMAC_Exported_Functions_Group4
-
This section provides a set of functions allowing to :
-
Start a FIR filter process by calling HAL_FMAC_StartFilterFIR() .
-
Start a IIR filter process by calling HAL_FMAC_StartFilterIIR() .
-
Stop the filter process, the X1 process and the Y process by calling HAL_FMAC_StopFilter() .
Functions
-
hal_status_t
HAL_FMAC_StartFilterFIR
(
hal_fmac_handle_t
*
hfmac
,
uint32_t
coeff_nb
,
uint32_t
gain
,
uint32_t
opt_it
)
¶
-
Start the FIR filtering.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
coeff_nb – Number of coefficients (N). (P in param register)
-
gain – Gain. (R in param register)
-
opt_it – Optional interruption can be one of HAL_FMAC_OPT_IT_FILTER_NONE HAL_FMAC_OPT_IT_FILTER_SATURATION_ERROR
-
- Return values :
-
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_OK – Filter started.
-
-
hal_status_t
HAL_FMAC_StartFilterIIR
(
hal_fmac_handle_t
*
hfmac
,
uint32_t
ff_coeff_nb
,
uint32_t
fb_coeff_nb
,
uint32_t
gain
,
uint32_t
opt_it
)
¶
-
Start the IIR filtering.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
ff_coeff_nb – Number of feed-forward coefficients (N). (P in param register)
-
fb_coeff_nb – Number of feed-back coefficients (M). (Q in param register)
-
gain – Gain. (R in param register)
-
opt_it – Optional interruption can be one of HAL_FMAC_OPT_IT_FILTER_NONE HAL_FMAC_OPT_IT_FILTER_SATURATION_ERROR
-
- Return values :
-
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_OK – Filter started.
-
-
hal_status_t
HAL_FMAC_StopFilter
(
hal_fmac_handle_t
*
hfmac
)
¶
-
Stop the active filter, the X1 process and the Y process. Reset the write and read pointers, the internal control logic, the FMAC_SR register and the FMAC_PARAM register, including the START bit if active. All interruts are disable. X1, Y and Filter are in IDLE state. After the stop, user must preload X1 and Y if needed, start a writeX1 process, start a readY process and start filter.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_OK – Operation completed successfully
-
-
- group FMAC_Exported_Functions_Group4
-
This section provides a set of functions allowing to :
-
Start a FIR filter process by calling HAL_FMAC_StartFilterFIR() .
-
Start a IIR filter process by calling HAL_FMAC_StartFilterIIR() .
-
Stop the filter process, the X1 process and the Y process by calling HAL_FMAC_StopFilter() .
Functions
-
hal_status_t
HAL_FMAC_StartFilterFIR
(
hal_fmac_handle_t
*
hfmac
,
uint32_t
coeff_nb
,
uint32_t
gain
,
uint32_t
opt_it
)
-
Start the FIR filtering.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
coeff_nb – Number of coefficients (N). (P in param register)
-
gain – Gain. (R in param register)
-
opt_it – Optional interruption can be one of HAL_FMAC_OPT_IT_FILTER_NONE HAL_FMAC_OPT_IT_FILTER_SATURATION_ERROR
-
- Return values :
-
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_OK – Filter started.
-
-
hal_status_t
HAL_FMAC_StartFilterIIR
(
hal_fmac_handle_t
*
hfmac
,
uint32_t
ff_coeff_nb
,
uint32_t
fb_coeff_nb
,
uint32_t
gain
,
uint32_t
opt_it
)
-
Start the IIR filtering.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
ff_coeff_nb – Number of feed-forward coefficients (N). (P in param register)
-
fb_coeff_nb – Number of feed-back coefficients (M). (Q in param register)
-
gain – Gain. (R in param register)
-
opt_it – Optional interruption can be one of HAL_FMAC_OPT_IT_FILTER_NONE HAL_FMAC_OPT_IT_FILTER_SATURATION_ERROR
-
- Return values :
-
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_OK – Filter started.
-
-
hal_status_t
HAL_FMAC_StopFilter
(
hal_fmac_handle_t
*
hfmac
)
-
Stop the active filter, the X1 process and the Y process. Reset the write and read pointers, the internal control logic, the FMAC_SR register and the FMAC_PARAM register, including the START bit if active. All interruts are disable. X1, Y and Filter are in IDLE state. After the stop, user must preload X1 and Y if needed, start a writeX1 process, start a readY process and start filter.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_OK – Operation completed successfully
-
-
- group FMAC_Exported_Functions_Group4
-
This section provides a set of functions allowing to :
-
Start a FIR filter process by calling HAL_FMAC_StartFilterFIR() .
-
Start a IIR filter process by calling HAL_FMAC_StartFilterIIR() .
-
Stop the filter process, the X1 process and the Y process by calling HAL_FMAC_StopFilter() .
Functions
-
hal_status_t
HAL_FMAC_StartFilterFIR
(
hal_fmac_handle_t
*
hfmac
,
uint32_t
coeff_nb
,
uint32_t
gain
,
uint32_t
opt_it
)
-
Start the FIR filtering.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
coeff_nb – Number of coefficients (N). (P in param register)
-
gain – Gain. (R in param register)
-
opt_it – Optional interruption can be one of HAL_FMAC_OPT_IT_FILTER_NONE HAL_FMAC_OPT_IT_FILTER_SATURATION_ERROR
-
- Return values :
-
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_OK – Filter started.
-
-
hal_status_t
HAL_FMAC_StartFilterIIR
(
hal_fmac_handle_t
*
hfmac
,
uint32_t
ff_coeff_nb
,
uint32_t
fb_coeff_nb
,
uint32_t
gain
,
uint32_t
opt_it
)
-
Start the IIR filtering.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
ff_coeff_nb – Number of feed-forward coefficients (N). (P in param register)
-
fb_coeff_nb – Number of feed-back coefficients (M). (Q in param register)
-
gain – Gain. (R in param register)
-
opt_it – Optional interruption can be one of HAL_FMAC_OPT_IT_FILTER_NONE HAL_FMAC_OPT_IT_FILTER_SATURATION_ERROR
-
- Return values :
-
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_OK – Filter started.
-
-
hal_status_t
HAL_FMAC_StopFilter
(
hal_fmac_handle_t
*
hfmac
)
-
Stop the active filter, the X1 process and the Y process. Reset the write and read pointers, the internal control logic, the FMAC_SR register and the FMAC_PARAM register, including the START bit if active. All interruts are disable. X1, Y and Filter are in IDLE state. After the stop, user must preload X1 and Y if needed, start a writeX1 process, start a readY process and start filter.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_OK – Operation completed successfully
-
-
Y buffer read functions and X1 buffer write functions ¶
- group FMAC_Exported_Functions_Group5
-
This section provides a set of functions allowing to :
-
Write data to X1 in polling mode by calling HAL_FMAC_WriteX1() .
-
Write data to X1 in interrupt mode by calling HAL_FMAC_WriteX1_IT() .
-
Write data to X1 in DMA mode by calling HAL_FMAC_WriteX1_DMA() .
-
Write data to X1 in DMA mode and optional interrupt by calling HAL_FMAC_WriteX1_DMA_Opt() .
-
Start Write data to X1 in peripheral mode by calling HAL_FMAC_LockX1WriteAccessForExternPeriph() .
-
Stop Write data to X1 in peripheral mode by calling HAL_FMAC_UnlockX1WriteAccessForExternPeriph() .
-
Read data from Y in polling mode by calling HAL_FMAC_ReadY() .
-
Read data from Y in interrupt mode by calling HAL_FMAC_ReadY_IT() .
-
Read data from Y in DMA mode by calling HAL_FMAC_ReadY_DMA() .
-
Read data from Y in DMA mode and optional interrupt by calling HAL_FMAC_ReadY_DMA_Opt() .
-
Start Read data from Y in peripheral mode by calling HAL_FMAC_LockYReadAccessForExternPeriph() .
-
Stop Read data from Y in peripheral mode by calling HAL_FMAC_UnlockYReadAccessForExternPeriph() .
Functions
-
hal_status_t
HAL_FMAC_WriteX1
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
,
uint32_t
timeout_ms
)
¶
-
Write data to X1 in polling mode.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to input data
-
size_half_word – Size of the input data
-
timeout_ms – Timeout duration in millisecond
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_TIMEOUT – Operation exceeds user timeout
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_ReadY
(
hal_fmac_handle_t
*
hfmac
,
int16_t
*
p_data
,
uint32_t
size_half_word
,
uint32_t
timeout_ms
)
¶
-
Read data from Y in polling mode.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to output data
-
size_half_word – Size of the output data
-
timeout_ms – Timeout duration in millisecond
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_TIMEOUT – Operation exceeds user timeout
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_WriteX1_IT
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
¶
-
Write data to X1 in interrupt mode.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to input data
-
size_half_word – Size of the input data
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_ReadY_IT
(
hal_fmac_handle_t
*
hfmac
,
int16_t
*
p_data
,
uint32_t
size_half_word
)
¶
-
Read data from Y in interrupt mode.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to output data
-
size_half_word – Size of the output data.
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_WriteX1_DMA
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
¶
-
Write data to X1 in DMA mode. Global state must be IDLE (START = 0).
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to input data
-
size_half_word – Size of the input data
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_WriteX1_DMA_Opt
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
,
uint32_t
opt_it
)
¶
-
Write data to X1 in DMA mode. Global state must be IDLE (START = 0).
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to input data
-
size_half_word – Size of the input data
-
opt_it – Optional interruption can be a combination of HAL_FMAC_OPT_DMA_X1_IT_NONE HAL_FMAC_OPT_DMA_X1_IT_HT
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_ReadY_DMA
(
hal_fmac_handle_t
*
hfmac
,
int16_t
*
p_data
,
uint32_t
size_half_word
)
¶
-
Read data from Y in DMA mode. Global state must be IDLE (START = 0).
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to output data
-
size_half_word – Size of the output data.
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_ReadY_DMA_Opt
(
hal_fmac_handle_t
*
hfmac
,
int16_t
*
p_data
,
uint32_t
size_half_word
,
uint32_t
opt_it
)
¶
-
Read data from Y in DMA mode. Global state must be IDLE (START = 0).
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to output data
-
size_half_word – Size of the output data.
-
opt_it – Optional interruption can be a combination of HAL_FMAC_OPT_DMA_Y_IT_NONE HAL_FMAC_OPT_DMA_Y_IT_HT
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_LockX1WriteAccessForExternPeriph
(
hal_fmac_handle_t
*
hfmac
)
¶
-
Start write data to X1 is directly driven by a timer or other peripheral such as an ADC. Overflow error interruption is activated.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_UnlockX1WriteAccessForExternPeriph
(
hal_fmac_handle_t
*
hfmac
)
¶
-
Stop write data to X1 directly driven by a timer or other peripheral such as an ADC.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_status_t
HAL_FMAC_LockYReadAccessForExternPeriph
(
hal_fmac_handle_t
*
hfmac
)
¶
-
Start read data from Y driven by a timer or other peripheral such as an DAC. Underflow error interruption is activated.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_UnlockYReadAccessForExternPeriph
(
hal_fmac_handle_t
*
hfmac
)
¶
-
Stop read data from Y driven by a timer or other peripheral such as an DAC.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
HAL_OK – Operation completed successfully
-
- group FMAC_Exported_Functions_Group5
-
This section provides a set of functions allowing to :
-
Write data to X1 in polling mode by calling HAL_FMAC_WriteX1() .
-
Write data to X1 in interrupt mode by calling HAL_FMAC_WriteX1_IT() .
-
Write data to X1 in DMA mode by calling HAL_FMAC_WriteX1_DMA() .
-
Write data to X1 in DMA mode and optional interrupt by calling HAL_FMAC_WriteX1_DMA_Opt() .
-
Start Write data to X1 in peripheral mode by calling HAL_FMAC_LockX1WriteAccessForExternPeriph() .
-
Stop Write data to X1 in peripheral mode by calling HAL_FMAC_UnlockX1WriteAccessForExternPeriph() .
-
Read data from Y in polling mode by calling HAL_FMAC_ReadY() .
-
Read data from Y in interrupt mode by calling HAL_FMAC_ReadY_IT() .
-
Read data from Y in DMA mode by calling HAL_FMAC_ReadY_DMA() .
-
Read data from Y in DMA mode and optional interrupt by calling HAL_FMAC_ReadY_DMA_Opt() .
-
Start Read data from Y in peripheral mode by calling HAL_FMAC_LockYReadAccessForExternPeriph() .
-
Stop Read data from Y in peripheral mode by calling HAL_FMAC_UnlockYReadAccessForExternPeriph() .
Functions
-
hal_status_t
HAL_FMAC_WriteX1
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
,
uint32_t
timeout_ms
)
-
Write data to X1 in polling mode.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to input data
-
size_half_word – Size of the input data
-
timeout_ms – Timeout duration in millisecond
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_TIMEOUT – Operation exceeds user timeout
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_ReadY
(
hal_fmac_handle_t
*
hfmac
,
int16_t
*
p_data
,
uint32_t
size_half_word
,
uint32_t
timeout_ms
)
-
Read data from Y in polling mode.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to output data
-
size_half_word – Size of the output data
-
timeout_ms – Timeout duration in millisecond
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_TIMEOUT – Operation exceeds user timeout
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_WriteX1_IT
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
-
Write data to X1 in interrupt mode.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to input data
-
size_half_word – Size of the input data
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_ReadY_IT
(
hal_fmac_handle_t
*
hfmac
,
int16_t
*
p_data
,
uint32_t
size_half_word
)
-
Read data from Y in interrupt mode.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to output data
-
size_half_word – Size of the output data.
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_WriteX1_DMA
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
-
Write data to X1 in DMA mode. Global state must be IDLE (START = 0).
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to input data
-
size_half_word – Size of the input data
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_WriteX1_DMA_Opt
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
,
uint32_t
opt_it
)
-
Write data to X1 in DMA mode. Global state must be IDLE (START = 0).
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to input data
-
size_half_word – Size of the input data
-
opt_it – Optional interruption can be a combination of HAL_FMAC_OPT_DMA_X1_IT_NONE HAL_FMAC_OPT_DMA_X1_IT_HT
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_ReadY_DMA
(
hal_fmac_handle_t
*
hfmac
,
int16_t
*
p_data
,
uint32_t
size_half_word
)
-
Read data from Y in DMA mode. Global state must be IDLE (START = 0).
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to output data
-
size_half_word – Size of the output data.
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_ReadY_DMA_Opt
(
hal_fmac_handle_t
*
hfmac
,
int16_t
*
p_data
,
uint32_t
size_half_word
,
uint32_t
opt_it
)
-
Read data from Y in DMA mode. Global state must be IDLE (START = 0).
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to output data
-
size_half_word – Size of the output data.
-
opt_it – Optional interruption can be a combination of HAL_FMAC_OPT_DMA_Y_IT_NONE HAL_FMAC_OPT_DMA_Y_IT_HT
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_LockX1WriteAccessForExternPeriph
(
hal_fmac_handle_t
*
hfmac
)
-
Start write data to X1 is directly driven by a timer or other peripheral such as an ADC. Overflow error interruption is activated.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_UnlockX1WriteAccessForExternPeriph
(
hal_fmac_handle_t
*
hfmac
)
-
Stop write data to X1 directly driven by a timer or other peripheral such as an ADC.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_status_t
HAL_FMAC_LockYReadAccessForExternPeriph
(
hal_fmac_handle_t
*
hfmac
)
-
Start read data from Y driven by a timer or other peripheral such as an DAC. Underflow error interruption is activated.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_UnlockYReadAccessForExternPeriph
(
hal_fmac_handle_t
*
hfmac
)
-
Stop read data from Y driven by a timer or other peripheral such as an DAC.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
HAL_OK – Operation completed successfully
-
- group FMAC_Exported_Functions_Group5
-
This section provides a set of functions allowing to :
-
Write data to X1 in polling mode by calling HAL_FMAC_WriteX1() .
-
Write data to X1 in interrupt mode by calling HAL_FMAC_WriteX1_IT() .
-
Write data to X1 in DMA mode by calling HAL_FMAC_WriteX1_DMA() .
-
Write data to X1 in DMA mode and optional interrupt by calling HAL_FMAC_WriteX1_DMA_Opt() .
-
Start Write data to X1 in peripheral mode by calling HAL_FMAC_LockX1WriteAccessForExternPeriph() .
-
Stop Write data to X1 in peripheral mode by calling HAL_FMAC_UnlockX1WriteAccessForExternPeriph() .
-
Read data from Y in polling mode by calling HAL_FMAC_ReadY() .
-
Read data from Y in interrupt mode by calling HAL_FMAC_ReadY_IT() .
-
Read data from Y in DMA mode by calling HAL_FMAC_ReadY_DMA() .
-
Read data from Y in DMA mode and optional interrupt by calling HAL_FMAC_ReadY_DMA_Opt() .
-
Start Read data from Y in peripheral mode by calling HAL_FMAC_LockYReadAccessForExternPeriph() .
-
Stop Read data from Y in peripheral mode by calling HAL_FMAC_UnlockYReadAccessForExternPeriph() .
Functions
-
hal_status_t
HAL_FMAC_WriteX1
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
,
uint32_t
timeout_ms
)
-
Write data to X1 in polling mode.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to input data
-
size_half_word – Size of the input data
-
timeout_ms – Timeout duration in millisecond
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_TIMEOUT – Operation exceeds user timeout
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_ReadY
(
hal_fmac_handle_t
*
hfmac
,
int16_t
*
p_data
,
uint32_t
size_half_word
,
uint32_t
timeout_ms
)
-
Read data from Y in polling mode.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to output data
-
size_half_word – Size of the output data
-
timeout_ms – Timeout duration in millisecond
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_TIMEOUT – Operation exceeds user timeout
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_WriteX1_IT
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
-
Write data to X1 in interrupt mode.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to input data
-
size_half_word – Size of the input data
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_ReadY_IT
(
hal_fmac_handle_t
*
hfmac
,
int16_t
*
p_data
,
uint32_t
size_half_word
)
-
Read data from Y in interrupt mode.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to output data
-
size_half_word – Size of the output data.
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_WriteX1_DMA
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
)
-
Write data to X1 in DMA mode. Global state must be IDLE (START = 0).
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to input data
-
size_half_word – Size of the input data
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_WriteX1_DMA_Opt
(
hal_fmac_handle_t
*
hfmac
,
const
int16_t
*
p_data
,
uint32_t
size_half_word
,
uint32_t
opt_it
)
-
Write data to X1 in DMA mode. Global state must be IDLE (START = 0).
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to input data
-
size_half_word – Size of the input data
-
opt_it – Optional interruption can be a combination of HAL_FMAC_OPT_DMA_X1_IT_NONE HAL_FMAC_OPT_DMA_X1_IT_HT
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_ReadY_DMA
(
hal_fmac_handle_t
*
hfmac
,
int16_t
*
p_data
,
uint32_t
size_half_word
)
-
Read data from Y in DMA mode. Global state must be IDLE (START = 0).
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to output data
-
size_half_word – Size of the output data.
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_ReadY_DMA_Opt
(
hal_fmac_handle_t
*
hfmac
,
int16_t
*
p_data
,
uint32_t
size_half_word
,
uint32_t
opt_it
)
-
Read data from Y in DMA mode. Global state must be IDLE (START = 0).
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_data – Pointer to output data
-
size_half_word – Size of the output data.
-
opt_it – Optional interruption can be a combination of HAL_FMAC_OPT_DMA_Y_IT_NONE HAL_FMAC_OPT_DMA_Y_IT_HT
-
- Return values :
-
-
HAL_ERROR – Operation completed with error
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_LockX1WriteAccessForExternPeriph
(
hal_fmac_handle_t
*
hfmac
)
-
Start write data to X1 is directly driven by a timer or other peripheral such as an ADC. Overflow error interruption is activated.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_UnlockX1WriteAccessForExternPeriph
(
hal_fmac_handle_t
*
hfmac
)
-
Stop write data to X1 directly driven by a timer or other peripheral such as an ADC.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
HAL_OK – Operation completed successfully
-
hal_status_t
HAL_FMAC_LockYReadAccessForExternPeriph
(
hal_fmac_handle_t
*
hfmac
)
-
Start read data from Y driven by a timer or other peripheral such as an DAC. Underflow error interruption is activated.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
-
HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_UnlockYReadAccessForExternPeriph
(
hal_fmac_handle_t
*
hfmac
)
-
Stop read data from Y driven by a timer or other peripheral such as an DAC.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
HAL_OK – Operation completed successfully
-
Callback functions ¶
- group FMAC_Exported_Functions_Group6
-
This section provides Interruption and DMA callback functions:
-
The HAL_FMAC_WriteX1CpltCallback() function is called when the write of X1 buffer is complete.
-
The HAL_FMAC_WriteX1HalfCpltCallback() function is called when the write ofX1 buffer is half complete (DMA only).
-
The HAL_FMAC_ReadYCpltCallback() function is called when the read of Y buffer is complete.
-
The HAL_FMAC_ReadYHalfCpltCallback() function is called when the read of Y buffer is half complete (DMA only).
-
The HAL_FMAC_ErrorCallback() function is called in case of an error, there are four possible errors :
-
X1 buffer overflow
-
Y buffer underflow
-
Saturation of the accumulator
-
DMA error
-
-
The HAL_FMAC_PreloadCpltCallback() function is called when the preload is complete.
-
Call HAL_FMAC_RegisterWriteX1CpltCallback() to register the FMAC Write X1 complete callback.
-
Call HAL_FMAC_RegisterReadYCpltCallback() to register the FMAC Read Y complete callback (DMA only).
-
Call HAL_FMAC_RegisterWriteX1HalfCpltCallback() to register the FMAC Write X1 Half complete callback.
-
Call HAL_FMAC_RegisterReadYHalfCpltCallback() to register the FMAC Read Y Half complete callback (DMA only).
-
Call HAL_FMAC_RegisterErrorCallback() to register the FMAC error callback.
-
Call HAL_FMAC_RegisterPreloadCpltCallback() to register the FMAC Preload complete callback.
Functions
-
void
HAL_FMAC_ErrorCallback
(
hal_fmac_handle_t
*
hfmac
)
¶
-
FMAC error callback : It can be a combination of X1 buffer overflow, Y buffer underflow, Saturation of the accumulator or DMA error.
Note
Use HAL_FMAC_GetLastErrorCodes() to get the error codes.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_WriteX1CpltCallback
(
hal_fmac_handle_t
*
hfmac
)
¶
-
Write X1 buffer complete callback.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_ReadYCpltCallback
(
hal_fmac_handle_t
*
hfmac
)
¶
-
Read Y buffer complete callback.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_WriteX1HalfCpltCallback
(
hal_fmac_handle_t
*
hfmac
)
¶
-
Write X1 buffer half complete callback.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_ReadYHalfCpltCallback
(
hal_fmac_handle_t
*
hfmac
)
¶
-
Read Y buffer half complete callback.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_PreloadCpltCallback
(
hal_fmac_handle_t
*
hfmac
)
¶
-
FMAC preload buffer complete callback.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
hal_status_t
HAL_FMAC_RegisterWriteX1CpltCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
¶
-
Register the FMAC Write X1 complete callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_RegisterReadYCpltCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
¶
-
Register the FMAC Read Y complete callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_RegisterWriteX1HalfCpltCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
¶
-
Register the FMAC Write X1 Half complete callback callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_RegisterReadYHalfCpltCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
¶
-
Register the FMAC Read Y Half complete callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_RegisterPreloadCpltCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
¶
-
Register the FMAC Preload complete callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_RegisterErrorCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
¶
-
Register the FMAC error callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
- group FMAC_Exported_Functions_Group6
-
This section provides Interruption and DMA callback functions:
-
The HAL_FMAC_WriteX1CpltCallback() function is called when the write of X1 buffer is complete.
-
The HAL_FMAC_WriteX1HalfCpltCallback() function is called when the write ofX1 buffer is half complete (DMA only).
-
The HAL_FMAC_ReadYCpltCallback() function is called when the read of Y buffer is complete.
-
The HAL_FMAC_ReadYHalfCpltCallback() function is called when the read of Y buffer is half complete (DMA only).
-
The HAL_FMAC_ErrorCallback() function is called in case of an error, there are four possible errors :
-
X1 buffer overflow
-
Y buffer underflow
-
Saturation of the accumulator
-
DMA error
-
-
The HAL_FMAC_PreloadCpltCallback() function is called when the preload is complete.
-
Call HAL_FMAC_RegisterWriteX1CpltCallback() to register the FMAC Write X1 complete callback.
-
Call HAL_FMAC_RegisterReadYCpltCallback() to register the FMAC Read Y complete callback (DMA only).
-
Call HAL_FMAC_RegisterWriteX1HalfCpltCallback() to register the FMAC Write X1 Half complete callback.
-
Call HAL_FMAC_RegisterReadYHalfCpltCallback() to register the FMAC Read Y Half complete callback (DMA only).
-
Call HAL_FMAC_RegisterErrorCallback() to register the FMAC error callback.
-
Call HAL_FMAC_RegisterPreloadCpltCallback() to register the FMAC Preload complete callback.
Functions
-
void
HAL_FMAC_ErrorCallback
(
hal_fmac_handle_t
*
hfmac
)
-
FMAC error callback : It can be a combination of X1 buffer overflow, Y buffer underflow, Saturation of the accumulator or DMA error.
Note
Use HAL_FMAC_GetLastErrorCodes() to get the error codes.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_WriteX1CpltCallback
(
hal_fmac_handle_t
*
hfmac
)
-
Write X1 buffer complete callback.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_ReadYCpltCallback
(
hal_fmac_handle_t
*
hfmac
)
-
Read Y buffer complete callback.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_WriteX1HalfCpltCallback
(
hal_fmac_handle_t
*
hfmac
)
-
Write X1 buffer half complete callback.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_ReadYHalfCpltCallback
(
hal_fmac_handle_t
*
hfmac
)
-
Read Y buffer half complete callback.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_PreloadCpltCallback
(
hal_fmac_handle_t
*
hfmac
)
-
FMAC preload buffer complete callback.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
hal_status_t
HAL_FMAC_RegisterWriteX1CpltCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
-
Register the FMAC Write X1 complete callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_RegisterReadYCpltCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
-
Register the FMAC Read Y complete callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_RegisterWriteX1HalfCpltCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
-
Register the FMAC Write X1 Half complete callback callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_RegisterReadYHalfCpltCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
-
Register the FMAC Read Y Half complete callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_RegisterPreloadCpltCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
-
Register the FMAC Preload complete callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_RegisterErrorCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
-
Register the FMAC error callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
- group FMAC_Exported_Functions_Group6
-
This section provides Interruption and DMA callback functions:
-
The HAL_FMAC_WriteX1CpltCallback() function is called when the write of X1 buffer is complete.
-
The HAL_FMAC_WriteX1HalfCpltCallback() function is called when the write ofX1 buffer is half complete (DMA only).
-
The HAL_FMAC_ReadYCpltCallback() function is called when the read of Y buffer is complete.
-
The HAL_FMAC_ReadYHalfCpltCallback() function is called when the read of Y buffer is half complete (DMA only).
-
The HAL_FMAC_ErrorCallback() function is called in case of an error, there are four possible errors :
-
X1 buffer overflow
-
Y buffer underflow
-
Saturation of the accumulator
-
DMA error
-
-
The HAL_FMAC_PreloadCpltCallback() function is called when the preload is complete.
-
Call HAL_FMAC_RegisterWriteX1CpltCallback() to register the FMAC Write X1 complete callback.
-
Call HAL_FMAC_RegisterReadYCpltCallback() to register the FMAC Read Y complete callback (DMA only).
-
Call HAL_FMAC_RegisterWriteX1HalfCpltCallback() to register the FMAC Write X1 Half complete callback.
-
Call HAL_FMAC_RegisterReadYHalfCpltCallback() to register the FMAC Read Y Half complete callback (DMA only).
-
Call HAL_FMAC_RegisterErrorCallback() to register the FMAC error callback.
-
Call HAL_FMAC_RegisterPreloadCpltCallback() to register the FMAC Preload complete callback.
Functions
-
void
HAL_FMAC_ErrorCallback
(
hal_fmac_handle_t
*
hfmac
)
-
FMAC error callback : It can be a combination of X1 buffer overflow, Y buffer underflow, Saturation of the accumulator or DMA error.
Note
Use HAL_FMAC_GetLastErrorCodes() to get the error codes.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_WriteX1CpltCallback
(
hal_fmac_handle_t
*
hfmac
)
-
Write X1 buffer complete callback.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_ReadYCpltCallback
(
hal_fmac_handle_t
*
hfmac
)
-
Read Y buffer complete callback.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_WriteX1HalfCpltCallback
(
hal_fmac_handle_t
*
hfmac
)
-
Write X1 buffer half complete callback.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_ReadYHalfCpltCallback
(
hal_fmac_handle_t
*
hfmac
)
-
Read Y buffer half complete callback.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_PreloadCpltCallback
(
hal_fmac_handle_t
*
hfmac
)
-
FMAC preload buffer complete callback.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
hal_status_t
HAL_FMAC_RegisterWriteX1CpltCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
-
Register the FMAC Write X1 complete callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_RegisterReadYCpltCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
-
Register the FMAC Read Y complete callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_RegisterWriteX1HalfCpltCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
-
Register the FMAC Write X1 Half complete callback callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_RegisterReadYHalfCpltCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
-
Register the FMAC Read Y Half complete callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_RegisterPreloadCpltCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
-
Register the FMAC Preload complete callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
hal_status_t
HAL_FMAC_RegisterErrorCallback
(
hal_fmac_handle_t
*
hfmac
,
hal_fmac_cb_t
p_callback
)
-
Register the FMAC error callback.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_callback – User callback
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter
-
HAL_OK – Operation completed successfully
-
-
IRQ handler management ¶
- group FMAC_Exported_Functions_Group7
-
This section provides:
-
the main FMAC IRQ handler HAL_FMAC_IRQHandler() .
-
Smaller FMAC IRQ handler HAL_FMAC_ERROR_IRQHandler() applicable instead of HAL_FMAC_IRQHandler() when neither HAL_FMAC_WriteX1_IT nor HAL_FMAC_ReadY_IT processes are used.
Depending on the process function one’s use, different callback might be triggered:
Process API
\
CallbacksHAL_FMAC_WriteX1_IT
HAL_FMAC_ReadY_IT
HAL_FMAC_WriteX1CpltCallback
x
HAL_FMAC_ReadYCpltCallback
x
HAL_FMAC_ErrorCallback
x
x
Process API
\
CallbacksHAL_FMAC_WriteX1_DMA
HAL_FMAC_ReadY_DMA
HAL_FMAC_WriteX1CpltCallback
x
HAL_FMAC_ReadYCpltCallback
x
HAL_FMAC_WriteX1HalfCpltCallback*
x
HAL_FMAC_ReadYHalfCpltCallback*
x
HAL_FMAC_ErrorCallback**
x
x
Process API
\
CallbacksHAL_FMAC_PreloadX1_DMA
HAL_FMAC_PreloadY_DMA
HAL_FMAC_ErrorCallback**
x
x
HAL_FMAC_PreloadCpltCallback**
x
x
Process API
\
CallbacksHAL_FMAC_WriteX1_DMA_Opt
HAL_FMAC_ReadY_DMA_Opt
HAL_FMAC_WriteX1CpltCallback
x
HAL_FMAC_ReadYCpltCallback
x
HAL_FMAC_WriteX1HalfCpltCallback*
x
HAL_FMAC_ReadYHalfCpltCallback*
x
HAL_FMAC_ErrorCallback**
x
x
Note
* these callbacks might be called following DMA IRQ management, not FMAC IRQ management.
Note
** these callbacks might be called following DMA IRQ management, or FMAC IRQ management.
Note
* these callbacks might be called following DMA IRQ management, not FMAC IRQ management.
Note
** these callbacks might be called following DMA IRQ management, or FMAC IRQ management.
Functions
-
void
HAL_FMAC_IRQHandler
(
hal_fmac_handle_t
*
hfmac
)
¶
-
FMAC interrupt request HANDLER. All FMAC interrupts are managed.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_ERROR_IRQHandler
(
hal_fmac_handle_t
*
hfmac
)
¶
-
FMAC interrupt request HANDLER limited to error management. Errors FMAC interrupts only are managed. It is applicable instead of HAL_FMAC_IRQHandler when neither HAL_FMAC_WriteX1_IT nor HAL_FMAC_ReadY_IT processes are used.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
- group FMAC_Exported_Functions_Group7
-
This section provides:
-
the main FMAC IRQ handler HAL_FMAC_IRQHandler() .
-
Smaller FMAC IRQ handler HAL_FMAC_ERROR_IRQHandler() applicable instead of HAL_FMAC_IRQHandler() when neither HAL_FMAC_WriteX1_IT nor HAL_FMAC_ReadY_IT processes are used.
Depending on the process function one’s use, different callback might be triggered:
Process API
\
CallbacksHAL_FMAC_WriteX1_IT
HAL_FMAC_ReadY_IT
HAL_FMAC_WriteX1CpltCallback
x
HAL_FMAC_ReadYCpltCallback
x
HAL_FMAC_ErrorCallback
x
x
Process API
\
CallbacksHAL_FMAC_WriteX1_DMA
HAL_FMAC_ReadY_DMA
HAL_FMAC_WriteX1CpltCallback
x
HAL_FMAC_ReadYCpltCallback
x
HAL_FMAC_WriteX1HalfCpltCallback*
x
HAL_FMAC_ReadYHalfCpltCallback*
x
HAL_FMAC_ErrorCallback**
x
x
Process API
\
CallbacksHAL_FMAC_PreloadX1_DMA
HAL_FMAC_PreloadY_DMA
HAL_FMAC_ErrorCallback**
x
x
HAL_FMAC_PreloadCpltCallback**
x
x
Process API
\
CallbacksHAL_FMAC_WriteX1_DMA_Opt
HAL_FMAC_ReadY_DMA_Opt
HAL_FMAC_WriteX1CpltCallback
x
HAL_FMAC_ReadYCpltCallback
x
HAL_FMAC_WriteX1HalfCpltCallback*
x
HAL_FMAC_ReadYHalfCpltCallback*
x
HAL_FMAC_ErrorCallback**
x
x
Note
* these callbacks might be called following DMA IRQ management, not FMAC IRQ management.
Note
** these callbacks might be called following DMA IRQ management, or FMAC IRQ management.
Note
* these callbacks might be called following DMA IRQ management, not FMAC IRQ management.
Note
** these callbacks might be called following DMA IRQ management, or FMAC IRQ management.
Functions
-
void
HAL_FMAC_IRQHandler
(
hal_fmac_handle_t
*
hfmac
)
-
FMAC interrupt request HANDLER. All FMAC interrupts are managed.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_ERROR_IRQHandler
(
hal_fmac_handle_t
*
hfmac
)
-
FMAC interrupt request HANDLER limited to error management. Errors FMAC interrupts only are managed. It is applicable instead of HAL_FMAC_IRQHandler when neither HAL_FMAC_WriteX1_IT nor HAL_FMAC_ReadY_IT processes are used.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
- group FMAC_Exported_Functions_Group7
-
This section provides:
-
the main FMAC IRQ handler HAL_FMAC_IRQHandler() .
-
Smaller FMAC IRQ handler HAL_FMAC_ERROR_IRQHandler() applicable instead of HAL_FMAC_IRQHandler() when neither HAL_FMAC_WriteX1_IT nor HAL_FMAC_ReadY_IT processes are used.
Depending on the process function one’s use, different callback might be triggered:
Process API
\
CallbacksHAL_FMAC_WriteX1_IT
HAL_FMAC_ReadY_IT
HAL_FMAC_WriteX1CpltCallback
x
HAL_FMAC_ReadYCpltCallback
x
HAL_FMAC_ErrorCallback
x
x
Process API
\
CallbacksHAL_FMAC_WriteX1_DMA
HAL_FMAC_ReadY_DMA
HAL_FMAC_WriteX1CpltCallback
x
HAL_FMAC_ReadYCpltCallback
x
HAL_FMAC_WriteX1HalfCpltCallback*
x
HAL_FMAC_ReadYHalfCpltCallback*
x
HAL_FMAC_ErrorCallback**
x
x
Process API
\
CallbacksHAL_FMAC_PreloadX1_DMA
HAL_FMAC_PreloadY_DMA
HAL_FMAC_ErrorCallback**
x
x
HAL_FMAC_PreloadCpltCallback**
x
x
Process API
\
CallbacksHAL_FMAC_WriteX1_DMA_Opt
HAL_FMAC_ReadY_DMA_Opt
HAL_FMAC_WriteX1CpltCallback
x
HAL_FMAC_ReadYCpltCallback
x
HAL_FMAC_WriteX1HalfCpltCallback*
x
HAL_FMAC_ReadYHalfCpltCallback*
x
HAL_FMAC_ErrorCallback**
x
x
Note
* these callbacks might be called following DMA IRQ management, not FMAC IRQ management.
Note
** these callbacks might be called following DMA IRQ management, or FMAC IRQ management.
Note
* these callbacks might be called following DMA IRQ management, not FMAC IRQ management.
Note
** these callbacks might be called following DMA IRQ management, or FMAC IRQ management.
Functions
-
void
HAL_FMAC_IRQHandler
(
hal_fmac_handle_t
*
hfmac
)
-
FMAC interrupt request HANDLER. All FMAC interrupts are managed.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
void
HAL_FMAC_ERROR_IRQHandler
(
hal_fmac_handle_t
*
hfmac
)
-
FMAC interrupt request HANDLER limited to error management. Errors FMAC interrupts only are managed. It is applicable instead of HAL_FMAC_IRQHandler when neither HAL_FMAC_WriteX1_IT nor HAL_FMAC_ReadY_IT processes are used.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
-
Peripheral State and Error functions ¶
- group FMAC_Exported_Functions_Group8
-
This section provides a set of functions allowing to :
-
Get the current state of the filter process by calling HAL_FMAC_GetState() .
-
Get state of the X1 Write process by calling HAL_FMAC_GetX1State() .
-
Get state of the Y Read process by calling HAL_FMAC_GetYState() .
-
Get the FMAC last error codes (X1 overflow, Y underflow Saturation and DMA) by calling HAL_FMAC_GetLastErrorCodes() .
Functions
-
hal_fmac_state_t
HAL_FMAC_GetState
(
const
hal_fmac_handle_t
*
hfmac
)
¶
-
Return the FMAC filter process state.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
hal_fmac_state_t – FMAC filter state
-
hal_fmac_x1_state_t
HAL_FMAC_GetX1State
(
const
hal_fmac_handle_t
*
hfmac
)
¶
-
Return the HAL FMAC X1 process state.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
hal_fmac_x1_state_t – FMAC X1 process state
-
hal_fmac_y_state_t
HAL_FMAC_GetYState
(
const
hal_fmac_handle_t
*
hfmac
)
¶
-
Return the HAL FMAC Y process state.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
hal_fmac_y_state_t – FMAC Y process state
-
uint32_t
HAL_FMAC_GetLastErrorCodes
(
const
hal_fmac_handle_t
*
hfmac
)
¶
-
Return the errors limited to the last process.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
uint32_t – last error code. It can be HAL_FMAC_ERROR_NONE or a combination of FMAC Error code
-
- group FMAC_Exported_Functions_Group8
-
This section provides a set of functions allowing to :
-
Get the current state of the filter process by calling HAL_FMAC_GetState() .
-
Get state of the X1 Write process by calling HAL_FMAC_GetX1State() .
-
Get state of the Y Read process by calling HAL_FMAC_GetYState() .
-
Get the FMAC last error codes (X1 overflow, Y underflow Saturation and DMA) by calling HAL_FMAC_GetLastErrorCodes() .
Functions
-
hal_fmac_state_t
HAL_FMAC_GetState
(
const
hal_fmac_handle_t
*
hfmac
)
-
Return the FMAC filter process state.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
hal_fmac_state_t – FMAC filter state
-
hal_fmac_x1_state_t
HAL_FMAC_GetX1State
(
const
hal_fmac_handle_t
*
hfmac
)
-
Return the HAL FMAC X1 process state.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
hal_fmac_x1_state_t – FMAC X1 process state
-
hal_fmac_y_state_t
HAL_FMAC_GetYState
(
const
hal_fmac_handle_t
*
hfmac
)
-
Return the HAL FMAC Y process state.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
hal_fmac_y_state_t – FMAC Y process state
-
uint32_t
HAL_FMAC_GetLastErrorCodes
(
const
hal_fmac_handle_t
*
hfmac
)
-
Return the errors limited to the last process.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
uint32_t – last error code. It can be HAL_FMAC_ERROR_NONE or a combination of FMAC Error code
-
- group FMAC_Exported_Functions_Group8
-
This section provides a set of functions allowing to :
-
Get the current state of the filter process by calling HAL_FMAC_GetState() .
-
Get state of the X1 Write process by calling HAL_FMAC_GetX1State() .
-
Get state of the Y Read process by calling HAL_FMAC_GetYState() .
-
Get the FMAC last error codes (X1 overflow, Y underflow Saturation and DMA) by calling HAL_FMAC_GetLastErrorCodes() .
Functions
-
hal_fmac_state_t
HAL_FMAC_GetState
(
const
hal_fmac_handle_t
*
hfmac
)
-
Return the FMAC filter process state.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
hal_fmac_state_t – FMAC filter state
-
hal_fmac_x1_state_t
HAL_FMAC_GetX1State
(
const
hal_fmac_handle_t
*
hfmac
)
-
Return the HAL FMAC X1 process state.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
hal_fmac_x1_state_t – FMAC X1 process state
-
hal_fmac_y_state_t
HAL_FMAC_GetYState
(
const
hal_fmac_handle_t
*
hfmac
)
-
Return the HAL FMAC Y process state.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
hal_fmac_y_state_t – FMAC Y process state
-
uint32_t
HAL_FMAC_GetLastErrorCodes
(
const
hal_fmac_handle_t
*
hfmac
)
-
Return the errors limited to the last process.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
uint32_t – last error code. It can be HAL_FMAC_ERROR_NONE or a combination of FMAC Error code
-
Set/Get user data ¶
- group FMAC_Exported_Functions_Group9
-
This section provides a set of functions allowing to manage a user data pointer stored to the FMAC handle:
-
HAL_FMAC_SetUserData() Set the user data into the handle
-
HAL_FMAC_GetUserData() Get the user data from the handle
Functions
-
void
HAL_FMAC_SetUserData
(
hal_fmac_handle_t
*
hfmac
,
const
void
*
p_user_data
)
¶
-
Set the user data pointer into the handle.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_user_data – Pointer to the user data.
-
-
const
void
*
HAL_FMAC_GetUserData
(
const
hal_fmac_handle_t
*
hfmac
)
¶
-
Get the user data pointer from the handle.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
void* – Pointer to the user data
-
- group FMAC_Exported_Functions_Group9
-
This section provides a set of functions allowing to manage a user data pointer stored to the FMAC handle:
-
HAL_FMAC_SetUserData() Set the user data into the handle
-
HAL_FMAC_GetUserData() Get the user data from the handle
Functions
-
void
HAL_FMAC_SetUserData
(
hal_fmac_handle_t
*
hfmac
,
const
void
*
p_user_data
)
-
Set the user data pointer into the handle.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_user_data – Pointer to the user data.
-
-
const
void
*
HAL_FMAC_GetUserData
(
const
hal_fmac_handle_t
*
hfmac
)
-
Get the user data pointer from the handle.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
void* – Pointer to the user data
-
- group FMAC_Exported_Functions_Group9
-
This section provides a set of functions allowing to manage a user data pointer stored to the FMAC handle:
-
HAL_FMAC_SetUserData() Set the user data into the handle
-
HAL_FMAC_GetUserData() Get the user data from the handle
Functions
-
void
HAL_FMAC_SetUserData
(
hal_fmac_handle_t
*
hfmac
,
const
void
*
p_user_data
)
-
Set the user data pointer into the handle.
- Parameters :
-
-
hfmac – Pointer to a hal_fmac_handle_t
-
p_user_data – Pointer to the user data.
-
-
const
void
*
HAL_FMAC_GetUserData
(
const
hal_fmac_handle_t
*
hfmac
)
-
Get the user data pointer from the handle.
- Parameters :
-
hfmac – Pointer to a hal_fmac_handle_t
- Return values :
-
void* – Pointer to the user data
-