<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<IP xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://mcd.rou.st.com/modules.php?name=mcu" DBVersion="V4.0" Name="LPTIM" Version="G4_lptimer1_v1_4_Cube" IPType="peripheral" ns0:schemaLocation="http://mcd.rou.st.com/modules.php?name=mcu ../../../../../../../doc/V4/Development/Specifications/db/IP_Modes.xsd">
  <About>LPTIM: Low Power Timer</About>
    <RefParameter Comment="Clock Source" DefaultValue="LPTIM_CLOCKSOURCE_APBCLOCK_LPOSC" Name="ClockSource" Type="list" Visible="false">
        <Condition Diagnostic="Internal Clock Selected" Expression="Semaphore_CounterInternalClk$IpInstance|Semaphore_CounterExternalClk_synchro$IpInstance|Semaphore_Encoder$IpInstance"/>
        <PossibleValue Comment="Clocksource Apbclock Lposc" Value="LPTIM_CLOCKSOURCE_APBCLOCK_LPOSC"/>
    </RefParameter>
    <RefParameter Comment="Clock Source" DefaultValue="LPTIM_CLOCKSOURCE_ULPTIM" Name="ClockSource" Type="list" Visible="false">
        <Condition Diagnostic="External Clock Selected" Expression="Semaphore_CounterExternalClk_standalone$IpInstance"/>
        <PossibleValue Comment="Clocksource Ulptim" Value="LPTIM_CLOCKSOURCE_ULPTIM"/>
    </RefParameter>
    <RefParameter Comment="Clock Prescaler" DefaultValue="LPTIM_PRESCALER_DIV1" Name="ClockPrescaler" Type="list" Group="Clock">
        <Condition Diagnostic="Internal or External clock Selected" Expression="Semaphore_CounterExternalClk_standalone$IpInstance|Semaphore_CounterInternalClk$IpInstance"/>
        <PossibleValue Comment="Prescaler Div1" Value="LPTIM_PRESCALER_DIV1"/>
        <PossibleValue Comment="Prescaler Div2" Value="LPTIM_PRESCALER_DIV2"/>
        <PossibleValue Comment="Prescaler Div4" Value="LPTIM_PRESCALER_DIV4"/>
        <PossibleValue Comment="Prescaler Div8" Value="LPTIM_PRESCALER_DIV8"/>
        <PossibleValue Comment="Prescaler Div16" Value="LPTIM_PRESCALER_DIV16"/>
        <PossibleValue Comment="Prescaler Div32" Value="LPTIM_PRESCALER_DIV32"/>
        <PossibleValue Comment="Prescaler Div64" Value="LPTIM_PRESCALER_DIV64"/>
        <PossibleValue Comment="Prescaler Div128" Value="LPTIM_PRESCALER_DIV128"/>
    </RefParameter>
    <RefParameter Comment="Clock Prescaler" DefaultValue="LPTIM_PRESCALER_DIV1" Name="ClockPrescaler" Type="list" Group="Clock" Visible="false">
        <Condition Diagnostic="Internal or External clock Selected" Expression="!(Semaphore_CounterExternalClk_standalone$IpInstance|Semaphore_CounterInternalClk$IpInstance)"/>
        <PossibleValue Comment="Prescaler Div1" Value="LPTIM_PRESCALER_DIV1"/>
    </RefParameter>
    <RefParameter Comment="ULP Clock Sample Time" DefaultValue="LPTIM_CLOCKSAMPLETIME_DIRECTTRANSITION" Name="ULPClockSampleTime" Type="list" Group="Clock">
        <Condition Diagnostic="" Expression="!Semaphore_CounterExternalClk_standalone$IpInstance &amp; !Semaphore_CounterInternalClk$IpInstance"/>
        <PossibleValue Comment="Direct Transition" Value="LPTIM_CLOCKSAMPLETIME_DIRECTTRANSITION"/>
        <PossibleValue Comment="2 Transitions" Value="LPTIM_CLOCKSAMPLETIME_2TRANSITIONS"/>
        <PossibleValue Comment="4 Transitions" Value="LPTIM_CLOCKSAMPLETIME_4TRANSITIONS"/>
        <PossibleValue Comment="8 Transitions" Value="LPTIM_CLOCKSAMPLETIME_8TRANSITIONS"/>
    </RefParameter>
    <RefParameter Comment="ULP Clock Sample Time" DefaultValue="LPTIM_CLOCKSAMPLETIME_DIRECTTRANSITION" Name="ULPClockSampleTime" Type="list" Group="Clock">
        <Condition Diagnostic="" Expression="Semaphore_CounterExternalClk_standalone$IpInstance"/>
        <PossibleValue Comment="Direct Transition" Value="LPTIM_CLOCKSAMPLETIME_DIRECTTRANSITION"/>
        <PossibleValue Comment="2 Transitions (requires internal clock)" Value="LPTIM_CLOCKSAMPLETIME_2TRANSITIONS"/>
        <PossibleValue Comment="4 Transitions (requires internal clock)" Value="LPTIM_CLOCKSAMPLETIME_4TRANSITIONS"/>
        <PossibleValue Comment="8 Transitions (requires internal clock)" Value="LPTIM_CLOCKSAMPLETIME_8TRANSITIONS"/>
    </RefParameter>
    <RefParameter Comment="ULP Clock Sample Time" DefaultValue="null" Name="ULPClockSampleTime" Type="list" Group="Clock" Visible="false">
        <Condition Diagnostic="" Expression="Semaphore_CounterInternalClk$IpInstance"/>
    </RefParameter>
    <RefParameter Comment="ULP Clock Polarity" DefaultValue="LPTIM_CLOCKPOLARITY_RISING" Name="ULPClockPolarity" Type="list" Group="Clock">
        <Condition Diagnostic="" Expression="!Semaphore_CounterInternalClk$IpInstance"/>
        <PossibleValue Comment="Rising Edge" Value="LPTIM_CLOCKPOLARITY_RISING"/>
        <PossibleValue Comment="Falling Edge" Value="LPTIM_CLOCKPOLARITY_FALLING"/>
        <PossibleValue Comment="Both Edges (Requires internal clock freq. > 4 x Fin1) " Value="LPTIM_CLOCKPOLARITY_RISING_FALLING"/>
    </RefParameter>
    <RefParameter Comment="ULP Clock Polarity" DefaultValue="null" Name="ULPClockPolarity" Type="list" Group="Clock" Visible="false">
        <Condition Diagnostic="" Expression="Semaphore_CounterInternalClk$IpInstance"/>
    </RefParameter>
