STM32L486xx HAL User Manual
Functions
Configuration of comparator inputs
COMP Exported Functions

Functions

__STATIC_INLINE void LL_COMP_ConfigInputs (COMP_TypeDef *COMPx, uint32_t InputMinus, uint32_t InputPlus)
 Set comparator inputs minus (inverting) and plus (non-inverting).
__STATIC_INLINE void LL_COMP_SetInputPlus (COMP_TypeDef *COMPx, uint32_t InputPlus)
 Set comparator input plus (non-inverting).
__STATIC_INLINE uint32_t LL_COMP_GetInputPlus (COMP_TypeDef *COMPx)
 Get comparator input plus (non-inverting).
__STATIC_INLINE void LL_COMP_SetInputMinus (COMP_TypeDef *COMPx, uint32_t InputMinus)
 Set comparator input minus (inverting).
__STATIC_INLINE uint32_t LL_COMP_GetInputMinus (COMP_TypeDef *COMPx)
 Get comparator input minus (inverting).
__STATIC_INLINE void LL_COMP_SetInputHysteresis (COMP_TypeDef *COMPx, uint32_t InputHysteresis)
 Set comparator instance hysteresis mode of the input minus (inverting input).
__STATIC_INLINE uint32_t LL_COMP_GetInputHysteresis (COMP_TypeDef *COMPx)
 Get comparator instance hysteresis mode of the minus (inverting) input.

Function Documentation

__STATIC_INLINE void LL_COMP_ConfigInputs ( COMP_TypeDef *  COMPx,
uint32_t  InputMinus,
uint32_t  InputPlus 
)

Set comparator inputs minus (inverting) and plus (non-inverting).

Note:
In case of comparator input selected to be connected to IO: GPIO pins are specific to each comparator instance. Refer to description of parameters or to reference manual.
On this STM32 serie, scaler bridge is configurable: to optimize power consumption, this function enables the voltage scaler bridge only when required (when selecting comparator input based on VrefInt: VrefInt or subdivision of VrefInt).
  • For scaler bridge power consumption values, refer to device datasheet, parameter "IDDA(SCALER)".
  • Voltage scaler requires a delay for voltage stabilization. Refer to device datasheet, parameter "tSTART_SCALER".
  • Scaler bridge is common for all comparator instances, therefore if at least one of the comparator instance is requiring the scaler bridge, it remains enabled.
Reference Manual to LL API cross reference:
CSR INMSEL LL_COMP_ConfigInputs
CSR INPSEL LL_COMP_ConfigInputs
CSR BRGEN LL_COMP_ConfigInputs
CSR SCALEN LL_COMP_ConfigInputs
Parameters:
COMPxComparator instance
InputMinusThis parameter can be one of the following values: (*) Parameter not available on all devices.
InputPlusThis parameter can be one of the following values: (*) Parameter not available on all devices.
Return values:
None

Definition at line 475 of file stm32l4xx_ll_comp.h.

__STATIC_INLINE uint32_t LL_COMP_GetInputHysteresis ( COMP_TypeDef *  COMPx)

Get comparator instance hysteresis mode of the minus (inverting) input.

Reference Manual to LL API cross reference:
CSR HYST LL_COMP_GetInputHysteresis
Parameters:
COMPxComparator instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 632 of file stm32l4xx_ll_comp.h.

__STATIC_INLINE uint32_t LL_COMP_GetInputMinus ( COMP_TypeDef *  COMPx)

Get comparator input minus (inverting).

Note:
In case of comparator input selected to be connected to IO: GPIO pins are specific to each comparator instance. Refer to description of parameters or to reference manual.
Reference Manual to LL API cross reference:
CSR INMSEL LL_COMP_GetInputMinus
CSR BRGEN LL_COMP_GetInputMinus
CSR SCALEN LL_COMP_GetInputMinus
Parameters:
COMPxComparator instance
Return values:
Returnedvalue can be one of the following values: (*) Parameter not available on all devices.

Definition at line 597 of file stm32l4xx_ll_comp.h.

Referenced by LL_COMP_GetInputInverting().

__STATIC_INLINE uint32_t LL_COMP_GetInputPlus ( COMP_TypeDef *  COMPx)

Get comparator input plus (non-inverting).

Note:
In case of comparator input selected to be connected to IO: GPIO pins are specific to each comparator instance. Refer to description of parameters or to reference manual.
Reference Manual to LL API cross reference:
CSR INPSEL LL_COMP_GetInputPlus
Parameters:
COMPxComparator instance
Return values:
Returnedvalue can be one of the following values: (*) Parameter not available on all devices.

Definition at line 522 of file stm32l4xx_ll_comp.h.

Referenced by LL_COMP_GetInputNonInverting().

__STATIC_INLINE void LL_COMP_SetInputHysteresis ( COMP_TypeDef *  COMPx,
uint32_t  InputHysteresis 
)

Set comparator instance hysteresis mode of the input minus (inverting input).

Reference Manual to LL API cross reference:
CSR HYST LL_COMP_SetInputHysteresis
Parameters:
COMPxComparator instance
InputHysteresisThis parameter can be one of the following values:
Return values:
None

Definition at line 617 of file stm32l4xx_ll_comp.h.

__STATIC_INLINE void LL_COMP_SetInputMinus ( COMP_TypeDef *  COMPx,
uint32_t  InputMinus 
)

Set comparator input minus (inverting).

Note:
In case of comparator input selected to be connected to IO: GPIO pins are specific to each comparator instance. Refer to description of parameters or to reference manual.
On this STM32 serie, scaler bridge is configurable: to optimize power consumption, this function enables the voltage scaler bridge only when required (when selecting comparator input based on VrefInt: VrefInt or subdivision of VrefInt).
  • For scaler bridge power consumption values, refer to device datasheet, parameter "IDDA(SCALER)".
  • Voltage scaler requires a delay for voltage stabilization. Refer to device datasheet, parameter "tSTART_SCALER".
  • Scaler bridge is common for all comparator instances, therefore if at least one of the comparator instance is requiring the scaler bridge, it remains enabled.
Reference Manual to LL API cross reference:
CSR INMSEL LL_COMP_SetInputMinus
CSR BRGEN LL_COMP_SetInputMinus
CSR SCALEN LL_COMP_SetInputMinus
Parameters:
COMPxComparator instance
InputMinusThis parameter can be one of the following values: (*) Parameter not available on all devices.
Return values:
None

Definition at line 564 of file stm32l4xx_ll_comp.h.

Referenced by LL_COMP_SetInputInverting().

__STATIC_INLINE void LL_COMP_SetInputPlus ( COMP_TypeDef *  COMPx,
uint32_t  InputPlus 
)

Set comparator input plus (non-inverting).

Note:
In case of comparator input selected to be connected to IO: GPIO pins are specific to each comparator instance. Refer to description of parameters or to reference manual.
Reference Manual to LL API cross reference:
CSR INPSEL LL_COMP_SetInputPlus
Parameters:
COMPxComparator instance
InputPlusThis parameter can be one of the following values: (*) Parameter not available on all devices.
Return values:
None

Definition at line 503 of file stm32l4xx_ll_comp.h.

Referenced by LL_COMP_SetInputNonInverting().