<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<IP DBVersion="V3.0" IPType="peripheral" Name="IRTIM" Version="G0xx_irtim_v1_0_Cube" xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance" ns0:schemaLocation="http://mcd.rou.st.com/modules.php?name=mcu ../../db/IP_Modes_V3_0.xsd" xmlns="http://mcd.rou.st.com/modules.php?name=mcu">

	<!-- Description of IP. -->
	<About>Infrared Interface</About>

	<RefParameter Name="Instance" DefaultValue="IRTIM" Comment="Instance" Type="" Visible="false"/>


    <RefParameter Name="Polarity" DefaultValue="HAL_SYSCFG_IRDA_POLARITY_NOT_INVERTED" Comment="output polarity" Type="list" Visible="true">
    <!--<PossibleValue Comment="Polarity not inverted" Value="__NULL"/>-->
        <PossibleValue Comment="Polarity not inverted" Value="HAL_SYSCFG_IRDA_POLARITY_NOT_INVERTED"/>
        <PossibleValue Comment="Polarity inverted"     Value="HAL_SYSCFG_IRDA_POLARITY_INVERTED"/>
    </RefParameter>

    <RefParameter Name="InputSelection" DefaultValue="HAL_SYSCFG_IRDA_ENV_SEL_TIM16" Comment="IR Modulation Envelope signal selection" Type="list" Visible="true">
    <Condition Diagnostic="" Expression="DIE460|DIE467"/>
        <PossibleValue Comment="TIM16"  Value="HAL_SYSCFG_IRDA_ENV_SEL_TIM16"  Condition="!(Semaphore_ActivatedTIM16 &amp;Semaphore_output_Channel1TIM16 &amp; Semaphore_ActivatedTIM17 &amp;Semaphore_output_Channel1TIM17)" Action="Disable" Diagnostic="Channel 1 of TIM16 and TIM17 must be configured in one of the availables output modes"/>
        <PossibleValue Comment="USART1" Value="HAL_SYSCFG_IRDA_ENV_SEL_USART1" Condition="!(USART1Used_ForRCC &amp; Semaphore_ActivatedTIM17 &amp;Semaphore_output_Channel1TIM17)"                    Action="Disable" Diagnostic="Channel 1 of TIM17 must be configured in one of the availables output modes, and USART1 must be activated"/>
        <PossibleValue Comment="USART4" Value="HAL_SYSCFG_IRDA_ENV_SEL_USART4" Condition="!(USART4Used_ForRCC &amp; Semaphore_ActivatedTIM17 &amp;Semaphore_output_Channel1TIM17)"                    Action="Disable" Diagnostic="Channel 1 of TIM17 and USART4 must be configured in one of the availables output modes, and USART4 must be activated"/>
    </RefParameter>

    <RefParameter Name="InputSelection" DefaultValue="HAL_SYSCFG_IRDA_ENV_SEL_TIM16" Comment="IR Modulation Envelope signal selection" Type="list" Visible="true">
    <Condition Diagnostic="" Expression="DIE466"/>
        <PossibleValue Comment="TIM16"  Value="HAL_SYSCFG_IRDA_ENV_SEL_TIM16"  Condition="!(Semaphore_ActivatedTIM16 &amp;Semaphore_output_Channel1TIM16 &amp; Semaphore_ActivatedTIM17 &amp;Semaphore_output_Channel1TIM17)" Action="Disable" Diagnostic="Channel 1 of TIM16 and TIM17 must be configured in one of the availables output modes"/>
        <PossibleValue Comment="USART1" Value="HAL_SYSCFG_IRDA_ENV_SEL_USART1" Condition="!(USART1Used_ForRCC &amp; Semaphore_ActivatedTIM17 &amp;Semaphore_output_Channel1TIM17)"                    Action="Disable" Diagnostic="Channel 1 of TIM17 must be configured in one of the availables output modes, and USART1 must be activated"/>
        <PossibleValue Comment="USART2" Value="HAL_SYSCFG_IRDA_ENV_SEL_USART2" Condition="!(USART2Used_ForRCC &amp; Semaphore_ActivatedTIM17 &amp;Semaphore_output_Channel1TIM17)"                    Action="Disable" Diagnostic="Channel 1 of TIM17 and USART2 must be configured in one of the availables output modes, and USART2 must be activated"/>
    </RefParameter>

    <!-- RefModes  -->
	<RefMode Name="INFRARED">
		<ConfigForMode>IRTIM_Init</ConfigForMode>
        <Parameter Name="Polarity"/>
        <Parameter Name="InputSelection"/>
	</RefMode>

	<ModeLogicOperator Name="OR">
		<Mode Name="Activate">
            <Condition Expression="((Semaphore_ActivatedTIM16 &amp;Semaphore_output_Channel1TIM16)|(USART1Used_ForRCC)|(USART4Used_ForRCC) )&amp; Semaphore_ActivatedTIM17 &amp;Semaphore_output_Channel1TIM17" Diagnostic="Channel 1 of TIM16 and TIM17 must be configured in one of the availables output modes"/>
			<ModeLogicOperator Name="XOR">
				<Mode Name="INFRARED">
					<SignalLogicalOp Name="AND">
						<Signal Name="$SingleInstanceIR_OUT"/>
					</SignalLogicalOp>
				</Mode>
			</ModeLogicOperator>
		</Mode>
	</ModeLogicOperator>
	<RefSignal IOMode="AlternateFunctionOpenDrainAndPushPullDefaultPP" Name="$SingleInstanceIR_OUT"/>
</IP>