<!-- trigger management -->
    <RefParameter Comment="Trigger Source" DefaultValue="LPTIM_TRIGSOURCE_0" Name="TriggerSource" Type="list" Group="Trigger">
        <Condition Diagnostic="External trigger is selected" Expression="Semaphore_ETR$IpInstance &amp; (DIE469 &amp; STM32G4x4)"/>
        <PossibleValue Comment="Software Trigger" Value="LPTIM_TRIGSOURCE_SOFTWARE" Semaphore="Semaphore_SWTrigger_$IpInstance"/>
        <PossibleValue Comment="LPTIM1_ETR IO" Value="LPTIM_TRIGSOURCE_0"/>
        <PossibleValue Comment="RTC Alarm A" Value="LPTIM_TRIGSOURCE_1"/>
        <PossibleValue Comment="RTC Alarm B" Value="LPTIM_TRIGSOURCE_2"/>
        <PossibleValue Comment="RTC TAMP1 Input Detection" Value="LPTIM_TRIGSOURCE_3"/>
        <PossibleValue Comment="RTC TAMP2 Input Detection" Value="LPTIM_TRIGSOURCE_4"/>
        <PossibleValue Comment="RTC TAMP3 Input Detection" Value="LPTIM_TRIGSOURCE_5"/>
        <PossibleValue Comment="COMP1 OUT" Value="LPTIM_TRIGSOURCE_6" Condition="!COMP1" Action="disable"/>
        <PossibleValue Comment="COMP2 OUT" Value="LPTIM_TRIGSOURCE_7" Condition="!COMP2" Action="disable"/>
        <PossibleValue Comment="COMP3 OUT" Value="LPTIM_TRIGSOURCE_8" Condition="!COMP3" Action="disable"/>
        <PossibleValue Comment="COMP4 OUT" Value="LPTIM_TRIGSOURCE_9" Condition="!COMP4" Action="disable"/>
        <PossibleValue Comment="COMP5 OUT" Value="LPTIM_TRIGSOURCE_10" Condition="!COMP5" Action="disable"/>
        <PossibleValue Comment="COMP6 OUT" Value="LPTIM_TRIGSOURCE_11" Condition="!COMP6" Action="disable"/>
        <PossibleValue Comment="COMP7 OUT" Value="LPTIM_TRIGSOURCE_12" Condition="!COMP7" Action="disable"/>
    </RefParameter>
    <RefParameter Comment="Trigger Source" DefaultValue="LPTIM_TRIGSOURCE_0" Name="TriggerSource" Type="list" Group="Trigger">
        <Condition Diagnostic="External trigger is selected" Expression="Semaphore_ETR$IpInstance &amp; !(DIE469 &amp; STM32G4x4)"/>
        <PossibleValue Comment="Software Trigger" Value="LPTIM_TRIGSOURCE_SOFTWARE" Semaphore="Semaphore_SWTrigger_$IpInstance"/>
        <PossibleValue Comment="LPTIM1_ETR IO" Value="LPTIM_TRIGSOURCE_0"/>
        <PossibleValue Comment="RTC Alarm A" Value="LPTIM_TRIGSOURCE_1"/>
        <PossibleValue Comment="RTC Alarm B" Value="LPTIM_TRIGSOURCE_2"/>
        <PossibleValue Comment="RTC TAMP1 Input Detection" Value="LPTIM_TRIGSOURCE_3"/>
        <PossibleValue Comment="RTC TAMP2 Input Detection" Value="LPTIM_TRIGSOURCE_4"/>
        <PossibleValue Comment="RTC TAMP3 Input Detection" Value="LPTIM_TRIGSOURCE_5"/>
        <PossibleValue Comment="COMP1 OUT" Value="LPTIM_TRIGSOURCE_6" Condition="!COMP1" Action="disable"/>
        <PossibleValue Comment="COMP2 OUT" Value="LPTIM_TRIGSOURCE_7" Condition="!COMP2" Action="disable"/>
        <PossibleValue Comment="COMP3 OUT" Value="LPTIM_TRIGSOURCE_8" Condition="!COMP3" Action="disable"/>
        <PossibleValue Comment="COMP4 OUT" Value="LPTIM_TRIGSOURCE_9" Condition="!COMP4" Action="disable"/>
    </RefParameter>
    <RefParameter Comment="Trigger Source" DefaultValue="LPTIM_TRIGSOURCE_SOFTWARE" Name="TriggerSource" Type="list" Group="Trigger">
        <Condition Diagnostic="External trigger is not selected" Expression="!Semaphore_ETR$IpInstance &amp; (DIE469 &amp; STM32G4x4)"/>
        <PossibleValue Comment="Software Trigger" Value="LPTIM_TRIGSOURCE_SOFTWARE" Semaphore="Semaphore_SWTrigger_$IpInstance"/>
        <PossibleValue Comment="RTC Alarm A" Value="LPTIM_TRIGSOURCE_1"/>
        <PossibleValue Comment="RTC Alarm B" Value="LPTIM_TRIGSOURCE_2"/>
        <PossibleValue Comment="RTC TAMP1 Input Detection" Value="LPTIM_TRIGSOURCE_3"/>
        <PossibleValue Comment="RTC TAMP2 Input Detection" Value="LPTIM_TRIGSOURCE_4"/>
        <PossibleValue Comment="RTC TAMP3 Input Detection" Value="LPTIM_TRIGSOURCE_5"/>
        <PossibleValue Comment="COMP1 OUT" Value="LPTIM_TRIGSOURCE_6" Condition="!COMP1" Action="disable"/>
        <PossibleValue Comment="COMP2 OUT" Value="LPTIM_TRIGSOURCE_7" Condition="!COMP2" Action="disable"/>
        <PossibleValue Comment="COMP3 OUT" Value="LPTIM_TRIGSOURCE_8" Condition="!COMP3" Action="disable"/>
        <PossibleValue Comment="COMP4 OUT" Value="LPTIM_TRIGSOURCE_9" Condition="!COMP4" Action="disable"/>
        <PossibleValue Comment="COMP5 OUT" Value="LPTIM_TRIGSOURCE_10" Condition="!COMP5" Action="disable"/>
        <PossibleValue Comment="COMP6 OUT" Value="LPTIM_TRIGSOURCE_11" Condition="!COMP6" Action="disable"/>
        <PossibleValue Comment="COMP7 OUT" Value="LPTIM_TRIGSOURCE_12" Condition="!COMP7" Action="disable"/>
    </RefParameter>
    <RefParameter Comment="Trigger Source" DefaultValue="LPTIM_TRIGSOURCE_SOFTWARE" Name="TriggerSource" Type="list" Group="Trigger">
        <Condition Diagnostic="External trigger is not selected" Expression="!Semaphore_ETR$IpInstance &amp; !(DIE469 &amp; STM32G4x4)"/>
        <PossibleValue Comment="Software Trigger" Value="LPTIM_TRIGSOURCE_SOFTWARE" Semaphore="Semaphore_SWTrigger_$IpInstance"/>
        <PossibleValue Comment="RTC Alarm A" Value="LPTIM_TRIGSOURCE_1"/>
        <PossibleValue Comment="RTC Alarm B" Value="LPTIM_TRIGSOURCE_2"/>
        <PossibleValue Comment="RTC TAMP1 Input Detection" Value="LPTIM_TRIGSOURCE_3"/>
        <PossibleValue Comment="RTC TAMP2 Input Detection" Value="LPTIM_TRIGSOURCE_4"/>
        <PossibleValue Comment="RTC TAMP3 Input Detection" Value="LPTIM_TRIGSOURCE_5"/>
        <PossibleValue Comment="COMP1 OUT" Value="LPTIM_TRIGSOURCE_6" Condition="!COMP1" Action="disable"/>
        <PossibleValue Comment="COMP2 OUT" Value="LPTIM_TRIGSOURCE_7" Condition="!COMP2" Action="disable"/>
        <PossibleValue Comment="COMP3 OUT" Value="LPTIM_TRIGSOURCE_8" Condition="!COMP3" Action="disable"/>
        <PossibleValue Comment="COMP4 OUT" Value="LPTIM_TRIGSOURCE_9" Condition="!COMP4" Action="disable"/>
    </RefParameter>
    <RefParameter Comment="Active Edge" DefaultValue="LPTIM_ACTIVEEDGE_RISING" Name="TriggerActiveEdge" Type="list" Group="Trigger">
        <Condition Diagnostic="External trigger is selected" Expression="!Semaphore_SWTrigger_$IpInstance"/><!--pour tous les extriggers-->
        <PossibleValue Comment="Active Edge Rising" Value="LPTIM_ACTIVEEDGE_RISING"/>
        <PossibleValue Comment="Active Edge Falling" Value="LPTIM_ACTIVEEDGE_FALLING"/>
        <PossibleValue Comment="Active Edge Rising Falling" Value="LPTIM_ACTIVEEDGE_RISING_FALLING"/>
    </RefParameter>
    <RefParameter Comment="Active Edge" DefaultValue="null" Name="TriggerActiveEdge" Type="list" Visible="false">
        <Condition Diagnostic="External trigger is not selected" Expression="Semaphore_SWTrigger_$IpInstance"/>
   <!-- <PossibleValue Comment="Active Edge Rising" Value="LPTIM_ACTIVEEDGE_RISING"/>-->
    </RefParameter>
