<?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="V4.0" IPType="peripheral" Name="COMP" Version="TSMC90_Cube" ns0:schemaLocation="http://mcd.rou.st.com/modules.php?name=mcu ../../../../../../../doc/V4/Development/Specifications/db/IP_Modes.xsd">
	<About>COMP: Comparator</About>

	
	<!-- Pinout Parameters for COMP 1/2/3/4/5/6/7 for MantaEdge (F302/303/358). Already selected on Pinout TreeView -->
	<RefParameter Comment="Inverting Input" DefaultValue="COMP_INPUT_MINUS_IO1" Group="Pinout Parameters" Name="InvertingInput" Type="list" Visible="false">
		<Condition Diagnostic="" Expression="((PB1_COMP1_INM  &amp; ($IpNumber=1)) | (PB3_COMP2_INM  &amp; ($IpNumber=2)))"/>
		<PossibleValue Comment="I/O1 (PB1/PB3)" Value="COMP_INPUT_MINUS_IO1"/>
	</RefParameter>
	<RefParameter Comment="Inverting Input" DefaultValue="COMP_INPUT_MINUS_IO2" Group="Pinout Parameters" Name="InvertingInput" Type="list" Visible="false">
		<Condition Diagnostic="" Expression="((PC4_COMP1_INM  &amp; ($IpNumber=1)) | (PB7_COMP2_INM &amp; ($IpNumber=2)))"/>
		<PossibleValue Comment="I/O2 (PC4/PB7)" Value="COMP_INPUT_MINUS_IO2"/>
	</RefParameter>
	<RefParameter Comment="Inverting Input" DefaultValue="COMP_INPUT_MINUS_IO3" Group="Pinout Parameters" Name="InvertingInput" Type="list" Visible="false">
		<Condition Diagnostic="" Expression="((PA0_COMP1_INM  &amp; ($IpNumber=1)) | (PA2_COMP2_INM &amp; ($IpNumber=2)))"/>
		<PossibleValue Comment="I/O3 (PC4/PB7)" Value="COMP_INPUT_MINUS_IO3"/>
	</RefParameter>
	<RefParameter Comment="Inverting Input" DefaultValue="COMP_INPUT_MINUS_IO4" Group="Pinout Parameters" Name="InvertingInput" Type="list" Visible="false">
		<Condition Diagnostic="" Expression="((PA4_COMP1_INM  &amp; ($IpNumber=1)) | (PA4_COMP2_INM &amp; ($IpNumber=2)))"/>
		<PossibleValue Comment="I/O4 (PC4/PB7)" Value="COMP_INPUT_MINUS_IO4"/>
	</RefParameter>
	<RefParameter Comment="Inverting Input" DefaultValue="COMP_INPUT_MINUS_IO5" Group="Pinout Parameters" Name="InvertingInput" Type="list" Visible="false">
		<Condition Diagnostic="" Expression="((PA5_COMP1_INM  &amp; ($IpNumber=1)) | (PA5_COMP2_INM &amp; ($IpNumber=2)))"/>
		<PossibleValue Comment="I/O5 (PC4/PB7)" Value="COMP_INPUT_MINUS_IO5"/>
	</RefParameter>
	<RefParameter Comment="Inverting Input" DefaultValue="COMP_INPUT_MINUS_DAC1_CH1" Group="Pinout Parameters" Name="InvertingInput" Type="list" Visible="false">
		<Condition Diagnostic="" Expression="$IpInstance_DACChannel1"/>
		<PossibleValue Comment="DAC Channel1" Value="COMP_INPUT_MINUS_DAC1_CH1"/>
	</RefParameter>
	<RefParameter Comment="Inverting Input" DefaultValue="COMP_INPUT_MINUS_DAC1_CH2" Group="Pinout Parameters" Name="InvertingInput" Type="list" Visible="false">
		<Condition Diagnostic="" Expression="$IpInstance_DACChannel2"/>
		<PossibleValue Comment="DAC Channel2" Value="COMP_INPUT_MINUS_DAC1_CH2"/>
	</RefParameter>
	<RefParameter Comment="Inverting Input" DefaultValue="COMP_INPUT_MINUS_1_4VREFINT" Group="Pinout Parameters" Name="InvertingInput" Type="list" Visible="false">
		<Condition Diagnostic="" Expression="$IpInstance_Vref14"/>
                <PossibleValue Comment="1/4 VREFINT connected to comparator inverting input " Value="COMP_INPUT_MINUS_1_4VREFINT"/>
	</RefParameter>
	<RefParameter Comment="Inverting Input" DefaultValue="COMP_INPUT_MINUS_1_2VREFINT" Group="Pinout Parameters" Name="InvertingInput" Type="list" Visible="false">
		<Condition Diagnostic="" Expression="$IpInstance_Vref12"/>
        <PossibleValue Comment="1/2 VREFINT connected to comparator inverting input " Value="COMP_INPUT_MINUS_1_2VREFINT"/>
	</RefParameter>
	<RefParameter Comment="Inverting Input" DefaultValue="COMP_INPUT_MINUS_3_4VREFINT" Group="Pinout Parameters" Name="InvertingInput" Type="list" Visible="false">
		<Condition Diagnostic="" Expression="$IpInstance_Vref34"/>
        <PossibleValue Comment="3/4 VREFINT connected to comparator inverting input " Value="COMP_INPUT_MINUS_3_4VREFINT"/>
	</RefParameter>
	<RefParameter Comment="Inverting Input" DefaultValue="COMP_INPUT_MINUS_VREFINT" Group="Pinout Parameters" Name="InvertingInput" Type="list" Visible="false">
		<Condition Diagnostic="" Expression="$IpInstance_Vref"/>
                <PossibleValue Comment="VREFINT connected to comparator1 inverting input " Value="COMP_INPUT_MINUS_VREFINT"/>
	</RefParameter>
	<RefParameter Comment="Inverting Input" DefaultValue="COMP_INPUT_MINUS_1_4VREFINT" Group="Pinout Parameters" Name="InvertingInput" Type="list" Visible="false">
