20#ifndef STM32H7xx_HAL_DFSDM_H
21#define STM32H7xx_HAL_DFSDM_H
119#if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1)
120typedef struct __DFSDM_Channel_HandleTypeDef
128#if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1)
129 void (*CkabCallback) (
struct __DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
130 void (*ScdCallback) (
struct __DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
131 void (*MspInitCallback) (
struct __DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
132 void (*MspDeInitCallback) (
struct __DFSDM_Channel_HandleTypeDef *hdfsdm_channel);
136#if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1)
142 HAL_DFSDM_CHANNEL_CKAB_CB_ID = 0x00U,
143 HAL_DFSDM_CHANNEL_SCD_CB_ID = 0x01U,
144 HAL_DFSDM_CHANNEL_MSPINIT_CB_ID = 0x02U,
145 HAL_DFSDM_CHANNEL_MSPDEINIT_CB_ID = 0x03U
146} HAL_DFSDM_Channel_CallbackIDTypeDef;
219#if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1)
220typedef struct __DFSDM_Filter_HandleTypeDef
238#if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1)
239 void (*AwdCallback) (
struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter,
240 uint32_t Channel, uint32_t Threshold);
241 void (*RegConvCpltCallback) (
struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
242 void (*RegConvHalfCpltCallback) (
struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
243 void (*InjConvCpltCallback) (
struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
244 void (*InjConvHalfCpltCallback) (
struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
245 void (*ErrorCallback) (
struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
246 void (*MspInitCallback) (
struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
247 void (*MspDeInitCallback) (
struct __DFSDM_Filter_HandleTypeDef *hdfsdm_filter);
270#if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1)
276 HAL_DFSDM_FILTER_REGCONV_COMPLETE_CB_ID = 0x00U,
277 HAL_DFSDM_FILTER_REGCONV_HALFCOMPLETE_CB_ID = 0x01U,
278 HAL_DFSDM_FILTER_INJCONV_COMPLETE_CB_ID = 0x02U,
279 HAL_DFSDM_FILTER_INJCONV_HALFCOMPLETE_CB_ID = 0x03U,
280 HAL_DFSDM_FILTER_ERROR_CB_ID = 0x04U,
281 HAL_DFSDM_FILTER_MSPINIT_CB_ID = 0x05U,
282 HAL_DFSDM_FILTER_MSPDEINIT_CB_ID = 0x06U
283} HAL_DFSDM_Filter_CallbackIDTypeDef;
289typedef void (*pDFSDM_Filter_AwdCallbackTypeDef)(
DFSDM_Filter_HandleTypeDef *hdfsdm_filter, uint32_t Channel, uint32_t Threshold);
307#define DFSDM_CHANNEL_OUTPUT_CLOCK_SYSTEM 0x00000000U
308#define DFSDM_CHANNEL_OUTPUT_CLOCK_AUDIO DFSDM_CHCFGR1_CKOUTSRC
317#define DFSDM_CHANNEL_EXTERNAL_INPUTS 0x00000000U
318#define DFSDM_CHANNEL_ADC_OUTPUT DFSDM_CHCFGR1_DATMPX_0
319#define DFSDM_CHANNEL_INTERNAL_REGISTER DFSDM_CHCFGR1_DATMPX_1
328#define DFSDM_CHANNEL_STANDARD_MODE 0x00000000U
329#define DFSDM_CHANNEL_INTERLEAVED_MODE DFSDM_CHCFGR1_DATPACK_0
330#define DFSDM_CHANNEL_DUAL_MODE DFSDM_CHCFGR1_DATPACK_1
339#define DFSDM_CHANNEL_SAME_CHANNEL_PINS 0x00000000U
340#define DFSDM_CHANNEL_FOLLOWING_CHANNEL_PINS DFSDM_CHCFGR1_CHINSEL
349#define DFSDM_CHANNEL_SPI_RISING 0x00000000U
350#define DFSDM_CHANNEL_SPI_FALLING DFSDM_CHCFGR1_SITP_0
351#define DFSDM_CHANNEL_MANCHESTER_RISING DFSDM_CHCFGR1_SITP_1
352#define DFSDM_CHANNEL_MANCHESTER_FALLING DFSDM_CHCFGR1_SITP
361#define DFSDM_CHANNEL_SPI_CLOCK_EXTERNAL 0x00000000U
362#define DFSDM_CHANNEL_SPI_CLOCK_INTERNAL DFSDM_CHCFGR1_SPICKSEL_0
363#define DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_FALLING DFSDM_CHCFGR1_SPICKSEL_1
364#define DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_RISING DFSDM_CHCFGR1_SPICKSEL
373#define DFSDM_CHANNEL_FASTSINC_ORDER 0x00000000U
374#define DFSDM_CHANNEL_SINC1_ORDER DFSDM_CHAWSCDR_AWFORD_0
375#define DFSDM_CHANNEL_SINC2_ORDER DFSDM_CHAWSCDR_AWFORD_1
376#define DFSDM_CHANNEL_SINC3_ORDER DFSDM_CHAWSCDR_AWFORD
385#define DFSDM_FILTER_SW_TRIGGER 0x00000000U
386#define DFSDM_FILTER_SYNC_TRIGGER 0x00000001U
387#define DFSDM_FILTER_EXT_TRIGGER 0x00000002U
396#define DFSDM_FILTER_EXT_TRIG_TIM1_TRGO 0x00000000U
397#define DFSDM_FILTER_EXT_TRIG_TIM1_TRGO2 DFSDM_FLTCR1_JEXTSEL_0
398#define DFSDM_FILTER_EXT_TRIG_TIM8_TRGO DFSDM_FLTCR1_JEXTSEL_1
399#define DFSDM_FILTER_EXT_TRIG_TIM8_TRGO2 (DFSDM_FLTCR1_JEXTSEL_0 | DFSDM_FLTCR1_JEXTSEL_1)
400#define DFSDM_FILTER_EXT_TRIG_TIM3_TRGO DFSDM_FLTCR1_JEXTSEL_2
401#define DFSDM_FILTER_EXT_TRIG_TIM4_TRGO (DFSDM_FLTCR1_JEXTSEL_0 | DFSDM_FLTCR1_JEXTSEL_2)
402#define DFSDM_FILTER_EXT_TRIG_TIM16_OC1 (DFSDM_FLTCR1_JEXTSEL_2 | DFSDM_FLTCR1_JEXTSEL_1)
403#define DFSDM_FILTER_EXT_TRIG_TIM6_TRGO (DFSDM_FLTCR1_JEXTSEL_0 | DFSDM_FLTCR1_JEXTSEL_2 | DFSDM_FLTCR1_JEXTSEL_1)
404#define DFSDM_FILTER_EXT_TRIG_TIM7_TRGO DFSDM_FLTCR1_JEXTSEL_3
405#define DFSDM_FILTER_EXT_TRIG_HRTIM1_ADCTRG1 (DFSDM_FLTCR1_JEXTSEL_3 | DFSDM_FLTCR1_JEXTSEL_0)
406#define DFSDM_FILTER_EXT_TRIG_HRTIM1_ADCTRG3 (DFSDM_FLTCR1_JEXTSEL_3 | DFSDM_FLTCR1_JEXTSEL_1)
407#define DFSDM_FILTER_EXT_TRIG_EXTI11 (DFSDM_FLTCR1_JEXTSEL_4 | DFSDM_FLTCR1_JEXTSEL_3)
408#define DFSDM_FILTER_EXT_TRIG_EXTI15 (DFSDM_FLTCR1_JEXTSEL_4 | DFSDM_FLTCR1_JEXTSEL_3 | DFSDM_FLTCR1_JEXTSEL_0)
409#define DFSDM_FILTER_EXT_TRIG_LPTIM1_OUT (DFSDM_FLTCR1_JEXTSEL_4 | DFSDM_FLTCR1_JEXTSEL_3 | DFSDM_FLTCR1_JEXTSEL_1)
410#define DFSDM_FILTER_EXT_TRIG_LPTIM2_OUT (DFSDM_FLTCR1_JEXTSEL_4 | DFSDM_FLTCR1_JEXTSEL_3 | DFSDM_FLTCR1_JEXTSEL_1 | DFSDM_FLTCR1_JEXTSEL_0)
411#define DFSDM_FILTER_EXT_TRIG_LPTIM3_OUT (DFSDM_FLTCR1_JEXTSEL_4 | DFSDM_FLTCR1_JEXTSEL_3 | DFSDM_FLTCR1_JEXTSEL_2)
412#if (STM32H7_DEV_ID == 0x480UL)
413#define DFSDM_FILTER_EXT_TRIG_COMP1_OUT (DFSDM_FLTCR1_JEXTSEL_4 | DFSDM_FLTCR1_JEXTSEL_3 | \
414 DFSDM_FLTCR1_JEXTSEL_2 | DFSDM_FLTCR1_JEXTSEL_0)
415#define DFSDM_FILTER_EXT_TRIG_COMP2_OUT (DFSDM_FLTCR1_JEXTSEL_4 | DFSDM_FLTCR1_JEXTSEL_3 | \
416 DFSDM_FLTCR1_JEXTSEL_2 | DFSDM_FLTCR1_JEXTSEL_1)
417#elif (STM32H7_DEV_ID == 0x483UL)
418#define DFSDM_FILTER_EXT_TRIG_TIM23_TRGO (DFSDM_FLTCR1_JEXTSEL_3 | DFSDM_FLTCR1_JEXTSEL_1 | \
419 DFSDM_FLTCR1_JEXTSEL_0)
420#define DFSDM_FILTER_EXT_TRIG_TIM24_TRGO (DFSDM_FLTCR1_JEXTSEL_3 | DFSDM_FLTCR1_JEXTSEL_2 )
430#define DFSDM_FILTER_EXT_TRIG_RISING_EDGE DFSDM_FLTCR1_JEXTEN_0
431#define DFSDM_FILTER_EXT_TRIG_FALLING_EDGE DFSDM_FLTCR1_JEXTEN_1
432#define DFSDM_FILTER_EXT_TRIG_BOTH_EDGES DFSDM_FLTCR1_JEXTEN
441#define DFSDM_FILTER_FASTSINC_ORDER 0x00000000U
442#define DFSDM_FILTER_SINC1_ORDER DFSDM_FLTFCR_FORD_0
443#define DFSDM_FILTER_SINC2_ORDER DFSDM_FLTFCR_FORD_1
444#define DFSDM_FILTER_SINC3_ORDER (DFSDM_FLTFCR_FORD_0 | DFSDM_FLTFCR_FORD_1)
445#define DFSDM_FILTER_SINC4_ORDER DFSDM_FLTFCR_FORD_2
446#define DFSDM_FILTER_SINC5_ORDER (DFSDM_FLTFCR_FORD_0 | DFSDM_FLTFCR_FORD_2)
455#define DFSDM_FILTER_AWD_FILTER_DATA 0x00000000U
456#define DFSDM_FILTER_AWD_CHANNEL_DATA DFSDM_FLTCR1_AWFSEL
465#define DFSDM_FILTER_ERROR_NONE 0x00000000U
466#define DFSDM_FILTER_ERROR_REGULAR_OVERRUN 0x00000001U
467#define DFSDM_FILTER_ERROR_INJECTED_OVERRUN 0x00000002U
468#define DFSDM_FILTER_ERROR_DMA 0x00000003U
469#if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1)
470#define DFSDM_FILTER_ERROR_INVALID_CALLBACK 0x00000004U
480#define DFSDM_NO_BREAK_SIGNAL 0x00000000U
481#define DFSDM_BREAK_SIGNAL_0 0x00000001U
482#define DFSDM_BREAK_SIGNAL_1 0x00000002U
483#define DFSDM_BREAK_SIGNAL_2 0x00000004U
484#define DFSDM_BREAK_SIGNAL_3 0x00000008U
501#define DFSDM_CHANNEL_0 0x00000001U
502#define DFSDM_CHANNEL_1 0x00010002U
503#define DFSDM_CHANNEL_2 0x00020004U
504#define DFSDM_CHANNEL_3 0x00030008U
505#define DFSDM_CHANNEL_4 0x00040010U
506#define DFSDM_CHANNEL_5 0x00050020U
507#define DFSDM_CHANNEL_6 0x00060040U
508#define DFSDM_CHANNEL_7 0x00070080U
517#define DFSDM_CONTINUOUS_CONV_OFF 0x00000000U
518#define DFSDM_CONTINUOUS_CONV_ON 0x00000001U
527#define DFSDM_AWD_HIGH_THRESHOLD 0x00000000U
528#define DFSDM_AWD_LOW_THRESHOLD 0x00000001U
548#if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1)
549#define __HAL_DFSDM_CHANNEL_RESET_HANDLE_STATE(__HANDLE__) do{ \
550 (__HANDLE__)->State = HAL_DFSDM_CHANNEL_STATE_RESET; \
551 (__HANDLE__)->MspInitCallback = NULL; \
552 (__HANDLE__)->MspDeInitCallback = NULL; \
555#define __HAL_DFSDM_CHANNEL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DFSDM_CHANNEL_STATE_RESET)
562#if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1)
563#define __HAL_DFSDM_FILTER_RESET_HANDLE_STATE(__HANDLE__) do{ \
564 (__HANDLE__)->State = HAL_DFSDM_FILTER_STATE_RESET; \
565 (__HANDLE__)->MspInitCallback = NULL; \
566 (__HANDLE__)->MspDeInitCallback = NULL; \
569#define __HAL_DFSDM_FILTER_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DFSDM_FILTER_STATE_RESET)
577#if defined(DFSDM_CHDLYR_PLSSKP)
596#if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1)
599 HAL_DFSDM_Channel_CallbackIDTypeDef CallbackID,
600 pDFSDM_Channel_CallbackTypeDef pCallback);
602 HAL_DFSDM_Channel_CallbackIDTypeDef CallbackID);
653#if (USE_HAL_DFSDM_REGISTER_CALLBACKS == 1)
656 HAL_DFSDM_Filter_CallbackIDTypeDef CallbackID,
657 pDFSDM_Filter_CallbackTypeDef pCallback);
659 HAL_DFSDM_Filter_CallbackIDTypeDef CallbackID);
661 pDFSDM_Filter_AwdCallbackTypeDef pCallback);
674 uint32_t ContinuousMode);
747#define IS_DFSDM_CHANNEL_OUTPUT_CLOCK(CLOCK) (((CLOCK) == DFSDM_CHANNEL_OUTPUT_CLOCK_SYSTEM) || \
748 ((CLOCK) == DFSDM_CHANNEL_OUTPUT_CLOCK_AUDIO))
749#define IS_DFSDM_CHANNEL_OUTPUT_CLOCK_DIVIDER(DIVIDER) ((2U <= (DIVIDER)) && ((DIVIDER) <= 256U))
750#define IS_DFSDM_CHANNEL_INPUT(INPUT) (((INPUT) == DFSDM_CHANNEL_EXTERNAL_INPUTS) || \
751 ((INPUT) == DFSDM_CHANNEL_ADC_OUTPUT) || \
752 ((INPUT) == DFSDM_CHANNEL_INTERNAL_REGISTER))
753#define IS_DFSDM_CHANNEL_DATA_PACKING(MODE) (((MODE) == DFSDM_CHANNEL_STANDARD_MODE) || \
754 ((MODE) == DFSDM_CHANNEL_INTERLEAVED_MODE) || \
755 ((MODE) == DFSDM_CHANNEL_DUAL_MODE))
756#define IS_DFSDM_CHANNEL_INPUT_PINS(PINS) (((PINS) == DFSDM_CHANNEL_SAME_CHANNEL_PINS) || \
757 ((PINS) == DFSDM_CHANNEL_FOLLOWING_CHANNEL_PINS))
758#define IS_DFSDM_CHANNEL_SERIAL_INTERFACE_TYPE(MODE) (((MODE) == DFSDM_CHANNEL_SPI_RISING) || \
759 ((MODE) == DFSDM_CHANNEL_SPI_FALLING) || \
760 ((MODE) == DFSDM_CHANNEL_MANCHESTER_RISING) || \
761 ((MODE) == DFSDM_CHANNEL_MANCHESTER_FALLING))
762#define IS_DFSDM_CHANNEL_SPI_CLOCK(TYPE) (((TYPE) == DFSDM_CHANNEL_SPI_CLOCK_EXTERNAL) || \
763 ((TYPE) == DFSDM_CHANNEL_SPI_CLOCK_INTERNAL) || \
764 ((TYPE) == DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_FALLING) || \
765 ((TYPE) == DFSDM_CHANNEL_SPI_CLOCK_INTERNAL_DIV2_RISING))
766#define IS_DFSDM_CHANNEL_FILTER_ORDER(ORDER) (((ORDER) == DFSDM_CHANNEL_FASTSINC_ORDER) || \
767 ((ORDER) == DFSDM_CHANNEL_SINC1_ORDER) || \
768 ((ORDER) == DFSDM_CHANNEL_SINC2_ORDER) || \
769 ((ORDER) == DFSDM_CHANNEL_SINC3_ORDER))
770#define IS_DFSDM_CHANNEL_FILTER_OVS_RATIO(RATIO) ((1U <= (RATIO)) && ((RATIO) <= 32U))
771#define IS_DFSDM_CHANNEL_OFFSET(VALUE) ((-8388608 <= (VALUE)) && ((VALUE) <= 8388607))
772#define IS_DFSDM_CHANNEL_RIGHT_BIT_SHIFT(VALUE) ((VALUE) <= 0x1FU)
773#define IS_DFSDM_CHANNEL_SCD_THRESHOLD(VALUE) ((VALUE) <= 0xFFU)
774#define IS_DFSDM_FILTER_REG_TRIGGER(TRIG) (((TRIG) == DFSDM_FILTER_SW_TRIGGER) || \
775 ((TRIG) == DFSDM_FILTER_SYNC_TRIGGER))
776#define IS_DFSDM_FILTER_INJ_TRIGGER(TRIG) (((TRIG) == DFSDM_FILTER_SW_TRIGGER) || \
777 ((TRIG) == DFSDM_FILTER_SYNC_TRIGGER) || \
778 ((TRIG) == DFSDM_FILTER_EXT_TRIGGER))
779#if (STM32H7_DEV_ID == 0x480UL)
780#define IS_DFSDM_FILTER_EXT_TRIG(TRIG) (((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO) || \
781 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO2) || \
782 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM8_TRGO) || \
783 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM8_TRGO2) || \
784 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM3_TRGO) || \
785 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM4_TRGO) || \
786 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM16_OC1) || \
787 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM6_TRGO) || \
788 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM7_TRGO) || \
789 ((TRIG) == DFSDM_FILTER_EXT_TRIG_EXTI11) || \
790 ((TRIG) == DFSDM_FILTER_EXT_TRIG_EXTI15) || \
791 ((TRIG) == DFSDM_FILTER_EXT_TRIG_LPTIM1_OUT) || \
792 ((TRIG) == DFSDM_FILTER_EXT_TRIG_LPTIM2_OUT) || \
793 ((TRIG) == DFSDM_FILTER_EXT_TRIG_LPTIM3_OUT) || \
794 ((TRIG) == DFSDM_FILTER_EXT_TRIG_COMP1_OUT) || \
795 ((TRIG) == DFSDM_FILTER_EXT_TRIG_COMP2_OUT))
796#elif (STM32H7_DEV_ID == 0x483UL)
797#define IS_DFSDM_FILTER_EXT_TRIG(TRIG) (((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO) || \
798 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO2) || \
799 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM8_TRGO) || \
800 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM8_TRGO2) || \
801 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM3_TRGO) || \
802 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM4_TRGO) || \
803 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM16_OC1) || \
804 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM6_TRGO) || \
805 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM7_TRGO) || \
806 ((TRIG) == DFSDM_FILTER_EXT_TRIG_EXTI11) || \
807 ((TRIG) == DFSDM_FILTER_EXT_TRIG_EXTI15) || \
808 ((TRIG) == DFSDM_FILTER_EXT_TRIG_LPTIM1_OUT) || \
809 ((TRIG) == DFSDM_FILTER_EXT_TRIG_LPTIM2_OUT) || \
810 ((TRIG) == DFSDM_FILTER_EXT_TRIG_LPTIM3_OUT) || \
811 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM23_TRGO) || \
812 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM24_TRGO))
815#define IS_DFSDM_FILTER_EXT_TRIG(TRIG) (((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO) || \
816 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM1_TRGO2) || \
817 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM8_TRGO) || \
818 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM8_TRGO2) || \
819 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM3_TRGO) || \
820 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM4_TRGO) || \
821 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM16_OC1) || \
822 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM6_TRGO) || \
823 ((TRIG) == DFSDM_FILTER_EXT_TRIG_TIM7_TRGO) || \
824 ((TRIG) == DFSDM_FILTER_EXT_TRIG_HRTIM1_ADCTRG1) || \
825 ((TRIG) == DFSDM_FILTER_EXT_TRIG_HRTIM1_ADCTRG3) || \
826 ((TRIG) == DFSDM_FILTER_EXT_TRIG_EXTI11) || \
827 ((TRIG) == DFSDM_FILTER_EXT_TRIG_EXTI15) || \
828 ((TRIG) == DFSDM_FILTER_EXT_TRIG_LPTIM1_OUT) || \
829 ((TRIG) == DFSDM_FILTER_EXT_TRIG_LPTIM2_OUT) || \
830 ((TRIG) == DFSDM_FILTER_EXT_TRIG_LPTIM3_OUT))
832#define IS_DFSDM_FILTER_EXT_TRIG_EDGE(EDGE) (((EDGE) == DFSDM_FILTER_EXT_TRIG_RISING_EDGE) || \
833 ((EDGE) == DFSDM_FILTER_EXT_TRIG_FALLING_EDGE) || \
834 ((EDGE) == DFSDM_FILTER_EXT_TRIG_BOTH_EDGES))
835#define IS_DFSDM_FILTER_SINC_ORDER(ORDER) (((ORDER) == DFSDM_FILTER_FASTSINC_ORDER) || \
836 ((ORDER) == DFSDM_FILTER_SINC1_ORDER) || \
837 ((ORDER) == DFSDM_FILTER_SINC2_ORDER) || \
838 ((ORDER) == DFSDM_FILTER_SINC3_ORDER) || \
839 ((ORDER) == DFSDM_FILTER_SINC4_ORDER) || \
840 ((ORDER) == DFSDM_FILTER_SINC5_ORDER))
841#define IS_DFSDM_FILTER_OVS_RATIO(RATIO) ((1U <= (RATIO)) && ((RATIO) <= 1024U))
842#define IS_DFSDM_FILTER_INTEGRATOR_OVS_RATIO(RATIO) ((1U <= (RATIO)) && ((RATIO) <= 256U))
843#define IS_DFSDM_FILTER_AWD_DATA_SOURCE(DATA) (((DATA) == DFSDM_FILTER_AWD_FILTER_DATA) || \
844 ((DATA) == DFSDM_FILTER_AWD_CHANNEL_DATA))
845#define IS_DFSDM_FILTER_AWD_THRESHOLD(VALUE) ((-8388608 <= (VALUE)) && ((VALUE) <= 8388607))
846#define IS_DFSDM_BREAK_SIGNALS(VALUE) ((VALUE) <= 0xFU)
847#define IS_DFSDM_REGULAR_CHANNEL(CHANNEL) (((CHANNEL) == DFSDM_CHANNEL_0) || \
848 ((CHANNEL) == DFSDM_CHANNEL_1) || \
849 ((CHANNEL) == DFSDM_CHANNEL_2) || \
850 ((CHANNEL) == DFSDM_CHANNEL_3) || \
851 ((CHANNEL) == DFSDM_CHANNEL_4) || \
852 ((CHANNEL) == DFSDM_CHANNEL_5) || \
853 ((CHANNEL) == DFSDM_CHANNEL_6) || \
854 ((CHANNEL) == DFSDM_CHANNEL_7))
855#define IS_DFSDM_INJECTED_CHANNEL(CHANNEL) (((CHANNEL) != 0U) && ((CHANNEL) <= 0x000F00FFU))
856#define IS_DFSDM_CONTINUOUS_MODE(MODE) (((MODE) == DFSDM_CONTINUOUS_CONV_OFF) || \
857 ((MODE) == DFSDM_CONTINUOUS_CONV_ON))
858#if defined(DFSDM2_Channel0)
859#define IS_DFSDM1_CHANNEL_INSTANCE(INSTANCE) (((INSTANCE) == DFSDM1_Channel0) || \
860 ((INSTANCE) == DFSDM1_Channel1) || \
861 ((INSTANCE) == DFSDM1_Channel2) || \
862 ((INSTANCE) == DFSDM1_Channel3) || \
863 ((INSTANCE) == DFSDM1_Channel4) || \
864 ((INSTANCE) == DFSDM1_Channel5) || \
865 ((INSTANCE) == DFSDM1_Channel6) || \
866 ((INSTANCE) == DFSDM1_Channel7))
867#define IS_DFSDM1_FILTER_INSTANCE(INSTANCE) (((INSTANCE) == DFSDM1_Filter0) || \
868 ((INSTANCE) == DFSDM1_Filter1) || \
869 ((INSTANCE) == DFSDM1_Filter2) || \
870 ((INSTANCE) == DFSDM1_Filter3) || \
871 ((INSTANCE) == DFSDM1_Filter4) || \
872 ((INSTANCE) == DFSDM1_Filter5) || \
873 ((INSTANCE) == DFSDM1_Filter6) || \
874 ((INSTANCE) == DFSDM1_Filter7))
HAL_DFSDM_Channel_StateTypeDef
HAL DFSDM Channel states definition.
Definition: stm32h7xx_hal_dfsdm.h:48
HAL_DFSDM_Filter_StateTypeDef
HAL DFSDM Filter states definition.
Definition: stm32h7xx_hal_dfsdm.h:158
@ HAL_DFSDM_CHANNEL_STATE_READY
Definition: stm32h7xx_hal_dfsdm.h:50
@ HAL_DFSDM_CHANNEL_STATE_RESET
Definition: stm32h7xx_hal_dfsdm.h:49
@ HAL_DFSDM_CHANNEL_STATE_ERROR
Definition: stm32h7xx_hal_dfsdm.h:51
@ HAL_DFSDM_FILTER_STATE_INJ
Definition: stm32h7xx_hal_dfsdm.h:162
@ HAL_DFSDM_FILTER_STATE_ERROR
Definition: stm32h7xx_hal_dfsdm.h:164
@ HAL_DFSDM_FILTER_STATE_REG
Definition: stm32h7xx_hal_dfsdm.h:161
@ HAL_DFSDM_FILTER_STATE_REG_INJ
Definition: stm32h7xx_hal_dfsdm.h:163
@ HAL_DFSDM_FILTER_STATE_READY
Definition: stm32h7xx_hal_dfsdm.h:160
@ HAL_DFSDM_FILTER_STATE_RESET
Definition: stm32h7xx_hal_dfsdm.h:159
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_StatusTypeDef
HAL Status structures definition.
Definition: stm32h7xx_hal_def.h:47
Header file of DFSDM HAL extended module.
DFSDM channel analog watchdog structure definition.
Definition: stm32h7xx_hal_dfsdm.h:94
uint32_t FilterOrder
Definition: stm32h7xx_hal_dfsdm.h:95
uint32_t Oversampling
Definition: stm32h7xx_hal_dfsdm.h:97
DFSDM channel handle structure definition.
Definition: stm32h7xx_hal_dfsdm.h:124
DFSDM_Channel_InitTypeDef Init
Definition: stm32h7xx_hal_dfsdm.h:126
DFSDM_Channel_TypeDef * Instance
Definition: stm32h7xx_hal_dfsdm.h:125
HAL_DFSDM_Channel_StateTypeDef State
Definition: stm32h7xx_hal_dfsdm.h:127
DFSDM channel init structure definition.
Definition: stm32h7xx_hal_dfsdm.h:105
int32_t Offset
Definition: stm32h7xx_hal_dfsdm.h:110
DFSDM_Channel_SerialInterfaceTypeDef SerialInterface
Definition: stm32h7xx_hal_dfsdm.h:108
DFSDM_Channel_InputTypeDef Input
Definition: stm32h7xx_hal_dfsdm.h:107
uint32_t RightBitShift
Definition: stm32h7xx_hal_dfsdm.h:112
DFSDM_Channel_AwdTypeDef Awd
Definition: stm32h7xx_hal_dfsdm.h:109
DFSDM_Channel_OutputClockTypeDef OutputClock
Definition: stm32h7xx_hal_dfsdm.h:106
DFSDM channel output clock structure definition.
Definition: stm32h7xx_hal_dfsdm.h:58
FunctionalState Activation
Definition: stm32h7xx_hal_dfsdm.h:59
uint32_t Selection
Definition: stm32h7xx_hal_dfsdm.h:60
uint32_t Divider
Definition: stm32h7xx_hal_dfsdm.h:62
DFSDM channel serial interface structure definition.
Definition: stm32h7xx_hal_dfsdm.h:83
uint32_t SpiClock
Definition: stm32h7xx_hal_dfsdm.h:86
uint32_t Type
Definition: stm32h7xx_hal_dfsdm.h:84
DFSDM channel configuration registers.
Definition: stm32h723xx.h:518
DFSDM filter analog watchdog parameters structure definition.
Definition: stm32h7xx_hal_dfsdm.h:255
int32_t LowThreshold
Definition: stm32h7xx_hal_dfsdm.h:262
uint32_t HighBreakSignal
Definition: stm32h7xx_hal_dfsdm.h:264
int32_t HighThreshold
Definition: stm32h7xx_hal_dfsdm.h:260
uint32_t LowBreakSignal
Definition: stm32h7xx_hal_dfsdm.h:266
uint32_t Channel
Definition: stm32h7xx_hal_dfsdm.h:258
uint32_t DataSource
Definition: stm32h7xx_hal_dfsdm.h:256
DFSDM filter parameters structure definition.
Definition: stm32h7xx_hal_dfsdm.h:197
uint32_t IntOversampling
Definition: stm32h7xx_hal_dfsdm.h:202
uint32_t Oversampling
Definition: stm32h7xx_hal_dfsdm.h:200
uint32_t SincOrder
Definition: stm32h7xx_hal_dfsdm.h:198
DFSDM filter handle structure definition.
Definition: stm32h7xx_hal_dfsdm.h:224
uint32_t RegularContMode
Definition: stm32h7xx_hal_dfsdm.h:229
FunctionalState InjectedScanMode
Definition: stm32h7xx_hal_dfsdm.h:233
uint32_t ExtTriggerEdge
Definition: stm32h7xx_hal_dfsdm.h:232
uint32_t ErrorCode
Definition: stm32h7xx_hal_dfsdm.h:237
DMA_HandleTypeDef * hdmaInj
Definition: stm32h7xx_hal_dfsdm.h:228
DMA_HandleTypeDef * hdmaReg
Definition: stm32h7xx_hal_dfsdm.h:227
HAL_DFSDM_Filter_StateTypeDef State
Definition: stm32h7xx_hal_dfsdm.h:236
uint32_t InjConvRemaining
Definition: stm32h7xx_hal_dfsdm.h:235
uint32_t RegularTrigger
Definition: stm32h7xx_hal_dfsdm.h:230
DFSDM_Filter_InitTypeDef Init
Definition: stm32h7xx_hal_dfsdm.h:226
uint32_t InjectedChannelsNbr
Definition: stm32h7xx_hal_dfsdm.h:234
DFSDM_Filter_TypeDef * Instance
Definition: stm32h7xx_hal_dfsdm.h:225
uint32_t InjectedTrigger
Definition: stm32h7xx_hal_dfsdm.h:231
DFSDM filter init structure definition.
Definition: stm32h7xx_hal_dfsdm.h:210
DFSDM_Filter_RegularParamTypeDef RegularParam
Definition: stm32h7xx_hal_dfsdm.h:211
DFSDM_Filter_InjectedParamTypeDef InjectedParam
Definition: stm32h7xx_hal_dfsdm.h:212
DFSDM_Filter_FilterParamTypeDef FilterParam
Definition: stm32h7xx_hal_dfsdm.h:213
DFSDM filter injected conversion parameters structure definition.
Definition: stm32h7xx_hal_dfsdm.h:182
FunctionalState ScanMode
Definition: stm32h7xx_hal_dfsdm.h:185
FunctionalState DmaMode
Definition: stm32h7xx_hal_dfsdm.h:186
uint32_t ExtTriggerEdge
Definition: stm32h7xx_hal_dfsdm.h:189
uint32_t Trigger
Definition: stm32h7xx_hal_dfsdm.h:183
uint32_t ExtTrigger
Definition: stm32h7xx_hal_dfsdm.h:187
DFSDM filter regular conversion parameters structure definition.
Definition: stm32h7xx_hal_dfsdm.h:171
FunctionalState FastMode
Definition: stm32h7xx_hal_dfsdm.h:174
uint32_t Trigger
Definition: stm32h7xx_hal_dfsdm.h:172
FunctionalState DmaMode
Definition: stm32h7xx_hal_dfsdm.h:175
DFSDM module registers.
Definition: stm32h723xx.h:496
DMA handle Structure definition.
Definition: stm32h7xx_hal_dma.h:138