<!-- Change naming since not available in legacy file -->
    <RefParameter Comment="Sample Time" DefaultValue="LPTIM_TRIGSAMPLETIME_DIRECTTRANSITION" Name="TriggerSampleTime" Type="list" Group="Trigger">
        <Condition Diagnostic="External trigger is selected" Expression="!Semaphore_SWTrigger_$IpInstance &amp;!Semaphore_CounterExternalClk_standalone$IpInstance"/><!--pour tous les extriggers-->
        <PossibleValue Comment="Direct Transition" Value="LPTIM_TRIGSAMPLETIME_DIRECTTRANSITION"/>
        <PossibleValue Comment="2 Transitions" Value="LPTIM_TRIGSAMPLETIME_2TRANSITIONS"/>
        <PossibleValue Comment="4 Transitions" Value="LPTIM_TRIGSAMPLETIME_4TRANSITIONS"/>
        <PossibleValue Comment="8 Transitions" Value="LPTIM_TRIGSAMPLETIME_8TRANSITIONS"/>
    </RefParameter>
    <RefParameter Comment="Sample Time" DefaultValue="LPTIM_TRIGSAMPLETIME_DIRECTTRANSITION" Name="TriggerSampleTime" Type="list" Group="Trigger">
        <Condition Diagnostic="External trigger is selected" Expression="!Semaphore_SWTrigger_$IpInstance &amp;Semaphore_CounterExternalClk_standalone$IpInstance"/><!--pour tous les extriggers-->
        <PossibleValue Comment="Direct Transition" Value="LPTIM_TRIGSAMPLETIME_DIRECTTRANSITION"/>
        <PossibleValue Comment="2 Transitions (requires internal clock)" Value="LPTIM_TRIGSAMPLETIME_2TRANSITIONS"/>
        <PossibleValue Comment="4 Transitions (requires internal clock)" Value="LPTIM_TRIGSAMPLETIME_4TRANSITIONS"/>
        <PossibleValue Comment="8 Transitions (requires internal clock)" Value="LPTIM_TRIGSAMPLETIME_8TRANSITIONS"/>
    </RefParameter>
    <RefParameter Comment="Sample Time" DefaultValue="null" Name="TriggerSampleTime" Type="list" Visible="false">
        <Condition Diagnostic="External trigger is not selected" Expression="Semaphore_SWTrigger_$IpInstance"/>
   <!-- <PossibleValue Comment="Direct Transition" Value="LPTIM_TRIGSAMPLETIME_DIRECTTRANSISTION"/>-->
    </RefParameter>
