|
STM32L4xx_HAL_Driver
1.14.0
|
This file provides firmware functions to manage the following functionalities of the Digital Filter for Sigma-Delta Modulators (DFSDM) peripherals: More...
Go to the source code of this file.
Functions | |
| static uint32_t | DFSDM_GetInjChannelsNbr (uint32_t Channels) |
| This function allows to get the number of injected channels. More... | |
| static uint32_t | DFSDM_GetChannelFromInstance (const DFSDM_Channel_TypeDef *Instance) |
| This function allows to get the channel number from channel instance. More... | |
| static void | DFSDM_RegConvStart (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to really start regular conversion. More... | |
| static void | DFSDM_RegConvStop (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to really stop regular conversion. More... | |
| static void | DFSDM_InjConvStart (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to really start injected conversion. More... | |
| static void | DFSDM_InjConvStop (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to really stop injected conversion. More... | |
| static void | DFSDM_DMARegularHalfConvCplt (DMA_HandleTypeDef *hdma) |
| DMA half transfer complete callback for regular conversion. More... | |
| static void | DFSDM_DMARegularConvCplt (DMA_HandleTypeDef *hdma) |
| DMA transfer complete callback for regular conversion. More... | |
| static void | DFSDM_DMAInjectedHalfConvCplt (DMA_HandleTypeDef *hdma) |
| DMA half transfer complete callback for injected conversion. More... | |
| static void | DFSDM_DMAInjectedConvCplt (DMA_HandleTypeDef *hdma) |
| DMA transfer complete callback for injected conversion. More... | |
| static void | DFSDM_DMAError (DMA_HandleTypeDef *hdma) |
| DMA error callback. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_ChannelInit (DFSDM_Channel_HandleTypeDef *hdfsdm_channel) |
| Initialize the DFSDM channel according to the specified parameters in the DFSDM_ChannelInitTypeDef structure and initialize the associated handle. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_ChannelDeInit (DFSDM_Channel_HandleTypeDef *hdfsdm_channel) |
| De-initialize the DFSDM channel. More... | |
| void | HAL_DFSDM_ChannelMspInit (DFSDM_Channel_HandleTypeDef *hdfsdm_channel) |
| Initialize the DFSDM channel MSP. More... | |
| void | HAL_DFSDM_ChannelMspDeInit (DFSDM_Channel_HandleTypeDef *hdfsdm_channel) |
| De-initialize the DFSDM channel MSP. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_Channel_RegisterCallback (DFSDM_Channel_HandleTypeDef *hdfsdm_channel, HAL_DFSDM_Channel_CallbackIDTypeDef CallbackID, pDFSDM_Channel_CallbackTypeDef pCallback) |
| Register a user DFSDM channel callback to be used instead of the weak predefined callback. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_Channel_UnRegisterCallback (DFSDM_Channel_HandleTypeDef *hdfsdm_channel, HAL_DFSDM_Channel_CallbackIDTypeDef CallbackID) |
| Unregister a user DFSDM channel callback. DFSDM channel callback is redirected to the weak predefined callback. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_ChannelCkabStart (DFSDM_Channel_HandleTypeDef *hdfsdm_channel) |
| This function allows to start clock absence detection in polling mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_ChannelPollForCkab (DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t Timeout) |
| This function allows to poll for the clock absence detection. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_ChannelCkabStop (DFSDM_Channel_HandleTypeDef *hdfsdm_channel) |
| This function allows to stop clock absence detection in polling mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_ChannelCkabStart_IT (DFSDM_Channel_HandleTypeDef *hdfsdm_channel) |
| This function allows to start clock absence detection in interrupt mode. More... | |
| void | HAL_DFSDM_ChannelCkabCallback (DFSDM_Channel_HandleTypeDef *hdfsdm_channel) |
| Clock absence detection callback. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_ChannelCkabStop_IT (DFSDM_Channel_HandleTypeDef *hdfsdm_channel) |
| This function allows to stop clock absence detection in interrupt mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_ChannelScdStart (DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t Threshold, uint32_t BreakSignal) |
| This function allows to start short circuit detection in polling mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_ChannelPollForScd (DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t Timeout) |
| This function allows to poll for the short circuit detection. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_ChannelScdStop (DFSDM_Channel_HandleTypeDef *hdfsdm_channel) |
| This function allows to stop short circuit detection in polling mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_ChannelScdStart_IT (DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t Threshold, uint32_t BreakSignal) |
| This function allows to start short circuit detection in interrupt mode. More... | |
| void | HAL_DFSDM_ChannelScdCallback (DFSDM_Channel_HandleTypeDef *hdfsdm_channel) |
| Short circuit detection callback. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_ChannelScdStop_IT (DFSDM_Channel_HandleTypeDef *hdfsdm_channel) |
| This function allows to stop short circuit detection in interrupt mode. More... | |
| int16_t | HAL_DFSDM_ChannelGetAwdValue (DFSDM_Channel_HandleTypeDef *hdfsdm_channel) |
| This function allows to get channel analog watchdog value. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_ChannelModifyOffset (DFSDM_Channel_HandleTypeDef *hdfsdm_channel, int32_t Offset) |
| This function allows to modify channel offset value. More... | |
| HAL_DFSDM_Channel_StateTypeDef | HAL_DFSDM_ChannelGetState (DFSDM_Channel_HandleTypeDef *hdfsdm_channel) |
| This function allows to get the current DFSDM channel handle state. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterInit (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| Initialize the DFSDM filter according to the specified parameters in the DFSDM_FilterInitTypeDef structure and initialize the associated handle. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterDeInit (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| De-initializes the DFSDM filter. More... | |
| void | HAL_DFSDM_FilterMspInit (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| Initializes the DFSDM filter MSP. More... | |
| void | HAL_DFSDM_FilterMspDeInit (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| De-initializes the DFSDM filter MSP. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_Filter_RegisterCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, HAL_DFSDM_Filter_CallbackIDTypeDef CallbackID, pDFSDM_Filter_CallbackTypeDef pCallback) |
| Register a user DFSDM filter callback to be used instead of the weak predefined callback. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_Filter_UnRegisterCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, HAL_DFSDM_Filter_CallbackIDTypeDef CallbackID) |
| Unregister a user DFSDM filter callback. DFSDM filter callback is redirected to the weak predefined callback. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_Filter_RegisterAwdCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, pDFSDM_Filter_AwdCallbackTypeDef pCallback) |
| Register a user DFSDM filter analog watchdog callback to be used instead of the weak predefined callback. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_Filter_UnRegisterAwdCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| Unregister a user DFSDM filter analog watchdog callback. DFSDM filter AWD callback is redirected to the weak predefined callback. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterConfigRegChannel (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Channel, uint32_t ContinuousMode) |
| This function allows to select channel and to enable/disable continuous mode for regular conversion. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterConfigInjChannel (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Channel) |
| This function allows to select channels for injected conversion. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterRegularStart (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to start regular conversion in polling mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterPollForRegConversion (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Timeout) |
| This function allows to poll for the end of regular conversion. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterRegularStop (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to stop regular conversion in polling mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterRegularStart_IT (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to start regular conversion in interrupt mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterRegularStop_IT (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to stop regular conversion in interrupt mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterRegularStart_DMA (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, int32_t *pData, uint32_t Length) |
| This function allows to start regular conversion in DMA mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterRegularMsbStart_DMA (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, int16_t *pData, uint32_t Length) |
| This function allows to start regular conversion in DMA mode and to get only the 16 most significant bits of conversion. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterRegularStop_DMA (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to stop regular conversion in DMA mode. More... | |
| int32_t | HAL_DFSDM_FilterGetRegularValue (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t *Channel) |
| This function allows to get regular conversion value. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterInjectedStart (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to start injected conversion in polling mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterPollForInjConversion (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Timeout) |
| This function allows to poll for the end of injected conversion. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterInjectedStop (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to stop injected conversion in polling mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterInjectedStart_IT (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to start injected conversion in interrupt mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterInjectedStop_IT (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to stop injected conversion in interrupt mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterInjectedStart_DMA (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, int32_t *pData, uint32_t Length) |
| This function allows to start injected conversion in DMA mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterInjectedMsbStart_DMA (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, int16_t *pData, uint32_t Length) |
| This function allows to start injected conversion in DMA mode and to get only the 16 most significant bits of conversion. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterInjectedStop_DMA (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to stop injected conversion in DMA mode. More... | |
| int32_t | HAL_DFSDM_FilterGetInjectedValue (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t *Channel) |
| This function allows to get injected conversion value. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterAwdStart_IT (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, DFSDM_Filter_AwdParamTypeDef *awdParam) |
| This function allows to start filter analog watchdog in interrupt mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterAwdStop_IT (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to stop filter analog watchdog in interrupt mode. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterExdStart (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Channel) |
| This function allows to start extreme detector feature. More... | |
| HAL_StatusTypeDef | HAL_DFSDM_FilterExdStop (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to stop extreme detector feature. More... | |
| int32_t | HAL_DFSDM_FilterGetExdMaxValue (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t *Channel) |
| This function allows to get extreme detector maximum value. More... | |
| int32_t | HAL_DFSDM_FilterGetExdMinValue (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t *Channel) |
| This function allows to get extreme detector minimum value. More... | |
| uint32_t | HAL_DFSDM_FilterGetConvTimeValue (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to get conversion time value. More... | |
| void | HAL_DFSDM_IRQHandler (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function handles the DFSDM interrupts. More... | |
| void | HAL_DFSDM_FilterRegConvCpltCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| Regular conversion complete callback. More... | |
| void | HAL_DFSDM_FilterRegConvHalfCpltCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| Half regular conversion complete callback. More... | |
| void | HAL_DFSDM_FilterInjConvCpltCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| Injected conversion complete callback. More... | |
| void | HAL_DFSDM_FilterInjConvHalfCpltCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| Half injected conversion complete callback. More... | |
| void | HAL_DFSDM_FilterAwdCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Channel, uint32_t Threshold) |
| Filter analog watchdog callback. More... | |
| void | HAL_DFSDM_FilterErrorCallback (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| Error callback. More... | |
| HAL_DFSDM_Filter_StateTypeDef | HAL_DFSDM_FilterGetState (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to get the current DFSDM filter handle state. More... | |
| uint32_t | HAL_DFSDM_FilterGetError (DFSDM_Filter_HandleTypeDef *hdfsdm_filter) |
| This function allows to get the current DFSDM filter error. More... | |
Variables | |
| static __IO uint32_t | v_dfsdm1ChannelCounter = 0 |
| static DFSDM_Channel_HandleTypeDef * | a_dfsdm1ChannelHandle [DFSDM1_CHANNEL_NUMBER] = {NULL} |
This file provides firmware functions to manage the following functionalities of the Digital Filter for Sigma-Delta Modulators (DFSDM) peripherals:
==============================================================================
##### How to use this driver #####
==============================================================================
[..]
*** Channel initialization ***
==============================
[..]
(#) User has first to initialize channels (before filters initialization).
(#) As prerequisite, fill in the HAL_DFSDM_ChannelMspInit() :
(++) Enable DFSDMz clock interface with __HAL_RCC_DFSDMz_CLK_ENABLE().
(++) Enable the clocks for the DFSDMz GPIOS with __HAL_RCC_GPIOx_CLK_ENABLE().
(++) Configure these DFSDMz pins in alternate mode using HAL_GPIO_Init().
(++) If interrupt mode is used, enable and configure DFSDMz_FLT0 global
interrupt with HAL_NVIC_SetPriority() and HAL_NVIC_EnableIRQ().
(#) Configure the output clock, input, serial interface, analog watchdog,
offset and data right bit shift parameters for this channel using the
HAL_DFSDM_ChannelInit() function.
*** Channel clock absence detector ***
======================================
[..]
(#) Start clock absence detector using HAL_DFSDM_ChannelCkabStart() or
HAL_DFSDM_ChannelCkabStart_IT().
(#) In polling mode, use HAL_DFSDM_ChannelPollForCkab() to detect the clock
absence.
(#) In interrupt mode, HAL_DFSDM_ChannelCkabCallback() will be called if
clock absence is detected.
(#) Stop clock absence detector using HAL_DFSDM_ChannelCkabStop() or
HAL_DFSDM_ChannelCkabStop_IT().
(#) Please note that the same mode (polling or interrupt) has to be used
for all channels because the channels are sharing the same interrupt.
(#) Please note also that in interrupt mode, if clock absence detector is
stopped for one channel, interrupt will be disabled for all channels.
*** Channel short circuit detector ***
======================================
[..]
(#) Start short circuit detector using HAL_DFSDM_ChannelScdStart() or
or HAL_DFSDM_ChannelScdStart_IT().
(#) In polling mode, use HAL_DFSDM_ChannelPollForScd() to detect short
circuit.
(#) In interrupt mode, HAL_DFSDM_ChannelScdCallback() will be called if
short circuit is detected.
(#) Stop short circuit detector using HAL_DFSDM_ChannelScdStop() or
or HAL_DFSDM_ChannelScdStop_IT().
(#) Please note that the same mode (polling or interrupt) has to be used
for all channels because the channels are sharing the same interrupt.
(#) Please note also that in interrupt mode, if short circuit detector is
stopped for one channel, interrupt will be disabled for all channels.
*** Channel analog watchdog value ***
=====================================
[..]
(#) Get analog watchdog filter value of a channel using
HAL_DFSDM_ChannelGetAwdValue().
*** Channel offset value ***
=====================================
[..]
(#) Modify offset value of a channel using HAL_DFSDM_ChannelModifyOffset().
*** Filter initialization ***
=============================
[..]
(#) After channel initialization, user has to init filters.
(#) As prerequisite, fill in the HAL_DFSDM_FilterMspInit() :
(++) If interrupt mode is used , enable and configure DFSDMz_FLTx global
interrupt with HAL_NVIC_SetPriority() and HAL_NVIC_EnableIRQ().
Please note that DFSDMz_FLT0 global interrupt could be already
enabled if interrupt is used for channel.
(++) If DMA mode is used, configure DMA with HAL_DMA_Init() and link it
with DFSDMz filter handle using __HAL_LINKDMA().
(#) Configure the regular conversion, injected conversion and filter
parameters for this filter using the HAL_DFSDM_FilterInit() function.
*** Filter regular channel conversion ***
=========================================
[..]
(#) Select regular channel and enable/disable continuous mode using
HAL_DFSDM_FilterConfigRegChannel().
(#) Start regular conversion using HAL_DFSDM_FilterRegularStart(),
HAL_DFSDM_FilterRegularStart_IT(), HAL_DFSDM_FilterRegularStart_DMA() or
HAL_DFSDM_FilterRegularMsbStart_DMA().
(#) In polling mode, use HAL_DFSDM_FilterPollForRegConversion() to detect
the end of regular conversion.
(#) In interrupt mode, HAL_DFSDM_FilterRegConvCpltCallback() will be called
at the end of regular conversion.
(#) Get value of regular conversion and corresponding channel using
HAL_DFSDM_FilterGetRegularValue().
(#) In DMA mode, HAL_DFSDM_FilterRegConvHalfCpltCallback() and
HAL_DFSDM_FilterRegConvCpltCallback() will be called respectively at the
half transfer and at the transfer complete. Please note that
HAL_DFSDM_FilterRegConvHalfCpltCallback() will be called only in DMA
circular mode.
(#) Stop regular conversion using HAL_DFSDM_FilterRegularStop(),
HAL_DFSDM_FilterRegularStop_IT() or HAL_DFSDM_FilterRegularStop_DMA().
*** Filter injected channels conversion ***
===========================================
[..]
(#) Select injected channels using HAL_DFSDM_FilterConfigInjChannel().
(#) Start injected conversion using HAL_DFSDM_FilterInjectedStart(),
HAL_DFSDM_FilterInjectedStart_IT(), HAL_DFSDM_FilterInjectedStart_DMA() or
HAL_DFSDM_FilterInjectedMsbStart_DMA().
(#) In polling mode, use HAL_DFSDM_FilterPollForInjConversion() to detect
the end of injected conversion.
(#) In interrupt mode, HAL_DFSDM_FilterInjConvCpltCallback() will be called
at the end of injected conversion.
(#) Get value of injected conversion and corresponding channel using
HAL_DFSDM_FilterGetInjectedValue().
(#) In DMA mode, HAL_DFSDM_FilterInjConvHalfCpltCallback() and
HAL_DFSDM_FilterInjConvCpltCallback() will be called respectively at the
half transfer and at the transfer complete. Please note that
HAL_DFSDM_FilterInjConvCpltCallback() will be called only in DMA
circular mode.
(#) Stop injected conversion using HAL_DFSDM_FilterInjectedStop(),
HAL_DFSDM_FilterInjectedStop_IT() or HAL_DFSDM_FilterInjectedStop_DMA().
*** Filter analog watchdog ***
==============================
[..]
(#) Start filter analog watchdog using HAL_DFSDM_FilterAwdStart_IT().
(#) HAL_DFSDM_FilterAwdCallback() will be called if analog watchdog occurs.
(#) Stop filter analog watchdog using HAL_DFSDM_FilterAwdStop_IT().
*** Filter extreme detector ***
===============================
[..]
(#) Start filter extreme detector using HAL_DFSDM_FilterExdStart().
(#) Get extreme detector maximum value using HAL_DFSDM_FilterGetExdMaxValue().
(#) Get extreme detector minimum value using HAL_DFSDM_FilterGetExdMinValue().
(#) Start filter extreme detector using HAL_DFSDM_FilterExdStop().
*** Filter conversion time ***
==============================
[..]
(#) Get conversion time value using HAL_DFSDM_FilterGetConvTimeValue().
*** Callback registration ***
=============================
[..]
The compilation define USE_HAL_DFSDM_REGISTER_CALLBACKS when set to 1
allows the user to configure dynamically the driver callbacks.
Use functions HAL_DFSDM_Channel_RegisterCallback(),
HAL_DFSDM_Filter_RegisterCallback() or
HAL_DFSDM_Filter_RegisterAwdCallback() to register a user callback.
[..]
Function HAL_DFSDM_Channel_RegisterCallback() allows to register
following callbacks:
(+) CkabCallback : DFSDM channel clock absence detection callback.
(+) ScdCallback : DFSDM channel short circuit detection callback.
(+) MspInitCallback : DFSDM channel MSP init callback.
(+) MspDeInitCallback : DFSDM channel MSP de-init callback.
[..]
This function takes as parameters the HAL peripheral handle, the Callback ID
and a pointer to the user callback function.
[..]
Function HAL_DFSDM_Filter_RegisterCallback() allows to register
following callbacks:
(+) RegConvCpltCallback : DFSDM filter regular conversion complete callback.
(+) RegConvHalfCpltCallback : DFSDM filter half regular conversion complete callback.
(+) InjConvCpltCallback : DFSDM filter injected conversion complete callback.
(+) InjConvHalfCpltCallback : DFSDM filter half injected conversion complete callback.
(+) ErrorCallback : DFSDM filter error callback.
(+) MspInitCallback : DFSDM filter MSP init callback.
(+) MspDeInitCallback : DFSDM filter MSP de-init callback.
[..]
This function takes as parameters the HAL peripheral handle, the Callback ID
and a pointer to the user callback function.
[..]
For specific DFSDM filter analog watchdog callback use dedicated register callback:
HAL_DFSDM_Filter_RegisterAwdCallback().
[..]
Use functions HAL_DFSDM_Channel_UnRegisterCallback() or
HAL_DFSDM_Filter_UnRegisterCallback() to reset a callback to the default
weak function.
[..]
HAL_DFSDM_Channel_UnRegisterCallback() takes as parameters the HAL peripheral handle,
and the Callback ID.
[..]
This function allows to reset following callbacks:
(+) CkabCallback : DFSDM channel clock absence detection callback.
(+) ScdCallback : DFSDM channel short circuit detection callback.
(+) MspInitCallback : DFSDM channel MSP init callback.
(+) MspDeInitCallback : DFSDM channel MSP de-init callback.
[..]
HAL_DFSDM_Filter_UnRegisterCallback() takes as parameters the HAL peripheral handle,
and the Callback ID.
[..]
This function allows to reset following callbacks:
(+) RegConvCpltCallback : DFSDM filter regular conversion complete callback.
(+) RegConvHalfCpltCallback : DFSDM filter half regular conversion complete callback.
(+) InjConvCpltCallback : DFSDM filter injected conversion complete callback.
(+) InjConvHalfCpltCallback : DFSDM filter half injected conversion complete callback.
(+) ErrorCallback : DFSDM filter error callback.
(+) MspInitCallback : DFSDM filter MSP init callback.
(+) MspDeInitCallback : DFSDM filter MSP de-init callback.
[..]
For specific DFSDM filter analog watchdog callback use dedicated unregister callback:
HAL_DFSDM_Filter_UnRegisterAwdCallback().
[..]
By default, after the call of init function and if the state is RESET
all callbacks are reset to the corresponding legacy weak functions:
examples HAL_DFSDM_ChannelScdCallback(), HAL_DFSDM_FilterErrorCallback().
Exception done for MspInit and MspDeInit callbacks that are respectively
reset to the legacy weak functions in the init and de-init only when these
callbacks are null (not registered beforehand).
If not, MspInit or MspDeInit are not null, the init and de-init keep and use
the user MspInit/MspDeInit callbacks (registered beforehand)
[..]
Callbacks can be registered/unregistered in READY state only.
Exception done for MspInit/MspDeInit callbacks that can be registered/unregistered
in READY or RESET state, thus registered (user) MspInit/DeInit callbacks can be used
during the init/de-init.
In that case first register the MspInit/MspDeInit user callbacks using
HAL_DFSDM_Channel_RegisterCallback() or
HAL_DFSDM_Filter_RegisterCallback() before calling init or de-init function.
[..]
When The compilation define USE_HAL_DFSDM_REGISTER_CALLBACKS is set to 0 or
not defined, the callback registering feature is not available
and weak callbacks are used.This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause
Definition in file stm32l4xx_hal_dfsdm.c.