<!-- if input neg is disabled then generate the code with a quarter of Vref that is reset value --> 
                <PossibleValue Comment="parameter not set in CubeMx interface" Value="COMP_INPUT_MINUS_1_4VREFINT"/>
	</RefParameter>


	<RefParameter Comment="Non Inverting Input" DefaultValue="COMP_INPUT_PLUS_IO1" Group="Pinout Parameters" Name="NonInvertingInput" Type="list" Visible="false">
		<Condition Diagnostic="" Expression="((PC5_COMP1_INP  &amp; ($IpNumber=1))|((PB4_COMP2_INP|Semaphore_WindowMode_COMP2_Enable ) &amp; ($IpNumber=2)))"/>
		<PossibleValue Comment="" Value="COMP_INPUT_PLUS_IO1"/>
	</RefParameter>
	<RefParameter Comment="Non Inverting Input" DefaultValue="COMP_INPUT_PLUS_IO2" Group="Pinout Parameters" Name="NonInvertingInput" Type="list" Visible="false">
		<Condition Diagnostic="" Expression="((PB2_COMP1_INP  &amp; ($IpNumber=1))|(PB6_COMP2_INP  &amp; ($IpNumber=2)))"/>
		<PossibleValue Comment="" Value="COMP_INPUT_PLUS_IO2"/>
	</RefParameter>
	<RefParameter Comment="Non Inverting Input" DefaultValue="COMP_INPUT_PLUS_IO3" Group="Pinout Parameters" Name="NonInvertingInput" Type="list" Visible="false">
		<Condition Diagnostic="" Expression="((PA1_COMP1_INP  &amp; ($IpNumber=1))|(PA3_COMP2_INP  &amp; ($IpNumber=2)))"/>
		<PossibleValue Comment="" Value="COMP_INPUT_PLUS_IO3"/>
	</RefParameter>

	<RefParameter Comment="Window Mode" DefaultValue="COMP_WINDOWMODE_DISABLE" Group="Pinout Parameters" Name="WindowMode" Type="list" Visible="false">
            <PossibleValue Comment="Window mode disabled (Plus input of comparator 1 connected to PC5/PB2) " Value="COMP_WINDOWMODE_DISABLE"/>
            <PossibleValue Comment="Window mode enabled: Plus input of comparator 1 shorted with Plus input of comparator 2 " Value="COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON"/>
	</RefParameter>


	
	<!-- Basic Parameters -->

	<RefParameter Comment="Speed / Power Mode" DefaultValue="COMP_POWERMODE_HIGHSPEED" Group="Basic Parameters" Name="Mode" Type="list">
            <PossibleValue Comment="High Speed " Value="COMP_POWERMODE_HIGHSPEED"/>
            <PossibleValue Comment="Medium Speed " Value="COMP_POWERMODE_MEDIUMSPEED"/>
            <PossibleValue Comment="Ultra-low power mode " Value="COMP_POWERMODE_ULTRALOWPOWER"/>
	</RefParameter>
	
	<RefParameter Comment="Trigger Mode" DefaultValue="COMP_TRIGGERMODE_NONE" Group="Basic Parameters" Name="TriggerMode" Type="list">
		<PossibleValue Comment="None" Value="COMP_TRIGGERMODE_NONE"/>
		<PossibleValue Comment="Rising Edge Interrupt" Semaphore="$IpInstance_EXTI_IT_ENABLED" Value="COMP_TRIGGERMODE_IT_RISING"/>
		<PossibleValue Comment="Falling Edge Interrupt" Semaphore="$IpInstance_EXTI_IT_ENABLED" Value="COMP_TRIGGERMODE_IT_FALLING"/>
		<PossibleValue Comment="Rising/Falling Edge Interrupt" Semaphore="$IpInstance_EXTI_IT_ENABLED" Value="COMP_TRIGGERMODE_IT_RISING_FALLING"/>
		<PossibleValue Comment="Rising Edge Event" Value="COMP_TRIGGERMODE_EVENT_RISING"/>
		<PossibleValue Comment="Falling Edge Event" Value="COMP_TRIGGERMODE_EVENT_FALLING"/>
		<PossibleValue Comment="Rising/Falling Edge Event" Value="COMP_TRIGGERMODE_EVENT_RISING_FALLING"/>
	</RefParameter>
	
	<!-- Hysteresis Level -->
	<RefParameter Comment="Hysteresis Level" DefaultValue="COMP_HYSTERESIS_NONE" Group="Basic Parameters" Name="Hysteresis" Type="list">
		<PossibleValue Comment="None" Value="COMP_HYSTERESIS_NONE"/>
		<PossibleValue Comment="Low" Value="COMP_HYSTERESIS_LOW"/>
		<PossibleValue Comment="Medium" Value="COMP_HYSTERESIS_MEDIUM"/>
		<PossibleValue Comment="High" Value="COMP_HYSTERESIS_HIGH"/>
	</RefParameter>
		
	<!-- Blanking Sources. -->
	<RefParameter Comment="Blanking Source" DefaultValue="COMP_BLANKINGSRC_NONE" Group="Output Configuration" Name="BlankingSrce" Type="list">
		<Condition Diagnostic="" Expression="($IpNumber=1) &amp; !DIE435"/>
		<PossibleValue Comment="None" Value="COMP_BLANKINGSRC_NONE"/>
		<PossibleValue Action="Disable" Comment="Timer 1 Output Compare 5" Condition="!Semaphore_output_Channel5TIM1" Diagnostic="Need to activate Timer 1 Channel 5 in an 'Output Compare' Mode." Value="COMP_BLANKINGSRC_TIM1_OC5_COMP1"/>
		<PossibleValue Action="Disable" Comment="Timer 2 Output Compare 3" Condition="!Semaphore_output_Channel3TIM2" Diagnostic="Need to activate Timer 2 Channel 3 in an 'Output Compare' Mode." Value="COMP_BLANKINGSRC_TIM2_OC3_COMP1"/>
		<PossibleValue Action="Disable" Comment="Timer 3 Output Compare 3" Condition="!Semaphore_output_Channel3TIM3" Diagnostic="Need to activate Timer 3 Channel 3 in an 'Output Compare' Mode." Value="COMP_BLANKINGSRC_TIM3_OC3_COMP1"/>
	</RefParameter>
	<RefParameter Comment="Blanking Source" DefaultValue="COMP_BLANKINGSRC_NONE" Group="Output Configuration" Name="BlankingSrce" Type="list">
		<Condition Diagnostic="" Expression="($IpNumber=1) &amp; DIE435"/>
		<PossibleValue Comment="None" Value="COMP_BLANKINGSRC_NONE"/>
		<PossibleValue Action="Disable" Comment="Timer 1 Output Compare 5" Condition="!Semaphore_output_Channel5TIM1" Diagnostic="Need to activate Timer 1 Channel 5 in an 'Output Compare' Mode." Value="COMP_BLANKINGSRC_TIM1_OC5_COMP1"/>
		<PossibleValue Action="Disable" Comment="Timer 2 Output Compare 3" Condition="!Semaphore_output_Channel3TIM2" Diagnostic="Need to activate Timer 2 Channel 3 in an 'Output Compare' Mode." Value="COMP_BLANKINGSRC_TIM2_OC3_COMP1"/>
	</RefParameter>

	<RefParameter Comment="Blanking Source" DefaultValue="COMP_BLANKINGSRC_NONE" Group="Output Configuration" Name="BlankingSrce" Type="list">
		<Condition Diagnostic="" Expression="($IpNumber=2) &amp; !DIE435"/>
		<PossibleValue Comment="None" Value="COMP_BLANKINGSRC_NONE"/>
		<PossibleValue Action="Disable" Comment="Timer 3 Output Compare 4" Condition="!Semaphore_output_Channel4TIM3" Diagnostic="Need to activate Timer 3 Channel 4 in an 'Output Compare' Mode." Value="COMP_BLANKINGSRC_TIM3_OC4_COMP2"/>
		<PossibleValue Action="Disable" Comment="Timer 8 Output Compare 5" Condition="!Semaphore_output_Channel5TIM8" Diagnostic="Need to activate Timer 8 Channel 5 in an 'Output Compare' Mode." Value="COMP_BLANKINGSRC_TIM8_OC5_COMP2"/>
		<PossibleValue Action="Disable" Comment="Timer 15 Output Compare 1" Condition="!Semaphore_output_Channel1TIM15" Diagnostic="Need to activate Timer 15 Channel 1 in an 'Output Compare' Mode." Value="COMP_BLANKINGSRC_TIM15_OC1_COMP2"/>
	</RefParameter>
	<RefParameter Comment="Blanking Source" DefaultValue="COMP_BLANKINGSRC_NONE" Group="Output Configuration" Name="BlankingSrce" Type="list">
		<Condition Diagnostic="" Expression="($IpNumber=2) &amp; DIE435"/>
		<PossibleValue Comment="None" Value="COMP_BLANKINGSRC_NONE"/>
		<PossibleValue Action="Disable" Comment="Timer 15 Output Compare 1" Condition="!Semaphore_output_Channel1TIM15" Diagnostic="Need to activate Timer 15 Channel 1 in an 'Output Compare' Mode." Value="COMP_BLANKINGSRC_TIM15_OC1_COMP2"/>
	</RefParameter>	
	
    <RefParameter Comment="Output Pol" DefaultValue="COMP_OUTPUTPOL_NONINVERTED" Group="Output Configuration" Name="OutputPol" Type="list">
             <PossibleValue Comment="COMP output on GPIO isn't inverted " Value="COMP_OUTPUTPOL_NONINVERTED"/>
        <PossibleValue Comment="COMP output on GPIO is inverted " Value="COMP_OUTPUTPOL_INVERTED"/>
    </RefParameter>
	
	

	<!-- InputPlus is the default Mode -->
	<RefMode Abstract="true" Name="InputPlus_BaseMode">
		<ConfigForMode>Comp_Init</ConfigForMode>
		<Parameter Name="Mode"/>
		<Parameter Name="TriggerMode"/>
		<Parameter Name="Hysteresis"/>
		<Parameter Name="BlankingSrce"/>
		<Parameter Name="OutputPol"/>
	</RefMode>
	
	
	<!-- 'Non-Inverting Input' RefModes list -->
	<RefMode BaseMode="InputPlus_BaseMode" Name="INP">
		<Parameter Name="NonInvertingInput"/>
	</RefMode>
	

	<!-- 'Window Mode' RefMode-->
	<RefMode BaseMode="InputPlus_BaseMode" Name="WindowMode">
		<Parameter Name="WindowMode">
			<PossibleValue>COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON</PossibleValue>
		</Parameter>
	</RefMode>


	<!-- 'Inverting Input' RefModes list -->
	<RefMode Name="INM">
		<Parameter Name="InvertingInput"/>
	</RefMode>
	<RefMode Name="VREFINT">
		<Parameter Name="InvertingInput">
			<PossibleValue>COMP_INPUT_MINUS_VREFINT</PossibleValue>
		</Parameter>	
	</RefMode>
	<RefMode Name="VREFINT_34">
		<Parameter Name="InvertingInput">
			<PossibleValue>COMP_INPUT_MINUS_3_4VREFINT</PossibleValue>
		</Parameter>	
	</RefMode>
	<RefMode Name="VREFINT_12">
		<Parameter Name="InvertingInput">
			<PossibleValue>COMP_INPUT_MINUS_1_2VREFINT</PossibleValue>
		</Parameter>	
	</RefMode>
	<RefMode Name="VREFINT_14">
		<Parameter Name="InvertingInput">
			<PossibleValue>COMP_INPUT_MINUS_1_4VREFINT</PossibleValue>
		</Parameter>	
	</RefMode>
	<RefMode Name="INM_DACOUT1">
		<Parameter Name="InvertingInput">
			<PossibleValue>COMP_INPUT_MINUS_DAC1_CH1</PossibleValue>
		</Parameter>	
	</RefMode>
	<RefMode Name="INM_DACOUT2">
		<Parameter Name="InvertingInput">
			<PossibleValue>COMP_INPUT_MINUS_DAC1_CH2</PossibleValue>
		</Parameter>	
	</RefMode>

	
	
	<!-- Modes for COMP. Defined for MantaEdge (F302/303/358) -->
	<ModeLogicOperator Name="OR">
		<Mode Name="InputPlus" UserName="Input [+]">
			<ModeLogicOperator Name="XOR">
				<Mode Name="INP" ShrinkName="Input [+] : INP" UserName="INP">
					<SignalLogicalOp Name="AND">
						<Signal Name="INP"/>
					</SignalLogicalOp>
					<Semaphore>$IpInstance_ExternalInputPlus</Semaphore>
	                                <Semaphore>Semaphore_$IpInstance_Enable</Semaphore>
				</Mode>
			
				<Mode Name="WindowMode" RemoveCondition="($IpNumber=1)" UserName="Window Mode">
					<SignalLogicalOp Name="AND">
						<Signal Name="VS_WindowMode"/>
					</SignalLogicalOp>
	                                <Semaphore>Semaphore_$IpInstance_Enable</Semaphore>
	                                <Semaphore>Semaphore_WindowMode_$IpInstance_Enable</Semaphore>
					<Condition Diagnostic="Need to have an INP (External Input [+]) on previous Comparator" Expression="(($IpNumber=2) &amp; COMP1_ExternalInputPlus)"/>
				</Mode>
			</ModeLogicOperator>
			<Semaphore>$IpInstance_InputPlus</Semaphore>

		</Mode>
		
		<Mode Name="InputNeg" UserName="Input [-]">
			<ModeLogicOperator Name="XOR">
				<Mode Name="INM" UserName="INM">
					<SignalLogicalOp Name="AND">
						<Signal Name="INM"/>
					</SignalLogicalOp>
				</Mode>
				<!-- Used if only one DAC -->
				<Mode Name="INM_DACOUT1" UserName="DAC OUT1">
                                       <Semaphore>$IpInstance_DACChannel1</Semaphore>
					<SignalLogicalOp Name="AND">
						<Signal Name="VS_DACOUT1"/>
					</SignalLogicalOp>
					<Condition Diagnostic="Need to have 'DAC Out 1' with internal connection activated" Expression="(DAC1_OUT1_ExtAndInt | DAC1_OUT1_Int)"/>
				</Mode>
				<Mode Name="INM_DACOUT2" UserName="DAC OUT2">
                                       <Semaphore>$IpInstance_DACChannel2</Semaphore>
					<SignalLogicalOp Name="AND">
						<Signal Name="VS_DACOUT2"/>
					</SignalLogicalOp>
					<Condition Diagnostic="Need to have an 'DAC Out 2' with internal connection activated" Expression="(DAC1_OUT2_ExtAndInt | DAC1_OUT2_Int)"/>
				</Mode>
			
				<Mode Name="VREFINT" UserName="Internal VRef">
                                       <Semaphore>$IpInstance_Vref</Semaphore>
					<SignalLogicalOp Name="AND">
						<Signal Name="VS_VREFINT"/>
					</SignalLogicalOp>
				</Mode>
				<Mode Name="VREFINT_34" UserName="3/4 Internal VRef">
                                       <Semaphore>$IpInstance_Vref34</Semaphore>
					<SignalLogicalOp Name="AND">
						<Signal Name="VS_VREFINT34"/>
					</SignalLogicalOp>
				</Mode>
				<Mode Name="VREFINT_12" UserName="1/2 Internal VRef">
                                       <Semaphore>$IpInstance_Vref12</Semaphore>
					<SignalLogicalOp Name="AND">
						<Signal Name="VS_VREFINT12"/>
					</SignalLogicalOp>
				</Mode>
				<Mode Name="VREFINT_14" UserName="1/4 Internal VRef">
                                       <Semaphore>$IpInstance_Vref14</Semaphore>
					<SignalLogicalOp Name="AND">
						<Signal Name="VS_VREFINT14"/>
					</SignalLogicalOp>
				</Mode>
			</ModeLogicOperator>
			<Condition Diagnostic="Need to have an INP (External Input [+]) activated" Expression="$IpInstance_InputPlus"/>
		</Mode>
		
		<Mode Name="ExternalOutput">
                   <ModeLogicOperator Name="OR">
				<Mode Name="ExternalOutput" UserName="External Output">
					<SignalLogicalOp Name="AND">
                                     	    <Signal Name="OUT"/>
 					</SignalLogicalOp>
				</Mode>
                        </ModeLogicOperator>
			<Condition Diagnostic="Need to have an INP (External Input [+]) activated" Expression="$IpInstance_InputPlus"/>
		</Mode>
                <Mode Name="ExternalOutputTIM1BKIN" UserName="External Output to TIM1 BKIN">
                   <ModeLogicOperator Name="OR">
				<Mode Name="ExternalOutput_TIM1BKIN">
	                                <Semaphore>Semaphore_$IpInstance_ExternalOutputTIM1BKIN</Semaphore>
					<SignalLogicalOp Name="AND">
	                                        <Signal Name="$SingleInstanceTIM1_BKIN_$IpInstance"/>
					</SignalLogicalOp>
		               </Mode>
                        </ModeLogicOperator>
			<Condition Diagnostic="Need to have an INP (External Input [+]) activated" Expression="$IpInstance_InputPlus"/>
		</Mode>
                 <Mode Name="ExternalOutputTIM1BKIN2" UserName="External Output to TIM1 BKIN2">
                   <ModeLogicOperator Name="OR">
				<Mode Name="ExternalOutput_TIM1BKIN2">
	                                <Semaphore>Semaphore_$IpInstance_ExternalOutputTIM1BKIN2</Semaphore>
					<SignalLogicalOp Name="AND">
	                                        <Signal Name="$SingleInstanceTIM1_BKIN2_$IpInstance"/>
					</SignalLogicalOp>
		               </Mode>
                        </ModeLogicOperator>
			<Condition Diagnostic="Need to have an INP (External Input [+]) activated" Expression="$IpInstance_InputPlus"/>
    	       </Mode>
               <Mode Name="ExternalOutputTIM8BKIN" UserName="External Output to TIM8 BKIN">
                   <ModeLogicOperator Name="OR">
               <Mode Name="ExternalOutput_TIM8BKIN">
	                                <Semaphore>Semaphore_$IpInstance_ExternalOutputTIM8BKIN</Semaphore>
					<SignalLogicalOp Name="AND">
	                                        <Signal Name="$SingleInstanceTIM8_BKIN_$IpInstance"/>
					</SignalLogicalOp>
		               </Mode>
                        </ModeLogicOperator>
			<Condition Diagnostic="Need to have an INP (External Input [+]) activated" Expression="$IpInstance_InputPlus"/>
		</Mode>
                <Mode Name="ExternalOutputTIM8BKIN2" UserName="External Output to TIM8 BKIN2">
                   <ModeLogicOperator Name="OR">
                <Mode Name="ExternalOutput_TIM8BKIN2">
	                                <Semaphore>Semaphore_$IpInstance_ExternalOutputTIM8BKIN2</Semaphore>
					<SignalLogicalOp Name="AND">
	                                        <Signal Name="$SingleInstanceTIM8_BKIN2_$IpInstance"/>
					</SignalLogicalOp>
				</Mode>
                        </ModeLogicOperator>
			<Condition Diagnostic="Need to have an INP (External Input [+]) activated" Expression="$IpInstance_InputPlus"/>
               </Mode>
	</ModeLogicOperator>

	
	<!-- Signals for COMP. -->
	<RefSignal IOMode="Analog" Name="INP"/>
	<RefSignal IOMode="Analog" Name="INM"/>
	<RefSignal IOMode="AlternateFunctionPushPull" Name="OUT"/>
	<RefSignal IOMode="AlternateFunctionOpenDrainAndPushPullDefaultPP" Name="$SingleInstanceTIM8_BKIN_$IpInstance"/>
	<RefSignal IOMode="AlternateFunctionOpenDrainAndPushPullDefaultPP" Name="$SingleInstanceTIM8_BKIN2_$IpInstance"/>
	<RefSignal IOMode="AlternateFunctionOpenDrainAndPushPullDefaultPP" Name="$SingleInstanceTIM1_BKIN_$IpInstance"/>
	<RefSignal IOMode="AlternateFunctionOpenDrainAndPushPullDefaultPP" Name="$SingleInstanceTIM1_BKIN2_$IpInstance"/>
	<RefSignal Name="VS_WindowMode" Virtual="true"/>
	<RefSignal Name="VS_Switch" Virtual="true"/>
	<RefSignal Name="VS_VREFINT" Virtual="true"/>
	<RefSignal Name="VS_VREFINT34" Virtual="true"/>
	<RefSignal Name="VS_VREFINT12" Virtual="true"/>
	<RefSignal Name="VS_VREFINT14" Virtual="true"/>
	<RefSignal Name="VS_DACOUT1" Virtual="true"/>
	<RefSignal Name="VS_DACOUT2" Virtual="true"/>

	
	<!-- Semaphore for COMP -->
	<Semaphore>$IpInstance</Semaphore>
</IP>