<!-- Output Polarity management -->
    <RefParameter Comment="Output Polarity" DefaultValue="LPTIM_OUTPUTPOLARITY_HIGH" Name="OutputPolarity" Type="list" Group="Output">
        <Condition Diagnostic="Waveform gen. is selected" Expression="Semaphore_OUT$IpInstance"/>
        <PossibleValue Comment="Output Polarity High" Value="LPTIM_OUTPUTPOLARITY_HIGH"/>
        <PossibleValue Comment="Output Polarity Low" Value="LPTIM_OUTPUTPOLARITY_LOW"/>
    </RefParameter>
    <RefParameter Comment="Output Polarity" DefaultValue="LPTIM_OUTPUTPOLARITY_HIGH" Name="OutputPolarity" Type="list" Visible="false">
        <Condition Diagnostic="Wavegorm gen.  is not selected" Expression="!Semaphore_OUT$IpInstance"/>
        <PossibleValue Comment="Output Polarity High" Value="LPTIM_OUTPUTPOLARITY_HIGH"/>
    </RefParameter>
    <RefParameter Comment="Update Mode" DefaultValue="LPTIM_UPDATE_IMMEDIATE" Name="UpdateMode" Type="list" Group="Preload">
        <PossibleValue Comment="Update Immediate" Value="LPTIM_UPDATE_IMMEDIATE"/>
        <PossibleValue Comment="Update End Of Period" Value="LPTIM_UPDATE_ENDOFPERIOD"/>
    </RefParameter>
    <RefParameter Comment="Counter Source" DefaultValue="LPTIM_COUNTERSOURCE_INTERNAL" Name="CounterSource" Type="list" Visible="false">
        <Condition Diagnostic="Encoder, internal" Expression="(Semaphore_CounterInternalClk$IpInstance)"/>
        <PossibleValue Comment="Countersource Internal" Value="LPTIM_COUNTERSOURCE_INTERNAL"/>
    </RefParameter>
    <RefParameter Comment="Counter Source" DefaultValue="LPTIM_COUNTERSOURCE_EXTERNAL" Name="CounterSource" Type="list" Visible="false">
        <Condition Diagnostic="external or standalone" Expression="!(Semaphore_CounterInternalClk$IpInstance)"/>
        <PossibleValue Comment="Countersource External" Value="LPTIM_COUNTERSOURCE_EXTERNAL"/>
    </RefParameter>
    <RefParameter Comment="Input1 Source" DefaultValue="LPTIM_INPUT1SOURCE_GPIO" Name="Input1Source" Type="list" Visible="false">
        <Condition Diagnostic="external or standalone" Expression="Semaphore_Input1_gpio$IpInstance"/>
        <PossibleValue Comment="GPIO" Value="LPTIM_INPUT1SOURCE_GPIO"/>
    </RefParameter>
    <RefParameter Comment="Input1 Source" DefaultValue="LPTIM_INPUT1SOURCE_COMP1" Name="Input1Source" Type="list" Visible="true">
        <Condition Diagnostic="external or standalone" Expression="(Semaphore_Input1_comp1$IpInstance|Semaphore_Input1_comp1comp2$IpInstance) &amp; (DIE469 &amp; STM32G4x4)"/>
        <PossibleValue Comment="COMP1" Value="LPTIM_INPUT1SOURCE_COMP1" Condition="!COMP1" Action="disable"/>
        <PossibleValue Comment="COMP3" Value="LPTIM_INPUT1SOURCE_COMP3" Condition="!COMP3" Action="disable"/>
        <PossibleValue Comment="COMP5" Value="LPTIM_INPUT1SOURCE_COMP5" Condition="!COMP5" Action="disable"/>
        <PossibleValue Comment="COMP7" Value="LPTIM_INPUT1SOURCE_COMP7" Condition="!COMP7" Action="disable"/>
    </RefParameter>
    <RefParameter Comment="Input1 Source" DefaultValue="LPTIM_INPUT1SOURCE_COMP1" Name="Input1Source" Type="list" Visible="true">
        <Condition Diagnostic="external or standalone" Expression="(Semaphore_Input1_comp1$IpInstance|Semaphore_Input1_comp1comp2$IpInstance) &amp; !(DIE469 &amp; STM32G4x4)"/>
        <PossibleValue Comment="COMP1" Value="LPTIM_INPUT1SOURCE_COMP1" Condition="!COMP1" Action="disable"/>
        <PossibleValue Comment="COMP3" Value="LPTIM_INPUT1SOURCE_COMP3" Condition="!COMP3" Action="disable"/>
    </RefParameter>
    <RefParameter Comment="Input2 Source" DefaultValue="LPTIM_INPUT2SOURCE_GPIO" Name="Input2Source" Type="list" Visible="false">
         <Condition Diagnostic="external or standalone" Expression="Semaphore_Input2_gpio$IpInstance"/>
        <PossibleValue Comment="GPIO" Value="LPTIM_INPUT2SOURCE_GPIO"/>
    </RefParameter>
    <RefParameter Comment="Input2 Source" DefaultValue="LPTIM_INPUT2SOURCE_COMP2" Name="Input2Source" Type="list" Visible="true">
         <Condition Diagnostic="external or standalone" Expression="(Semaphore_Input2_comp2$IpInstance|Semaphore_Input1_comp1comp2$IpInstance) &amp; (DIE469 &amp; STM32G4x4)"/>
        <PossibleValue Comment="COMP2" Value="LPTIM_INPUT2SOURCE_COMP2" Condition="!COMP2" Action="disable"/>
        <PossibleValue Comment="COMP4" Value="LPTIM_INPUT2SOURCE_COMP4" Condition="!COMP4" Action="disable"/>
        <PossibleValue Comment="COMP6" Value="LPTIM_INPUT2SOURCE_COMP6" Condition="!COMP6" Action="disable"/>
    </RefParameter>
    <RefParameter Comment="Input2 Source" DefaultValue="LPTIM_INPUT2SOURCE_COMP2" Name="Input2Source" Type="list" Visible="true">
         <Condition Diagnostic="external or standalone" Expression="(Semaphore_Input2_comp2$IpInstance|Semaphore_Input1_comp1comp2$IpInstance) &amp; !(DIE469 &amp; STM32G4x4)"/>
        <PossibleValue Comment="COMP2" Value="LPTIM_INPUT2SOURCE_COMP2" Condition="!COMP2" Action="disable"/>
        <PossibleValue Comment="COMP4" Value="LPTIM_INPUT2SOURCE_COMP4" Condition="!COMP4" Action="disable"/>
    </RefParameter>
 <RefMode Name="Counts__internal_clock_event_00" Comment="" >
  <ConfigForMode>lptim_Initialization</ConfigForMode>
  <Parameter Name="ClockSource"/>
  <Parameter Name="ClockPrescaler"/>
  <Parameter Name="UpdateMode"/>
  <Parameter Name="TriggerSource"/>
  <Parameter Name="TriggerActiveEdge"/>
  <Parameter Name="TriggerSampleTime"/>
  <Parameter Name="OutputPolarity"/>
  <Parameter Name="CounterSource"/>
  <Parameter Name="Input1Source"/>
  <Parameter Name="Input2Source"/>
 </RefMode>
 <RefMode Name="Counts_external_clock_with_synchro_01_occur1" Comment="" BaseMode="Counts_external_clock_with_synchro_01"/>
 <RefMode Name="Counts_external_clock_with_synchro_01_occur2" Comment="" BaseMode="Counts_external_clock_with_synchro_01"/>
 <RefMode Name="Counts_external_clock_with_synchro_01_occur3" Comment="" BaseMode="Counts_external_clock_with_synchro_01"/>
 <RefMode Name="Counts_external_clock_with_synchro_01_occur4" Comment="" BaseMode="Counts_external_clock_with_synchro_01"/>
 <RefMode Name="Counts_external_clock_with_synchro_01_occur5" Comment="" BaseMode="Counts_external_clock_with_synchro_01"/>
 <RefMode Name="Counts_external_clock_with_synchro_01_occur6" Comment="" BaseMode="Counts_external_clock_with_synchro_01"/>
 <RefMode Name="Counts_external_clock_with_synchro_01" Comment="">
  <ConfigForMode>lptim_Initialization</ConfigForMode>
  <Parameter Name="ClockSource"/>
  <Parameter Name="ClockPrescaler"/>
  <Parameter Name="ULPClockPolarity"/>
  <Parameter Name="ULPClockSampleTime"/>
  <Parameter Name="UpdateMode"/>
  <Parameter Name="TriggerSource"/>
  <Parameter Name="TriggerActiveEdge"/>
  <Parameter Name="TriggerSampleTime"/>
  <Parameter Name="OutputPolarity"/>
  <Parameter Name="CounterSource"/>
  <Parameter Name="Input1Source"/>
  <Parameter Name="Input2Source"/>
 </RefMode>
 <RefMode Name="Counts_external_clock_standalone_1X_occur1" Comment="" BaseMode="Counts_external_clock_standalone_1X"/>
 <RefMode Name="Counts_external_clock_standalone_1X_occur2" Comment="" BaseMode="Counts_external_clock_standalone_1X"/>
 <RefMode Name="Counts_external_clock_standalone_1X_occur3" Comment="" BaseMode="Counts_external_clock_standalone_1X"/>
 <RefMode Name="Counts_external_clock_standalone_1X_occur4" Comment="" BaseMode="Counts_external_clock_standalone_1X"/>
 <RefMode Name="Counts_external_clock_standalone_1X_occur5" Comment="" BaseMode="Counts_external_clock_standalone_1X"/>
 <RefMode Name="Counts_external_clock_standalone_1X_occur6" Comment="" BaseMode="Counts_external_clock_standalone_1X"/>
 <RefMode Name="Counts_external_clock_standalone_1X" Comment="">
  <ConfigForMode>lptim_Initialization</ConfigForMode>
  <Parameter Name="ClockSource"/>
  <Parameter Name="ClockPrescaler"/>
  <Parameter Name="ULPClockPolarity"/>
  <Parameter Name="ULPClockSampleTime"/>
  <Parameter Name="UpdateMode"/>
  <Parameter Name="TriggerSource"/>
  <Parameter Name="TriggerActiveEdge"/>
  <Parameter Name="TriggerSampleTime"/>
  <Parameter Name="OutputPolarity"/>
  <Parameter Name="CounterSource"/>
  <Parameter Name="Input1Source"/>
  <Parameter Name="Input2Source"/>
 </RefMode>
 <RefMode Name="Encoder_mode_occur1" Comment="" BaseMode="Encoder_mode"/>
 <RefMode Name="Encoder_mode_occur2" Comment="" BaseMode="Encoder_mode"/>
 <RefMode Name="Encoder_mode_occur3" Comment="" BaseMode="Encoder_mode"/>
 <RefMode Name="Encoder_mode_occur4" Comment="" BaseMode="Encoder_mode"/>
 <RefMode Name="Encoder_mode_occur5" Comment="" BaseMode="Encoder_mode"/>
 <RefMode Name="Encoder_mode" Comment="" >
  <ConfigForMode>lptim_Initialization</ConfigForMode>
  <Parameter Name="ClockSource">
   <PossibleValue>LPTIM_CLOCKSOURCE_APBCLOCK_LPOSC</PossibleValue>
  </Parameter>
  <Parameter Name="ULPClockPolarity"/>
  <Parameter Name="ULPClockSampleTime"/>
  <Parameter Name="UpdateMode"/>
  <Parameter Name="TriggerSource"/>
  <Parameter Name="TriggerActiveEdge"/>
  <Parameter Name="TriggerSampleTime"/>
  <Parameter Name="OutputPolarity"/>
  <Parameter Name="CounterSource"/>
  <Parameter Name="Input1Source"/>
  <Parameter Name="Input2Source"/>
 </RefMode>
 <ModeLogicOperator Name="OR">
  <Mode Name="Mode">
                        <Semaphore>Semaphore_ModeSelected$IpInstance</Semaphore>
                        <Semaphore>$IpInstanceUsed_ForRCC</Semaphore>
   <ModeLogicOperator Name="XOR">
