DocID026248 Rev 1
11/21
UM1753
STLUX library
21
3.4 STLUX385A
analog
comparator unit (stlux_acu)
3.5 STLUX385A
analog-to-digital converter (stlux_adc)
Table 4. STLUX385A analog comparator unit
Header
Input parameters
Output parameters
Functionality
ACU_Reset
Sets the ACU internal
registers to their default
initialization values.
ACU_Init
Enables the ACU unit and
initializes the compare levels.
ACU_Read
ACUx specifies the comparator
peripheral number.
The comparator output
value is returned.
Reads the output of the
comparator x.
ACU_Enable
ACUx specifies the comparator
peripheral number.
CP3_SEL specifies whether
the reference voltage for the
CP3 is internal or external.
Enables the comparator CPx.
In case of CP3, also the
internal/external reference is
specified.
ACU_SetCompareLevel
ACUx specifies the comparator
peripheral number.
DACIN specifies the input
voltage level to be set.
Assigns a specified voltage
level reference to the DACx.
Table 5. STLUX385A analog-to-digital converter
Header
Input parameters
Output parameters
Functionality
ADC_Reset
Sets the ADC internal
registers to their default
initialization values.
ADC_Init
ADC_ConvMode_Init is the conversion
mode. It can be SEQUENCE or
CIRCULAR.
ADC_DataFormat_Init determines
whether the 10 bits data are left or right
aligned.
This function initializes the
ADC sequencer.
ADC_Interrupt
ADC_IntEndConvMode_Interrupt.
ADC_IntEndSeqMode_interrupt
ADC_IntSeqFull_Interrupt
ADC_Sequencer
ADC_Channel_Sequencer
ADC_Gain_Sequencer
ADC_Start
This function enables ADC
functionality.
ADC_Stop
This function disables ADC
functionality.