<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<IP DBVersion="V3.0" IPType="peripheral" Name="TS" Version="ts1_v1_0" 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">
    <!-- Modes *******************************************************************-->
    <About>TS: Touch Sensing</About>

    <!--  RefParameters mandatory for TouchSensing MW - begin -->
    <!--  RefParameters mandatory for TouchSensing MW - Sampling -->
    <RefParameter Comment="Gx_IOx-Sampling" DefaultValue="=(IF(Sampling_IO_G1_isSet,1,0) + IF(Sampling_IO_G2_isSet,1,0) + IF(Sampling_IO_G3_isSet,1,0) + IF(Sampling_IO_G4_isSet,1,0) + IF(Sampling_IO_G5_isSet,1,0) + IF(Sampling_IO_G6_isSet,1,0) + IF(Sampling_IO_G7_isSet,1,0) + IF(Sampling_IO_G8_isSet,1,0) + IF(Sampling_IO_G9_isSet,1,0) + IF(Sampling_IO_G10_isSet,1,0) + IF(Sampling_IO_G11_isSet,1,0))" Group="TSC Settings" Name="Gx_IOx-Sampling" Type="integer" Min="0" Max="11" Visible="false">
    </RefParameter>
    <!--  RefParameters mandatory for TouchSensing MW - Channels -->
    <RefParameter Comment="Gx_IOx-Channel" DefaultValue="=(IF(Channel_IO1_G1_isSet,1,0) + IF(Channel_IO2_G1_isSet,1,0) + IF(Channel_IO3_G1_isSet,1,0) + IF(Channel_IO4_G1_isSet,1,0) + IF(Channel_IO1_G2_isSet,1,0) + IF(Channel_IO2_G2_isSet,1,0) + IF(Channel_IO3_G2_isSet,1,0) + IF(Channel_IO4_G2_isSet,1,0) + IF(Channel_IO5_G2_isSet,1,0) + IF(Channel_IO1_G3_isSet,1,0) + IF(Channel_IO2_G3_isSet,1,0) + IF(Channel_IO3_G3_isSet,1,0) + IF(Channel_IO4_G3_isSet,1,0) + IF(Channel_IO5_G3_isSet,1,0) + IF(Channel_IO1_G4_isSet,1,0) + IF(Channel_IO2_G4_isSet,1,0) + IF(Channel_IO3_G4_isSet,1,0) + IF(Channel_IO4_G4_isSet,1,0) + IF(Channel_IO1_G5_isSet,1,0) + IF(Channel_IO2_G5_isSet,1,0) + IF(Channel_IO3_G5_isSet,1,0) + IF(Channel_IO4_G5_isSet,1,0) + IF(Channel_IO1_G6_isSet,1,0) + IF(Channel_IO2_G6_isSet,1,0) + IF(Channel_IO3_G6_isSet,1,0) + IF(Channel_IO4_G6_isSet,1,0) + IF(Channel_IO1_G7_isSet,1,0) + IF(Channel_IO2_G7_isSet,1,0) + IF(Channel_IO3_G7_isSet,1,0) + IF(Channel_IO4_G7_isSet,1,0) + IF(Channel_IO5_G7_isSet,1,0) + IF(Channel_IO6_G7_isSet,1,0) + IF(Channel_IO7_G7_isSet,1,0) + IF(Channel_IO1_G8_isSet,1,0) + IF(Channel_IO2_G8_isSet,1,0) + IF(Channel_IO3_G8_isSet,1,0) + IF(Channel_IO4_G8_isSet,1,0) + IF(Channel_IO1_G9_isSet,1,0) + IF(Channel_IO2_G9_isSet,1,0) + IF(Channel_IO3_G9_isSet,1,0) + IF(Channel_IO4_G9_isSet,1,0) + IF(Channel_IO1_G10_isSet,1,0) + IF(Channel_IO2_G10_isSet,1,0) + IF(Channel_IO3_G10_isSet,1,0) + IF(Channel_IO4_G10_isSet,1,0) + IF(Channel_IO1_G11_isSet,1,0) + IF(Channel_IO2_G11_isSet,1,0) + IF(Channel_IO3_G11_isSet,1,0) + IF(Channel_IO4_G11_isSet,1,0) + IF(Channel_IO5_G11_isSet,1,0))" Group="TSC Settings" Name="Gx_IOx-Channel" Type="integer" Min="0" Max="34" Visible="false">
    </RefParameter>
    <!--  RefParameters mandatory for TouchSensing MW - Shield -->
    <RefParameter Comment="Gx_IOx-Shield" DefaultValue="=(IF(Shield_IO1_G1_isSet,1,0) | IF(Shield_IO2_G1_isSet,1,0) | IF(Shield_IO3_G1_isSet,1,0) | IF(Shield_IO4_G1_isSet,1,0) | IF(Shield_IO1_G2_isSet,1,0) | IF(Shield_IO2_G2_isSet,1,0) | IF(Shield_IO3_G2_isSet,1,0) | IF(Shield_IO4_G2_isSet,1,0) | IF(Shield_IO1_G3_isSet,1,0) | IF(Shield_IO2_G3_isSet,1,0) | IF(Shield_IO3_G3_isSet,1,0) | IF(Shield_IO4_G3_isSet,1,0) | IF(Shield_IO1_G4_isSet,1,0) | IF(Shield_IO2_G4_isSet,1,0) | IF(Shield_IO3_G4_isSet,1,0) | IF(Shield_IO4_G4_isSet,1,0) | IF(Shield_IO1_G5_isSet,1,0) | IF(Shield_IO2_G5_isSet,1,0) | IF(Shield_IO3_G5_isSet,1,0) | IF(Shield_IO4_G5_isSet,1,0) | IF(Shield_IO1_G6_isSet,1,0) | IF(Shield_IO2_G6_isSet,1,0) | IF(Shield_IO3_G6_isSet,1,0) | IF(Shield_IO4_G6_isSet,1,0) | IF(Shield_IO1_G7_isSet,1,0) | IF(Shield_IO2_G7_isSet,1,0) | IF(Shield_IO3_G7_isSet,1,0) | IF(Shield_IO4_G7_isSet,1,0) | IF(Shield_IO1_G8_isSet,1,0) | IF(Shield_IO2_G8_isSet,1,0) | IF(Shield_IO3_G8_isSet,1,0) | IF(Shield_IO4_G8_isSet,1,0) | IF(Shield_IO1_G9_isSet,1,0) | IF(Shield_IO2_G9_isSet,1,0) | IF(Shield_IO3_G9_isSet,1,0) | IF(Shield_IO4_G9_isSet,1,0) | IF(Shield_IO1_G10_isSet,1,0) | IF(Shield_IO2_G10_isSet,1,0) | IF(Shield_IO3_G10_isSet,1,0) | IF(Shield_IO4_G10_isSet,1,0) | IF(Shield_IO1_G11_isSet,1,0) | IF(Shield_IO2_G11_isSet,1,0) | IF(Shield_IO3_G11_isSet,1,0) | IF(Shield_IO4_G11_isSet,1,0))" Group="TSC Settings" Name="Gx_IOx-Shield" Type="integer" Min="0" Max="1" Visible="false">
    </RefParameter>

    <RefParameter Comment="Shield IOs" DefaultValue="null" Group="TSC Settings" Name="ShieldIOs" Type="list" Visible="false">
    </RefParameter>
    <RefParameter Comment="Sampling IOs" DefaultValue="null" Group="TSC Settings" Name="SamplingIOs" Type="list" Visible="false">
    </RefParameter>
    <!--  RefParameters mandatory for TouchSensing MW - end -->

    <RefParameter Comment="G2_Activated_Channels" DefaultValue="=(IF(Channel_IO1_G2_isSet,1,0) + IF(Channel_IO2_G2_isSet,1,0) + IF(Channel_IO3_G2_isSet,1,0) + IF(Channel_IO4_G2_isSet,1,0) + IF(Channel_IO5_G2_isSet,1,0))" Group="TSC Settings" Name="G2_Activated_Channels" Type="integer" Min="0" Max="4" Visible="false">
    </RefParameter>
    <RefParameter Comment="G7_Activated_Channels" DefaultValue="=(IF(Channel_IO1_G7_isSet,1,0) + IF(Channel_IO2_G7_isSet,1,0) + IF(Channel_IO3_G7_isSet,1,0) + IF(Channel_IO4_G7_isSet,1,0) + IF(Channel_IO5_G7_isSet,1,0) + IF(Channel_IO6_G7_isSet,1,0) + IF(Channel_IO7_G7_isSet,1,0))" Group="TSC Settings" Name="G7_Activated_Channels" Type="integer" Min="0" Max="5" Visible="false">
    </RefParameter>
    
    <RefMode Abstract="true" Comment="TSC settings" Group="TSC_Settings" Name="TSCSettings">
        <Parameter Name="Gx_IOx-Shield"/>
    </RefMode>

    <!-- Sampling Ref Mode for Group 1 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G1_IO1-Sampling">
		<ConfigForMode>TSC_Init</ConfigForMode>
		<Parameter Name="SamplingIOs">
			<PossibleValue>TSC_GROUP1_IO1</PossibleValue>
		</Parameter>
	</RefMode>
	<RefMode BaseMode="TSCSettings" Comment="" Name="G1_IO2-Sampling">
		<ConfigForMode>TSC_Init</ConfigForMode>
		<Parameter Name="SamplingIOs">
			<PossibleValue>TSC_GROUP1_IO2</PossibleValue>
		</Parameter>
	</RefMode>
	<RefMode BaseMode="TSCSettings" Comment="" Name="G1_IO3-Sampling">
		<ConfigForMode>TSC_Init</ConfigForMode>
		<Parameter Name="SamplingIOs">
			<PossibleValue>TSC_GROUP1_IO3</PossibleValue>
		</Parameter>
	</RefMode>
	<RefMode BaseMode="TSCSettings" Comment="" Name="G1_IO4-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP1_IO4</PossibleValue>
        </Parameter>
    </RefMode>	

    <!-- Shield Ref Mode for Group 1 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G1_IO1-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP1_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G1_IO2-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP1_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G1_IO3-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP1_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G1_IO4-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP1_IO4</PossibleValue>
        </Parameter>
    </RefMode>	

    <!-- Sampling Ref Mode for Group 2 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G2_IO1-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP2_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G2_IO2-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP2_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G2_IO3-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP2_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G2_IO4-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP2_IO4</PossibleValue>
        </Parameter>
    </RefMode>	

    <!-- Shield Ref Mode for Group 2 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G2_IO1-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP2_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G2_IO2-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP2_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G2_IO3-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP2_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G2_IO4-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP2_IO4</PossibleValue>
        </Parameter>
    </RefMode>	

    <!-- Sampling Ref Mode for Group 3 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G3_IO1-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP3_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G3_IO2-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP3_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G3_IO3-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP3_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G3_IO4-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP3_IO4</PossibleValue>
        </Parameter>
    </RefMode>	

    <!-- Shield Ref Mode for Group 3 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G3_IO1-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP3_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G3_IO2-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP3_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G3_IO3-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP3_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G3_IO4-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP3_IO4</PossibleValue>
        </Parameter>
    </RefMode>

    <!-- Sampling Ref Mode for Group 4 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G4_IO1-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP4_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G4_IO2-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP4_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G4_IO3-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP4_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G4_IO4-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP4_IO4</PossibleValue>
        </Parameter>
    </RefMode>	

    <!-- Shield Ref Mode for Group 4 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G4_IO1-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP4_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G4_IO2-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP4_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G4_IO3-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP4_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G4_IO4-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP4_IO4</PossibleValue>
        </Parameter>
    </RefMode>

    <!-- Sampling Ref Mode for Group 5 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G5_IO1-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP5_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G5_IO2-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP5_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G5_IO3-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP5_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G5_IO4-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP5_IO4</PossibleValue>
        </Parameter>
    </RefMode>	

    <!-- Shield Ref Mode for Group 5 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G5_IO1-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP5_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G5_IO2-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP5_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G5_IO3-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP5_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G5_IO4-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP5_IO4</PossibleValue>
        </Parameter>
    </RefMode>

    <!-- Sampling Ref Mode for Group 6 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G6_IO1-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP6_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G6_IO2-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP6_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G6_IO3-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP6_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G6_IO4-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP6_IO4</PossibleValue>
        </Parameter>
    </RefMode>	

    <!-- Shield Ref Mode for Group 6 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G6_IO1-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP6_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G6_IO2-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP6_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G6_IO3-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP6_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G6_IO4-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP6_IO4</PossibleValue>
        </Parameter>
    </RefMode>

    <!-- Sampling Ref Mode for Group 7 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G7_IO1-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP7_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G7_IO2-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP7_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G7_IO3-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP7_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G7_IO4-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP7_IO4</PossibleValue>
        </Parameter>
    </RefMode>	

    <!-- Shield Ref Mode for Group 7 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G7_IO1-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP7_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G7_IO2-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP7_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G7_IO3-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP7_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G7_IO4-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP7_IO4</PossibleValue>
        </Parameter>
    </RefMode>

    <!-- Sampling Ref Mode for Group 8 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G8_IO1-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP8_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G8_IO2-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP8_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G8_IO3-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP8_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G8_IO4-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP8_IO4</PossibleValue>
        </Parameter>
    </RefMode>	

    <!-- Shield Ref Mode for Group 8 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G8_IO1-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP8_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G8_IO2-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP8_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G8_IO3-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP8_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G8_IO4-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP8_IO4</PossibleValue>
        </Parameter>
    </RefMode>

    <!-- Sampling Ref Mode for Group 9 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G9_IO1-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP9_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G9_IO2-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP9_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G9_IO3-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP9_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G9_IO4-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP9_IO4</PossibleValue>
        </Parameter>
    </RefMode>	

    <!-- Shield Ref Mode for Group 9 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G9_IO1-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP9_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G9_IO2-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP9_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G9_IO3-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP9_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G9_IO4-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP9_IO4</PossibleValue>
        </Parameter>
    </RefMode>

    <!-- Sampling Ref Mode for Group 10 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G10_IO1-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP10_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G10_IO2-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP10_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G10_IO3-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP10_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G10_IO4-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP10_IO4</PossibleValue>
        </Parameter>
    </RefMode>	

    <!-- Shield Ref Mode for Group 10 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G10_IO1-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP10_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G10_IO2-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP10_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G10_IO3-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP10_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G10_IO4-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP10_IO4</PossibleValue>
        </Parameter>
    </RefMode>

    <!-- Sampling Ref Mode for Group 2 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G11_IO1-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP11_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G11_IO2-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP11_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G11_IO3-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP11_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G11_IO4-Sampling">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="SamplingIOs">
            <PossibleValue>TSC_GROUP11_IO4</PossibleValue>
        </Parameter>
    </RefMode>	

    <!-- Shield Ref Mode for Group 11 -->
    <RefMode BaseMode="TSCSettings" Comment="" Name="G11_IO1-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP11_IO1</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G11_IO2-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP11_IO2</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G11_IO3-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP11_IO3</PossibleValue>
        </Parameter>
    </RefMode>
    <RefMode BaseMode="TSCSettings" Comment="" Name="G11_IO4-Shield">
        <ConfigForMode>TSC_Init</ConfigForMode>
        <Parameter Name="ShieldIOs">
            <PossibleValue>TSC_GROUP11_IO4</PossibleValue>
        </Parameter>
    </RefMode>

    <ModeLogicOperator Name="OR">
        <Mode Name="G1" UserName="Group 1">
            <ModeLogicOperator Name="OR">

                <!-- The I/O Sampling choice -->
                <Mode Name="Sampling" UserName="Sampling">
                    <Condition Expression="!(Channel_IO1_G1_isSet &amp; Channel_IO2_G1_isSet &amp; Channel_IO3_G1_isSet &amp; Channel_IO4_G1_isSet)" Diagnostic="All IOs are selected as Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G1_IO1-Sampling" UserName="G1_IO1" >
                            <Condition Expression="!(Shield_IO1_G1_isSet|Channel_IO1_G1_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G1_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO1_G1_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G1_IO2-Sampling" UserName="G1_IO2">
                            <Condition Expression="!(Shield_IO2_G1_isSet|Channel_IO2_G1_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G1_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO2_G1_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G1_IO3-Sampling" UserName="G1_IO3">
                            <Condition Expression="!(Shield_IO3_G1_isSet|Channel_IO3_G1_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G1_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO3_G1_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G1_IO4-Sampling" UserName="G1_IO4">
                            <Condition Expression="!(Shield_IO4_G1_isSet|Channel_IO4_G1_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G1_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO4_G1_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Sampling_IO_G1_isSet</Semaphore>
                </Mode>

                <!-- The I/O Shield choice -->
                <Mode Name="Shield" UserName="Shield">
                    <Condition Expression="(!(OneChannel_IO_G1_isSet|Shield_IO_G2_isSet|Shield_IO_G3_isSet|Shield_IO_G4_isSet|Shield_IO_G5_isSet|Shield_IO_G6_isSet|Shield_IO_G7_isSet|Shield_IO_G8_isSet|Shield_IO_G9_isSet|Shield_IO_G10_isSet|Shield_IO_G11_isSet))" Diagnostic="An IO is selected as Shield IO in other goups or as a Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G1_IO1-Shield" UserName="G1_IO1" >
                            <Condition Expression="!Sampling_IO1_G1_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G1_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO1_G1_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G1_IO2-Shield" UserName="G1_IO2">
                            <Condition Expression="!Sampling_IO2_G1_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G1_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO2_G1_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G1_IO3-Shield" UserName="G1_IO3">
                            <Condition Expression="!Sampling_IO3_G1_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G1_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO3_G1_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G1_IO4-Shield" UserName="G1_IO4">
                            <Condition Expression="!Sampling_IO4_G1_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G1_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO4_G1_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Shield_IO_G1_isSet</Semaphore>
                </Mode>

                <!-- The I/O Channels choice -->
                <Mode Name="G1_IO1" UserName="G1_IO1">
                    <Condition Expression="!(Shield_IO_G1_isSet|Sampling_IO1_G1_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G1_IO1-Channel" UserName="G1_IO1">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G1_IO1"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO1_G1_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G1_isSet</Semaphore>
                </Mode>
                <Mode Name="G1_IO2" UserName="G1_IO2">
                    <Condition Expression="!(Shield_IO_G1_isSet|Sampling_IO2_G1_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G1_IO2-Channel" UserName="G1_IO2">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G1_IO2"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO2_G1_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G1_isSet</Semaphore>
                </Mode>
                <Mode Name="G1_IO3" UserName="G1_IO3">
                    <Condition Expression="!(Shield_IO_G1_isSet|Sampling_IO3_G1_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G1_IO3-Channel" UserName="G1_IO3">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G1_IO3"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO3_G1_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G1_isSet</Semaphore>
                </Mode>
                <Mode Name="G1_IO4" UserName="G1_IO4">
				 <Condition Expression="!(Shield_IO_G1_isSet|Sampling_IO4_G1_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
         			 <ModeLogicOperator Name="OR">
	         			   <Mode Name="G1_IO4-Channel" UserName="G1_IO4">
	         			     <SignalLogicalOp Name="AND">
	         			       <Signal Name="G1_IO4"/>
	         			     </SignalLogicalOp>
	        			  </Mode>
        			 </ModeLogicOperator>
        			 <Semaphore>Channel_IO4_G1_isSet</Semaphore>
        			 <Semaphore>OneChannel_IO_G1_isSet</Semaphore>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>GROUP1_isUsed</Semaphore>
        </Mode>

        <Mode Name="G2" UserName="Group 2">
            <ModeLogicOperator Name="OR">

                <!-- The I/O Sampling choice -->
                <Mode Name="Sampling" UserName="Sampling">
                    <Condition Expression="!(Channel_IO1_G2_isSet &amp; Channel_IO2_G2_isSet &amp; Channel_IO3_G2_isSet &amp; Channel_IO4_G2_isSet &amp; Channel_IO5_G2_isSet)" Diagnostic="All IOs are selected as Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G2_IO1-Sampling" UserName="G2_IO1" >
                            <Condition Expression="!(Shield_IO1_G2_isSet|Channel_IO1_G2_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G2_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO1_G2_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G2_IO2-Sampling" UserName="G2_IO2">
                            <Condition Expression="!(Shield_IO2_G2_isSet|Channel_IO2_G2_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G2_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO2_G2_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G2_IO3-Sampling" UserName="G2_IO3" RemoveCondition="DIE427|DIE429|DIE416">
                            <Condition Expression="!(Shield_IO3_G2_isSet|Channel_IO3_G2_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G2_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO3_G2_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G2_IO4-Sampling" UserName="G2_IO4" RemoveCondition="DIE427|DIE429|DIE416">
                            <Condition Expression="!(Shield_IO4_G2_isSet|Channel_IO4_G2_isSet|Semaphore_TOUCHSENSING_MODE_SOFTWARE)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G2_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO4_G2_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G2_IO5-Sampling" UserName="G2_IO5" RemoveCondition="DIE427|DIE429|DIE416|D436">
                            <Condition Expression="!(Shield_IO5_G2_isSet|Channel_IO5_G2_isSet|Semaphore_TOUCHSENSING_MODE_SOFTWARE)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G2_IO5"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO5_G2_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Sampling_IO_G2_isSet</Semaphore>
                </Mode>

                <!-- The I/O Shield choice -->
                <Mode Name="Shield" UserName="Shield">
                    <Condition Expression="(!(OneChannel_IO_G2_isSet|Shield_IO_G1_isSet|Shield_IO_G3_isSet|Shield_IO_G4_isSet|Shield_IO_G5_isSet|Shield_IO_G6_isSet|Shield_IO_G7_isSet|Shield_IO_G8_isSet|Shield_IO_G9_isSet|Shield_IO_G10_isSet|Shield_IO_G11_isSet))" Diagnostic="An IO is selected as Shield IO in other goups or as a Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G2_IO1-Shield" UserName="G2_IO1" >
                            <Condition Expression="!Sampling_IO1_G2_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G2_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO1_G2_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G2_IO2-Shield" UserName="G2_IO2">
                            <Condition Expression="!Sampling_IO2_G2_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G2_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO2_G2_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G2_IO3-Shield" UserName="G2_IO3" RemoveCondition="DIE427|DIE429|DIE416">
                            <Condition Expression="!Sampling_IO3_G2_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G2_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO3_G2_isSet</Semaphore>
                        </Mode>

                        <Mode Name="G2_IO4-Shield" UserName="G2_IO4" RemoveCondition="DIE427|DIE429|DIE416|DIE436">
                            <Condition Expression="!Sampling_IO4_G2_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G2_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO3_G2_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G2_IO5-Shield" UserName="G2_IO5" RemoveCondition="DIE427|DIE429|DIE416|DIE436">
                            <Condition Expression="!Sampling_IO5_G2_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G2_IO5"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO3_G2_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Shield_IO_G2_isSet</Semaphore>
                </Mode>

                <!-- The I/O Channels choice -->
                <Mode Name="G2_IO1" UserName="G2_IO1">
                    <Condition Expression="!(Shield_IO_G2_isSet|Sampling_IO1_G2_isSet|((G2_Activated_Channels = 3) &amp; !Channel_IO1_G2_isSet))" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group and max simultaneous available pins is 4"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G2_IO1-Channel" UserName="G2_IO1">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G2_IO1"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO1_G2_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G2_isSet</Semaphore>
                </Mode>
                <Mode Name="G2_IO2" UserName="G2_IO2">
                    <Condition Expression="!(Shield_IO_G2_isSet|Sampling_IO2_G2_isSet|((G2_Activated_Channels = 3) &amp; !Channel_IO2_G2_isSet))" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group and max simultaneous available pins is 4"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G2_IO2-Channel" UserName="G2_IO2">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G2_IO2"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO2_G2_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G2_isSet</Semaphore>
                </Mode>
                <Mode Name="G2_IO3" UserName="G2_IO3" RemoveCondition="DIE427|DIE429|DIE416">
                    <Condition Expression="!(Shield_IO_G2_isSet|Sampling_IO3_G2_isSet|((G2_Activated_Channels = 3) &amp; !Channel_IO3_G2_isSet))" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group and max simultaneous available pins is 4"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G2_IO3-Channel" UserName="G2_IO3">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G2_IO3"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO3_G2_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G2_isSet</Semaphore>
                </Mode>
                <Mode Name="G2_IO4" UserName="G2_IO4" RemoveCondition="DIE427|DIE429|DIE416">
                    <Condition Expression="!(Shield_IO_G2_isSet|Sampling_IO4_G2_isSet|((G2_Activated_Channels = 3) &amp; !Channel_IO4_G2_isSet)|(Semaphore_TOUCHSENSING_MODE_HARDWARE))" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group and max simultaneous available pins is 4"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G2_IO4-Channel" UserName="G2_IO4">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G2_IO4"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO4_G2_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G2_isSet</Semaphore>
                </Mode>
                <Mode Name="G2_IO5" UserName="G2_IO5" RemoveCondition="DIE427|DIE429|DIE416">
                    <Condition Expression="!(Shield_IO_G2_isSet|Sampling_IO5_G2_isSet|((G2_Activated_Channels = 3) &amp; !Channel_IO5_G2_isSet)|(Semaphore_TOUCHSENSING_MODE_HARDWARE))" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group and max simultaneous available pins is 4"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G2_IO5-Channel" UserName="G2_IO5">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G2_IO5"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO5_G2_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G2_isSet</Semaphore>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>GROUP2_isUsed</Semaphore>
        </Mode>

        <Mode Name="G3" UserName="Group 3">
            <ModeLogicOperator Name="OR">

                <!-- The I/O Sampling choice -->
                <Mode Name="Sampling" UserName="Sampling">
                    <Condition Expression="!(Channel_IO1_G3_isSet &amp; Channel_IO2_G3_isSet &amp; Channel_IO3_G3_isSet &amp; Channel_IO4_G3_isSet &amp; Channel_IO5_G3_isSet)" Diagnostic="All IOs are selected as Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G3_IO1-Sampling" UserName="G3_IO1" >
                            <Condition Expression="!(Shield_IO1_G3_isSet|Channel_IO1_G3_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G3_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO1_G3_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G3_IO2-Sampling" UserName="G3_IO2">
                            <Condition Expression="!(Shield_IO2_G3_isSet|Channel_IO2_G3_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G3_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO2_G3_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G3_IO3-Sampling" UserName="G3_IO3" RemoveCondition="!OPAMP1_Exist|DIE429|DIE416">
                            <Condition Expression="!(Shield_IO3_G3_isSet|Channel_IO3_G3_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G3_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO3_G3_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G3_IO4-Sampling" UserName="G3_IO4" RemoveCondition="!OPAMP1_Exist|DIE427|DIE429|DIE416">
                            <Condition Expression="!(Shield_IO4_G3_isSet|Channel_IO4_G3_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G3_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO4_G3_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G3_IO5-Sampling" UserName="G3_IO5" RemoveCondition="!OPAMP1_Exist|DIE427|DIE429|DIE416">
                            <Condition Expression="!(Shield_IO5_G3_isSet|Channel_IO5_G3_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G3_IO5"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO5_G3_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Sampling_IO_G3_isSet</Semaphore>
                </Mode>

                <!-- The I/O Shield choice -->
                <Mode Name="Shield" UserName="Shield">
                    <Condition Expression="(!(OneChannel_IO_G3_isSet|Shield_IO_G1_isSet|Shield_IO_G2_isSet|Shield_IO_G4_isSet|Shield_IO_G5_isSet|Shield_IO_G6_isSet|Shield_IO_G7_isSet|Shield_IO_G8_isSet|Shield_IO_G9_isSet|Shield_IO_G10_isSet|Shield_IO_G11_isSet))" Diagnostic="An IO is selected as Shield IO in other goups or as a Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G3_IO1-Shield" UserName="G3_IO1" >
                            <Condition Expression="!Sampling_IO1_G3_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G3_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO1_G3_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G3_IO2-Shield" UserName="G3_IO2">
                            <Condition Expression="!Sampling_IO2_G3_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G3_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO2_G3_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G3_IO3-Shield" UserName="G3_IO3" RemoveCondition="!OPAMP1_Exist|DIE429|DIE416">
                            <Condition Expression="!Sampling_IO3_G3_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G3_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO3_G3_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G3_IO4-Shield" UserName="G3_IO4" RemoveCondition="!OPAMP1_Exist|DIE427|DIE429|DIE416">
                            <Condition Expression="!Sampling_IO4_G3_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G3_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO4_G3_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G3_IO5-Shield" UserName="G3_IO5" RemoveCondition="!OPAMP1_Exist|DIE427|DIE429|DIE416">
                            <Condition Expression="!Sampling_IO5_G3_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G3_IO5"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO5_G3_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Shield_IO_G3_isSet</Semaphore>
                </Mode>

                <!-- The I/O Channels choice -->
                <Mode Name="G3_IO1" UserName="G3_IO1">
                    <Condition Expression="!(Shield_IO_G3_isSet|Sampling_IO1_G3_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G3_IO1-Channel" UserName="G3_IO1">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G3_IO1"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO1_G3_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G3_isSet</Semaphore>
                </Mode>
                <Mode Name="G3_IO2" UserName="G3_IO2">
                    <Condition Expression="!(Shield_IO_G3_isSet|Sampling_IO2_G3_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G3_IO2-Channel" UserName="G3_IO2">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G3_IO2"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO2_G3_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G3_isSet</Semaphore>
                </Mode>
                <Mode Name="G3_IO3" UserName="G3_IO3" RemoveCondition="!OPAMP1_Exist|DIE429|DIE416">
                    <Condition Expression="!(Shield_IO_G3_isSet|Sampling_IO3_G3_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G3_IO3-Channel" UserName="G3_IO3">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G3_IO3"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO3_G3_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G3_isSet</Semaphore>
                </Mode>
                <Mode Name="G3_IO4" UserName="G3_IO4" RemoveCondition="!OPAMP1_Exist|DIE427|DIE429|DIE416">
                    <Condition Expression="!(Shield_IO_G3_isSet|Sampling_IO4_G3_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G3_IO4-Channel" UserName="G3_IO4">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G3_IO4"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO4_G3_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G3_isSet</Semaphore>
                </Mode>
                <Mode Name="G3_IO5" UserName="G3_IO5" RemoveCondition="!OPAMP1_Exist|DIE427|DIE429|DIE416">
                    <Condition Expression="!(Shield_IO_G3_isSet|Sampling_IO5_G3_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G3_IO5-Channel" UserName="G3_IO5">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G3_IO5"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO5_G3_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G3_isSet</Semaphore>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>GROUP3_isUsed</Semaphore>
        </Mode>

        <Mode Name="G4" UserName="Group 4">
            <ModeLogicOperator Name="OR">

                <!-- The I/O Sampling choice -->
                <Mode Name="Sampling" UserName="Sampling">
                    <Condition Expression="!(Channel_IO1_G4_isSet &amp; Channel_IO2_G4_isSet &amp; Channel_IO3_G4_isSet &amp; Channel_IO4_G4_isSet)" Diagnostic="All IOs are selected as Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G4_IO1-Sampling" UserName="G4_IO1" >
                            <Condition Expression="!(Shield_IO1_G4_isSet|Channel_IO1_G4_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G4_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO1_G4_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G4_IO2-Sampling" UserName="G4_IO2">
                            <Condition Expression="!(Shield_IO2_G4_isSet|Channel_IO2_G4_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G4_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO2_G4_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G4_IO3-Sampling" UserName="G4_IO3">
                            <Condition Expression="!(Shield_IO3_G4_isSet|Channel_IO3_G4_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G4_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO3_G4_isSet</Semaphore>
                        </Mode>
                        <!--Mode Name="G4_IO4-Sampling" UserName="G4_IO4" RemoveCondition="STM32L1|DIE416|DIE429|DIE427">
       				     <Condition Expression="!(Shield_IO4_G4_isSet|Channel_IO4_G4_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
      				        <SignalLogicalOp Name="AND">
       					       <Signal Name="G4_IO4"/>
         					     </SignalLogicalOp>
         					  <Semaphore>Sampling_IO4_G4_isSet</Semaphore>
         				</Mode-->
                    </ModeLogicOperator>
                    <Semaphore>Sampling_IO_G4_isSet</Semaphore>
                </Mode>

                <!-- The I/O Shield choice -->
                <Mode Name="Shield" UserName="Shield">
                    <Condition Expression="(!(OneChannel_IO_G4_isSet|Shield_IO_G1_isSet|Shield_IO_G2_isSet|Shield_IO_G3_isSet|Shield_IO_G5_isSet|Shield_IO_G6_isSet|Shield_IO_G7_isSet|Shield_IO_G8_isSet|Shield_IO_G9_isSet|Shield_IO_G10_isSet|Shield_IO_G11_isSet))" Diagnostic="An IO is selected as Shield IO in other goups or as a Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G4_IO1-Shield" UserName="G4_IO1" >
                            <Condition Expression="!Sampling_IO1_G4_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G4_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO1_G4_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G4_IO2-Shield" UserName="G4_IO2">
                            <Condition Expression="!Sampling_IO2_G4_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G4_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO2_G4_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G4_IO3-Shield" UserName="G4_IO3">
                            <Condition Expression="!Sampling_IO3_G4_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G4_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO3_G4_isSet</Semaphore>
                        </Mode>
                        <!--Mode Name="G4_IO4-Shield" UserName="G4_IO4" RemoveCondition="STM32L1|DIE416|DIE429|DIE427">
       				      <Condition Expression="!Sampling_IO4_G4_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
      				        <SignalLogicalOp Name="AND">
       					       <Signal Name="G4_IO4"/>
         					     </SignalLogicalOp>
         					   <Semaphore>Shield_IO4_G4_isSet</Semaphore>
         				</Mode-->
                    </ModeLogicOperator>
                    <Semaphore>Shield_IO_G4_isSet</Semaphore>
                </Mode>

                <!-- The I/O Channels choice -->
                <Mode Name="G4_IO1" UserName="G4_IO1">
                    <Condition Expression="!(Shield_IO_G4_isSet|Sampling_IO1_G4_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G4_IO1-Channel" UserName="G4_IO1">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G4_IO1"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO1_G4_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G4_isSet</Semaphore>
                </Mode>
                <Mode Name="G4_IO2" UserName="G4_IO2">
                    <Condition Expression="!(Shield_IO_G4_isSet|Sampling_IO2_G4_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G4_IO2-Channel" UserName="G4_IO2">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G4_IO2"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO2_G4_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G4_isSet</Semaphore>
                </Mode>
                <Mode Name="G4_IO3" UserName="G4_IO3">
                    <Condition Expression="!(Shield_IO_G4_isSet|Sampling_IO3_G4_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G4_IO3-Channel" UserName="G4_IO3">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G4_IO3"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO3_G4_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G4_isSet</Semaphore>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>GROUP4_isUsed</Semaphore>
        </Mode>

        <Mode Name="G5" UserName="Group 5">
            <ModeLogicOperator Name="OR">

                <!-- The I/O Sampling choice -->
                <Mode Name="Sampling" UserName="Sampling">
                    <Condition Expression="!(Channel_IO1_G5_isSet &amp; Channel_IO2_G5_isSet &amp; Channel_IO3_G5_isSet &amp; Channel_IO4_G5_isSet)" Diagnostic="All IOs are selected as Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G5_IO1-Sampling" UserName="G5_IO1" >
                            <Condition Expression="!(Shield_IO1_G5_isSet|Channel_IO1_G5_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G5_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO1_G5_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G5_IO2-Sampling" UserName="G5_IO2">
                            <Condition Expression="!(Shield_IO2_G5_isSet|Channel_IO2_G5_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G5_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO2_G5_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G5_IO3-Sampling" UserName="G5_IO3">
                            <Condition Expression="!(Shield_IO3_G5_isSet|Channel_IO3_G5_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G5_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO3_G5_isSet</Semaphore>
                        </Mode>
                        <!--Mode Name="G5_IO4-Sampling" UserName="G5_IO4" RemoveCondition="STM32L1|DIE416|DIE429|DIE427">
                    <Condition Expression="!(Shield_IO4_G5_isSet|Channel_IO4_G5_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                        <SignalLogicalOp Name="AND">
                           <Signal Name="G5_IO4"/>
                             </SignalLogicalOp>
                          <Semaphore>Sampling_IO4_G5_isSet</Semaphore>
                    </Mode-->
                    </ModeLogicOperator>
                    <Semaphore>Sampling_IO_G5_isSet</Semaphore>
                </Mode>

                <!-- The I/O Shield choice -->
                <Mode Name="Shield" UserName="Shield">
                    <Condition Expression="(!(OneChannel_IO_G5_isSet|Shield_IO_G1_isSet|Shield_IO_G2_isSet|Shield_IO_G3_isSet|Shield_IO_G4_isSet|Shield_IO_G6_isSet|Shield_IO_G7_isSet|Shield_IO_G8_isSet|Shield_IO_G9_isSet|Shield_IO_G10_isSet|Shield_IO_G11_isSet))" Diagnostic="An IO is selected as Shield IO in other goups or as a Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G5_IO1-Shield" UserName="G5_IO1" >
                            <Condition Expression="!Sampling_IO1_G5_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G5_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO1_G5_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G5_IO2-Shield" UserName="G5_IO2">
                            <Condition Expression="!Sampling_IO2_G5_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G5_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO2_G5_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G5_IO3-Shield" UserName="G5_IO3">
                            <Condition Expression="!Sampling_IO3_G5_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G5_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO3_G5_isSet</Semaphore>
                        </Mode>
                        <!--Mode Name="G5_IO4-Shield" UserName="G5_IO4" RemoveCondition="STM32L1|DIE416|DIE429|DIE427">
       				      <Condition Expression="!Sampling_IO4_G5_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
      				        <SignalLogicalOp Name="AND">
       					       <Signal Name="G5_IO4"/>
         					     </SignalLogicalOp>
         					   <Semaphore>Shield_IO4_G5_isSet</Semaphore>
         				</Mode-->
                    </ModeLogicOperator>
                    <Semaphore>Shield_IO_G5_isSet</Semaphore>
                </Mode>

                <!-- The I/O Channels choice -->
                <Mode Name="G5_IO1" UserName="G5_IO1">
                    <Condition Expression="!(Shield_IO_G5_isSet|Sampling_IO1_G5_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G5_IO1-Channel" UserName="G5_IO1">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G5_IO1"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO1_G5_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G5_isSet</Semaphore>
                </Mode>
                <Mode Name="G5_IO2" UserName="G5_IO2">
                    <Condition Expression="!(Shield_IO_G5_isSet|Sampling_IO2_G5_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G5_IO2-Channel" UserName="G5_IO2">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G5_IO2"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO2_G5_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G5_isSet</Semaphore>
                </Mode>
                <Mode Name="G5_IO3" UserName="G5_IO3">
                    <Condition Expression="!(Shield_IO_G5_isSet|Sampling_IO3_G5_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G5_IO3-Channel" UserName="G5_IO3">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G5_IO3"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO3_G5_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G5_isSet</Semaphore>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>GROUP5_isUsed</Semaphore>
        </Mode>

        <Mode Name="G6" UserName="Group 6">
            <ModeLogicOperator Name="OR">

                <!-- The I/O Sampling choice -->
                <Mode Name="Sampling" UserName="Sampling">
                    <Condition Expression="!(Channel_IO1_G6_isSet &amp; Channel_IO2_G6_isSet &amp; Channel_IO3_G6_isSet &amp; Channel_IO4_G6_isSet)" Diagnostic="All IOs are selected as Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G6_IO1-Sampling" UserName="G6_IO1" >
                            <Condition Expression="!(Shield_IO1_G6_isSet|Channel_IO1_G6_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G6_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO1_G6_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G6_IO2-Sampling" UserName="G6_IO2">
                            <Condition Expression="!(Shield_IO2_G6_isSet|Channel_IO2_G6_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G6_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO2_G6_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G6_IO3-Sampling" UserName="G6_IO3" RemoveCondition="!OPAMP1_Exist|DIE416|DIE429">
                            <Condition Expression="!(Shield_IO3_G6_isSet|Channel_IO3_G6_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G6_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO3_G6_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G6_IO4-Sampling" UserName="G6_IO4" RemoveCondition="!OPAMP1_Exist|DIE416|DIE429">
                            <Condition Expression="!(Shield_IO4_G6_isSet|Channel_IO4_G6_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G6_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO4_G6_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Sampling_IO_G6_isSet</Semaphore>
                </Mode>

                <!-- The I/O Shield choice -->
                <Mode Name="Shield" UserName="Shield">
                    <Condition Expression="(!(OneChannel_IO_G6_isSet|Shield_IO_G1_isSet|Shield_IO_G2_isSet|Shield_IO_G3_isSet|Shield_IO_G4_isSet|Shield_IO_G5_isSet|Shield_IO_G7_isSet|Shield_IO_G8_isSet|Shield_IO_G9_isSet|Shield_IO_G10_isSet|Shield_IO_G11_isSet))" Diagnostic="An IO is selected as Shield IO in other goups or as a Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G6_IO1-Shield" UserName="G6_IO1" >
                            <Condition Expression="!Sampling_IO1_G6_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G6_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO1_G6_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G6_IO2-Shield" UserName="G6_IO2">
                            <Condition Expression="!Sampling_IO2_G6_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G6_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO2_G6_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G6_IO3-Shield" UserName="G6_IO3" RemoveCondition="!OPAMP1_Exist|DIE416|DIE429">
                            <Condition Expression="!Sampling_IO3_G6_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G6_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO3_G6_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G6_IO4-Shield" UserName="G6_IO4" RemoveCondition="!OPAMP1_Exist|DIE416|DIE429">
                            <Condition Expression="!Sampling_IO4_G6_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G6_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO4_G6_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Shield_IO_G6_isSet</Semaphore>
                </Mode>

                <!-- The I/O Channels choice -->
                <Mode Name="G6_IO1" UserName="G6_IO1">
                    <Condition Expression="!(Shield_IO_G6_isSet|Sampling_IO1_G6_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G6_IO1-Channel" UserName="G6_IO1">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G6_IO1"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO1_G6_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G6_isSet</Semaphore>
                </Mode>
                <Mode Name="G6_IO2" UserName="G6_IO2">
                    <Condition Expression="!(Shield_IO_G6_isSet|Sampling_IO2_G6_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G6_IO2-Channel" UserName="G6_IO2">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G6_IO2"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO2_G6_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G6_isSet</Semaphore>
                </Mode>
                <Mode Name="G6_IO3" UserName="G6_IO3" RemoveCondition="!OPAMP1_Exist|DIE416|DIE429">
                    <Condition Expression="!(Shield_IO_G6_isSet|Sampling_IO3_G6_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G6_IO3-Channel" UserName="G6_IO3">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G6_IO3"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO3_G6_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G6_isSet</Semaphore>
                </Mode>
                <Mode Name="G6_IO4" UserName="G6_IO4" RemoveCondition="!OPAMP1_Exist|DIE416|DIE429">
                    <Condition Expression="!(Shield_IO_G6_isSet|Sampling_IO4_G6_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G6_IO4-Channel" UserName="G6_IO4">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G6_IO4"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO4_G6_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G6_isSet</Semaphore>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>GROUP6_isUsed</Semaphore>
        </Mode>

        <Mode Name="G7" UserName="Group 7">
            <ModeLogicOperator Name="OR">

                <!-- The I/O Sampling choice -->
                <Mode Name="Sampling" UserName="Sampling">
                    <Condition Expression="!(Channel_IO1_G7_isSet &amp; Channel_IO2_G7_isSet &amp; Channel_IO3_G7_isSet &amp; Channel_IO4_G7_isSet &amp; Channel_IO5_G7_isSet &amp; Channel_IO5_G7_isSet &amp; Channel_IO5_G7_isSet)" Diagnostic="All IOs are selected as Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G7_IO1-Sampling" UserName="G7_IO1" >
                            <Condition Expression="!(Shield_IO1_G7_isSet|Channel_IO1_G7_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO1_G7_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G7_IO2-Sampling" UserName="G7_IO2">
                            <Condition Expression="!(Shield_IO2_G7_isSet|Channel_IO2_G7_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO2_G7_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G7_IO3-Sampling" UserName="G7_IO3">
                            <Condition Expression="!(Shield_IO3_G7_isSet|Channel_IO3_G7_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO3_G7_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G7_IO4-Sampling" UserName="G7_IO4">
                            <Condition Expression="!(Shield_IO4_G7_isSet|Channel_IO4_G7_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO4_G7_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G7_IO5-Sampling" UserName="G7_IO5" RemoveCondition="DIE416|DIE429">
                            <Condition Expression="!(Shield_IO5_G7_isSet|Channel_IO5_G7_isSet|Semaphore_TOUCHSENSING_MODE_SOFTWARE)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO5"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO5_G7_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G7_IO6-Sampling" UserName="G7_IO6" RemoveCondition="DIE416|DIE429">
                            <Condition Expression="!(Shield_IO6_G7_isSet|Channel_IO6_G7_isSet|Semaphore_TOUCHSENSING_MODE_SOFTWARE)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO6"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO6_G7_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G7_IO7-Sampling" UserName="G7_IO7" RemoveCondition="DIE416|DIE429">
                            <Condition Expression="!(Shield_IO7_G7_isSet|Channel_IO7_G7_isSet|Semaphore_TOUCHSENSING_MODE_SOFTWARE)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO7"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO7_G7_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Sampling_IO_G7_isSet</Semaphore>
                </Mode>

                <!-- The I/O Shield choice -->
                <Mode Name="Shield" UserName="Shield">
                    <Condition Expression="(!(OneChannel_IO_G7_isSet|Shield_IO_G1_isSet|Shield_IO_G2_isSet|Shield_IO_G3_isSet|Shield_IO_G4_isSet|Shield_IO_G5_isSet|Shield_IO_G6_isSet|Shield_IO_G8_isSet|Shield_IO_G9_isSet|Shield_IO_G10_isSet|Shield_IO_G11_isSet))" Diagnostic="An IO is selected as Shield IO in other goups or as a Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G7_IO1-Shield" UserName="G7_IO1" >
                            <Condition Expression="!Sampling_IO1_G7_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO1_G7_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G7_IO2-Shield" UserName="G7_IO2">
                            <Condition Expression="!Sampling_IO2_G7_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO2_G7_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G7_IO3-Shield" UserName="G7_IO3">
                            <Condition Expression="!Sampling_IO3_G7_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO3_G7_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G7_IO4-Shield" UserName="G7_IO4">
                            <Condition Expression="!Sampling_IO4_G7_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO4_G7_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G7_IO5-Shield" UserName="G7_IO5" RemoveCondition="DIE416|DIE429|DIE436">
                            <Condition Expression="!Sampling_IO5_G7_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO5"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO5_G7_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G7_IO6-Shield" UserName="G7_IO6" RemoveCondition="DIE416|DIE429|DIE436">
                            <Condition Expression="!Sampling_IO6_G7_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO6"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO6_G7_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G7_IO7-Shield" UserName="G7_IO7" RemoveCondition="DIE416|DIE429|DIE436">
                            <Condition Expression="!Sampling_IO7_G7_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO7"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO7_G7_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Shield_IO_G7_isSet</Semaphore>
                </Mode>

                <!-- The I/O Channels choice -->
                <Mode Name="G7_IO1" UserName="G7_IO1">
                    <Condition Expression="!(Shield_IO_G7_isSet|Sampling_IO1_G7_isSet|((G7_Activated_Channels = 4) &amp; !Channel_IO1_G7_isSet))" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group and max simultaneous available pins is 5"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G7_IO1-Channel" UserName="G7_IO1">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO1"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO1_G7_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G7_isSet</Semaphore>
                </Mode>
                <Mode Name="G7_IO2" UserName="G7_IO2">
                    <Condition Expression="!(Shield_IO_G7_isSet|Sampling_IO2_G7_isSet|((G7_Activated_Channels = 4) &amp; !Channel_IO2_G7_isSet))" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group and max simultaneous available pins is 5"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G7_IO2-Channel" UserName="G7_IO2">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO2"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO2_G7_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G7_isSet</Semaphore>
                </Mode>
                <Mode Name="G7_IO3" UserName="G7_IO3">
                    <Condition Expression="!(Shield_IO_G7_isSet|Sampling_IO3_G7_isSet|((G7_Activated_Channels = 4) &amp; !Channel_IO3_G7_isSet))" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group and max simultaneous available pins is 5"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G7_IO3-Channel" UserName="G7_IO3">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO3"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO3_G7_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G7_isSet</Semaphore>
                </Mode>
                <Mode Name="G7_IO4" UserName="G7_IO4">
                    <Condition Expression="!(Shield_IO_G7_isSet|Sampling_IO4_G7_isSet|((G7_Activated_Channels = 4) &amp; !Channel_IO4_G7_isSet))" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group and max simultaneous available pins is 5"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G7_IO4-Channel" UserName="G7_IO4">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO4"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO4_G7_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G7_isSet</Semaphore>
                </Mode>
                <Mode Name="G7_IO5" UserName="G7_IO5" RemoveCondition="DIE416|DIE429">
                    <Condition Expression="!(Shield_IO_G7_isSet|Sampling_IO5_G7_isSet|((G7_Activated_Channels = 4) &amp; !Channel_IO5_G7_isSet)|(Semaphore_TOUCHSENSING_MODE_HARDWARE))" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group and max simultaneous available pins is 5"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G7_IO5-Channel" UserName="G7_IO5">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO5"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO5_G7_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G7_isSet</Semaphore>
                </Mode>
                <Mode Name="G7_IO6" UserName="G7_IO6" RemoveCondition="DIE416|DIE429">
                    <Condition Expression="!(Shield_IO_G7_isSet|Sampling_IO6_G7_isSet|((G7_Activated_Channels = 4) &amp; !Channel_IO6_G7_isSet)|(Semaphore_TOUCHSENSING_MODE_HARDWARE))" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group and max simultaneous available pins is 5"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G7_IO6-Channel" UserName="G7_IO6">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO6"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO6_G7_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G7_isSet</Semaphore>
                </Mode>
                <Mode Name="G7_IO7" UserName="G7_IO7" RemoveCondition="DIE416|DIE429">
                    <Condition Expression="!(Shield_IO_G7_isSet|Sampling_IO7_G7_isSet|((G7_Activated_Channels = 4) &amp; !Channel_IO7_G7_isSet)|(Semaphore_TOUCHSENSING_MODE_HARDWARE))" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group and max simultaneous available pins is 5"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G7_IO7-Channel" UserName="G7_IO7">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G7_IO7"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO7_G7_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G7_isSet</Semaphore>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>GROUP7_isUsed</Semaphore>
        </Mode>

        <Mode Name="G8" UserName="Group 8">
            <ModeLogicOperator Name="OR">

                <!-- The I/O Sampling choice -->
                <Mode Name="Sampling" UserName="Sampling">
                    <Condition Expression="!(Channel_IO1_G8_isSet &amp; Channel_IO2_G8_isSet &amp; Channel_IO3_G8_isSet &amp; Channel_IO4_G8_isSet)" Diagnostic="All IOs are selected as Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G8_IO1-Sampling" UserName="G8_IO1" >
                            <Condition Expression="!(Shield_IO1_G8_isSet|Channel_IO1_G8_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G8_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO1_G8_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G8_IO2-Sampling" UserName="G8_IO2">
                            <Condition Expression="!(Shield_IO2_G8_isSet|Channel_IO2_G8_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G8_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO2_G8_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G8_IO3-Sampling" UserName="G8_IO3">
                            <Condition Expression="!(Shield_IO3_G8_isSet|Channel_IO3_G8_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G8_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO3_G8_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G8_IO4-Sampling" UserName="G8_IO4">
                            <Condition Expression="!(Shield_IO4_G8_isSet|Channel_IO4_G8_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G8_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO4_G8_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Sampling_IO_G8_isSet</Semaphore>
                </Mode>

                <!-- The I/O Shield choice -->
                <Mode Name="Shield" UserName="Shield">
                    <Condition Expression="(!(OneChannel_IO_G8_isSet|Shield_IO_G1_isSet|Shield_IO_G2_isSet|Shield_IO_G3_isSet|Shield_IO_G4_isSet|Shield_IO_G5_isSet|Shield_IO_G6_isSet|Shield_IO_G7_isSet|Shield_IO_G9_isSet|Shield_IO_G10_isSet|Shield_IO_G11_isSet))" Diagnostic="An IO is selected as Shield IO in other goups or as a Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G8_IO1-Shield" UserName="G8_IO1" >
                            <Condition Expression="!Sampling_IO1_G8_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G8_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO1_G8_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G8_IO2-Shield" UserName="G8_IO2">
                            <Condition Expression="!Sampling_IO2_G8_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G8_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO2_G8_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G8_IO3-Shield" UserName="G8_IO3">
                            <Condition Expression="!Sampling_IO3_G8_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G8_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO3_G8_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G8_IO4-Shield" UserName="G8_IO4">
                            <Condition Expression="!Sampling_IO4_G8_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G8_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO4_G8_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Shield_IO_G8_isSet</Semaphore>
                </Mode>

                <!-- The I/O Channels choice -->
                <Mode Name="G8_IO1" UserName="G8_IO1">
                    <Condition Expression="!(Shield_IO_G8_isSet|Sampling_IO1_G8_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G8_IO1-Channel" UserName="G8_IO1">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G8_IO1"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO1_G8_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G8_isSet</Semaphore>
                </Mode>
                <Mode Name="G8_IO2" UserName="G8_IO2">
                    <Condition Expression="!(Shield_IO_G8_isSet|Sampling_IO2_G8_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G8_IO2-Channel" UserName="G8_IO2">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G8_IO2"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO2_G8_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G8_isSet</Semaphore>
                </Mode>
                <Mode Name="G8_IO3" UserName="G8_IO3">
                    <Condition Expression="!(Shield_IO_G8_isSet|Sampling_IO3_G8_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G8_IO3-Channel" UserName="G8_IO3">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G8_IO3"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO3_G8_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G8_isSet</Semaphore>
                </Mode>
                <Mode Name="G8_IO4" UserName="G8_IO4">
                    <Condition Expression="!(Shield_IO_G8_isSet|Sampling_IO4_G8_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G8_IO4-Channel" UserName="G8_IO4">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G8_IO4"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO4_G8_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G8_isSet</Semaphore>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>GROUP8_isUsed</Semaphore>
        </Mode>

        <Mode Name="G9" UserName="Group 9">
            <ModeLogicOperator Name="OR">

                <!-- The I/O Sampling choice -->
                <Mode Name="Sampling" UserName="Sampling">
                    <Condition Expression="!(Channel_IO1_G9_isSet &amp; Channel_IO2_G9_isSet &amp; Channel_IO3_G9_isSet &amp; Channel_IO4_G9_isSet)" Diagnostic="All IOs are selected as Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G9_IO1-Sampling" UserName="G9_IO1" >
                            <Condition Expression="!(Shield_IO1_G9_isSet|Channel_IO1_G9_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G9_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO1_G9_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G9_IO2-Sampling" UserName="G9_IO2">
                            <Condition Expression="!(Shield_IO2_G9_isSet|Channel_IO2_G9_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G9_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO2_G9_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G9_IO3-Sampling" UserName="G9_IO3"  RemoveCondition="DIE416|DIE429|DIE427">
                            <Condition Expression="!(Shield_IO3_G9_isSet|Channel_IO3_G9_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G9_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO3_G9_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G9_IO4-Sampling" UserName="G9_IO4" RemoveCondition="DIE416|DIE429|DIE427">
                            <Condition Expression="!(Shield_IO4_G9_isSet|Channel_IO4_G9_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G9_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO4_G9_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Sampling_IO_G9_isSet</Semaphore>
                </Mode>

                <!-- The I/O Shield choice -->
                <Mode Name="Shield" UserName="Shield">
                    <Condition Expression="(!(OneChannel_IO_G9_isSet|Shield_IO_G1_isSet|Shield_IO_G2_isSet|Shield_IO_G3_isSet|Shield_IO_G4_isSet|Shield_IO_G5_isSet|Shield_IO_G6_isSet|Shield_IO_G7_isSet|Shield_IO_G8_isSet|Shield_IO_G10_isSet|Shield_IO_G11_isSet))" Diagnostic="An IO is selected as Shield IO in other goups or as a Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G9_IO1-Shield" UserName="G9_IO1" >
                            <Condition Expression="!Sampling_IO1_G9_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G9_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO1_G9_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G9_IO2-Shield" UserName="G9_IO2">
                            <Condition Expression="!Sampling_IO2_G9_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G9_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO2_G9_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G9_IO3-Shield" UserName="G9_IO3" RemoveCondition="DIE416|DIE427|DIE429">
                            <Condition Expression="!Sampling_IO3_G9_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G9_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO3_G9_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G9_IO4-Shield" UserName="G9_IO4" RemoveCondition="DIE416|DIE427|DIE429">
                            <Condition Expression="!Sampling_IO4_G9_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G9_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO4_G9_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Shield_IO_G9_isSet</Semaphore>
                </Mode>

                <!-- The I/O Channels choice -->
                <Mode Name="G9_IO1" UserName="G9_IO1">
                    <Condition Expression="!(Shield_IO_G9_isSet|Sampling_IO1_G9_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G9_IO1-Channel" UserName="G9_IO1">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G9_IO1"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO1_G9_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G9_isSet</Semaphore>
                </Mode>
                <Mode Name="G9_IO2" UserName="G9_IO2">
                    <Condition Expression="!(Shield_IO_G9_isSet|Sampling_IO2_G9_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G9_IO2-Channel" UserName="G9_IO2">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G9_IO2"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO2_G9_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G9_isSet</Semaphore>
                </Mode>
                <Mode Name="G9_IO3" UserName="G9_IO3" RemoveCondition="DIE416|DIE427|DIE429">
                    <Condition Expression="!(Shield_IO_G9_isSet|Sampling_IO3_G9_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G9_IO3-Channel" UserName="G9_IO3">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G9_IO3"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO3_G9_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G9_isSet</Semaphore>
                </Mode>
                <Mode Name="G9_IO4" UserName="G9_IO4" RemoveCondition="DIE416|DIE427|DIE429">
                    <Condition Expression="!(Shield_IO_G9_isSet|Sampling_IO4_G9_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G9_IO4-Channel" UserName="G9_IO4">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G9_IO4"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO4_G9_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G9_isSet</Semaphore>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>GROUP9_isUsed</Semaphore>
        </Mode>

        <Mode Name="G10" UserName="Group 10">
            <ModeLogicOperator Name="OR">

                <!-- The I/O Sampling choice -->
                <Mode Name="Sampling" UserName="Sampling">
                    <Condition Expression="!(Channel_IO1_G10_isSet &amp; Channel_IO2_G10_isSet &amp; Channel_IO3_G10_isSet &amp; Channel_IO4_G10_isSet)" Diagnostic="All IOs are selected as Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G10_IO1-Sampling" UserName="G10_IO1" >
                            <Condition Expression="!(Shield_IO1_G10_isSet|Channel_IO1_G10_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G10_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO1_G10_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G10_IO2-Sampling" UserName="G10_IO2">
                            <Condition Expression="!(Shield_IO2_G10_isSet|Channel_IO2_G10_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G10_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO2_G10_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G10_IO3-Sampling" UserName="G10_IO3">
                            <Condition Expression="!(Shield_IO3_G10_isSet|Channel_IO3_G10_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G10_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO3_G10_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G10_IO4-Sampling" UserName="G10_IO4">
                            <Condition Expression="!(Shield_IO4_G10_isSet|Channel_IO4_G10_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G10_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO4_G10_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Sampling_IO_G10_isSet</Semaphore>
                </Mode>

                <!-- The I/O Shield choice -->
                <Mode Name="Shield" UserName="Shield">
                    <Condition Expression="(!(OneChannel_IO_G10_isSet|Shield_IO_G1_isSet|Shield_IO_G2_isSet|Shield_IO_G3_isSet|Shield_IO_G4_isSet|Shield_IO_G5_isSet|Shield_IO_G6_isSet|Shield_IO_G7_isSet|Shield_IO_G8_isSet|Shield_IO_G9_isSet|Shield_IO_G11_isSet))" Diagnostic="An IO is selected as Shield IO in other goups or as a Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G10_IO1-Shield" UserName="G10_IO1" >
                            <Condition Expression="!Sampling_IO1_G10_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G10_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO1_G10_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G10_IO2-Shield" UserName="G10_IO2">
                            <Condition Expression="!Sampling_IO2_G10_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G10_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO2_G10_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G10_IO3-Shield" UserName="G10_IO3">
                            <Condition Expression="!Sampling_IO3_G10_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G10_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO3_G10_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G10_IO4-Shield" UserName="G10_IO4">
                            <Condition Expression="!Sampling_IO4_G10_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G10_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO4_G10_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Shield_IO_G10_isSet</Semaphore>
                </Mode>

                <!-- The I/O Channels choice -->
                <Mode Name="G10_IO1" UserName="G10_IO1">
                    <Condition Expression="!(Shield_IO_G10_isSet|Sampling_IO1_G10_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G10_IO1-Channel" UserName="G10_IO1">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G10_IO1"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO1_G10_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G10_isSet</Semaphore>
                </Mode>
                <Mode Name="G10_IO2" UserName="G10_IO2">
                    <Condition Expression="!(Shield_IO_G10_isSet|Sampling_IO2_G10_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G10_IO2-Channel" UserName="G10_IO2">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G10_IO2"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO2_G10_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G10_isSet</Semaphore>
                </Mode>
                <Mode Name="G10_IO3" UserName="G10_IO3">
                    <Condition Expression="!(Shield_IO_G10_isSet|Sampling_IO3_G10_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G10_IO3-Channel" UserName="G10_IO3">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G10_IO3"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO3_G10_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G10_isSet</Semaphore>
                </Mode>
                <Mode Name="G10_IO4" UserName="G10_IO4">
                    <Condition Expression="!(Shield_IO_G10_isSet|Sampling_IO4_G10_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G10_IO4-Channel" UserName="G10_IO4">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G10_IO4"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO4_G10_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G10_isSet</Semaphore>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>GROUP10_isUsed</Semaphore>
        </Mode>

        <Mode Name="G11" UserName="Group 11">
            <ModeLogicOperator Name="OR">

                <!-- The I/O Sampling choice -->
                <Mode Name="Sampling" UserName="Sampling">
                    <Condition Expression="!(Channel_IO1_G11_isSet &amp; Channel_IO2_G11_isSet &amp; Channel_IO3_G11_isSet &amp; Channel_IO4_G11_isSet &amp; Channel_IO4_G11_isSet)" Diagnostic="All IOs are selected as Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G11_IO1-Sampling" UserName="G11_IO1"  RemoveCondition="DIE429|DIE427|DIE416">
                            <Condition Expression="!(Shield_IO1_G11_isSet|Channel_IO1_G11_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G11_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO1_G11_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G11_IO2-Sampling" UserName="G11_IO2"  RemoveCondition="DIE429|DIE427|DIE416">
                            <Condition Expression="!(Shield_IO2_G11_isSet|Channel_IO2_G11_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G11_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO2_G11_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G11_IO3-Sampling" UserName="G11_IO3"  RemoveCondition="DIE429|DIE427|DIE416">
                            <Condition Expression="!(Shield_IO3_G11_isSet|Channel_IO3_G11_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G11_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO3_G11_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G11_IO4-Sampling" UserName="G11_IO4" RemoveCondition="DIE429|DIE427|DIE416">
                            <Condition Expression="!(Shield_IO4_G11_isSet|Channel_IO4_G11_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G11_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO4_G11_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G11_IO5-Sampling" UserName="G11_IO5" RemoveCondition="DIE429|DIE427|DIE416">
                            <Condition Expression="!(Shield_IO5_G11_isSet|Channel_IO5_G11_isSet)" Diagnostic="This IO is selected as Shield or Channel IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G11_IO5"/>
                            </SignalLogicalOp>
                            <Semaphore>Sampling_IO5_G11_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Sampling_IO_G11_isSet</Semaphore>
                </Mode>

                <!-- The I/O Shield choice -->
                <Mode Name="Shield" UserName="Shield">
                    <Condition Expression="(!(OneChannel_IO_G11_isSet|Shield_IO_G1_isSet|Shield_IO_G2_isSet|Shield_IO_G3_isSet|Shield_IO_G4_isSet|Shield_IO_G5_isSet|Shield_IO_G6_isSet|Shield_IO_G7_isSet|Shield_IO_G8_isSet|Shield_IO_G9_isSet|Shield_IO_G10_isSet))" Diagnostic="An IO is selected as Shield IO in other goups or as a Channel IO in this group"/>
                    <ModeLogicOperator Name="XOR">
                        <Mode Name="G11_IO1-Shield" UserName="G11_IO1"  RemoveCondition="DIE429|DIE427|DIE416">
                            <Condition Expression="!Sampling_IO1_G11_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G11_IO1"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO1_G11_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G11_IO2-Shield" UserName="G11_IO2"  RemoveCondition="DIE429|DIE427|DIE416">
                            <Condition Expression="!Sampling_IO2_G11_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G11_IO2"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO2_G11_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G11_IO3-Shield" UserName="G11_IO3" RemoveCondition="DIE429|DIE427|DIE416">
                            <Condition Expression="!Sampling_IO3_G11_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G11_IO3"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO3_G11_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G11_IO4-Shield" UserName="G11_IO4" RemoveCondition="DIE429|DIE427|DIE416">
                            <Condition Expression="!Sampling_IO4_G11_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G11_IO4"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO4_G11_isSet</Semaphore>
                        </Mode>
                        <Mode Name="G11_IO5-Shield" UserName="G11_IO5" RemoveCondition="DIE429|DIE427|DIE416">
                            <Condition Expression="!Sampling_IO5_G11_isSet" Diagnostic="This IO is selected as a Sampling IO in this group"/>
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G11_IO5"/>
                            </SignalLogicalOp>
                            <Semaphore>Shield_IO5_G11_isSet</Semaphore>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Shield_IO_G11_isSet</Semaphore>
                </Mode>

                <!-- The I/O Channels choice -->
                <Mode Name="G11_IO1" UserName="G11_IO1"> <!-- RemoveCondition="DIE429|DIE427|DIE416"> -->
                    <Condition Expression="!(Shield_IO_G11_isSet|Sampling_IO1_G11_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G11_IO1-Channel" UserName="G11_IO1">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G11_IO1"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO1_G11_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G11_isSet</Semaphore>
                </Mode>
                <Mode Name="G11_IO2" UserName="G11_IO2">
                    <Condition Expression="!(Shield_IO_G11_isSet|Sampling_IO2_G11_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G11_IO2-Channel" UserName="G11_IO2">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G11_IO2"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO2_G11_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G11_isSet</Semaphore>
                </Mode>
                <Mode Name="G11_IO3" UserName="G11_IO3">
                    <Condition Expression="!(Shield_IO_G11_isSet|Sampling_IO3_G11_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G11_IO3-Channel" UserName="G11_IO3">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G11_IO3"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO3_G11_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G11_isSet</Semaphore>
                </Mode>
                <Mode Name="G11_IO4" UserName="G11_IO4">
                    <Condition Expression="!(Shield_IO_G11_isSet|Sampling_IO4_G11_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G11_IO4-Channel" UserName="G11_IO4">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G11_IO4"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO4_G11_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G11_isSet</Semaphore>
                </Mode>
                <Mode Name="G11_IO5" UserName="G11_IO5">
                    <Condition Expression="!(Shield_IO_G11_isSet|Sampling_IO5_G11_isSet)" Diagnostic="This IO is selected as Sampling IO in this group, or a Shield IO is used in this group"/>
                    <ModeLogicOperator Name="OR">
                        <Mode Name="G11_IO5-Channel" UserName="G11_IO5">
                            <SignalLogicalOp Name="AND">
                                <Signal Name="G11_IO5"/>
                            </SignalLogicalOp>
                        </Mode>
                    </ModeLogicOperator>
                    <Semaphore>Channel_IO5_G11_isSet</Semaphore>
                    <Semaphore>OneChannel_IO_G11_isSet</Semaphore>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>GROUP11_isUsed</Semaphore>
        </Mode>
        <!-- Synchronized acquisition mode -->
        <Mode Name="SYNC">
            <Condition Expression="GROUP1_isUsed|GROUP2_isUsed|GROUP3_isUsed|GROUP4_isUsed|GROUP5_isUsed|GROUP6_isUsed|GROUP7_isUsed|GROUP8_isUsed|GROUP9_isUsed|GROUP10_isUsed|GROUP11_isUsed" Diagnostic="Available only if at least one group is used"/>
            <ModeLogicOperator Name="OR">
                <Mode Name="SYNC">
                    <SignalLogicalOp Name="AND">
                        <Signal Name="SYNC"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Semaphore>SYNC_Pin_Selected</Semaphore>
        </Mode>
    </ModeLogicOperator>

    <!-- Signals -->	
    <RefSignal IOMode="Analog" Name="SYNC"/>
    <RefSignal IOMode="Analog" Name="G1_IO1"/>
    <RefSignal IOMode="Analog" Name="G1_IO2"/>
    <RefSignal IOMode="Analog" Name="G1_IO3"/>
    <RefSignal IOMode="Analog" Name="G1_IO4"/>
    <RefSignal IOMode="Analog" Name="G2_IO1"/>
    <RefSignal IOMode="Analog" Name="G2_IO2"/>
    <RefSignal IOMode="Analog" Name="G2_IO3"/>
    <RefSignal IOMode="Analog" Name="G2_IO4"/>
    <RefSignal IOMode="Analog" Name="G2_IO5"/>
    <RefSignal IOMode="Analog" Name="G3_IO1"/>
    <RefSignal IOMode="Analog" Name="G3_IO2"/>
    <RefSignal IOMode="Analog" Name="G3_IO3"/>
    <RefSignal IOMode="Analog" Name="G3_IO4"/>
    <RefSignal IOMode="Analog" Name="G3_IO5"/>
    <RefSignal IOMode="Analog" Name="G4_IO1"/>
    <RefSignal IOMode="Analog" Name="G4_IO2"/>
    <RefSignal IOMode="Analog" Name="G4_IO3"/>
    <RefSignal IOMode="Analog" Name="G4_IO4"/>
    <RefSignal IOMode="Analog" Name="G5_IO1"/>
    <RefSignal IOMode="Analog" Name="G5_IO2"/>
    <RefSignal IOMode="Analog" Name="G5_IO3"/>
    <RefSignal IOMode="Analog" Name="G5_IO4"/>
    <RefSignal IOMode="Analog" Name="G6_IO1"/>
    <RefSignal IOMode="Analog" Name="G6_IO2"/>
    <RefSignal IOMode="Analog" Name="G6_IO3"/>
    <RefSignal IOMode="Analog" Name="G6_IO4"/>
    <RefSignal IOMode="Analog" Name="G7_IO1"/>
    <RefSignal IOMode="Analog" Name="G7_IO2"/>
    <RefSignal IOMode="Analog" Name="G7_IO3"/>
    <RefSignal IOMode="Analog" Name="G7_IO4"/>
    <RefSignal IOMode="Analog" Name="G7_IO5"/>
    <RefSignal IOMode="Analog" Name="G7_IO6"/>
    <RefSignal IOMode="Analog" Name="G7_IO7"/>
    <RefSignal IOMode="Analog" Name="G8_IO1"/>
    <RefSignal IOMode="Analog" Name="G8_IO2"/>
    <RefSignal IOMode="Analog" Name="G8_IO3"/>
    <RefSignal IOMode="Analog" Name="G8_IO4"/>
    <RefSignal IOMode="Analog" Name="G9_IO1"/>
    <RefSignal IOMode="Analog" Name="G9_IO2"/>
    <RefSignal IOMode="Analog" Name="G9_IO3"/>
    <RefSignal IOMode="Analog" Name="G9_IO4"/>
    <RefSignal IOMode="Analog" Name="G10_IO1"/>
    <RefSignal IOMode="Analog" Name="G10_IO2"/>
    <RefSignal IOMode="Analog" Name="G10_IO3"/>
    <RefSignal IOMode="Analog" Name="G10_IO4"/>
    <RefSignal IOMode="Analog" Name="G11_IO1"/>
    <RefSignal IOMode="Analog" Name="G11_IO2"/>
    <RefSignal IOMode="Analog" Name="G11_IO3"/>
    <RefSignal IOMode="Analog" Name="G11_IO4"/>
    <RefSignal IOMode="Analog" Name="G11_IO5"/>
    <Semaphore>TSC_isUsed</Semaphore>
    <Semaphore>MW_TSC_MW</Semaphore>
</IP>