<!-- <Mode Name="Counter_mode_on_internal_clock" UserName="Counter mode on internal clock">-->
    <Mode Name="Counts__internal_clock_event_00" UserName="Counts internal clock events">
                                        <Semaphore>Semaphore_CounterInternalClk$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input1_gpio$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input2_gpio$IpInstance</Semaphore>
     <SignalLogicalOp Name="AND">
      <Signal Name="VS_LPTIM_counterModeInternalClock"/>
     </SignalLogicalOp>
    </Mode>
                <Mode Name="Counts_external_clock_with_synchro_01_occur1" UserName="Counts external Clock events with internal synchronization">
                    <Semaphore>Semaphore_CounterExternalClk_synchro$IpInstance</Semaphore>
                    <Semaphore>Semaphore_Input1_gpio$IpInstance</Semaphore>
                    <Semaphore>Semaphore_Input2_gpio$IpInstance</Semaphore>
     <SignalLogicalOp Name="AND">
      <Signal Name="IN1"/>
     </SignalLogicalOp>
    </Mode>
                <Mode Name="Counts_external_clock_with_synchro_01_occur2" UserName="Counts external Clock events from COMPx with internal synchronization" RemoveCondition="!(DIE469 &amp; STM32G4x4)">
                    <Condition Diagnostic="at least COMP1,3,5 or 7 must be enabled to activate this function" Expression="COMP1|COMP3|COMP5|COMP7"/>
      <Semaphore>Semaphore_CounterExternalClk_synchro$IpInstance</Semaphore>
      <Semaphore>Semaphore_Input1_comp1$IpInstance</Semaphore>
      <Semaphore>Semaphore_Input2_gpio$IpInstance</Semaphore>
      <SignalLogicalOp Name="AND">
        <Signal Name="VS_COMP1_LPTIM"/>
      </SignalLogicalOp>
    </Mode>
                <Mode Name="Counts_external_clock_with_synchro_01_occur3" UserName="Counts external Clock events from COMPx with internal synchronization" RemoveCondition="(DIE469 &amp; STM32G4x4) ">
                    <Condition Diagnostic="at least COMP1 or 3 must be enabled to activate this function" Expression="COMP1|COMP3"/>
      <Semaphore>Semaphore_CounterExternalClk_synchro$IpInstance</Semaphore>
      <Semaphore>Semaphore_Input1_comp1$IpInstance</Semaphore>
      <Semaphore>Semaphore_Input2_gpio$IpInstance</Semaphore>
      <SignalLogicalOp Name="AND">
        <Signal Name="VS_COMP1_LPTIM"/>
      </SignalLogicalOp>
    </Mode>
                                <Mode Name="Counts_external_clock_standalone_1X_occur1" UserName="Standalone : counts external Clock events">
                                        <Condition Diagnostic="COMP1 link to LPTIM must be disabled in COMP1 settings" Expression="!Semaphore_COMP1_LPTIM_enabled"/>
                                        <Semaphore>Semaphore_CounterExternalClk_standalone$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input1_gpio$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input2_gpio$IpInstance</Semaphore>
                                        <SignalLogicalOp Name="AND">
                                                <Signal Name="IN1"/>
                                        </SignalLogicalOp>
                                </Mode>
