EasyManua.ls Logo

ST STM32F31xx

ST STM32F31xx
584 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Comparators (COMP)
UM1581
142/584
DocID023800 Rev 1
COMP_Mode :
Return values
None.
Notes
If the selected comparator is locked, initialization can't be
performed. To unlock the configuration, perform a system
reset.
By default, PA1 is selected as COMP1 non inverting input. To
use PA4 as COMP1 non inverting input call
COMP_SwitchCmd() after COMP_Init()
5.2.5.3 COMP_StructInit
Function Name
void COMP_StructInit ( COMP_InitTypeDef *
COMP_InitStruct)
Function Description
Fills each COMP_InitStruct member with its default value.
Parameters
COMP_InitStruct : pointer to an COMP_InitTypeDef
structure which will be initialized.
Return values
None.
Notes
None.
5.2.5.4 COMP_Cmd
Function Name
void COMP_Cmd ( uint32_t COMP_Selection, FunctionalState
NewState)
Function Description
Enable or disable the COMP peripheral.
Parameters
COMP_Selection : the selected comparator. This parameter
can be COMP_Selection_COMPx where x can be 1 to 7 to
select the COMP peripheral.
NewState : new state of the COMP peripheral. This
parameter can be: ENABLE or DISABLE. When enabled, the
comparator compares the non inverting input with the
inverting input and the comparison result is available on
comparator output. When disabled, the comparator doesn't
perform comparison and the output level is low.
Return values
None.
Notes
If the selected comparator is locked, enable/disable can't be

Table of Contents

Related product manuals