<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<IP xmlns="http://mcd.rou.st.com/modules.php?name=mcu" xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance" DBVersion="V3.0" IPType="peripheral" Name="ADC" Version="aditf4_v2_0_Cube" ns0:schemaLocation="http://mcd.rou.st.com/modules.php?name=mcu ../../../../../../../doc/V4/Development/Specifications/db/IP_Modes.xsd">
    <About>ADC: Analog to Digital Converter</About>
    <RefParameter Comment="Master List" DefaultValue="" Name="MasterList" Type="list" Visible="false"/>
    <!-- ADC_Settings parameters -->    
    <RefMode Comment="ADCx Settings" Group="ADC_Settings" Name="ADC_Settings">
        <ConfigForMode>ADC_RegularConfig</ConfigForMode>
        <Parameter Name="ClockPrescaler"/>
        <Parameter Name="Resolution"/>
        <Parameter Name="DataAlign"/>
        <Parameter Name="ScanConvMode"/> <!-- aligned with HAL v1.2.0-->
        <Parameter Name="ContinuousConvMode"/>
        <Parameter Name="DiscontinuousConvMode"/>
        <Parameter Name="DMAContinuousRequests"/>
        <Parameter Name="EOCSelection"/>
        <Parameter Name="Overrun"/>
        <Parameter Name="LowPowerAutoWait"/>
        <Parameter Name="LowPowerFrequencyMode"/>
        <Parameter Name="LowPowerAutoPowerOff"/><!-- aligned with HAL v1.2.0-->
        <Parameter Name="OversamplingMode"/>
        <Parameter Name="RightBitShift"/>
        <Parameter Name="Ratio"/>
        <Parameter Name="TriggeredMode"/>
    </RefMode>
    
    <!-- ADC Instance parameter needed in ADC_HandleTypeDef structure in the HAL -->
    <RefParameter Comment="ADC instance" DefaultValue="ADC1" Group="ADCgroup" Name="Instance" Type="list" Visible="false"/>
        
		
    <RefParameter Comment="Fadc Constraint" DefaultValue="4000000" Max="4000000" Min="140000" Name="FadcConstraint" Type="double" Visible="false">
        <Condition Diagnostic="" Expression="(RCC:PWR_Regulator_Voltage_Scale = PWR_REGULATOR_VOLTAGE_SCALE3)"/>
    </RefParameter>
    <RefParameter Comment="Fadc Constraint" DefaultValue="8000000" Max="8000000" Min="140000" Name="FadcConstraint" Type="double" Visible="false">
        <Condition Diagnostic="" Expression="(RCC:PWR_Regulator_Voltage_Scale = PWR_REGULATOR_VOLTAGE_SCALE2)"/>
    </RefParameter>
    <RefParameter Comment="Fadc Constraint" DefaultValue="16000000" Max="16000000" Min="140000" Name="FadcConstraint" Type="double" Visible="false"/>
	
    <!-- Possible value of Prescaler parameter -->
    <!-- Condition used in PossibleValue choice is a semaphore built by java which manage the FadcConstraint check -->
    <RefParameter Comment="Clock Prescaler" DefaultValue="ADC_CLOCK_SYNC_PCLK_DIV1" Group="ADCgroup" Name="ClockPrescaler" Type="list">
        <Condition Diagnostic="" Expression="((!AHBCLKDivider1 | !APB2CLKDivider1) &amp; !(HSEscale | (PLLscale &amp; PLLHSE) ))"/>
        <PossibleValue Action="DISABLE" Comment="Synchronous clock mode divided by 1" Condition="((!AHBCLKDivider1 | !APB2CLKDivider1) &amp; !(HSEscale | (PLLscale &amp; PLLHSE) ))" Diagnostic="Internal source clock selected, this implies only that thec AHB and APB prescalers do not divide the clock to ensure that PCLK has a 50% duty cycle ." Value="ADC_CLOCK_SYNC_PCLK_DIV1"/>
        <PossibleValue Action="DISABLE" Comment="Synchronous clock mode divided by 2" Condition="ADC_CLOCK_SYNC_PCLK_DIV2_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Value="ADC_CLOCK_SYNC_PCLK_DIV2"/>
        <PossibleValue Action="DISABLE" Comment="Synchronous clock mode divided by 4" Condition="ADC_CLOCK_SYNC_PCLK_DIV4_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Value="ADC_CLOCK_SYNC_PCLK_DIV4"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 1" Condition="ADC_CLOCK_ASYNC_DIV1_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC1" Value="ADC_CLOCK_ASYNC_DIV1"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 2" Condition="ADC_CLOCK_ASYNC_DIV2_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC2" Value="ADC_CLOCK_ASYNC_DIV2"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 4" Condition="ADC_CLOCK_ASYNC_DIV4_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC3" Value="ADC_CLOCK_ASYNC_DIV4"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 6" Condition="ADC_CLOCK_ASYNC_DIV6_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC4" Value="ADC_CLOCK_ASYNC_DIV6"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 8" Condition="ADC_CLOCK_ASYNC_DIV8_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC5" Value="ADC_CLOCK_ASYNC_DIV8"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 10" Condition="ADC_CLOCK_ASYNC_DIV10_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC6" Value="ADC_CLOCK_ASYNC_DIV10"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 12" Condition="ADC_CLOCK_ASYNC_DIV12_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC7" Value="ADC_CLOCK_ASYNC_DIV12"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 16" Condition="ADC_CLOCK_ASYNC_DIV16_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC8" Value="ADC_CLOCK_ASYNC_DIV16"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 32" Condition="ADC_CLOCK_ASYNC_DIV32_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC9" Value="ADC_CLOCK_ASYNC_DIV32"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 64" Condition="ADC_CLOCK_ASYNC_DIV64_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC10" Value="ADC_CLOCK_ASYNC_DIV64"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 128" Condition="ADC_CLOCK_ASYNC_DIV128_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC11" Value="ADC_CLOCK_ASYNC_DIV128"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 256" Condition="ADC_CLOCK_ASYNC_DIV256_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC12" Value="ADC_CLOCK_ASYNC_DIV256"/>
        <Description>frequency of the clock to the ADC. The clock is common for all the ADCs.</Description>
    </RefParameter>
    <RefParameter Comment="Clock Prescaler" DefaultValue="ADC_CLOCK_SYNC_PCLK_DIV1" Group="ADCgroup" Name="ClockPrescaler" Type="list">
        <PossibleValue Action="DISABLE" Comment="Synchronous clock mode divided by 1" Condition="ADC_CLOCK_SYNC_PCLK_DIV1_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Value="ADC_CLOCK_SYNC_PCLK_DIV1"/>
        <PossibleValue Action="DISABLE" Comment="Synchronous clock mode divided by 2" Condition="ADC_CLOCK_SYNC_PCLK_DIV2_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Value="ADC_CLOCK_SYNC_PCLK_DIV2"/>
        <PossibleValue Action="DISABLE" Comment="Synchronous clock mode divided by 4" Condition="ADC_CLOCK_SYNC_PCLK_DIV4_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Value="ADC_CLOCK_SYNC_PCLK_DIV4"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 1" Condition="ADC_CLOCK_ASYNC_DIV1_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC1" Value="ADC_CLOCK_ASYNC_DIV1"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 2" Condition="ADC_CLOCK_ASYNC_DIV2_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC2" Value="ADC_CLOCK_ASYNC_DIV2"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 4" Condition="ADC_CLOCK_ASYNC_DIV4_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC3" Value="ADC_CLOCK_ASYNC_DIV4"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 6" Condition="ADC_CLOCK_ASYNC_DIV6_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC4" Value="ADC_CLOCK_ASYNC_DIV6"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 8" Condition="ADC_CLOCK_ASYNC_DIV8_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC5" Value="ADC_CLOCK_ASYNC_DIV8"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 10" Condition="ADC_CLOCK_ASYNC_DIV10_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC6" Value="ADC_CLOCK_ASYNC_DIV10"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 12" Condition="ADC_CLOCK_ASYNC_DIV12_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC7" Value="ADC_CLOCK_ASYNC_DIV12"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 16" Condition="ADC_CLOCK_ASYNC_DIV16_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC8" Value="ADC_CLOCK_ASYNC_DIV16"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 32" Condition="ADC_CLOCK_ASYNC_DIV32_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC9" Value="ADC_CLOCK_ASYNC_DIV32"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 64" Condition="ADC_CLOCK_ASYNC_DIV64_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC10" Value="ADC_CLOCK_ASYNC_DIV64"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 128" Condition="ADC_CLOCK_ASYNC_DIV128_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC11" Value="ADC_CLOCK_ASYNC_DIV128"/>
        <PossibleValue Action="DISABLE" Comment="Asynchronous clock mode divided by 256" Condition="ADC_CLOCK_ASYNC_DIV256_$IpInstance" Diagnostic="Prescaler divider not respecting Fadc Min Max Constraint" Semaphore="ADC_RCC12" Value="ADC_CLOCK_ASYNC_DIV256"/>
        <Description>frequency of the clock to the ADC. The clock is common for all the ADCs.</Description>
    </RefParameter>
	    
    <!-- RefParameter To enable clock Semaphore -->
    <RefParameter Comment="Clock Prescaler" DefaultValue="true" Group="ADCgroup" Name="EnableClockSemaphore" Type="boolean" Visible="false">
        <Condition Diagnostic="" Expression="(channelSelected)&amp;(ADC_RCC1|ADC_RCC2|ADC_RCC3|ADC_RCC4|ADC_RCC5|ADC_RCC6|ADC_RCC7|ADC_RCC8|ADC_RCC9|ADC_RCC10|ADC_RCC11|ADC_RCC12)"/>
        <PossibleValue Comment="RCC" Semaphore="ADCUsed_ForRCC" Value="true"/>
    </RefParameter>
    <RefParameter Comment="Clock Prescaler" DefaultValue="false" Group="ADCgroup" Name="EnableClockSemaphore" Type="boolean" Visible="false">
        <PossibleValue Comment="RCC" Value="false"/>
    </RefParameter>
		
    <!-- Possible Value of Resolution parameter -->
    <RefParameter Comment="Resolution" DefaultValue="ADC_RESOLUTION_12B" Group="ADCgroup" Name="Resolution" Type="list">
        <PossibleValue Comment="ADC 12-bit resolution" Semaphore="ADC_RESOLUTION12b" Value="ADC_RESOLUTION_12B"/>
        <PossibleValue Comment="ADC 10-bit resolution" Semaphore="ADC_RESOLUTION10b" Value="ADC_RESOLUTION_10B"/>
        <PossibleValue Comment="ADC 8-bit resolution" Semaphore="ADC_RESOLUTION8b" Value="ADC_RESOLUTION_8B"/>
        <PossibleValue Comment="ADC 6-bit resolution" Semaphore="ADC_RESOLUTION6b" Value="ADC_RESOLUTION_6B"/>
        <Description>Resolution of the ADC conversion</Description>
    </RefParameter>
	    
    <!-- possible value of DataAlign parameter -->
    <RefParameter Comment="Data Alignment" DefaultValue="ADC_DATAALIGN_RIGHT" Group="ADCgroup" Name="DataAlign" Type="list">
        <PossibleValue Comment="Right alignment" Value="ADC_DATAALIGN_RIGHT"/>
        <PossibleValue Action="Disable" Comment="Left alignment" Condition="OversamplingMode_Enabled_$IpInstance" Diagnostic="The alignment mode is not available when working with oversampling: the data are always provided right-aligned" Value="ADC_DATAALIGN_LEFT"/>
        <Description>Select the alignment of the data stored after conversion.</Description>
    </RefParameter>
	    
    <!-- Possible values of ContinuousConvMode parameter -->
    <RefParameter Comment="Continuous Conversion Mode" DefaultValue="DISABLE" Group="ADCgroup" Name="ContinuousConvMode" Type="list">
        <PossibleValue Comment="Disabled" Value="DISABLE"/>
        <PossibleValue Action="Disable" Comment="Enabled" Condition="DiscontinuousConvMode = ENABLE" Diagnostic="Continuous and Discontinuous modes could not be used at the same time" Value="ENABLE"/>
        <Description>Enable or Disable the Continuous Conversion Mode</Description>
    </RefParameter>
    
    <!-- Possible values of DiscontinuousConvMode parameter -->    
    <RefParameter Comment="Discontinuous Conversion Mode" DefaultValue="DISABLE" Name="DiscontinuousConvMode" Type="list">
        <PossibleValue Comment="Disabled" Value="DISABLE"/>
        <PossibleValue Action="Disable" Comment="Enabled" Condition="ContinuousConvMode = ENABLE" Diagnostic="Continuous and Discontinuous modes could not be used at the same time" Value="ENABLE"/>
        <Description>Enable or Disable the Discontinuous Conversion Mode</Description>
    </RefParameter>
	    
    <!-- Possible values of DMAContinuousRequests parameter -->
    <!--RefParameter Comment="DMA Continuous Requests" DefaultValue="ENABLE" Name="DMAContinuousRequests" Type="list" Group="ADCgroup">
      <Condition Diagnostic="" Expression="DMARequest_$IpInstance"/>
            <PossibleValue Comment="Enabled" Value="ENABLE" Semaphore="Semaphore_DMAContinuousRequests_Enable"/>
            <Description>Enable/Disable DMA Continuous Requests</Description>
    </RefParameter-->
    <RefParameter Comment="DMA Continuous Requests" DefaultValue="LIMITED" Group="ADCgroup" Name="DMAContinuousRequestsForConfigFile" Type="list" Visible="false">
        <Condition Diagnostic="" Expression="$IpNumber=1 &amp; DMARequest_ADC &amp; DMAContinuousRequests=DISABLE"/>
        <PossibleValue Comment="LIMITED" Value="LIMITED"/>
        <Description>Enable/Disable DMA Continuous Requests</Description>
    </RefParameter>
    <RefParameter Comment="DMA Continuous Requests" DefaultValue="UNLIMITED" Group="ADCgroup" Name="DMAContinuousRequestsForConfigFile" Type="list" Visible="false">
        <Condition Diagnostic="" Expression="$IpNumber=1 &amp; DMARequest_ADC &amp; DMAContinuousRequests=ENABLE"/>
        <PossibleValue Comment="LIMITED" Value="UNLIMITED"/>
        <Description>Enable/Disable DMA Continuous Requests</Description>
    </RefParameter>
    <RefParameter Comment="DMA Continuous Requests" DefaultValue="NONE" Group="ADCgroup" Name="DMAContinuousRequestsForConfigFile" Type="list" Visible="false">
        <Condition Diagnostic="" Expression="$IpNumber=1 &amp; !DMARequest_ADC &amp; DMAContinuousRequests=DISABLE"/>
        <PossibleValue Comment="none" Value="NONE"/>
        <Description>Enable/Disable DMA Continuous Requests</Description>
    </RefParameter>
    <RefParameter Comment="DMA Continuous Requests" DefaultValue="NONE" Group="ADCgroup" Name="DMAContinuousRequestsForConfigFile" Type="list" Visible="false">
        <PossibleValue Comment="none" Value="NONE"/>
        <Description>Enable/Disable DMA Continuous Requests</Description>
    </RefParameter>

    <!-- Possible values of DMAContinuousRequests parameter -->
    <RefParameter Comment="DMA Continuous Requests" DefaultValue="DISABLE" Group="ADCgroup" Name="DMAContinuousRequests" Type="list">
        <PossibleValue Comment="Disabled" Value="DISABLE"/>
        <PossibleValue Comment="Enabled" Value="ENABLE" Action="Disable" Condition="!DMARequest_$IpInstance" Diagnostic="A DMA Request in Circular Mode must be configured in DMA Settings Tab for this ADC instance" />
        <Description>This parameter is used only when a DMA Request is configured. Else it is not relevant.&lt;br&gt;
            When the DMA Request for this ADC instance this parameter specifies whether 
            the DMA requests are performed in one shot mode (DMA transfer stops when number of conversions is reached)
            or are performed in continuous mode (DMA transfer unlimited, whatever number of conversions).&lt;br&gt;
            Note: In continuous mode, DMA must be configured in circular mode. Otherwise an overrun will be triggered when DMA buffer maximum pointer is reached.
        </Description>
    </RefParameter>
	    
    <!-- Possible values of EOCSelection parameter -->
    <RefParameter Comment="End Of Conversion Selection" DefaultValue="ADC_EOC_SINGLE_CONV" Group="ADCgroup" Name="EOCSelection" Type="list">
        <PossibleValue Comment="End of single conversion" Value="ADC_EOC_SINGLE_CONV"/>
        <PossibleValue Comment="End of sequence of conversion" Value="ADC_EOC_SEQ_CONV"/>
        <!--PossibleValue Comment="End of single or sequence of conversion" Value="ADC_EOC_SINGLE_SEQ_CONV"/-->
        <Description>Regular channel end of conversion selection</Description>
    </RefParameter>
	    
    <!-- Possible values of Overrun parameter -->
    <RefParameter Comment="Overrun behaviour" DefaultValue="ADC_OVR_DATA_PRESERVED" Group="ADCgroup" Name="Overrun" Type="list">
        <PossibleValue Comment="Overrun data preserved" Value="ADC_OVR_DATA_PRESERVED"/>
        <PossibleValue Comment="Overrun data overwritten" Value="ADC_OVR_DATA_OVERWRITTEN"/>
        <Description>Select the behaviour in case of overrun</Description>
    </RefParameter>
        
    <!-- LowPowerAutoWait -->
    <RefParameter Comment="Low Power Auto Wait" DefaultValue="DISABLE" Name="LowPowerAutoWait" Type="list">
        <PossibleValue Comment="Disabled" Value="DISABLE"/>
        <PossibleValue Comment="Enabled" Value="ENABLE"/>
        <Description>Specifies the usage of dynamic low power Auto Delay: New conversion start only when the previous conversion (for regular channel) is completed.</Description>
    </RefParameter>
        
    <!-- LowFrequencyMode -->

    <!-- Semaphore SEM_ADC_LOW_FREQ_3_5MHZ and SEM_ADC_LOW_FREQ_2_8MHZ are created thanks to checkLowFrequencyMode() method in Java ADC -->

    <RefParameter Comment="Low Frequency Mode" DefaultValue="ENABLE" Name="LowPowerFrequencyMode" Type="list">
        <Condition Diagnostic="" Expression="STM32L0x1&amp;SEM_ADC_LOW_FREQ_3_5MHZ"/>
        <PossibleValue Comment="Enabled" Value="ENABLE"/>
        <Description>When selecting an analog ADC clock frequency lower than 3.5MHz, the Low Frequency Mode is forced to enable.</Description>
    </RefParameter>
    <RefParameter Comment="Low Frequency Mode" DefaultValue="ENABLE" Name="LowPowerFrequencyMode" Type="list">
        <Condition Diagnostic="" Expression="SEM_ADC_LOW_FREQ_2_8MHZ"/>
        <PossibleValue Comment="Enabled" Value="ENABLE"/>
        <Description>When selecting an analog ADC clock frequency lower than 2.8MHz, the Low Frequency Mode is forced to enable.</Description>
    </RefParameter>
    <RefParameter Comment="Low Frequency Mode" DefaultValue="DISABLE" Name="LowPowerFrequencyMode" Type="list">
        <PossibleValue Comment="Disabled" Value="DISABLE"/>
        <PossibleValue Comment="Enabled" Value="ENABLE"/>
    </RefParameter>
    
        
    <!-- AutoOff -->
    <RefParameter Comment="Auto Off" DefaultValue="DISABLE" Name="LowPowerAutoPowerOff" Type="list"><!-- aligned with HAL v1.2.0-->
        <PossibleValue Comment="Disabled" Value="DISABLE"/>
        <PossibleValue Comment="Enabled" Value="ENABLE"/>
        <Description>The ADC is always powered off when not converting and automatically wakes-up when a conversion is started</Description>
    </RefParameter>
        
    <RefParameter Comment="Oversampling Mode" DefaultValue="DISABLE" Group="ADCgroup" Name="OversamplingMode" Type="list">
        <PossibleValue Comment="Disabled" Value="DISABLE"/>
        <PossibleValue Comment="Enabled" Semaphore="OversamplingMode_Enabled_$IpInstance" Value="ENABLE"/>
        <Description>Enable/Disable the over sampling mode</Description>
    </RefParameter>
	    
    <RefParameter Comment="Right Bit Shift" DefaultValue="null" Group="ADCgroup" Name="RightBitShift" Type="list" Visible="false">
        <Condition Diagnostic="" Expression="OversamplingMode=DISABLE"/>
    </RefParameter>
    <RefParameter Comment="Right Bit Shift" DefaultValue="ADC_RIGHTBITSHIFT_NONE" Group="ADCgroup" Name="RightBitShift" Type="list">
        <PossibleValue Comment="No bit shift" Semaphore="REG_RIGHTBITSHIFT_NONE_$IpInstance" Value="ADC_RIGHTBITSHIFT_NONE"/>
        <PossibleValue Comment="1 bit shift" Semaphore="REG_RIGHTBITSHIFT1_$IpInstance" Value="ADC_RIGHTBITSHIFT_1"/>
        <PossibleValue Comment="2 bit shift" Semaphore="REG_RIGHTBITSHIFT2_$IpInstance" Value="ADC_RIGHTBITSHIFT_2"/>
        <PossibleValue Comment="3 bit shift" Semaphore="REG_RIGHTBITSHIFT3_$IpInstance" Value="ADC_RIGHTBITSHIFT_3"/>
        <PossibleValue Comment="4 bit shift" Semaphore="REG_RIGHTBITSHIFT4_$IpInstance" Value="ADC_RIGHTBITSHIFT_4"/>
        <PossibleValue Comment="5 bit shift" Semaphore="REG_RIGHTBITSHIFT5_$IpInstance" Value="ADC_RIGHTBITSHIFT_5"/>
        <PossibleValue Comment="6 bit shift" Semaphore="REG_RIGHTBITSHIFT6_$IpInstance" Value="ADC_RIGHTBITSHIFT_6"/>
        <PossibleValue Comment="7 bit shift" Semaphore="REG_RIGHTBITSHIFT7_$IpInstance" Value="ADC_RIGHTBITSHIFT_7"/>
        <PossibleValue Comment="8 bit shift" Semaphore="REG_RIGHTBITSHIFT8_$IpInstance" Value="ADC_RIGHTBITSHIFT_8"/>
        <Description>Configures the division coefficient for the Oversampler</Description>
    </RefParameter>
    <RefParameter Comment="Ratio" DefaultValue="null" Group="ADCgroup" Name="Ratio" Type="list" Visible="false">
        <Condition Diagnostic="" Expression="OversamplingMode=DISABLE"/>
    </RefParameter>
    <RefParameter Comment="Ratio" DefaultValue="ADC_OVERSAMPLING_RATIO_2" Group="ADCgroup" Name="Ratio" Type="list">
        <PossibleValue Comment="Oversampling ratio 2x" Value="ADC_OVERSAMPLING_RATIO_2"/>
        <PossibleValue Comment="Oversampling ratio 4x" Value="ADC_OVERSAMPLING_RATIO_4"/>
        <PossibleValue Comment="Oversampling ratio 8x" Value="ADC_OVERSAMPLING_RATIO_8"/>
        <PossibleValue Comment="Oversampling ratio 16x" Value="ADC_OVERSAMPLING_RATIO_16"/>
        <PossibleValue Action="Disable" Comment="Oversampling ratio 32x" Condition="REG_RIGHTBITSHIFT_NONE_$IpInstance" Diagnostic="shift for oversampling should be equal or greater than 1" Value="ADC_OVERSAMPLING_RATIO_32"/>
        <PossibleValue Action="Disable" Comment="Oversampling ratio 64x" Condition="REG_RIGHTBITSHIFT_NONE_$IpInstance |REG_RIGHTBITSHIFT1_$IpInstance" Diagnostic="Shift for oversampling should be equal or greater than 2" Value="ADC_OVERSAMPLING_RATIO_64"/>
        <PossibleValue Action="Disable" Comment="Oversampling ratio 128x" Condition="REG_RIGHTBITSHIFT_NONE_$IpInstance |REG_RIGHTBITSHIFT1_$IpInstance | REG_RIGHTBITSHIFT2_$IpInstance " Diagnostic="Shift for oversampling should be equal or greater than 3" Value="ADC_OVERSAMPLING_RATIO_128"/>
        <PossibleValue Action="Disable" Comment="Oversampling ratio 256x" Condition="REG_RIGHTBITSHIFT_NONE_$IpInstance |REG_RIGHTBITSHIFT1_$IpInstance | REG_RIGHTBITSHIFT2_$IpInstance | REG_RIGHTBITSHIFT3_$IpInstance" Diagnostic="Shift for oversampling should be equal or greater than 4" Value="ADC_OVERSAMPLING_RATIO_256"/>
        <Description>Configure the Oversampling ratio</Description>
    </RefParameter>
	    
    <RefParameter Comment="Triggered Mode" DefaultValue="null" Group="ADCgroup" Name="TriggeredMode" Type="list" Visible="false">
        <Condition Diagnostic="" Expression="OversamplingMode=DISABLE"/>
    </RefParameter>
    <RefParameter Comment="Triggered Mode" DefaultValue="ADC_TRIGGEREDMODE_SINGLE_TRIGGER" Group="ADCgroup" Name="TriggeredMode" Type="list">
        <PossibleValue Comment="Single trigger" Value="ADC_TRIGGEREDMODE_SINGLE_TRIGGER"/>
        <PossibleValue Comment="Multi trigger" Value="ADC_TRIGGEREDMODE_MULTI_TRIGGER"/>
        <Description>The regular triggered Oversampling mode</Description>
    </RefParameter>
	    
    <!-- RefMode of ADC_Regular_ConversionMode -->
    <RefMode Abstract="true" Comment="Regular Conversion Settings" Group="ADC_Regular_ConversionMode" Name="ADC_Regular_ConversionMode">
        <Parameter Name="SamplingTime"/>
        <Parameter Name="ExternalTrigConv"/>
        <Parameter Name="ExternalTrigConvEdge"/>
    </RefMode>
	    
	    
    <!-- Possible Value of SamplingTime parameters  -->
    <RefParameter Comment="Sampling Time" DefaultValue="ADC_SAMPLETIME_1CYCLE_5" Group="ADCChannel" Name="SamplingTime" Type="list">
        <PossibleValue Comment="1.5 Cycles" Value="ADC_SAMPLETIME_1CYCLE_5"/>
        <PossibleValue Comment="3.5 Cycles" Value="ADC_SAMPLETIME_3CYCLES_5"/>
        <PossibleValue Comment="7.5 Cycles" Value="ADC_SAMPLETIME_7CYCLES_5"/>
        <PossibleValue Comment="12.5 Cycles" Value="ADC_SAMPLETIME_12CYCLES_5"/>
        <PossibleValue Comment="19.5 Cycles" Value="ADC_SAMPLETIME_19CYCLES_5"/>
        <PossibleValue Comment="39.5 Cycles" Value="ADC_SAMPLETIME_39CYCLES_5"/>
        <PossibleValue Comment="79.5 Cycles" Value="ADC_SAMPLETIME_79CYCLES_5"/>
        <PossibleValue Comment="160.5 Cycles" Value="ADC_SAMPLETIME_160CYCLES_5"/>
        <Description>Regular Channel x sampling time selection</Description>
    </RefParameter>
	    
    <!-- ExternalTrigConv -->
    <RefParameter Comment="External Trigger Conversion Source" DefaultValue="ADC_EXTERNALTRIGCONV_EXT_IT11" Group="ADCgroup" Name="ExternalTrigConv" Type="list">
        <Condition Diagnostic="EXTI Line11 is used for External-Trigger-for-Regular-conversion mode." Expression="(RegularExternalTrigger)"/>
        <PossibleValue Comment="EXTI Line11" Value="ADC_EXTERNALTRIGCONV_EXT_IT11"/>
    </RefParameter>
    <RefParameter Comment="External Trigger Conversion Source" DefaultValue="ADC_SOFTWARE_START" Group="ADCgroup" Name="ExternalTrigConv" Type="list">
        <PossibleValue Comment="Regular Conversion launched by software" Value="ADC_SOFTWARE_START"/>
        <PossibleValue Action="Remove" Comment="Timer 6 Trigger Out event" Condition="!TIM6_Exist" Diagnostic="" Value="ADC_EXTERNALTRIGCONV_T6_TRGO"/>
        <PossibleValue Action="Remove" Comment="Timer 21 Capture Compare 2 event" Condition="!TIM21_Exist" Diagnostic="" Value="ADC_EXTERNALTRIGCONV_T21_CC2"/>
        <PossibleValue Action="Remove" Comment="Timer 2 Trigger Out event" Condition="!TIM2_Exist" Diagnostic="" Value="ADC_EXTERNALTRIGCONV_T2_TRGO"/>
        <PossibleValue Action="Remove" Comment="Timer 2 Capture Compare 4 event" Condition="!TIM2_Exist" Diagnostic="" Value="ADC_EXTERNALTRIGCONV_T2_CC4"/>
        <PossibleValue Action="Remove" Comment="Timer 22 Trigger Out event" Condition="!TIM22_Exist" Diagnostic="" Value="ADC_EXTERNALTRIGCONV_T22_TRGO"/>
        <PossibleValue Action="Remove" Comment="Timer 3 Trigger Out event" Condition="!TIM3_Exist" Diagnostic="" Value="ADC_EXTERNALTRIGCONV_T3_TRGO"/>
        <PossibleValue Action="Remove" Comment="Timer 21 Trigger Out event" Condition="!TIM21_Exist | DIE457" Diagnostic="" Value="ADC_EXTERNALTRIGCONV_T21_TRGO"/>
        <PossibleValue Action="Remove" Comment="Timer 2 Capture Compare 3 event" Condition="!TIM2_Exist |DIE417" Diagnostic="" Value="ADC_EXTERNALTRIGCONV_T2_CC3"/>
        <Description>Select the external event used to trigger the start of conversion of a regular group</Description>
    </RefParameter>

    <!-- ExternalTrigConvEdge -->
    <RefParameter Comment="External Trigger Conversion Edge" DefaultValue="ADC_EXTERNALTRIGCONVEDGE_NONE" Group="ADCgroup" Name="ExternalTrigConvEdge" Type="list">
        <Condition Diagnostic="" Expression="ExternalTrigConv = ADC_SOFTWARE_START"/>
        <PossibleValue Comment="None" Value="ADC_EXTERNALTRIGCONVEDGE_NONE"/>
        <Description>Select the external trigger polarity and enable the trigger of a regular group: When an external trigger is selected for ADC regular conversion, only the rising edge of the signal can start the conversion.</Description>
    </RefParameter>
    
    <RefParameter Comment="External Trigger Conversion Edge" DefaultValue="ADC_EXTERNALTRIGCONVEDGE_RISING" Group="ADCgroup" Name="ExternalTrigConvEdge" Type="list">
        <PossibleValue Comment="Trigger detection on the rising edge" Value="ADC_EXTERNALTRIGCONVEDGE_RISING"/>
        <PossibleValue Comment="Trigger detection on the falling edge" Value="ADC_EXTERNALTRIGCONVEDGE_FALLING"/>
        <PossibleValue Comment="Trigger detection on the falling and rising edge" Value="ADC_EXTERNALTRIGCONVEDGE_RISINGFALLING"/>
        <Description>Select the external trigger polarity and enable the trigger of a regular group: When an external trigger is selected for ADC regular conversion, only the rising edge of the signal can start the conversion.</Description>
    </RefParameter>
	    
    <!-- Possible Value of Channel parameter -->
    <RefParameter Comment="Channel" DefaultValue="" Group="ADCChannel" Name="Channel" Type="list" Visible="false">
        <PossibleValue Comment="Channel 0" Value="ADC_CHANNEL_0"/>
        <PossibleValue Comment="Channel 1" Value="ADC_CHANNEL_1"/>
        <PossibleValue Comment="Channel 2" Value="ADC_CHANNEL_2"/>
        <PossibleValue Comment="Channel 3" Value="ADC_CHANNEL_3"/>
        <PossibleValue Comment="Channel 4" Value="ADC_CHANNEL_4"/>
        <PossibleValue Comment="Channel 5" Value="ADC_CHANNEL_5"/>
        <PossibleValue Comment="Channel 6" Value="ADC_CHANNEL_6"/>
        <PossibleValue Comment="Channel 7" Value="ADC_CHANNEL_7"/>
        <PossibleValue Comment="Channel 8" Value="ADC_CHANNEL_8"/>
        <PossibleValue Comment="Channel 9" Value="ADC_CHANNEL_9"/>
        <PossibleValue Comment="Channel 10" Value="ADC_CHANNEL_10"/>
        <PossibleValue Comment="Channel 11" Value="ADC_CHANNEL_11"/>
        <PossibleValue Comment="Channel 12" Value="ADC_CHANNEL_12"/>
        <PossibleValue Comment="Channel 13" Value="ADC_CHANNEL_13"/>
        <PossibleValue Comment="Channel 14" Value="ADC_CHANNEL_14"/>
        <PossibleValue Comment="Channel 15" Value="ADC_CHANNEL_15"/>
        <PossibleValue Comment="Channel Temperature Sensor" Value="ADC_CHANNEL_TEMPSENSOR"/>
        <PossibleValue Comment="Channel Vrefint" Value="ADC_CHANNEL_VREFINT"/>
        <PossibleValue Comment="Channel Vlcd" Value="ADC_CHANNEL_VLCD"/>
    </RefParameter>
    
    <!-- List of all available channel used to -->
    <RefParameter Comment="Rank" DefaultValue="ADC_RANK_CHANNEL_NUMBER" Group="ADCChannel" Name="Rank" Type="list" Visible="false"/>
   
	    
    <!-- Possible Value of SamplingTime parameters  -->
    <RefParameter Comment="Scan Direction" DefaultValue="ADC_SCAN_DIRECTION_FORWARD" Group="ADCChannel" Name="ScanConvMode" Type="list"><!-- aligned with HAL v1.2.0-->
        <PossibleValue Comment="Forward" Value="ADC_SCAN_DIRECTION_FORWARD"/><!-- aligned with HAL v1.2.0-->
        <PossibleValue Comment="Backward" Value="ADC_SCAN_DIRECTION_BACKWARD"/>
        <Description>Parameter Description: Configurable scan direction (Forward from channel 0 to 18 or Backward from channel 18 to channel 0)</Description>
    </RefParameter>

    <!-- WatchDog parameters -->
    <RefMode Comment="" Group="WatchDog" Name="WatchDog">
        <ConfigForMode>ADC_AnalogWDGConfig</ConfigForMode>
        <Parameter Name="EnableAnalogWatchDog"/>
        <Parameter Name="WatchdogMode"/>
        <Parameter Name="WatchdogChannel"/>
        <Parameter Name="HighThreshold"/>
        <Parameter Name="LowThreshold"/>
        <Parameter Name="ITMode"/>
    </RefMode>
        
    <!-- Possible value of EnableAnalogWatchDog parameter -->
    <RefParameter Comment="Enable Analog WatchDog Mode" DefaultValue="false" Group="ADCgroup" Name="EnableAnalogWatchDog" Type="boolean">
        <PossibleValue Comment="true" Value="true"/>
        <PossibleValue Comment="false" Value="false"/>
        <Description>Enable/Disable Analog WatchDog Mode</Description> 
    </RefParameter>
	    
    <!-- Possible value of WatchdogMode parameters -->
    <RefParameter Comment="Watchdog Mode" DefaultValue="null" Group="ADCgroup" Name="WatchdogMode" Type="list" Visible="false">
        <Condition Diagnostic="" Expression="EnableAnalogWatchDog=false"/>
    </RefParameter>
    <RefParameter Comment="Watchdog Mode" DefaultValue="ADC_ANALOGWATCHDOG_SINGLE_REG" Group="ADCgroup" Name="WatchdogMode" Type="list">
        <PossibleValue Comment="Single regular channel" Value="ADC_ANALOGWATCHDOG_SINGLE_REG"/>
        <PossibleValue Comment="All regular channels" Semaphore="AllRegular" Value="ADC_ANALOGWATCHDOG_ALL_REG"/>
        <Description>Configures the ADC analog watchdog mode.</Description>
    </RefParameter>

    <!-- Possible value of WatchdogChannel parameter -->
    <RefParameter Comment="Analog WatchDog Channel" DefaultValue="null" Group="ADCChannel" Name="WatchdogChannel" Type="list" Visible="false">
        <Condition Diagnostic="" Expression="EnableAnalogWatchDog=false"/>
    </RefParameter>
    <RefParameter Comment="Analog WatchDog Channel" DefaultValue="null" Group="ADCChannel" Name="WatchdogChannel" Type="list" Visible="false">
        <Condition Diagnostic="" Expression="AllRegular"/>
    </RefParameter>
    <RefParameter Comment="Analog WatchDog Channel" DefaultValue="" Group="ADCChannel" Name="WatchdogChannel" Type="list">
        <PossibleValue Comment="Channel 0" Value="ADC_CHANNEL_0"/>
        <PossibleValue Comment="Channel 1" Value="ADC_CHANNEL_1"/>
        <PossibleValue Comment="Channel 2" Value="ADC_CHANNEL_2"/>
        <PossibleValue Comment="Channel 3" Value="ADC_CHANNEL_3"/>
        <PossibleValue Comment="Channel 4" Value="ADC_CHANNEL_4"/>
        <PossibleValue Comment="Channel 5" Value="ADC_CHANNEL_5"/>
        <PossibleValue Comment="Channel 6" Value="ADC_CHANNEL_6"/>
        <PossibleValue Comment="Channel 7" Value="ADC_CHANNEL_7"/>
        <PossibleValue Comment="Channel 8" Value="ADC_CHANNEL_8"/>
        <PossibleValue Comment="Channel 9" Value="ADC_CHANNEL_9"/>
        <PossibleValue Comment="Channel 10" Value="ADC_CHANNEL_10"/>
        <PossibleValue Comment="Channel 11" Value="ADC_CHANNEL_11"/>
        <PossibleValue Comment="Channel 12" Value="ADC_CHANNEL_12"/>
        <PossibleValue Comment="Channel 13" Value="ADC_CHANNEL_13"/>
        <PossibleValue Comment="Channel 14" Value="ADC_CHANNEL_14"/>
        <PossibleValue Comment="Channel 15" Value="ADC_CHANNEL_15"/>
        <PossibleValue Comment="Channel 16" Value="ADC_CHANNEL_16"/>
        <PossibleValue Comment="Channel 17" Value="ADC_CHANNEL_17"/>
        <PossibleValue Comment="Channel 18" Value="ADC_CHANNEL_18"/>
        <PossibleValue Comment="Channel Temperature sensor" Value="ADC_CHANNEL_TEMPSENSOR"/>
        <PossibleValue Comment="Channel Vrefint" Value="ADC_CHANNEL_VREFINT"/>
        <PossibleValue Comment="Channel Vlcd" Value="ADC_CHANNEL_VLCD"/>
        <Description>ADC channel for the analog watchdog</Description> 
    </RefParameter>
        
    <!-- Possible value of HighThreshold parameter -->
    <RefParameter Comment="High Threshold" DefaultValue="null" Group="ADCgroup" Name="HighThreshold" Type="list" Visible="false">
        <Condition Diagnostic="" Expression="EnableAnalogWatchDog=false"/>
    </RefParameter>
    <RefParameter Comment="High Threshold" DefaultValue="0" Group="ADCgroup" Max="4095" Min="=LowThreshold" Name="HighThreshold" Type="integer">
        <Condition Diagnostic="" Expression="ADC_RESOLUTION12b"/>
        <Description>Configures the ADC analog watchdog High threshold value.</Description> 
    </RefParameter>
    <RefParameter Comment="High Threshold" DefaultValue="0" Group="ADCgroup" Max="1023" Min="=LowThreshold" Name="HighThreshold" Type="integer">
        <Condition Diagnostic="" Expression="ADC_RESOLUTION10b"/>
        <Description>Configures the ADC analog watchdog High threshold value.</Description> 
    </RefParameter>
    <RefParameter Comment="High Threshold" DefaultValue="0" Group="ADCgroup" Max="255" Min="=LowThreshold" Name="HighThreshold" Type="integer">
        <Condition Diagnostic="" Expression="ADC_RESOLUTION8b"/>
        <Description>Configures the ADC analog watchdog High threshold value.</Description> 
    </RefParameter>
    <RefParameter Comment="High Threshold" DefaultValue="0" Group="ADCgroup" Max="63" Min="=LowThreshold" Name="HighThreshold" Type="integer">
        <Condition Diagnostic="" Expression="ADC_RESOLUTION6b"/>
        <Description>Configures the ADC analog watchdog High threshold value.</Description> 
    </RefParameter>
    <RefParameter Comment="High Threshold" DefaultValue="0" Group="ADCgroup" Max="4095" Min="=LowThreshold" Name="HighThreshold" Type="integer">
        <Description>Configures the ADC analog watchdog High threshold value.</Description> 
    </RefParameter>
	    
    <!-- Possible value of LowThreshold parameter -->
    <RefParameter Comment="Low Threshold" DefaultValue="null" Group="ADCgroup" Name="LowThreshold" Type="list" Visible="false">
        <Condition Diagnostic="" Expression="EnableAnalogWatchDog=false"/>
    </RefParameter>
    <RefParameter Comment="Low Threshold" DefaultValue="0" Group="ADCgroup" Max="=HighThreshold" Min="0" Name="LowThreshold" Type="integer">
        <Description>Configures the ADC analog watchdog Low threshold value.</Description>
    </RefParameter>
	    
    <!-- Possible value of ITMode parameter -->
    <RefParameter Comment="Interrupt Mode" DefaultValue="null" Group="ADCgroup" Name="ITMode" Type="list" Visible="false">
        <Condition Diagnostic="" Expression="EnableAnalogWatchDog=false"/>
    </RefParameter>
    <RefParameter Comment="Interrupt Mode" DefaultValue="DISABLE" Group="ADCgroup" Name="ITMode" Type="list">
        <PossibleValue Comment="Disabled" Value="DISABLE"/>
        <PossibleValue Comment="Enabled" Value="ENABLE"/>
        <Description>Specifies whether the analog watchdog is configured in interrupt mode or in polling mode.</Description>
    </RefParameter>
    
    <!-- Not displayed parameters -->
    <RefParameter Comment="Master Flag" DefaultValue="0" Max="1" Min="0" Name="master" Type="integer" Visible="false"/>
    
    <!-- List of all available channel used to -->
    <RefParameter Comment="Channel" DefaultValue="ADC_CHANNEL_0" Group="ADCChannel" Name="AllChannels" Type="list" Visible="true">
        <PossibleValue Comment="Channel 0" Value="ADC_CHANNEL_0"/>
        <PossibleValue Comment="Channel 1" Value="ADC_CHANNEL_1"/>
        <PossibleValue Comment="Channel 2" Value="ADC_CHANNEL_2"/>
        <PossibleValue Comment="Channel 3" Value="ADC_CHANNEL_3"/>
        <PossibleValue Comment="Channel 4" Value="ADC_CHANNEL_4"/>
        <PossibleValue Comment="Channel 5" Value="ADC_CHANNEL_5"/>
        <PossibleValue Comment="Channel 6" Value="ADC_CHANNEL_6"/>
        <PossibleValue Comment="Channel 7" Value="ADC_CHANNEL_7"/>
        <PossibleValue Comment="Channel 8" Value="ADC_CHANNEL_8"/>
        <PossibleValue Comment="Channel 9" Value="ADC_CHANNEL_9"/>
        <PossibleValue Comment="Channel 10" Value="ADC_CHANNEL_10"/>
        <PossibleValue Comment="Channel 11" Value="ADC_CHANNEL_11"/>
        <PossibleValue Comment="Channel 12" Value="ADC_CHANNEL_12"/>
        <PossibleValue Comment="Channel 13" Value="ADC_CHANNEL_13"/>
        <PossibleValue Comment="Channel 14" Value="ADC_CHANNEL_14"/>
        <PossibleValue Comment="Channel 15" Value="ADC_CHANNEL_15"/>
        <PossibleValue Comment="Channel 16" Value="ADC_CHANNEL_16"/>
        <PossibleValue Comment="Channel 17" Value="ADC_CHANNEL_17"/>
        <PossibleValue Comment="Channel 18" Value="ADC_CHANNEL_18"/>
        <PossibleValue Comment="Channel Temperature sensor" Value="ADC_CHANNEL_TEMPSENSOR"/>
        <PossibleValue Comment="Channel Vrefint" Value="ADC_CHANNEL_VREFINT"/>
        <PossibleValue Comment="Channel Vlcd" Value="ADC_CHANNEL_VLCD"/>
    </RefParameter>
    
    <RefParameter Comment="Available Channel" DefaultValue="ADC_CHANNEL_TEMPSENSOR" Group="ADCChannel" Name="Available_Channel" Type="list" Visible="false">
        <!--  <PossibleValue Comment="Channel Temperature Sensor" Value="ADC_CHANNEL_TEMPSENSOR"/>
        <PossibleValue Comment="Channel Vrefint" Value="ADC_CHANNEL_VREFINT"/>
        <PossibleValue Comment="Channel Vlcd" Value="ADC_CHANNEL_VLCD"/> -->
    </RefParameter>

    
    <!-- Possible Value of AnalogWDChannel parameters -->
    <RefParameter Comment="Analog WatchDog Channel" DefaultValue="" Group="ADCChannel" Name="AnalogWDChannel" Type="list">
        <PossibleValue Comment="Channel 0" Value="ADC_CHANNEL_0"/>
        <PossibleValue Comment="Channel 1" Value="ADC_CHANNEL_1"/>
        <PossibleValue Comment="Channel 2" Value="ADC_CHANNEL_2"/>
        <PossibleValue Comment="Channel 3" Value="ADC_CHANNEL_3"/>
        <PossibleValue Comment="Channel 4" Value="ADC_CHANNEL_4"/>
        <PossibleValue Comment="Channel 5" Value="ADC_CHANNEL_5"/>
        <PossibleValue Comment="Channel 6" Value="ADC_CHANNEL_6"/>
        <PossibleValue Comment="Channel 7" Value="ADC_CHANNEL_7"/>
        <PossibleValue Comment="Channel 8" Value="ADC_CHANNEL_8"/>
        <PossibleValue Comment="Channel 9" Value="ADC_CHANNEL_9"/>
        <PossibleValue Comment="Channel 10" Value="ADC_CHANNEL_10"/>
        <PossibleValue Comment="Channel 11" Value="ADC_CHANNEL_11"/>
        <PossibleValue Comment="Channel 12" Value="ADC_CHANNEL_12"/>
        <PossibleValue Comment="Channel 13" Value="ADC_CHANNEL_13"/>
        <PossibleValue Comment="Channel 14" Value="ADC_CHANNEL_14"/>
        <PossibleValue Comment="Channel 15" Value="ADC_CHANNEL_15"/>
        <PossibleValue Comment="Channel 16" Value="ADC_CHANNEL_16"/>
        <PossibleValue Comment="Channel 17" Value="ADC_CHANNEL_17"/>
        <PossibleValue Comment="Channel 18" Value="ADC_CHANNEL_18"/>
        <Description>ADC channel for the analog watchdog</Description> 
    </RefParameter>
    
    <!-- ChannelForWatchDog used to specify witch channel list to be available for analog watch dog mode-->
    <RefParameter Comment="Channel type for WatchDog" DefaultValue="Regular" Name="ChannelForWatchDog" Type="list" Visible="false">
        <Condition Diagnostic="" Expression="WatchdogMode=ADC_ANALOGWATCHDOG_SINGLE_REG"/>
        <PossibleValue Comment="Regular" Value="Regular"/>
    </RefParameter>
    <RefParameter Comment="Channel type for WatchDog" DefaultValue="none" Name="ChannelForWatchDog" Type="list" Visible="false">
        <PossibleValue Comment="none" Value="none"/>
    </RefParameter>
    
    <!-- RefModes -->
    <RefMode Comment="" Name="IN0">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel" RefParameter="Channel">
            <PossibleValue>ADC_CHANNEL_0</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN1">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel" RefParameter="Channel">
            <PossibleValue>ADC_CHANNEL_1</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN2">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_2</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN3">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_3</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN4">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_4</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN5">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_5</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN6">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_6</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN7">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_7</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN8">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_8</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN9">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_9</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN10">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_10</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN11">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_11</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN12">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_12</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN13">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_13</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN14">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_14</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN15">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_15</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN-TempSens">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_TEMPSENSOR</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN-Vrefint">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_VREFINT</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>
    <RefMode Comment="" Name="IN-Vlcd">
        <ConfigForMode>ADC_RegularChannelConfig</ConfigForMode>
        <Parameter Name="Channel">
            <PossibleValue>ADC_CHANNEL_VLCD</PossibleValue>
        </Parameter>
        <Parameter Name="Rank"/>
    </RefMode>

    <ModeLogicOperator Name="OR">
        <!-- External channels -->
        <Mode Name="IN0">
            <ModeLogicOperator Name="OR">
                <Mode Name="IN0">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="IN0"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN1">
            <ModeLogicOperator Name="OR">
                <Mode Name="IN1">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="IN1"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN2">
            <ModeLogicOperator Name="OR">
                <Mode Name="IN2">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="IN2"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN3">
            <ModeLogicOperator Name="OR">
                <Mode Name="IN3">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="IN3"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN4">
            <ModeLogicOperator Name="OR">
                <Mode Name="IN4">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="IN4"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN5">
            <ModeLogicOperator Name="OR">
                <Mode Name="IN5">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="IN5"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN6">
            <ModeLogicOperator Name="OR">
                <Mode Name="IN6">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="IN6"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN7">
            <ModeLogicOperator Name="OR">
                <Mode Name="IN7">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="IN7"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN8">
            <ModeLogicOperator Name="OR">
                <Mode Name="IN8">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="IN8"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN9">
            <ModeLogicOperator Name="OR">
                <Mode Name="IN9">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="IN9"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN10">
            <ModeLogicOperator Name="OR">
                <Mode Name="IN10">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="IN10"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN11">
            <ModeLogicOperator Name="OR">
                <Mode Name="IN11">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="IN11"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN12">
            <ModeLogicOperator Name="OR">
                <Mode Name="IN12">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="IN12"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN13">
            <ModeLogicOperator Name="OR">
                <Mode Name="IN13">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="IN13"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN14">
            <ModeLogicOperator Name="OR">
                <Mode Name="IN14">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="IN14"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN15">
            <ModeLogicOperator Name="OR">
                <Mode Name="IN15">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="IN15"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <!-- Internal channels -->
        <Mode Name="IN-TempSens" UserName="Temperature Sensor Channel" RemoveCondition="STM32L0x0_Value_Line">
            <ModeLogicOperator Name="XOR">
                <Mode Name="IN-TempSens" UserName="Single-ended">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="TempSens_Input"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN-Vrefint" UserName="Vrefint Channel">
            <ModeLogicOperator Name="XOR">
                <Mode Name="IN-Vrefint" UserName="Vrefint Channel">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="Vref_Input"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <Mode Name="IN-Vlcd" RemoveCondition="!(LCD_Exist)" UserName="Vlcd Channel">
            <ModeLogicOperator Name="XOR">
                <Mode Name="IN-Vlcd" UserName="Vlcd Channel">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="Vlcd_Input"/>
                    </SignalLogicalOp>
                    <Condition Diagnostic="LCD should be Enabled" Expression="LCD_USED"/>
                </Mode>           
            </ModeLogicOperator>          
            <Semaphore>channelSelected</Semaphore>
        </Mode>
        <!-- Trigger -->
        <Mode Name="External-Trigger-for-Regular-conversion" UserName="Regular EXTI Conversion Trigger">
            <ModeLogicOperator Name="OR">
                <Mode Name="External-Trigger-for-Regular-conversion" UserName="Regular Conversion Trigger">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="EXTI11"/>
                    </SignalLogicalOp>
                    <Semaphore>RegularExternalTrigger</Semaphore>
                    <Condition Diagnostic="Available only if at least one channel is selected" Expression="channelSelected"/>
                </Mode>
            </ModeLogicOperator>
        </Mode>
    </ModeLogicOperator>
    <Semaphore>$IpInstance_USED</Semaphore>

    <RefSignal IOMode="EXTI" Name="EXTI11" ShareableGroupName="GPXTI11"/>
    <RefSignal IOMode="Analog" Name="IN0"/>
    <RefSignal IOMode="Analog" Name="IN1"/>
    <RefSignal IOMode="Analog" Name="IN2"/>
    <RefSignal IOMode="Analog" Name="IN3"/>
    <RefSignal IOMode="Analog" Name="IN4"/>
    <RefSignal IOMode="Analog" Name="IN5"/>
    <RefSignal IOMode="Analog" Name="IN6"/>
    <RefSignal IOMode="Analog" Name="IN7"/>
    <RefSignal IOMode="Analog" Name="IN8"/>
    <RefSignal IOMode="Analog" Name="IN9"/>
    <RefSignal IOMode="Analog" Name="IN10"/>
    <RefSignal IOMode="Analog" Name="IN11"/>
    <RefSignal IOMode="Analog" Name="IN12"/>
    <RefSignal IOMode="Analog" Name="IN13"/>
    <RefSignal IOMode="Analog" Name="IN14"/>
    <RefSignal IOMode="Analog" Name="IN15"/>
    <RefSignal IOMode="Analog" Name="TempSens_Input" Virtual="true"/>
    <RefSignal IOMode="Analog" Name="Vref_Input" Virtual="true"/>
    <RefSignal IOMode="Analog" Name="Vlcd_Input" Virtual="true"/>
</IP>