<!-- For G474 / G484 -->
                                <Mode Name="Counts_external_clock_standalone_1X_occur2" UserName="Standalone : counts external Clock events from COMPx" RemoveCondition="!(DIE469 &amp; STM32G4x4)">
                                        <Condition Diagnostic="at least COMP1,3,5 or 7 must be enabled to activate this function" Expression="COMP1|COMP3|COMP5|COMP7"/>
                                        <Semaphore>Semaphore_CounterExternalClk_standalone$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input1_comp1$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input2_gpio$IpInstance</Semaphore>
                                        <SignalLogicalOp Name="AND">
                                                <Signal Name="VS_COMP1_LPTIM"/>
                                        </SignalLogicalOp>
                                </Mode>
<!-- For others -->
                                <Mode Name="Counts_external_clock_standalone_1X_occur2" UserName="Standalone : counts external Clock events from COMPx" RemoveCondition="(DIE469 &amp; STM32G4x4)">
                                        <Condition Diagnostic="at least COMP1 or 3 must be enabled to activate this function" Expression="COMP1|COMP3"/>
                                        <Semaphore>Semaphore_CounterExternalClk_standalone$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input1_comp1$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input2_gpio$IpInstance</Semaphore>
                                        <SignalLogicalOp Name="AND">
                                                <Signal Name="VS_COMP1_LPTIM"/>
                                        </SignalLogicalOp>
                                </Mode>
                                <Mode Name="Encoder_mode_occur1" UserName="Encoder mode from IN1 IN2">
                                        <Semaphore>Semaphore_Encoder$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input1_gpio$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input2_gpio$IpInstance</Semaphore>
                                        <SignalLogicalOp Name="AND">
                                                <Signal Name="IN1"/>
                                                <Signal Name="IN2"/>
                                        </SignalLogicalOp>
                                </Mode>
<!-- For G474 / G484 -->
                                <Mode Name="Encoder_mode_occur2" UserName="Encoder mode from COMPx and IN2" RemoveCondition="!(DIE469 &amp; STM32G4x4)">
                                        <Condition Diagnostic="at least COMP1,3,5 or 7 must be enabled to activate this function" Expression="COMP1|COMP3|COMP5|COMP7"/>
                                        <Semaphore>Semaphore_Encoder$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input1_comp1$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input2_gpio$IpInstance</Semaphore>
                                        <SignalLogicalOp Name="AND">
                                                <Signal Name="VS_COMP1_LPTIM"/>
                                                <Signal Name="IN2"/>
                                        </SignalLogicalOp>
                                </Mode>
<!-- For others -->
                                <Mode Name="Encoder_mode_occur2" UserName="Encoder mode from COMPx and IN2" RemoveCondition="(DIE469 &amp; STM32G4x4)">
                                        <Condition Diagnostic="at least COMP1 or 3 must be enabled to activate this function" Expression="COMP1|COMP3"/>
                                        <Semaphore>Semaphore_Encoder$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input1_comp1$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input2_gpio$IpInstance</Semaphore>
                                        <SignalLogicalOp Name="AND">
                                                <Signal Name="VS_COMP1_LPTIM"/>
                                                <Signal Name="IN2"/>
                                        </SignalLogicalOp>
                                </Mode>
<!-- For G474 / G484 -->
                                <Mode Name="Encoder_mode_occur3" UserName="Encoder mode from IN1 and COMPy" RemoveCondition="!(DIE469 &amp; STM32G4x4)">
                                        <Condition Diagnostic="at least COMP2,4 or 6 must be enabled to activate this function" Expression="COMP2|COMP4|COMP6"/>
                                        <Semaphore>Semaphore_Encoder$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input1_gpio$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input2_comp2$IpInstance</Semaphore>
                                        <SignalLogicalOp Name="AND">
                                                <Signal Name="IN1"/>
                                                <Signal Name="VS_COMP2_LPTIM"/>
                                        </SignalLogicalOp>
                                </Mode>
<!-- For others -->
                                <Mode Name="Encoder_mode_occur3" UserName="Encoder mode from IN1 and COMPy" RemoveCondition="(DIE469 &amp; STM32G4x4)">
                                        <Condition Diagnostic="at least COMP2 or 4 must be enabled to activate this function" Expression="COMP2|COMP4"/>
                                        <Semaphore>Semaphore_Encoder$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input1_gpio$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input2_comp2$IpInstance</Semaphore>
                                        <SignalLogicalOp Name="AND">
                                                <Signal Name="IN1"/>
                                                <Signal Name="VS_COMP2_LPTIM"/>
                                        </SignalLogicalOp>
                                </Mode>
<!-- For all -->
                                <Mode Name="Encoder_mode_occur4" UserName="Encoder mode from COMPx and COMPy" >
                                        <Condition Diagnostic="at least a comparator with odd index and another with even index must be enabled to activate this function" Expression="(COMP2|COMP4|COMP6) &amp; (COMP1|COMP3|COMP5|COMP7)"/>
                                        <Semaphore>Semaphore_Encoder$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input1_comp1$IpInstance</Semaphore>
                                        <Semaphore>Semaphore_Input2_comp2$IpInstance</Semaphore>
                                        <SignalLogicalOp Name="AND">
                                                <Signal Name="VS_COMP12_LPTIM"/>
                                        </SignalLogicalOp>
                                </Mode>
   </ModeLogicOperator>
  </Mode>
  <Mode Name="External_Trigger" UserName="External Trigger" >
                        <Condition Diagnostic="A mode must be selected before" Expression="Semaphore_ModeSelected$IpInstance"/>
                        <Semaphore>Semaphore_ETR$IpInstance</Semaphore>
   <ModeLogicOperator Name="XOR">
    <Mode Name="ExternalTrigger">
     <SignalLogicalOp Name="AND">
      <Signal Name="ETR"/>
     </SignalLogicalOp>
    </Mode>
   </ModeLogicOperator>
  </Mode>
  <Mode Name="Waveform_Generation" UserName="Waveform Generation">
                        <Condition Diagnostic="A mode must be selected before" Expression="Semaphore_ModeSelected$IpInstance"/>
                        <Semaphore>Semaphore_OUT$IpInstance</Semaphore>
   <ModeLogicOperator Name="XOR">
    <Mode Name="WaveformGeneration">
     <SignalLogicalOp Name="AND">
      <Signal Name="OUT"/>
     </SignalLogicalOp>
    </Mode>
   </ModeLogicOperator>
  </Mode>
 </ModeLogicOperator>
 <RefSignal IOMode="AlternateFunctionOpenDrainAndPushPullDefaultPP" Name="OUT"/>
 <RefSignal IOMode="AlternateFunctionPushPull" Name="IN1"/>
 <RefSignal IOMode="AlternateFunctionPushPull" Name="IN2"/>
 <RefSignal IOMode="AlternateFunctionPushPull" Name="ETR"/>
 <RefSignal Name="VS_LPTIM_counterModeInternalClock" Virtual="true"/>
 <RefSignal Name="VS_COMP1_LPTIM" Virtual="true"/>
        <RefSignal Name="VS_COMP2_LPTIM" Virtual="true"/>
        <RefSignal Name="VS_COMP12_LPTIM" Virtual="true"/>
 <RefSignal Name="VS_COMP3_LPTIM" Virtual="true"/>
 <RefSignal Name="VS_COMP5_LPTIM" Virtual="true"/>
 <RefSignal Name="VS_COMP7_LPTIM" Virtual="true"/>
</IP>
