<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<IP xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance"
    ns0:schemaLocation="http://mcd.rou.st.com/modules.php?name=mcu ../../../../../../../doc/V4/Development/Specifications/db/IP_Modes.xsd"
    xmlns="http://mcd.rou.st.com/modules.php?name=mcu"
    DBVersion="V4.0"
    IPType="middleware"
    IpGroup="Middleware"
    Name="FATFS"
    Version="l5-v0.1.0_Cube">
    <About>FATFS: FAT File System</About>
        
    <RefParameter Name="FATFS_version" Comment="FATFS version" DefaultValue="11" Type="uniqueElementList" Group="Version" TabName="Set Defines">
        <PossibleValue Comment="R0.11" Value="11"/>
        <Condition Diagnostic="Version available for F0,F1,F2,F3" Expression="STM32F0|STM32F1|STM32F2|STM32F3"/>
    </RefParameter>
    <RefParameter Name="FATFS_version" Comment="FATFS version" DefaultValue="12" Type="uniqueElementList" Group="Version" TabName="Set Defines">
        <PossibleValue Comment="R0.12c" Value="12"/>
        <Condition Diagnostic="Version available for F4,F7,H7,G0,G4,L0,L1,L4,WB,L5" Expression="STM32F4|STM32F7|STM32H7|STM32G0|STM32G4|STM32L0|STM32L1|STM32L4|STM32WB|STM32L5"/>
    </RefParameter>	
    <RefParameter Name="FATFS_version" Comment="FATFS version" DefaultValue="13" Type="uniqueElementList" Group="Version" TabName="Set Defines">
        <PossibleValue Comment="R0.13" Value="13"/>
        <Condition Diagnostic="Version available for test purpose" Expression="STM32xx"/>  <!-- Replace STM32xx by a real series and remove it from above conditions -->
    </RefParameter>	
    <RefParameter Name="FATFS_version" Comment="FATFS version" DefaultValue="12" Type="uniqueElementList" Group="Version" TabName="Set Defines">
		<PossibleValue Comment="R0.12c" Value="12" />
    </RefParameter>
    <!-- In case we want to support multi-versions on a single series, could be like that:
    <RefParameter Name="FATFS_version" Comment="FATFS version" DefaultValue="12" Type="list" Group="Version" TabName="Set Defines">
        <PossibleValue Comment="R0.11" Value="11"/>
        <PossibleValue Comment="R0.12c" Value="12"/>
        <PossibleValue Comment="R0.13" Value="13"/>
        <Condition Diagnostic="Multi-versions available for F4" Expression="STM32F4"/>
    </RefParameter>
    -->
    
    <!-- Fix issue with S_FREERTOS$context on L5 -->
    <RefParameter Name="FATFS_CONTEXT" Comment="FatFS context (debug purpose)" DefaultValue="1" Type="uniqueElementList" Group="CONTEXT" TabName="Set Defines">
        <Condition Diagnostic="Secure runtime enabled with TZEN=1" Expression="FATFS_SECURE &amp; S_FATFS_ENABLED"/>
        <PossibleValue Comment="TZEN=1, Secure context" Value="1" Semaphore="S_FATFS_M33S"/>
        <Description>TZEN=1 and secure context</Description>
    </RefParameter>
    <RefParameter Name="FATFS_CONTEXT" Comment="FatFS context (debug purpose)" DefaultValue="2" Type="uniqueElementList" Group="CONTEXT" TabName="Set Defines">
        <Condition Diagnostic="Non secure runtime enabled with TZEN=1" Expression="FATFS_NON_SECURE &amp; S_FATFS_ENABLED"/>
        <PossibleValue Comment="TZEN=1, Non secure context" Value="2" Semaphore="S_FATFS_M33NS"/>
        <Description>TZEN=1 and secure context</Description>
    </RefParameter>
    <RefParameter Name="FATFS_CONTEXT" Comment="FatFS context (debug purpose)" DefaultValue="3" Type="uniqueElementList" Group="CONTEXT" TabName="Set Defines">
        <Condition Diagnostic="TZEN=0, No context" Expression="S_FATFS_ENABLED"/>
        <PossibleValue Comment="None" Value="3" Semaphore="S_FATFS"/>
        <Description>TZEN=0</Description>
    </RefParameter>
     <RefParameter Name="FATFS_CONTEXT" Comment="FatFS context (debug purpose)" DefaultValue="0" Type="uniqueElementList" Group="CONTEXT" TabName="Config parameters">
        <PossibleValue Comment="None" Value="0"/>
        <Description>Not in use.</Description>
    </RefParameter>
    
    
    <RefParameter Name="RTOS_IN_USE" Comment="RTOS in use" DefaultValue="2" Type="uniqueElementList" Group="DEBUG" TabName="Set Defines">
        <Condition Diagnostic="RTOS enabled" Expression="( (S_FATFS_M33S &amp; S_FREERTOS_M33S) | (S_FATFS_M33NS &amp; S_FREERTOS_M33NS) | (S_FREERTOS) )"/>
        <PossibleValue Comment="Yes" Value="1"/>
        <Description>RTOS in use (on L5)</Description>
    </RefParameter>
     <RefParameter Name="RTOS_IN_USE" Comment="RTOS in use" DefaultValue="0" Type="uniqueElementList" Group="DEBUG" TabName="Set Defines">
        <PossibleValue Comment="No" Value="0"/>
        <Description>RTOS not in use.</Description>
    </RefParameter>

    <!-- Added for L5 (that uses $context in another way than H7 dual core -->
    <RefParameter Name="SDIO_MODE_IN_USE" Comment="SD Card Mode status" DefaultValue="1" Type="uniqueElementList" Group="DEBUG" TabName="Set Defines">
        <Condition Diagnostic="SDIO on a mcu with a M33." Expression="S_FATFS_SDIO_FOR_M33"/>
        <PossibleValue Comment="Enabled" Value="1"/>
        <Description>In use on L5</Description>
    </RefParameter>
     <RefParameter Name="SDIO_MODE_IN_USE" Comment="SD Card Mode status" DefaultValue="0" Type="uniqueElementList" Group="DEBUG" TabName="Set Defines">
        <PossibleValue Comment="Disabled" Value="0"/>
        <Description>Not in use.</Description>
    </RefParameter>

    <RefParameter Name="SRAM_MODE_IN_USE" Comment="External SRAM Mode status" DefaultValue="1" Type="uniqueElementList" Group="DEBUG" TabName="Set Defines">
        <Condition Diagnostic="SRAM on a mcu with a M33." Expression="S_FATFS_SRAM_FOR_M33"/>
        <PossibleValue Comment="Enabled" Value="1"/>
        <Description>In use on L5</Description>
    </RefParameter>
     <RefParameter Name="SRAM_MODE_IN_USE" Comment="External SRAM Mode status" DefaultValue="0" Type="uniqueElementList" Group="DEBUG" TabName="Set Defines">
        <PossibleValue Comment="Disabled" Value="0"/>
        <Description>Not in use.</Description>
    </RefParameter>

    <RefParameter Name="USER_MODE_IN_USE" Comment="User-defined Mode status" DefaultValue="1" Type="uniqueElementList" Group="DEBUG" TabName="Set Defines">
        <Condition Diagnostic="USER mode on a mcu with a M33." Expression="S_FATFS_Generic_FOR_M33"/>
        <PossibleValue Comment="Enabled" Value="1"/>
        <Description>In use on L5</Description>
    </RefParameter>
     <RefParameter Name="USER_MODE_IN_USE" Comment="User-defined Mode status" DefaultValue="0" Type="uniqueElementList" Group="DEBUG" TabName="Set Defines">
        <PossibleValue Comment="Disabled" Value="0"/>
        <Description>Not in use.</Description>
    </RefParameter>
    <!-- Added for L5 (that uses $context in another way than H7 dual core -->

    <!-- Since R0.11, max value for VOLUMEs is 9 (no more 10) -->
    <RefParameter Name="MAX_VOLUMES_VALUE" Comment="Max value for the volumes parameter" DefaultValue="9" Type="integer" Visible="false">
        <PossibleValue Comment="Since R0.11, max is 9" Value="9"/>
	</RefParameter>

    <RefParameter Name="SD_MODE" Comment="SD MODE" DefaultValue="4" Type="integer" Visible="false">
	    <Condition Diagnostic="SDIO 4 bits" Expression="SDIO_SD_Card &amp; SDIO_Bus4Bits"/>
	</RefParameter>	
  	<RefParameter Name="SD_MODE" Comment="SD MODE" DefaultValue="1" Type="integer" Visible="false">
	    <Condition Diagnostic="SDIO 1 bit" Expression="SDIO_SD_Card &amp; SDIO_Bus1Bit"/>
	</RefParameter>
	<RefParameter Name="SD_MODE" Comment="SD MODE" DefaultValue="null" Type="integer" Visible="false"/>

    <RefParameter Name="SDMMC1_MODE" Comment="SD MODE" DefaultValue="4" Type="integer" Visible="false">
	    <Condition Diagnostic="SDIO 4 bits" Expression="SDMMC1_SD_Card &amp; SDMMC1_Bus4Bits"/>
	</RefParameter>	
  	<RefParameter Name="SDMMC1_MODE" Comment="SD MODE" DefaultValue="1" Type="integer" Visible="false">
	    <Condition Diagnostic="SDIO 1 bit" Expression="SDMMC1_SD_Card &amp; SDMMC1_Bus1Bit"/>
	</RefParameter>
	<RefParameter Name="SDMMC1_MODE" Comment="SD MODE" DefaultValue="null" Type="integer" Visible="false"/>

    <RefParameter Name="SDMMC2_MODE" Comment="SD MODE" DefaultValue="4" Type="integer" Visible="false">
	    <Condition Diagnostic="SDIO 4 bits" Expression="SDMMC2_SD_Card &amp; SDMMC2_Bus4Bits"/>
	</RefParameter>	
  	<RefParameter Name="SDMMC2_MODE" Comment="SD MODE" DefaultValue="1" Type="integer" Visible="false">
	    <Condition Diagnostic="SDIO 1 bit" Expression="SDMMC2_SD_Card &amp; SDMMC2_Bus1Bit"/>
	</RefParameter>
	<RefParameter Name="SDMMC2_MODE" Comment="SD MODE" DefaultValue="null" Type="integer" Visible="false"/>

    <RefParameter Name="Instance" DefaultValue="FATFS" Comment="Instance" Type="" Visible="false"/>

	<!-- #322733 -->
	<RefParameter Name="_HSD" Comment="SDMMC instance" DefaultValue="hsd1" Type="list" Group="SDIO/SDMMC" TabName="Advanced Settings">
	    <!-- <Condition Diagnostic="2 SDMMC available and selected" Expression="(SD_Card | SD_Card_4) &amp; (SDMMC1Used_ForRCC &amp; SDMMC2Used_ForRCC)"/>\  -->
	    <Condition Diagnostic="2 SDMMC available and selected" Expression="SDMMC1_SD_Card &amp; SDMMC2_SD_Card"/>    
		<PossibleValue Comment="SDMMC1" Value="hsd1"/>
		<PossibleValue Comment="SDMMC2" Value="hsd2"/>
	</RefParameter>
	
	<RefParameter Name="_HSD" Comment="SDMMC instance" DefaultValue="hsd1" Type="list" Group="SDIO/SDMMC" TabName="Advanced Settings">
	    <Condition Diagnostic="SDMMC1 available and selected" Expression="SDMMC1_SD_Card"/>
		<PossibleValue Comment="SDMMC1" Value="hsd1"/>
	</RefParameter>
	
	<RefParameter Name="_HSD" Comment="SDMMC instance" DefaultValue="hsd2" Type="list" Group="SDIO/SDMMC" TabName="Advanced Settings">
	    <Condition Diagnostic="SDMMC2 available and selected" Expression="SDMMC2_SD_Card"/>
		<PossibleValue Comment="SDMMC2" Value="hsd2"/>
	</RefParameter>
	
	<RefParameter Name="_HSD" Comment="SDIO instance" DefaultValue="hsd" Type="list" Group="SDIO/SDMMC" TabName="Advanced Settings">
	    <Condition Diagnostic="SDIO available and selected" Expression="SDIO_SD_Card"/>
		<PossibleValue Comment="SDIO" Value="hsd"/>
	</RefParameter>
	
	<RefParameter Name="_HSD" Comment="SDIO/SDMMC instance" DefaultValue="null" Type="list" Group="SDIO/SDMMC" TabName="Advanced Settings">
	</RefParameter>
	
	
	<RefParameter Name="_HUSBH" Comment="USBH instance" DefaultValue="hUsbHostFS" Type="list" Group="USBH" TabName="Advanced Settings">
		<Condition Diagnostic="MSC class selected for both USB" Expression="(USB_HOST_MSC_HS$context|ALL_Classes_HS$context) &amp; (USB_HOST_MSC_FS$context|ALL_Classes_FS$context) &amp; S_FATFS_USB$context"/>
		<PossibleValue Comment="USB Host MSC FS" Value="hUsbHostFS"/>
		<PossibleValue Comment="USB Host MSC HS" Value="hUsbHostHS"/>
	</RefParameter>
	
	<RefParameter Name="_HUSBH" Comment="USBH instance" DefaultValue="hUsbHostFS" Type="list" Group="USBH" TabName="Advanced Settings">
		<Condition Diagnostic="MSC class selected only for USB FS" Expression="(USB_HOST_MSC_FS$context|ALL_Classes_FS$context) &amp; S_FATFS_USB$context"/>
		<PossibleValue Comment="USB Host MSC FS" Value="hUsbHostFS"/>
	</RefParameter>
	
	<RefParameter Name="_HUSBH" Comment="USBH instance" DefaultValue="hUsbHostHS" Type="list" Group="USBH" TabName="Advanced Settings">
		<Condition Diagnostic="MSC class selected only for USB HS" Expression="(USB_HOST_MSC_HS$context|ALL_Classes_HS$context) &amp; S_FATFS_USB$context"/>
		<PossibleValue Comment="USB Host MSC HS" Value="hUsbHostHS"/>
	</RefParameter>
	
	<RefParameter Name="_HUSBH" Comment="USBH instance" DefaultValue="null" Type="list" Group="USBH" TabName="Advanced Settings" Visible="true">
	</RefParameter>
		
	
	<RefParameter Name="_HNAND" Comment="NandFlash instance" DefaultValue="hnand1" Type="list" Group="Nand" TabName="Advanced Settings">
		<Condition Diagnostic="Both Nand selected in IP tree" Expression="NandFlash1 &amp; NandFlash2"/>
		<PossibleValue Comment="Nand Flash1" Value="hnand1"/>
		<PossibleValue Comment="Nand Flash2" Value="hnand2"/>
	</RefParameter>
	
	<RefParameter Name="_HNAND" Comment="NandFlash instance" DefaultValue="hnand1" Type="list" Group="Nand" TabName="Advanced Settings">
		<Condition Diagnostic="Only Nand Flash1 selected in IP tree" Expression="NandFlash1"/>
		<PossibleValue Comment="Nand Flash1" Value="hnand1"/>
	</RefParameter>
	
	<RefParameter Name="_HNAND" Comment="NandFlash instance" DefaultValue="hnand2" Type="list" Group="Nand" TabName="Advanced Settings">
		<Condition Diagnostic="Only Nand Flash2 selected in IP tree" Expression="NandFlash2"/>
		<PossibleValue Comment="Nand Flash2" Value="hnand2"/>
	</RefParameter>
	
	<RefParameter Name="_HNAND" Comment="NandFlash instance" DefaultValue="null" Type="list" Group="Nand" TabName="Advanced Settings" Visible="false">
	</RefParameter>
	
	<!-- choose one instance in the selected SDRAM ones -->
	<RefParameter Name="_HSDRAM" Comment="SDRAM instance" DefaultValue="hsdram1" Type="list" Group="SDRAM" TabName="Advanced Settings">
		<Condition Diagnostic="Both SDRAM selected in IP tree" Expression="SdramChipSelect1 &amp; SdramChipSelect2 &amp; S_FATFS_SDRAM$context"/>
		<PossibleValue Comment="SDRAM1" Value="hsdram1"/>
		<PossibleValue Comment="SDRAM2" Value="hsdram2"/>
	</RefParameter>
	
	<RefParameter Name="_HSDRAM" Comment="SDRAM instance " DefaultValue="hsdram1" Type="list" Group="SDRAM" TabName="Advanced Settings">
		<Condition Diagnostic="Only SDRAM1 selected in IP tree" Expression="SdramChipSelect1 &amp; S_FATFS_SDRAM$context"/>
		<PossibleValue Comment="SDRAM1" Value="hsdram1"/>
	</RefParameter>
	
	<RefParameter Name="_HSDRAM" Comment="SDRAM instance" DefaultValue="hsdram2" Type="list" Group="SDRAM" TabName="Advanced Settings">
		<Condition Diagnostic="Only SDRAM2 selected in IP tree" Expression="SdramChipSelect2 &amp; S_FATFS_SDRAM$context"/>
		<PossibleValue Comment="SDRAM2" Value="hsdram2"/>
	</RefParameter>

	<RefParameter Name="_HSDRAM" Comment="SDRAM instance" DefaultValue="null" Type="list" Group="SDRAM" TabName="Advanced Settings" Visible="false">
	</RefParameter>

	<!-- choose one instance in the selected SRAM ones -->
	<RefParameter Name="VIRTUAL_SRAM1" Type="integer" Comment="SRAM1 on" DefaultValue="1" Group="SRAM" Visible="false">
	    <Condition Expression="(Sram1|Psram1|MuxedPsram1|Lcd1)" Diagnostic=""/>
    </RefParameter>	
    <RefParameter Name="VIRTUAL_SRAM1" Type="integer" Comment="SRAM1 off" DefaultValue="0" Group="SRAM" Visible="false"/>

	<RefParameter Name="VIRTUAL_SRAM2" Type="integer" Comment="SRAM2 on" DefaultValue="1" Group="SRAM" Visible="false">
	    <Condition Expression="(Sram2|Psram2|MuxedPsram2|Lcd2)" Diagnostic=""/>
    </RefParameter>	
    <RefParameter Name="VIRTUAL_SRAM2" Type="integer" Comment="SRAM2 off" DefaultValue="0" Group="SRAM" Visible="false"/>

	<RefParameter Name="VIRTUAL_SRAM3" Type="integer" Comment="SRAM3 on" DefaultValue="1" Group="SRAM" Visible="false">
	    <Condition Expression="(Sram3|Psram3|MuxedPsram3|Lcd3)" Diagnostic=""/>
    </RefParameter>	
    <RefParameter Name="VIRTUAL_SRAM3" Type="integer" Comment="SRAM2 off" DefaultValue="0" Group="SRAM" Visible="false"/>

	<RefParameter Name="VIRTUAL_SRAM4" Type="integer" Comment="SRAM4 on" DefaultValue="1" Group="SRAM" Visible="false">
	    <Condition Expression="(Sram4|Psram4|MuxedPsram4|Lcd4)" Diagnostic=""/>
    </RefParameter>	
    <RefParameter Name="VIRTUAL_SRAM4" Type="integer" Comment="SRAM4 off" DefaultValue="0" Group="SRAM" Visible="false"/>

	<RefParameter Name="_HSRAM" Comment="SRAM instance" DefaultValue="hsram1" Type="list" Group="SRAM" TabName="Advanced Settings">
		<Condition Diagnostic="The four SRAM set in IP tree" 
		           Expression="(VIRTUAL_SRAM1=1) &amp; (VIRTUAL_SRAM2=1) &amp; (VIRTUAL_SRAM3=1) &amp; (VIRTUAL_SRAM4=1) &amp; (SRAM_MODE_IN_USE=1)"/>
		<PossibleValue Comment="SRAM1" Value="hsram1"/>
		<PossibleValue Comment="SRAM2" Value="hsram2"/>
		<PossibleValue Comment="SRAM3" Value="hsram3"/>
		<PossibleValue Comment="SRAM4" Value="hsram4"/>
	</RefParameter>
	<RefParameter Name="_HSRAM" Comment="SRAM instance" DefaultValue="hsram1" Type="list" Group="SRAM" TabName="Advanced Settings">
		<Condition Diagnostic="SRAM 1, 2 and 3 set in IP tree" 
		           Expression="(VIRTUAL_SRAM1=1) &amp; (VIRTUAL_SRAM2=1) &amp; (VIRTUAL_SRAM3=1) &amp; (VIRTUAL_SRAM4=0) &amp; (SRAM_MODE_IN_USE=1)"/>
		<PossibleValue Comment="SRAM1" Value="hsram1"/>
		<PossibleValue Comment="SRAM2" Value="hsram2"/>
		<PossibleValue Comment="SRAM3" Value="hsram3"/>
	</RefParameter>
	<RefParameter Name="_HSRAM" Comment="SRAM instance" DefaultValue="hsram1" Type="list" Group="SRAM" TabName="Advanced Settings">
		<Condition Diagnostic="SRAM 1, 2 and 4 set in IP tree" 
		           Expression="(VIRTUAL_SRAM1=1) &amp; (VIRTUAL_SRAM2=1) &amp; (VIRTUAL_SRAM3=0) &amp; (VIRTUAL_SRAM4=1) &amp; (SRAM_MODE_IN_USE=1)"/>
		<PossibleValue Comment="SRAM1" Value="hsram1"/>
		<PossibleValue Comment="SRAM2" Value="hsram2"/>
		<PossibleValue Comment="SRAM4" Value="hsram4"/>
	</RefParameter>
	<RefParameter Name="_HSRAM" Comment="SRAM instance" DefaultValue="hsram1" Type="list" Group="SRAM" TabName="Advanced Settings">
		<Condition Diagnostic="SRAM 1, 3 and 4 set in IP tree" 
		           Expression="(VIRTUAL_SRAM1=1) &amp; (VIRTUAL_SRAM2=0) &amp; (VIRTUAL_SRAM3=1) &amp; (VIRTUAL_SRAM4=1) &amp; (SRAM_MODE_IN_USE=1)"/>
		<PossibleValue Comment="SRAM1" Value="hsram1"/>
		<PossibleValue Comment="SRAM3" Value="hsram3"/>
		<PossibleValue Comment="SRAM4" Value="hsram4"/>
	</RefParameter>
	<RefParameter Name="_HSRAM" Comment="SRAM instance" DefaultValue="hsram2" Type="list" Group="SRAM" TabName="Advanced Settings">
		<Condition Diagnostic="SRAM 2, 3 and 4 set in IP tree" 
		           Expression="(VIRTUAL_SRAM1=0) &amp; (VIRTUAL_SRAM2=1) &amp; (VIRTUAL_SRAM3=1) &amp; (VIRTUAL_SRAM4=1) &amp; (SRAM_MODE_IN_USE=1)"/>
		<PossibleValue Comment="SRAM2" Value="hsram2"/>
		<PossibleValue Comment="SRAM3" Value="hsram3"/>
		<PossibleValue Comment="SRAM4" Value="hsram4"/>
    </RefParameter>
    <RefParameter Name="_HSRAM" Comment="SRAM instance" DefaultValue="hsram1" Type="list" Group="SRAM" TabName="Advanced Settings">
        <Condition Diagnostic="Both SRAM 1 and 2 set in IP tree" 
		           Expression="(VIRTUAL_SRAM1=1) &amp; (VIRTUAL_SRAM2=1) &amp; (VIRTUAL_SRAM3=0) &amp; (VIRTUAL_SRAM4=0) &amp; (SRAM_MODE_IN_USE=1)"/>
        <PossibleValue Comment="SRAM1" Value="hsram1"/>
        <PossibleValue Comment="SRAM2" Value="hsram2"/>
    </RefParameter>
    <RefParameter Name="_HSRAM" Comment="SRAM instance" DefaultValue="hsram1" Type="list" Group="SRAM" TabName="Advanced Settings">
        <Condition Diagnostic="Both SRAM 1 and 3 set in IP tree" 
		           Expression="(VIRTUAL_SRAM1=1) &amp; (VIRTUAL_SRAM2=0) &amp; (VIRTUAL_SRAM3=1) &amp; (VIRTUAL_SRAM4=0) &amp; (SRAM_MODE_IN_USE=1)"/>
        <PossibleValue Comment="SRAM1" Value="hsram1"/>
        <PossibleValue Comment="SRAM3" Value="hsram3"/>
    </RefParameter>
    <RefParameter Name="_HSRAM" Comment="SRAM instance" DefaultValue="hsram1" Type="list" Group="SRAM" TabName="Advanced Settings">
		<Condition Diagnostic="Both SRAM 1 and 4 set in IP tree" 
		           Expression="(VIRTUAL_SRAM1=1) &amp; (VIRTUAL_SRAM2=0) &amp; (VIRTUAL_SRAM3=0) &amp; (VIRTUAL_SRAM4=1) &amp; (SRAM_MODE_IN_USE=1)"/>
		<PossibleValue Comment="SRAM1" Value="hsram1"/>
		<PossibleValue Comment="SRAM4" Value="hsram4"/>
    </RefParameter>
    <RefParameter Name="_HSRAM" Comment="SRAM instance" DefaultValue="hsram2" Type="list" Group="SRAM" TabName="Advanced Settings">
		<Condition Diagnostic="Both SRAM 2 and 3 set in IP tree" 
		           Expression="(VIRTUAL_SRAM1=0) &amp; (VIRTUAL_SRAM2=1) &amp; (VIRTUAL_SRAM3=1) &amp; (VIRTUAL_SRAM4=0) &amp; (SRAM_MODE_IN_USE=1)"/>
		<PossibleValue Comment="SRAM2" Value="hsram2"/>
		<PossibleValue Comment="SRAM3" Value="hsram3"/>
    </RefParameter>
    <RefParameter Name="_HSRAM" Comment="SRAM instance" DefaultValue="hsram2" Type="list" Group="SRAM" TabName="Advanced Settings">
		<Condition Diagnostic="Both SRAM 2 and 4 set in IP tree" 
		           Expression="(VIRTUAL_SRAM1=0) &amp; (VIRTUAL_SRAM2=1) &amp; (VIRTUAL_SRAM3=0) &amp; (VIRTUAL_SRAM4=1) &amp; (SRAM_MODE_IN_USE=1)"/>
		<PossibleValue Comment="SRAM2" Value="hsram2"/>
		<PossibleValue Comment="SRAM4" Value="hsram4"/>
    </RefParameter>
		<RefParameter Name="_HSRAM" Comment="SRAM instance" DefaultValue="hsram3" Type="list" Group="SRAM" TabName="Advanced Settings">
		<Condition Diagnostic="Both SRAM 3 and 4 set in IP tree" 
		           Expression="(VIRTUAL_SRAM1=0) &amp; (VIRTUAL_SRAM2=0) &amp; (VIRTUAL_SRAM3=1) &amp; (VIRTUAL_SRAM4=1) &amp; (SRAM_MODE_IN_USE=1)"/>
		<PossibleValue Comment="SRAM3" Value="hsram3"/>
		<PossibleValue Comment="SRAM4" Value="hsram4"/>
    </RefParameter>
    <RefParameter Name="_HSRAM" Comment="SRAM instance" DefaultValue="hsram1" Type="list" Group="SRAM" TabName="Advanced Settings">
		<Condition Diagnostic="Only SRAM 1 set in IP tree" 
		           Expression="(VIRTUAL_SRAM1=1) &amp; (VIRTUAL_SRAM2=0) &amp; (VIRTUAL_SRAM3=0) &amp; (VIRTUAL_SRAM4=0) &amp; (SRAM_MODE_IN_USE=1)"/>
		<PossibleValue Comment="SRAM1" Value="hsram1"/>
    </RefParameter>
    <RefParameter Name="_HSRAM" Comment="SRAM instance" DefaultValue="hsram2" Type="list" Group="SRAM" TabName="Advanced Settings">
		<Condition Diagnostic="Only SRAM 2 set in IP tree" 
		           Expression="(VIRTUAL_SRAM1=0) &amp; (VIRTUAL_SRAM2=1) &amp; (VIRTUAL_SRAM3=0) &amp; (VIRTUAL_SRAM4=0) &amp; (SRAM_MODE_IN_USE=1)"/>
		<PossibleValue Comment="SRAM2" Value="hsram2"/>
    </RefParameter>
    <RefParameter Name="_HSRAM" Comment="SRAM instance" DefaultValue="hsram3" Type="list" Group="SRAM" TabName="Advanced Settings">
		<Condition Diagnostic="Only SRAM 3 set in IP tree" 
		           Expression="(VIRTUAL_SRAM1=0) &amp; (VIRTUAL_SRAM2=0) &amp; (VIRTUAL_SRAM3=1) &amp; (VIRTUAL_SRAM4=0) &amp; (SRAM_MODE_IN_USE=1)"/>
		<PossibleValue Comment="SRAM3" Value="hsram3"/>
    </RefParameter>
    <RefParameter Name="_HSRAM" Comment="SRAM instance" DefaultValue="hsram4" Type="list" Group="SRAM" TabName="Advanced Settings">
		<Condition Diagnostic="Only SRAM 4 set in IP tree" 
		           Expression="(VIRTUAL_SRAM1=0) &amp; (VIRTUAL_SRAM2=0) &amp; (VIRTUAL_SRAM3=0) &amp; (VIRTUAL_SRAM4=1) &amp; (SRAM_MODE_IN_USE=1)"/>
		<PossibleValue Comment="SRAM4" Value="hsram4"/>
    </RefParameter>

	<RefParameter Name="_HSRAM" Comment="SRAM instance" DefaultValue="null" Type="list" Group="SRAM" TabName="Advanced Settings" Visible="false">
	</RefParameter>
    
    <!-- New from R12 -->
    <RefParameter Name="USE_DMA_CODE_SD" Comment="Use dma template" DefaultValue="1" Type="list" Group="SDIO/SDMMC" TabName="Advanced Settings">
        <Condition Diagnostic="Forced to enabled with FreeRTOS" Expression="(FATFS_version &gt; 11) &amp; (SDIO_MODE_IN_USE=1) &amp; (RTOS_IN_USE=1) &amp; !STM32L5"/>
        <PossibleValue Comment="Enabled" Value="1" Semaphore="S_DMA_TEMPLATE_ENABLED"/>
        <Description>When enabled, generate code based on sd_diskio_dma_rtos_template.* files. Please ensure that the DMA controller to be used is properly configured.&lt;br&gt;Note: DMA choice forced to enabled to ensure sync and notification mechanism under FreeRTOS control.</Description>
    </RefParameter>

    <!-- Ticket 51476 - [FatFS-SD Card-DMA] Disable dma template use by default (when FreeRTOS is disabled) -->
    <RefParameter Name="USE_DMA_CODE_SD" Comment="Use dma template" DefaultValue="0" Type="list" Group="SDIO/SDMMC" TabName="Advanced Settings">
        <Condition Diagnostic="Choice possible when FreeRTOS is disabled." Expression="(FATFS_version &gt; 11) &amp; (SDIO_MODE_IN_USE=1) &amp; !STM32L5"/>
        <PossibleValue Comment="Disabled" Value="0"/>
        <PossibleValue Comment="Enabled" Value="1" Semaphore="S_DMA_TEMPLATE_ENABLED"/>
        <Description>When enabled, generate code based on sd_diskio_dma_template.* files (recommended choice). Please ensure that the DMA controller to be used is properly configured.&lt;br&gt;When disabled, generate code based on sd_diskio_template.* files</Description>
    </RefParameter>

    <RefParameter Name="USE_DMA_CODE_SD" Comment="Use dma template" DefaultValue="0" Type="list" Group="SDIO/SDMMC" TabName="Advanced Settings" Visible="false"> 
        <PossibleValue Comment="Disabled" Value="0"/>
    </RefParameter>

    <RefParameter Name="USE_DMA_CODE_USBH" Comment="Use dma template" DefaultValue="1" Type="list" Group="USBH" TabName="Advanced Settings">
        <Condition Diagnostic="Forced to enabled (internal DMA IP being enabled)" Expression="(FATFS_version &gt; 11) &amp; S_FATFS_USB$context &amp; (HS_DMA_ENABLED|FS_DMA_ENABLED)"/>
        <PossibleValue Comment="Enabled" Value="1"/>
        <Description>Generate code based on usbh_diskio_dma_template.* files.</Description>
    </RefParameter>

    <RefParameter Name="USE_DMA_CODE_USBH" Comment="Use dma template" DefaultValue="0" Type="list" Group="USBH" TabName="Advanced Settings">
        <Condition Diagnostic="Forced to disabled (internal DMA IP being disabled)" Expression="(FATFS_version &gt; 11) &amp; S_FATFS_USB$context"/>
        <PossibleValue Comment="Disabled" Value="0"/>
        <Description>Generate code based on usbh_diskio_template.* files.</Description>
    </RefParameter>

    <RefParameter Name="USE_DMA_CODE_USBH" Comment="Use dma template" DefaultValue="0" Type="list" Group="USBH" TabName="Advanced Settings" Visible="false"> 
        <PossibleValue Comment="Disabled" Value="0"/>
    </RefParameter>
	
    <!--  Board should be detected by CubeMx in the future (no need for the user to select it again (as already selected in the current project) -->
    <!--
    <RefParameter Name="BOARD_NAME" Type="list" Comment="Name" DefaultValue="0" Group="Board" TabName="Advanced Settings">
        <Condition Diagnostic="TO DO " Expression="STM32G081B_EVAL"/>
        <PossibleValue Comment="STM32G081B-EVAL" Value="0" />
    </RefParameter>
    <RefParameter Name="BOARD_NAME" Type="list" Comment="Name" DefaultValue="1" Group="Board" TabName="Advanced Settings">
        <Condition Diagnostic="TO DO " Expression="NUCLEO_G071RB"/>
        <PossibleValue Comment="NUCLEO-G071RB" Value="1" />
    </RefParameter>
    <RefParameter Name="BOARD_NAME" Type="list" Comment="Name" DefaultValue="2" Group="Board" TabName="Advanced Settings">
        <Condition Diagnostic="TO DO " Expression="NUCLEO_G070RB"/>
        <PossibleValue Comment="NUCLEO-G070RB" Value="2" />
    </RefParameter>
    <RefParameter Name="BOARD_NAME" Type="list" Comment="Name" Group="Board" TabName="Advanced Settings" Visible="false"/>
    -->

    <!-- BZ 48303  --> <!--  User defined can be used for generating sd_diskio.* or user_diskio.* -->
    <RefParameter Name="DISKIO_CODE" Comment="Diskio code" DefaultValue="0" Type="list" Group="User Defined" TabName="Advanced Settings"> 
        <!--  <Condition Diagnostic="Choice to customize the User Defined code to generate." Expression="STM32G081B_EVAL"/>  -->
        <Condition Diagnostic="Choice allowing to customize the User Defined code to generate." Expression="STM32G0|STM32WB|STM32G4"/>
        <PossibleValue Comment="User" Value="0" />
        <PossibleValue Comment="SD" Value="1" Semaphore="USER_SD_DISKIO"/>
        <Description>- The default option is &lt;b&gt;User&lt;/b&gt; to generate user_diskio.* files.&lt;br&gt;
                     - On the other hand, the &lt;b&gt;SD&lt;/b&gt; choice provides the generation of sd_diskio.* files (to be completed by user).</Description>
    </RefParameter>
        <RefParameter Name="DISKIO_CODE" Comment="Diskio code" DefaultValue="0" Type="list" Group="UserDefined" TabName="Advanced Settings" Visible="false"> 
        <PossibleValue Comment="User" Value="0"/>
        <Description>TO DO</Description>
    </RefParameter>
     
    <RefParameter Name="SRAM_BSP_CODE" Comment="BSP code for SRAM" DefaultValue="0" Type="list" Group="SRAM" TabName="Advanced Settings"> 
	    <Condition Diagnostic="Choice allowing to customize the BSP code to generate/to use." Expression="STM32G4"/>
        <PossibleValue Comment="Generic" Value="0" />
        <PossibleValue Comment="Custom" Value="1" Semaphore="S_CUSTOM_BSP"/>
        <Description>- The default option is &lt;b&gt;Generic&lt;/b&gt; to generate sram_diskio.* files using generic bsp files (generated by CubeMx).&lt;br&gt;
                     - On the other hand, the &lt;b&gt;Custom&lt;/b&gt; choice provides the generation of sram_diskio.* files using BSP files from the board (to be added to the project by the user).</Description>
    </RefParameter>
    <RefParameter Name="SRAM_BSP_CODE" Comment="BSP code for SRAM" DefaultValue="2" Type="uniqueElementList" Group="SRAM" TabName="Advanced Settings"> 
	    <Condition Diagnostic="No BSP code generated for L5." Expression="STM32L5"/>
        <PossibleValue Comment="None" Value="2"/>
        <Description>The BSP code has to be added to the project according to the board (ST or custom) in use.</Description>
    </RefParameter>
    
	<RefParameter Name="SRAM_BSP_CODE" Comment="BSP code for SRAM" DefaultValue="0" Type="list" Group="SRAM" TabName="Advanced Settings" Visible="false"> 
        <PossibleValue Comment="Generic" Value="0"/>
        <Description>TO DO</Description>
    </RefParameter>
    
    <RefParameter Name="SD_BSP_CODE" Comment="BSP code for SD" DefaultValue="2" Type="list" Group="SDIO/SDMMC" TabName="Advanced Settings" Visible="true"> 
        <PossibleValue Comment="None" Value="2"/>
        <Description>Nothing generated by CubeMx: the BSP code has to be added to the project according to the board (ST or custom) in use.</Description>
    </RefParameter>

    <RefParameter Name="BOARD_NAME" Type="list" Comment="Name" DefaultValue="none" Group="Board" TabName="Advanced Settings">
        <Condition Diagnostic="Choice allowing to customize the ST Board to use." Expression="STM32G0 &amp; (!DISKIO_CODE=0)"/>
        <PossibleValue Comment="None" Value="none" />
        <PossibleValue Comment="STM32G081B-EVAL" Value="stm32g081b" />
        <PossibleValue Comment="NUCLEO-G071RB" Value="stm32g071rb" />
        <PossibleValue Comment="NUCLEO-G070RB" Value="stm32g070rb" />
        <Description>If not equals to None, will include the right header file in the generated sd_diskio.h.</Description>
    </RefParameter>
    <RefParameter Name="BOARD_NAME" Type="list" Comment="Name" DefaultValue="none" Group="Board" TabName="Advanced Settings">
        <Condition Diagnostic="Choice allowing to customize the ST Board to use." Expression="STM32WB &amp; (!DISKIO_CODE=0)"/>
        <PossibleValue Comment="None" Value="none" />
        <PossibleValue Comment="STM32WB55RG-NUCLEO" Value="stm32wb55rg" />
        <Description>If not equals to None, will include the right header file in the generated sd_diskio.h.</Description>
    </RefParameter>
    <!-- G4 case -->
    <RefParameter Name="BOARD_NAME" Type="list" Comment="Name" DefaultValue="none" Group="Board" TabName="Advanced Settings">
        <Condition Diagnostic="Choice allowing to customize the ST Board to use." Expression="STM32G4 &amp; DISKIO_CODE=1"/>
        <PossibleValue Comment="None" Value="none" />
        <PossibleValue Comment="STM32G474E-EVAL" Value="stm32g474e" Semaphore="S_STM32G474E_EVAL_BOARD"/>    <!-- be careful no "-" inside semaphore names!!! -->
        <PossibleValue Comment="NUCLEO-G474RE"  Value="stm32g474re" Semaphore="S_STM32G474RE_NUCLEO_BOARD"/> <!-- be careful no "-" inside semaphore names!!! -->
        <PossibleValue Comment="NUCLEO-G431RB"  Value="stm32g431rb" Semaphore="S_STM32G431RB_NUCLEO_BOARD"/> <!-- be careful no "-" inside semaphore names!!! -->
        <Description>If not equals to None, will include the right header file in the generated sd_diskio.h.</Description>
    </RefParameter>
    <RefParameter Name="BOARD_NAME" Type="list" Comment="Name" DefaultValue="none" Group="Board" TabName="Advanced Settings">
        <Condition Diagnostic="Choice allowing to customize the ST Board to use." Expression="STM32G4 &amp; SRAM_BSP_CODE=1 &amp; DISKIO_CODE=0"/>
        <PossibleValue Comment="None" Value="none" />
        <PossibleValue Comment="STM32G474E-EVAL" Value="stm32g474e" Semaphore="S_STM32G474E_EVAL_BOARD"/>    <!-- be careful no "-" inside semaphore names!!! -->
        <Description>If not equals to None, will include the right header file in the generated sd_diskio.h.</Description>
    </RefParameter>
    <!-- L5 case -->
    <RefParameter Name="BOARD_NAME" Type="list" Comment="Name" DefaultValue="none" Group="Board" TabName="Advanced Settings">
        <Condition Diagnostic="Choice allowing to customize the ST Board to use." Expression="STM32L5xx &amp; SD_BSP_CODE=1 &amp; S_DMA_TEMPLATE_ENABLED"/>
        <PossibleValue Comment="None" Value="none" />
        <PossibleValue Comment="STM32L552E-EVAL" Value="stm32l552e" Semaphore="S_STM32L552E_EVAL_BOARD"/>    <!-- be careful no "-" inside semaphore names!!! -->
        <PossibleValue Comment="STM32L562E-Discovery" Value="stm32l562e" Semaphore="S_STM32L562E_DISCOVERY_BOARD"/>
        <Description>If not equals to None, will include the right header file in the generated sd_diskio.h.</Description>
    </RefParameter>
    <RefParameter Name="BOARD_NAME" Type="list" Comment="Name" DefaultValue="none" Group="Board" TabName="Advanced Settings">
        <Condition Diagnostic="Choice allowing to customize the ST Board to use." Expression="STM32L5xx &amp; SD_BSP_CODE=1"/>
        <PossibleValue Comment="None" Value="none" />
        <PossibleValue Comment="STM32L552E-EVAL" Value="stm32l552e" Semaphore="S_STM32L552E_EVAL_BOARD"/>    <!-- be careful no "-" inside semaphore names!!! -->
        <PossibleValue Comment="STM32L562E-Discovery" Value="stm32l562e" Semaphore="S_STM32L562E_DISCOVERY_BOARD"/>
        <PossibleValue Comment="STM32L552ZE-Nucleo" Value="stm32l552ze" Semaphore="S_STM32L552ZE_NUCLEO_BOARD"/>  <!-- available with no dma enabled -->
        <Description>If not equals to None, will include the right header file in the generated sd_diskio.h.</Description>
    </RefParameter>
    <!-- default case -->
    <RefParameter Name="BOARD_NAME" Type="list" Comment="Name" DefaultValue="None" Group="Board" TabName="Advanced Settings" Visible="false">
        <PossibleValue Comment="None" Value="none"/>
        <Description>No board available, as no custom configuration on-going/possible on that series</Description>
    </RefParameter>

    <!-- Detect if CS are set or not (to know if FMC/FSMC is itself on or not) -->

    <RefParameter Name="VIRTUAL_CS" Type="integer" Comment="At least one CS set" DefaultValue="1" Group="CS" Visible="false">
        <Condition Expression="(NorPsramChipSelect1|NorPsramChipSelect2|NorPsramChipSelect3|NorPsramChipSelect4)" Diagnostic=""/>
    </RefParameter>
    <RefParameter Name="VIRTUAL_CS" Type="integer" Comment="No CS set" DefaultValue="0" Group="CS" Visible="false"/>


    <!-- #define to be generated in ffconf.h -->
    <RefParameter Name="_FS_READONLY" Comment="FS_READONLY (Read-only mode)" DefaultValue="0" Type="list" Group="Function Parameters" TabName="Set Defines">
        <Condition Diagnostic="" Expression="_FS_LOCK=0"/>
        <PossibleValue Comment="Disabled" Value="0"/>
        <PossibleValue Comment="Enabled" Value="1"/>
        <Description>Setting FS_READONLY to 1 defines read only configuration.&lt;br&gt;
                     This removes writing functions: f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename, f_truncate and useless f_getfree.&lt;br&gt;
                     &lt;b&gt;Dependency&lt;/b&gt;: FS_READONLY = 1 (Enabled) possible as FS_LOCK = 0.</Description>
    </RefParameter>
    <RefParameter Name="_FS_READONLY" Comment="FS_READONLY (Read-only mode)" DefaultValue="0" Type="list" Group="Function Parameters" TabName="Set Defines">
        <PossibleValue Comment="Disabled" Value="0"/>
        <Description>Setting FS_READONLY to 1 defines read only configuration.&lt;br&gt;
                     This removes writing functions: f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename, f_truncate and useless f_getfree.&lt;br&gt;
                     &lt;b&gt;Dependency&lt;/b&gt;: FS_READONLY = 1 (Enabled) not possible: it requires FS_LOCK = 0.</Description>
    </RefParameter>	

    <!-- Updated for R0.12 support (33566) -->
    <RefParameter Name="_FS_MINIMIZE" Comment="FS_MINIMIZE (Minimization level)" DefaultValue="0" Type="list" Group="Function Parameters" TabName="Set Defines">
    	<Condition Diagnostic="Function list updated for R0.12" Expression="FATFS_version &gt; 11"/>
        <PossibleValue Comment="Disabled" Value="0"/>
        <PossibleValue Comment="Enabled with 6 functions removed" Value="1"/>
        <PossibleValue Comment="Enabled with 9 functions removed" Value="2"/>
        <PossibleValue Comment="Enabled with 10 functions removed" Value="3"/>
	    <Description>The FS_MINIMIZE option defines minimization level to remove some functions.&lt;br&gt; 
                     0: All basic functions are enabled.&lt;br&gt;
                     1: f_stat(), f_getfree(), f_unlink(), f_mkdir(), f_truncate() and f_rename() functions are removed.&lt;br&gt;
                     2: f_opendir(), f_readdir() and f_closedir() are removed in addition to 1.&lt;br&gt;
                     3: f_lseek() function is removed in addition to 2.</Description>
    </RefParameter>
    <RefParameter Name="_FS_MINIMIZE" Comment="FS_MINIMIZE (Minimization level)" DefaultValue="0" Type="list" Group="Function Parameters" TabName="Set Defines">
        <PossibleValue Comment="Disabled" Value="0"/>
        <PossibleValue Comment="Enabled with 8 functions removed" Value="1"/>
        <PossibleValue Comment="Enabled with 11 functions removed" Value="2"/>
        <PossibleValue Comment="Enabled with 12 functions removed" Value="3"/>
	    <Description>The FS_MINIMIZE option defines minimization level to remove some functions.&lt;br&gt; 
                     0: All basic functions are enabled.&lt;br&gt;
                     1: f_stat(), f_getfree(), f_unlink(), f_mkdir(), f_chmod(), f_utime(), f_truncate() and f_rename() functions are removed.&lt;br&gt;
                     2: f_opendir(), f_readdir() and f_closedir() are removed in addition to 1.&lt;br&gt;
                     3: f_lseek() function is removed in addition to 2.</Description>
    </RefParameter>
	
	<RefParameter Name="_USE_STRFUNC" Comment="USE_STRFUNC (String functions)" DefaultValue="2" Type="list" Group="Function Parameters" TabName="Set Defines">
		<PossibleValue Comment="Disabled" Value="0"/>
		<PossibleValue Comment="Enabled without LF -> CRLF conversion" Value="1"/>
		<PossibleValue Comment="Enabled with LF -> CRLF conversion" Value="2"/>
		<Description>To enable string functions (f_gets, f_putc, f_puts, ...), set USE_STRFUNC to 1 or 2.&lt;br&gt;When set to 2, makes a LF -> CRLF conversion.</Description>
	</RefParameter>

    <!--  New in Fatfs R0.11 -->
	<RefParameter Name="_USE_FIND" Comment="USE_FIND (Find functions)" DefaultValue="0" Type="list" Group="Function Parameters" TabName="Set Defines">
		<PossibleValue Comment="Disabled" Value="0"/>
		<PossibleValue Comment="Enabled" Value="1"/>
		<Description>This option switches filtered directory read feature and related functions, f_findfirst() and f_findnext(). (0:Disable or 1:Enable).</Description>
	</RefParameter>
	<!--  New in Fatfs R0.11 -->
	
	<RefParameter Name="_USE_MKFS" Comment="USE_MKFS (Make filesystem function)" DefaultValue="1" Type="list" Group="Function Parameters" TabName="Set Defines">
		<PossibleValue Comment="Disabled" Value="0"/>
		<PossibleValue Comment="Enabled" Value="1"/>
		<Description>To enable f_mkfs function, set USE_MKFS to 1 (Enabled) and set FS_READONLY to 0 (Disabled)</Description>
	</RefParameter>
	
	<RefParameter Name="_USE_FORWARD" Comment="USE_FORWARD (Forward function)" DefaultValue="0" Type="list" Group="Function Parameters" TabName="Set Defines">
		<PossibleValue Comment="Disabled" Value="0"/>
		<PossibleValue Comment="Enabled" Value="1"/>
		<Description>To enable f_forward function, set USE_FORWARD to 1 (Enabled) and set FS_TINY to 1 (Enabled).</Description>
	</RefParameter>
	
	<RefParameter Name="_USE_LABEL" Comment="USE_LABEL (Volume label functions)" DefaultValue="0" Type="list" Group="Function Parameters" TabName="Set Defines">
		<PossibleValue Comment="Disabled" Value="0"/>
		<PossibleValue Comment="Enabled" Value="1"/>
		<Description>To enable volume label functions, set USE_LABEL to 1 (Enabled).</Description>
	</RefParameter>	
	
	<RefParameter Name="_USE_FASTSEEK" Comment="USE_FASTSEEK (Fast seek function)" DefaultValue="1" Type="list" Group="Function Parameters" TabName="Set Defines">
		<PossibleValue Comment="Disabled" Value="0"/>
		<PossibleValue Comment="Enabled" Value="1"/>
		<Description>To enable fast seek feature, set USE_FASTSEEK to 1 (Enabled).</Description>
	</RefParameter>	
	
	<!--  New in Fatfs R0.11 -->
	<RefParameter Name="HS_DMA_ENABLED" Type="integer" Comment="" DefaultValue="1" Group="Function Parameters" Visible="false">
	    <Condition Expression="S_FATFS_USB$context &amp; (_HUSBH = hUsbHostHS) &amp; (SEM_HS_USE_BUFF_WO_ALIGNMENT=1)" Diagnostic=""/>
	    <PossibleValue Comment="Enabled" Value="1"/>
	</RefParameter>
	<RefParameter Name="HS_DMA_ENABLED" Type="integer" Comment="" DefaultValue="0" Group="Function Parameters" Visible="false">
	    <PossibleValue Comment="Disabled" Value="0"/>
	</RefParameter>		
	
	<RefParameter Name="FS_DMA_ENABLED" Type="integer" Comment="" DefaultValue="1" Group="Function Parameters" Visible="false">
	    <Condition Expression="S_FATFS_USB$context &amp; (_HUSBH = hUsbHostFS) &amp; (SEM_FS_USE_BUFF_WO_ALIGNMENT=1)" Diagnostic=""/>
	    <PossibleValue Comment="Enabled" Value="1"/>
	</RefParameter>
	<RefParameter Name="FS_DMA_ENABLED" Type="integer" Comment="" DefaultValue="0" Group="Function Parameters" Visible="false">
	    <PossibleValue Comment="Disabled" Value="0"/>
	</RefParameter>	
	<!--  New in Fatfs R0.11 -->	

	<!--  Added in R011. Removed in Fatfs R0.12c -->
    <RefParameter Name="_USE_BUFF_WO_ALIGNMENT" Comment="USE_BUFF_WO_ALIGNMENT (Data alignment management)" DefaultValue="0" Type="uniqueElementList" Group="Function Parameters" TabName="Set Defines" Visible="false">
        <Condition Diagnostic="Removed in R0.12c" Expression="FATFS_version &gt; 11"/>
        <PossibleValue Comment="Disabled" Value="0"/>
        <Description>Removed in R0.12c */</Description>
    </RefParameter>
    <RefParameter Name="_USE_BUFF_WO_ALIGNMENT" Comment="USE_BUFF_WO_ALIGNMENT (Data alignment management)" DefaultValue="0" Type="uniqueElementList" Group="Function Parameters" TabName="Set Defines">
        <Condition Diagnostic="Available in CubeMx since R0.11 version (STM parameter)" Expression="S_FATFS_USB$context &amp; (HS_DMA_ENABLED | FS_DMA_ENABLED) "/>
        <PossibleValue Comment="Disabled" Value="0"/>
        <Description>This option is available only for usbh diskio interface (see the usbh_diskio.c file) and allows to disable the management of the unaligned buffer. &lt;br&gt;When STM32 USB OTG HS or FS IP is used with internal DMA enabled, this define is set to 0 (Disabled) to align data into 32bits through an internal scratch buffer before being processed by the DMA. &lt;br&gt;Otherwise (DMA not used), this define is set to 1 (Enabled) to avoid Data alignment and improve the performance. &lt;br&gt;Please note that if _USE_BUFF_WO_ALIGNMENT is set to 1 and an unaligned 32bits buffer is forwarded to the FatFs Write/Read functions, an error will be returned. (0: default value or 1: unaligned buffer return an error). */</Description>
    </RefParameter>
    <RefParameter Name="_USE_BUFF_WO_ALIGNMENT" Comment="USE_BUFF_WO_ALIGNMENT (Data alignment management)" DefaultValue="1" Type="uniqueElementList" Group="Function Parameters" TabName="Set Defines">
        <Condition Diagnostic="Available in CubeMx since R0.11 version (STM parameter)" Expression="S_FATFS_USB$context"/>
        <PossibleValue Comment="Enabled" Value="1"/>
        <Description>This option is available only for usbh diskio interface (see the usbh_diskio.c file) and allows to disable the management of the unaligned buffer. &lt;br&gt;When STM32 USB OTG HS or FS IP is used with internal DMA enabled, this define is set to 0 (Disabled) to align data into 32bits through an internal scratch buffer before being processed by the DMA. &lt;br&gt;Otherwise (DMA not used), this define is set to 1 (Enabled) to avoid Data alignment and improve the performance. &lt;br&gt;Please note that if _USE_BUFF_WO_ALIGNMENT is set to 1 and an unaligned 32bits buffer is forwarded to the FatFs Write/Read functions, an error will be returned. (0: default value or 1: unaligned buffer return an error). */</Description>
    </RefParameter>
    <RefParameter Name="_USE_BUFF_WO_ALIGNMENT" Comment="USE_BUFF_WO_ALIGNMENT (Data alignment management)" DefaultValue="2" Type="list" Group="Function Parameters" TabName="Set Defines" Visible="false">
        <PossibleValue Comment="Useless" Value="2"/>
        <Description>This option is not available for the current mcu. */</Description>
     </RefParameter>
     <!--  Added in R011. Removed in Fatfs R0.12c -->
	
    <!-- VIRTUAL_CODE_PAGE is used by the code generation (to copy the right file, if any to copy) -->
    <RefParameter Name="VIRTUAL_CODE_PAGE" Type="uniqueElementList" Comment="VIRTUAL_CODE_PAGE" DefaultValue="932" Group="Locale and Namespace Parameters" TabName="Set Defines" Visible="false">
        <Condition Expression="_CODE_PAGE=932 &amp; !_USE_LFN=0" Diagnostic=""/>
        <PossibleValue Comment="Value 932" Value="932"/>
    </RefParameter>
    <RefParameter Name="VIRTUAL_CODE_PAGE" Type="uniqueElementList" Comment="VIRTUAL_CODE_PAGE" DefaultValue="936" Group="Locale and Namespace Parameters" TabName="Set Defines" Visible="false">
        <Condition Expression="_CODE_PAGE=936 &amp; !_USE_LFN=0" Diagnostic=""/>
        <PossibleValue Comment="Value 936" Value="936"/>
    </RefParameter>
    <RefParameter Name="VIRTUAL_CODE_PAGE" Type="uniqueElementList" Comment="VIRTUAL_CODE_PAGE" DefaultValue="949" Group="Locale and Namespace Parameters" TabName="Set Defines" Visible="false">
        <Condition Expression="_CODE_PAGE=949 &amp; !_USE_LFN=0" Diagnostic=""/>
        <PossibleValue Comment="Value 949" Value="949"/>
    </RefParameter>
    <RefParameter Name="VIRTUAL_CODE_PAGE" Type="uniqueElementList" Comment="VIRTUAL_CODE_PAGE" DefaultValue="950" Group="Locale and Namespace Parameters" TabName="Set Defines" Visible="false">
        <Condition Expression="_CODE_PAGE=950 &amp; !_USE_LFN=0" Diagnostic=""/>
        <PossibleValue Comment="Value 950" Value="950"/>
    </RefParameter>
    <RefParameter Name="VIRTUAL_CODE_PAGE" Type="uniqueElementList" Comment="VIRTUAL_CODE_PAGE" DefaultValue="850" Group="Locale and Namespace Parameters" TabName="Set Defines" Visible="false">
        <Condition Expression="!_USE_LFN=0" Diagnostic=""/>
        <PossibleValue Comment="Value 850" Value="850"/>
    </RefParameter>
    <!-- BZ 61999 (2019-07-31) -->
    <RefParameter Name="VIRTUAL_CODE_PAGE" Type="uniqueElementList" Comment="VIRTUAL_CODE_PAGE" DefaultValue="12345" Group="Locale and Namespace Parameters" TabName="Set Defines" Visible="false">
        <PossibleValue Comment="Value 12345" Value="12345"/> <!-- dummy value for default case (cannot match anything in config file, which is the goal)-->  
    </RefParameter>
    
    <RefParameter Name="_CODE_PAGE" Comment="CODE_PAGE (Code page on target)" DefaultValue="850" Type="list" Group="Locale and Namespace Parameters" TabName="Set Defines">
        <Condition Diagnostic="" Expression="FATFS_version=13"/>
        <PossibleValue Comment="All code pages included" Value="0"/>
        <PossibleValue Comment="U.S." Value="437"/>
        <PossibleValue Comment="Arabic" Value="720"/>
        <PossibleValue Comment="Greek" Value="737"/>
        <PossibleValue Comment="KBL" Value="771"/>
        <PossibleValue Comment="Baltic" Value="775"/>
        <PossibleValue Comment="Latin 1" Value="850"/>
        <PossibleValue Comment="Latin 2" Value="852"/>
        <PossibleValue Comment="Cyrillic" Value="855"/>
        <PossibleValue Comment="Turkish" Value="857"/>
        <PossibleValue Comment="Portuguese" Value="860"/>
        <PossibleValue Comment="Icelandic" Value="861"/>
        <PossibleValue Comment="Hebrew" Value="862"/>
        <PossibleValue Comment="Canadian French" Value="863"/>
        <PossibleValue Comment="Arabic" Value="864"/>
        <PossibleValue Comment="Nordic" Value="865"/>		
        <PossibleValue Comment="Russian" Value="866"/>
        <PossibleValue Comment="Greek 2" Value="869"/>		
        <PossibleValue Comment="Japanese (DBCS)" Value="932"/>	
        <PossibleValue Comment="Simplified Chinese (DBCS)" Value="936"/>
        <PossibleValue Comment="Korean (DBCS)" Value="949"/>
        <PossibleValue Comment="Traditional Chinese (DBCS)" Value="950"/>
        <Description>The CODE_PAGE specifies the OEM code page to be used on the target system. Incorrect setting of the code page can cause a file open failure.</Description>
    </RefParameter>
    <RefParameter Name="_CODE_PAGE" Comment="CODE_PAGE (Code page on target)" DefaultValue="850" Type="list" Group="Locale and Namespace Parameters" TabName="Set Defines">
        <Condition Diagnostic="" Expression="FATFS_version=12 &amp; _USE_LFN=0"/>
		<PossibleValue Comment="ASCII only" Value="1"/>
		<PossibleValue Comment="U.S." Value="437"/>
		<PossibleValue Comment="Arabic" Value="720"/>
		<PossibleValue Comment="Greek" Value="737"/>
		<PossibleValue Comment="KBL" Value="771"/>
		<PossibleValue Comment="Baltic" Value="775"/>
		<PossibleValue Comment="Latin 1" Value="850"/>
		<PossibleValue Comment="Latin 2" Value="852"/>
		<PossibleValue Comment="Cyrillic" Value="855"/>
		<PossibleValue Comment="Turkish" Value="857"/>
		<PossibleValue Comment="Portuguese" Value="860"/>
		<PossibleValue Comment="Icelandic" Value="861"/>
		<PossibleValue Comment="Hebrew" Value="862"/>
		<PossibleValue Comment="Canadian French" Value="863"/>
		<PossibleValue Comment="Arabic" Value="864"/>
		<PossibleValue Comment="Nordic" Value="865"/>		
		<PossibleValue Comment="Russian" Value="866"/>
		<PossibleValue Comment="Greek 2" Value="869"/>		
		<PossibleValue Comment="Japanese (DBCS)" Value="932"/>	
		<PossibleValue Comment="Simplified Chinese (DBCS)" Value="936"/>
		<PossibleValue Comment="Korean (DBCS)" Value="949"/>
		<PossibleValue Comment="Traditional Chinese (DBCS)" Value="950"/>
	    <Description>The CODE_PAGE specifies the OEM code page to be used on the target system. Incorrect setting of the code page can cause a file open failure.&lt;br&gt;&lt;b&gt;Dependency&lt;/b&gt;: CODE_PAGE = 1 (ASCII only) possible as USE_LFN = 0 (Disabled).</Description>
	</RefParameter>
    <RefParameter Name="_CODE_PAGE" Comment="CODE_PAGE (Code page on target)" DefaultValue="850" Type="list" Group="Locale and Namespace Parameters" TabName="Set Defines">
		<Condition Diagnostic="" Expression="FATFS_version=12"/>
		<PossibleValue Comment="U.S." Value="437"/>
		<PossibleValue Comment="Arabic" Value="720"/>
		<PossibleValue Comment="Greek" Value="737"/>
		<PossibleValue Comment="KBL" Value="771"/>
		<PossibleValue Comment="Baltic" Value="775"/>
		<PossibleValue Comment="Latin 1" Value="850"/>
		<PossibleValue Comment="Latin 2" Value="852"/>
		<PossibleValue Comment="Cyrillic" Value="855"/>
		<PossibleValue Comment="Turkish" Value="857"/>
		<PossibleValue Comment="Portuguese" Value="860"/>
		<PossibleValue Comment="Icelandic" Value="861"/>
		<PossibleValue Comment="Hebrew" Value="862"/>
		<PossibleValue Comment="Canadian French" Value="863"/>
		<PossibleValue Comment="Arabic" Value="864"/>
		<PossibleValue Comment="Nordic" Value="865"/>		
		<PossibleValue Comment="Russian" Value="866"/>
		<PossibleValue Comment="Greek 2" Value="869"/>		
		<PossibleValue Comment="Japanese (DBCS)" Value="932"/>	
		<PossibleValue Comment="Simplified Chinese (DBCS)" Value="936"/>
		<PossibleValue Comment="Korean (DBCS)" Value="949"/>
		<PossibleValue Comment="Traditional Chinese (DBCS)" Value="950"/>
	    <Description>The CODE_PAGE specifies the OEM code page to be used on the target system. Incorrect setting of the code page can cause a file open failure.&lt;br&gt;&lt;b&gt;Dependency&lt;/b&gt;: CODE_PAGE = 1 (ASCII only) possible as USE_LFN = 0 (Disabled).</Description>
	</RefParameter>	
	<RefParameter Name="_CODE_PAGE" Comment="CODE_PAGE (Code page on target)" DefaultValue="850" Type="list" Group="Locale and Namespace Parameters" TabName="Set Defines">
		<Condition Diagnostic="" Expression="_USE_LFN=0"/>
		<PossibleValue Comment="ASCII only" Value="1"/>
		<PossibleValue Comment="U.S.(OEM)" Value="437"/>
		<PossibleValue Comment="Arabic (OEM)" Value="720"/>
		<PossibleValue Comment="Greek (OEM)" Value="737"/>
		<PossibleValue Comment="Baltic (OEM)" Value="775"/>
		<PossibleValue Comment="Multilingual Latin 1 (OEM)" Value="850"/>
		<PossibleValue Comment="Latin 2 (OEM)" Value="852"/>
		<PossibleValue Comment="Cyrillic (OEM)" Value="855"/>
		<PossibleValue Comment="Turkish (OEM)" Value="857"/>
		<PossibleValue Comment="Multilingual Latin 1 + Euro (OEM)" Value="858"/>
		<PossibleValue Comment="Hebrew (OEM)" Value="862"/>
		<PossibleValue Comment="Russian (OEM)" Value="866"/>
		<PossibleValue Comment="Thai (OEM, Windows)" Value="874"/>
		<PossibleValue Comment="Japanese Shift-JIS (DBCS, OEM, Windows)" Value="932"/>	
		<PossibleValue Comment="Simplified Chinese GBK (DBCS, OEM, Windows)" Value="936"/>
		<PossibleValue Comment="Korean (DBCS, OEM, Windows)" Value="949"/>
		<PossibleValue Comment="Traditional Chinese Big5 (DBCS, OEM, Windows)" Value="950"/>
		<PossibleValue Comment="Central Europe (Windows)" Value="1250"/>
		<PossibleValue Comment="Cyrillic (Windows)" Value="1251"/>
		<PossibleValue Comment="Latin 1 (Windows)" Value="1252"/>
		<PossibleValue Comment="Greek (Windows)" Value="1253"/>
		<PossibleValue Comment="Turkish (Windows)" Value="1254"/>
		<PossibleValue Comment="Hebrew (Windows)" Value="1255"/>
		<PossibleValue Comment="Arabic (Windows)" Value="1256"/>
		<PossibleValue Comment="Baltic (Windows)" Value="1257"/>
		<PossibleValue Comment="Vietnam (OEM, Windows)" Value="1258"/>
	    <Description>The CODE_PAGE specifies the OEM code page to be used on the target system. Incorrect setting of the code page can cause a file open failure.&lt;br&gt;&lt;b&gt;Dependency&lt;/b&gt;: CODE_PAGE = 1 (ASCII only) possible as USE_LFN = 0 (Disabled).</Description>
	</RefParameter>
	<RefParameter Name="_CODE_PAGE" Comment="CODE_PAGE (Code page on target)" DefaultValue="850" Type="list" Group="Locale and Namespace Parameters" TabName="Set Defines">
		<PossibleValue Comment="U.S.(OEM)" Value="437"/>
		<PossibleValue Comment="Arabic (OEM)" Value="720"/>
		<PossibleValue Comment="Greek (OEM)" Value="737"/>
		<PossibleValue Comment="Baltic (OEM)" Value="775"/>
		<PossibleValue Comment="Multilingual Latin 1 (OEM)" Value="850"/>
		<PossibleValue Comment="Latin 2 (OEM)" Value="852"/>
		<PossibleValue Comment="Cyrillic (OEM)" Value="855"/>
		<PossibleValue Comment="Turkish (OEM)" Value="857"/>
		<PossibleValue Comment="Multilingual Latin 1 + Euro (OEM)" Value="858"/>
		<PossibleValue Comment="Hebrew (OEM)" Value="862"/>
		<PossibleValue Comment="Russian (OEM)" Value="866"/>
		<PossibleValue Comment="Thai (OEM, Windows)" Value="874"/>
		<PossibleValue Comment="Japanese Shift-JIS (DBCS, OEM, Windows)" Value="932"/>	
		<PossibleValue Comment="Simplified Chinese GBK (DBCS, OEM, Windows)" Value="936"/>
		<PossibleValue Comment="Korean (DBCS, OEM, Windows)" Value="949"/>
		<PossibleValue Comment="Traditional Chinese Big5 (DBCS, OEM, Windows)" Value="950"/>
		<PossibleValue Comment="Central Europe (Windows)" Value="1250"/>
		<PossibleValue Comment="Cyrillic (Windows)" Value="1251"/>
		<PossibleValue Comment="Latin 1 (Windows)" Value="1252"/>
		<PossibleValue Comment="Greek (Windows)" Value="1253"/>
		<PossibleValue Comment="Turkish (Windows)" Value="1254"/>
		<PossibleValue Comment="Hebrew (Windows)" Value="1255"/>
		<PossibleValue Comment="Arabic (Windows)" Value="1256"/>
		<PossibleValue Comment="Baltic (Windows)" Value="1257"/>
		<PossibleValue Comment="Vietnam (OEM, Windows)" Value="1258"/>
		<Description>The CODE_PAGE specifies the OEM code page to be used on the target system. Incorrect setting of the code page can cause a file open failure.&lt;br&gt;&lt;b&gt;Dependency&lt;/b&gt;: CODE_PAGE = 1 (ASCII only) not possible: it requires USE_LFN = 0 (Disabled).</Description>
	</RefParameter>
	
	<RefParameter Name="_USE_LFN" Comment="USE_LFN (Use Long Filename)" DefaultValue="3" Type="list" Group="Locale and Namespace Parameters" TabName="Set Defines">
		<!--<Condition Diagnostic="" Expression="(_LFN_UNICODE = 1) &amp; (S_FS_REENTRANT_0)"/>   -->
	    <Condition Diagnostic="" Expression="(_LFN_UNICODE = 1) &amp; (!(RTOS_IN_USE=1))"/>
		<PossibleValue Comment="Enabled with static working buffer on the BSS" Value="1" Semaphore="S_USE_LFN_1"/>
		<PossibleValue Comment="Enabled with dynamic working buffer on the STACK" Value="2"/>
		<PossibleValue Comment="Enabled with dynamic working buffer on the HEAP" Value="3"/>
	    <Description>The USE_LFN option switches the LFN feature.&lt;br&gt;- 0: Disable LFN feature. MAX_LFN has no effect.&lt;br&gt;- 1: Enable LFN with static working buffer on the BSS. Always NOT reentrant.&lt;br&gt;- 2: Enable LFN with dynamic working buffer on the STACK.&lt;br&gt;- 3: Enable LFN with dynamic working buffer on the HEAP.&lt;br&gt;To enable LFN feature, Unicode handling functions ff_convert() and ff_wtoupper() function must be added to the project.&lt;br&gt;The LFN working buffer occupies (MAX_LFN + 1) * 2 bytes. When use stack for the working buffer, take care on stack overflow. &lt;br&gt;When use heap memory for the working buffer, memory management functions, ff_memalloc() and ff_memfree(), must be added to the project.
	                 &lt;br&gt;&lt;b&gt;Dependency&lt;/b&gt;: &lt;br&gt;
	                 USE_LFN = 0 (Disabled) not possible : it requires LFN_UNICODE != 1 (Unicode).</Description>
	</RefParameter>
	
	<RefParameter Name="_USE_LFN" Comment="USE_LFN (Use Long Filename)" DefaultValue="3" Type="list" Group="Locale and Namespace Parameters" TabName="Set Defines">
		<!-- <Condition Diagnostic="" Expression="(_LFN_UNICODE = 1) &amp; (!S_FS_REENTRANT_0)"/>  -->
		<Condition Diagnostic="" Expression="(_LFN_UNICODE = 1) &amp; (RTOS_IN_USE=1)"/>
		<PossibleValue Comment="Enabled with dynamic working buffer on the STACK" Value="2"/>
		<PossibleValue Comment="Enabled with dynamic working buffer on the HEAP" Value="3"/>
	    <Description>The USE_LFN option switches the LFN feature.&lt;br&gt;- 0: Disable LFN feature. MAX_LFN has no effect.&lt;br&gt;- 1: Enable LFN with static working buffer on the BSS. Always NOT reentrant.&lt;br&gt;- 2: Enable LFN with dynamic working buffer on the STACK.&lt;br&gt;- 3: Enable LFN with dynamic working buffer on the HEAP.&lt;br&gt;To enable LFN feature, Unicode handling functions ff_convert() and ff_wtoupper() function must be added to the project.&lt;br&gt;The LFN working buffer occupies (MAX_LFN + 1) * 2 bytes. When use stack for the working buffer, take care on stack overflow. &lt;br&gt;When use heap memory for the working buffer, memory management functions, ff_memalloc() and ff_memfree(), must be added to the project.
	                 &lt;br&gt;&lt;b&gt; Dependencies&lt;/b&gt;: &lt;br&gt;
	                 1) USE_LFN = 0 (Disabled) not possible : it requires LFN_UNICODE != 1 (Unicode) &lt;br&gt;
	                 2) USE_LFN = 1 (Enabled with static working buffer on the BSS) not possible : it requires FS_REENTRANT = 0 (Disabled).</Description>
	</RefParameter>
	
	<RefParameter Name="_USE_LFN" Comment="USE_LFN (Use Long Filename)" DefaultValue="0" Type="list" Group="Locale and Namespace Parameters" TabName="Set Defines">
	    <!-- <Condition Diagnostic="" Expression="(_LFN_UNICODE = 0) &amp; (!S_FS_REENTRANT_0)"/> -->
	    <Condition Diagnostic="" Expression="(_LFN_UNICODE = 0) &amp; (RTOS_IN_USE=1)"/>
		<PossibleValue Comment="Disabled" Value="0"/>
		<PossibleValue Comment="Enabled with dynamic working buffer on the STACK" Value="2"/>
		<PossibleValue Comment="Enabled with dynamic working buffer on the HEAP" Value="3"/>
		<Description>The USE_LFN option switches the LFN feature.&lt;br&gt;- 0: Disable LFN feature. MAX_LFN has no effect.&lt;br&gt;- 1: Enable LFN with static working buffer on the BSS. Always NOT reentrant.&lt;br&gt;- 2: Enable LFN with dynamic working buffer on the STACK.&lt;br&gt;- 3: Enable LFN with dynamic working buffer on the HEAP.&lt;br&gt;To enable LFN feature, Unicode handling functions ff_convert() and ff_wtoupper() function must be added to the project.&lt;br&gt;The LFN working buffer occupies (MAX_LFN + 1) * 2 bytes. When use stack for the working buffer, take care on stack overflow. &lt;br&gt;When use heap memory for the working buffer, memory management functions, ff_memalloc() and ff_memfree(), must be added to the project.
		             &lt;br&gt;&lt;b&gt;Dependency&lt;/b&gt;: &lt;br&gt;
		             USE_LFN = 1 not possible: it requires FS_REENTRANT = 0 (Disabled).</Description>
	</RefParameter>
	
	<RefParameter Name="_USE_LFN" Comment="USE_LFN (Use Long Filename)" DefaultValue="0" Type="list" Group="Locale and Namespace Parameters" TabName="Set Defines">
		<PossibleValue Comment="Disabled" Value="0"/>
		<PossibleValue Comment="Enabled with static working buffer on the BSS" Value="1" Semaphore="S_USE_LFN_1"/>
		<PossibleValue Comment="Enabled with dynamic working buffer on the STACK" Value="2"/>
		<PossibleValue Comment="Enabled with dynamic working buffer on the HEAP" Value="3"/>
	    <Description>The USE_LFN option switches the LFN feature.&lt;br&gt;- 0: Disable LFN feature. MAX_LFN has no effect.&lt;br&gt;- 1: Enable LFN with static working buffer on the BSS. Always NOT reentrant.&lt;br&gt;- 2: Enable LFN with dynamic working buffer on the STACK.&lt;br&gt;- 3: Enable LFN with dynamic working buffer on the HEAP.&lt;br&gt;To enable LFN feature, Unicode handling functions ff_convert() and ff_wtoupper() function must be added to the project.&lt;br&gt;The LFN working buffer occupies (MAX_LFN + 1) * 2 bytes. When use stack for the working buffer, take care on stack overflow. &lt;br&gt;When use heap memory for the working buffer, memory management functions, ff_memalloc() and ff_memfree(), must be added to the project.
	                 &lt;br&gt;&lt;b&gt;Dependency&lt;/b&gt;: &lt;br&gt;
	                 All choices available as FS_REENTRANT = 0 (Disabled) and LFN_UNICODE = 0 (ANSI/OEM).</Description>
	</RefParameter>
	
	<RefParameter Name="_MAX_LFN" Comment="MAX_LFN (Max Long Filename)" DefaultValue="255" Max="255" Min="12"  Type="integer" Group="Locale and Namespace Parameters" TabName="Set Defines">
	    <Description>Maximum LFN length to handle.</Description>
	</RefParameter>
	
	<RefParameter Name="_LFN_UNICODE" Comment="LFN_UNICODE (Enable Unicode)" DefaultValue="0" Type="list" Group="Locale and Namespace Parameters" TabName="Set Defines">
		<Condition Diagnostic="" Expression="!(_USE_LFN = 0)"/>
		<PossibleValue Comment="ANSI/OEM" Value="0"/>
		<PossibleValue Comment="Unicode" Value="1"/>
		<Description>To switch the character encoding on the FatFs API to Unicode, enable LFN feature (USE_LFN set to Enabled) and set LFN_UNICODE to 1 (Unicode).</Description>
	</RefParameter>

	<RefParameter Name="_LFN_UNICODE" Comment="LFN_UNICODE (Enable Unicode)" DefaultValue="0" Type="list" Group="Locale and Namespace Parameters" TabName="Set Defines">
		<PossibleValue Comment="ANSI/OEM" Value="0"/>
		<Description>To switch the character encoding on the FatFs API to Unicode, enable LFN feature (USE_LFN set to Enabled) and set LFN_UNICODE to 1 (Unicode). &lt;br&gt;&lt;b&gt;Dependency&lt;/b&gt;:&lt;br&gt;Must be set to 0 (ANSI/OEM) as USE_LFN is set to 0 (Disabled)</Description>
	</RefParameter>

	
	<RefParameter Name="_STRF_ENCODE" Comment="STRF_ENCODE (Character encoding)" DefaultValue="3" Type="list" Group="Locale and Namespace Parameters" TabName="Set Defines">
		<PossibleValue Comment="ANSI/OEM" Value="0"/>
		<PossibleValue Comment="UTF-16LE" Value="1"/>
		<PossibleValue Comment="UTF-16BE" Value="2"/>
		<PossibleValue Comment="UTF-8" Value="3"/>
		<Description>When Unicode API is enabled, character encoding on the all FatFs API is switched to Unicode.&lt;br&gt; STRF_ENCODE option selects the character encoding on the file to be read/written via string functions, f_gets(), f_putc(), f_puts and f_printf().&lt;br&gt; - 0: Read/Write a character in ANSI/OEM.&lt;br&gt; - 1: Read/Write a character in UTF-16LE.&lt;br&gt; - 2: Read/Write a character in UTF-16BE,&lt;br&gt; - 3: Read/Write a character in UTF-8&lt;br&gt; &lt;b&gt;Dependency&lt;/b&gt;: This option has no effect when LFN_UNICODE is 0 (ANSI/OEM).</Description>
	</RefParameter>
	
	<RefParameter Name="_FS_RPATH" Comment="FS_RPATH (Relative Path)" DefaultValue="0" Type="list" Group="Locale and Namespace Parameters" TabName="Set Defines">
		<PossibleValue Comment="Disabled" Value="0"/>
		<PossibleValue Comment="Enabled without f_getcwd" Value="1"/>
		<PossibleValue Comment="Enabled with f_getcwd" Value="2"/>
		<Description>The FS_RPATH option configures relative path feature.&lt;br&gt; - 0: Disable relative path feature and remove related functions.&lt;br&gt; - 1: Enable relative path. f_chdrive() and f_chdir() function are available.&lt;br&gt; - 2: f_getcwd() function is available in addition to 1.&lt;br&gt; Note that output of the f_readdir() function is affected by this option.</Description>
	</RefParameter>
	
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="5" Max="=MAX_VOLUMES_VALUE" Min="5"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="(SDIO_MODE_IN_USE=1) &amp; S_FATFS_SDRAM$context &amp; S_FATFS_USB$context &amp; (SRAM_MODE_IN_USE=1) &amp; (USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>
        <RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="4" Max="=MAX_VOLUMES_VALUE" Min="4"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="(SDIO_MODE_IN_USE=1) &amp; S_FATFS_SDRAM$context &amp; S_FATFS_USB$context &amp; (SRAM_MODE_IN_USE=1) &amp; !(USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="4" Max="=MAX_VOLUMES_VALUE" Min="4"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="(SDIO_MODE_IN_USE=1) &amp; S_FATFS_SDRAM$context &amp; S_FATFS_USB$context &amp; !(SRAM_MODE_IN_USE=1) &amp; (USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="4" Max="=MAX_VOLUMES_VALUE" Min="4"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="(SDIO_MODE_IN_USE=1) &amp; S_FATFS_SDRAM$context &amp; !S_FATFS_USB$context &amp; (SRAM_MODE_IN_USE=1) &amp; (USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="4" Max="=MAX_VOLUMES_VALUE" Min="4"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="(SDIO_MODE_IN_USE=1) &amp; !S_FATFS_SDRAM$context &amp; S_FATFS_USB$context &amp; (SRAM_MODE_IN_USE=1) &amp; (USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="4" Max="=MAX_VOLUMES_VALUE" Min="4"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="!(SDIO_MODE_IN_USE=1) &amp; S_FATFS_SDRAM$context &amp; S_FATFS_USB$context &amp; (SRAM_MODE_IN_USE=1) &amp; (USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="3" Max="=MAX_VOLUMES_VALUE" Min="3"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="(SDIO_MODE_IN_USE=1) &amp; S_FATFS_SDRAM$context &amp; S_FATFS_USB$context &amp; !(SRAM_MODE_IN_USE=1) &amp; !(USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="3" Max="=MAX_VOLUMES_VALUE" Min="3"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="(SDIO_MODE_IN_USE=1) &amp; S_FATFS_SDRAM$context &amp; !S_FATFS_USB$context &amp; !(SRAM_MODE_IN_USE=1) &amp; (USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="3" Max="=MAX_VOLUMES_VALUE" Min="3"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="(SDIO_MODE_IN_USE=1) &amp; !S_FATFS_SDRAM$context &amp; !S_FATFS_USB$context &amp; (SRAM_MODE_IN_USE=1) &amp; (USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="3" Max="=MAX_VOLUMES_VALUE" Min="3"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="!(SDIO_MODE_IN_USE=1) &amp; !S_FATFS_SDRAM$context &amp; S_FATFS_USB$context &amp; (SRAM_MODE_IN_USE=1) &amp; (USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="3" Max="=MAX_VOLUMES_VALUE" Min="3"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="!(SDIO_MODE_IN_USE=1) &amp; S_FATFS_SDRAM$context &amp; !S_FATFS_USB$context &amp; (SRAM_MODE_IN_USE=1) &amp; (USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>	
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="3" Max="=MAX_VOLUMES_VALUE" Min="3"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="!(SDIO_MODE_IN_USE=1) &amp; S_FATFS_SDRAM$context &amp; S_FATFS_USB$context &amp; !(SRAM_MODE_IN_USE=1) &amp; (USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>	
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="3" Max="=MAX_VOLUMES_VALUE" Min="3"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="!(SDIO_MODE_IN_USE=1) &amp; S_FATFS_SDRAM$context &amp; S_FATFS_USB$context &amp; (SRAM_MODE_IN_USE=1) &amp; !(USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>		
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="3" Max="=MAX_VOLUMES_VALUE" Min="3"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="(SDIO_MODE_IN_USE=1) &amp; !S_FATFS_SDRAM$context &amp; S_FATFS_USB$context &amp; !(SRAM_MODE_IN_USE=1) &amp; (USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>		
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="3" Max="=MAX_VOLUMES_VALUE" Min="3"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="(SDIO_MODE_IN_USE=1) &amp; !S_FATFS_SDRAM$context &amp; S_FATFS_USB$context &amp; (SRAM_MODE_IN_USE=1) &amp; !(USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>		
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="3" Max="=MAX_VOLUMES_VALUE" Min="3"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="(SDIO_MODE_IN_USE=1) &amp; S_FATFS_SDRAM$context &amp; !S_FATFS_USB$context &amp; (SRAM_MODE_IN_USE=1) &amp; !(USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>		
	
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="2" Max="=MAX_VOLUMES_VALUE" Min="2"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="!(SDIO_MODE_IN_USE=1) &amp; !S_FATFS_SDRAM$context &amp; !S_FATFS_USB$context &amp; (SRAM_MODE_IN_USE=1) &amp; (USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="2" Max="=MAX_VOLUMES_VALUE" Min="2"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="!(SDIO_MODE_IN_USE=1) &amp; !S_FATFS_SDRAM$context &amp; S_FATFS_USB$context &amp; (SRAM_MODE_IN_USE=1) &amp; !(USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="2" Max="=MAX_VOLUMES_VALUE" Min="2"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="!(SDIO_MODE_IN_USE=1) &amp; S_FATFS_SDRAM$context &amp; S_FATFS_USB$context &amp; !(SRAM_MODE_IN_USE=1) &amp; !(USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>
	
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="2" Max="=MAX_VOLUMES_VALUE" Min="2"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="(SDIO_MODE_IN_USE=1) &amp; S_FATFS_SDRAM$context &amp; !S_FATFS_USB$context &amp; !(SRAM_MODE_IN_USE=1) &amp; !(USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="2" Max="=MAX_VOLUMES_VALUE" Min="2"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="(SDIO_MODE_IN_USE=1) &amp; !S_FATFS_SDRAM$context &amp; S_FATFS_USB$context &amp; !(SRAM_MODE_IN_USE=1) &amp; !(USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>	
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="2" Max="=MAX_VOLUMES_VALUE" Min="2"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="(SDIO_MODE_IN_USE=1) &amp; !S_FATFS_SDRAM$context &amp; !S_FATFS_USB$context &amp; (SRAM_MODE_IN_USE=1) &amp; !(USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>	
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="2" Max="=MAX_VOLUMES_VALUE" Min="2"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="(SDIO_MODE_IN_USE=1) &amp; !S_FATFS_SDRAM$context &amp; !S_FATFS_USB$context &amp; !(SRAM_MODE_IN_USE=1) &amp; (USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>		
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="2" Max="=MAX_VOLUMES_VALUE" Min="2"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="!(SDIO_MODE_IN_USE=1) &amp; S_FATFS_SDRAM$context &amp; !S_FATFS_USB$context &amp; (SRAM_MODE_IN_USE=1) &amp; !(USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>		
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="2" Max="=MAX_VOLUMES_VALUE" Min="2"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="!(SDIO_MODE_IN_USE=1) &amp; S_FATFS_SDRAM$context &amp; !S_FATFS_USB$context &amp; !(SRAM_MODE_IN_USE=1) &amp; (USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>		
	<RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="2" Max="=MAX_VOLUMES_VALUE" Min="2"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Condition Diagnostic="" Expression="!(SDIO_MODE_IN_USE=1) &amp; !S_FATFS_SDRAM$context &amp; S_FATFS_USB$context &amp; !(SRAM_MODE_IN_USE=1) &amp; (USER_MODE_IN_USE=1)"/>
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>		
	
    <RefParameter Name="_VOLUMES" Comment="VOLUMES (Logical drives)" DefaultValue="1" Max="=MAX_VOLUMES_VALUE" Min="1"  Type="integer" Group="Physical Drive Parameters" TabName="Set Defines">
	    <Description>Number of volumes (logical drives) to be used.</Description>
	</RefParameter>
	
	    
	<RefParameter Name="_MAX_SS" Comment="MAX_SS (Maximum Sector Size)" DefaultValue="512" Type="list" Group="Physical Drive Parameters" TabName="Set Defines">
		<PossibleValue Comment="512" Value="512"/>
		<PossibleValue Comment="1024" Value="1024"/>
		<PossibleValue Comment="2048" Value="2048"/>
		<PossibleValue Comment="4096" Value="4096"/>
		<Description>Maximum sector size to be handled.&lt;br&gt; Four possible values: 512, 1024, 2048, 4096.&lt;br&gt; Always set &lt;b&gt;512&lt;/b&gt; for memory card and hard disk but a larger value may be required for on-board flash memory, floppy disk and optical disk.&lt;br&gt; When MAX_SS is larger than 512, it configures FatFs to variable sector size and GET_SECTOR_SIZE command must be implemented to the disk_ioctl() function.</Description>
	</RefParameter>
	
	<!--  Tracker 316293 -->
	<RefParameter Name="_MIN_SS" Comment="MIN_SS (Minimum Sector Size)" DefaultValue="512" Type="list" Group="Physical Drive Parameters" TabName="Set Defines">
		<Condition Diagnostic="Four possible values: 512, 1024, 2048 and 4096."  Expression="_MAX_SS = 4096"/>
		<PossibleValue Comment="512" Value="512"/>
		<PossibleValue Comment="1024" Value="1024"/>
		<PossibleValue Comment="2048" Value="2048"/>
		<PossibleValue Comment="4096" Value="4096"/>
		<Description>Minimum sector size to be handled.&lt;br&gt; Note: must be less than or equal to _MAX_SS.</Description>
	</RefParameter>
	
	<RefParameter Name="_MIN_SS" Comment="MIN_SS (Minimum Sector Size)" DefaultValue="512" Type="list" Group="Physical Drive Parameters" TabName="Set Defines">
		<Condition Diagnostic="Three possible values: 512, 1024 and 2048."  Expression="_MAX_SS = 2048"/>
		<PossibleValue Comment="512" Value="512"/>
		<PossibleValue Comment="1024" Value="1024"/>
		<PossibleValue Comment="2048" Value="2048"/>
		<Description>Minimum sector size to be handled.&lt;br&gt; Note: must be less than or equal to _MAX_SS.</Description>
	</RefParameter>
	
	<RefParameter Name="_MIN_SS" Comment="MIN_SS (Minimum Sector Size)" DefaultValue="512" Type="list" Group="Physical Drive Parameters" TabName="Set Defines">
		<Condition Diagnostic="Two possible values: 512 and 1024."  Expression="_MAX_SS = 1024"/>
		<PossibleValue Comment="512" Value="512"/>
		<PossibleValue Comment="1024" Value="1024"/>
		<Description>Minimum sector size to be handled.&lt;br&gt; Note: must be less than or equal to _MAX_SS.</Description>
	</RefParameter>

	<RefParameter Name="_MIN_SS" Comment="MIN_SS (Minimum Sector Size)" DefaultValue="512" Type="list" Group="Physical Drive Parameters" TabName="Set Defines">
		<PossibleValue Comment="512" Value="512"/>
		<Description>Minimum sector size to be handled.&lt;br&gt; Note: must be less than or equal to _MAX_SS.</Description>
	</RefParameter>
		
	<RefParameter Name="_MULTI_PARTITION" Comment="MULTI_PARTITION (Volume partitions feature)" DefaultValue="0" Type="list" Group="Physical Drive Parameters" TabName="Set Defines">
		<PossibleValue Comment="Disabled" Value="0"/>
		<PossibleValue Comment="Enabled" Value="1"/>
		<Description>When set to 0 (Disabled), each volume is bound to the same physical drive number and it can mount only first primaly partition. &lt;br&gt;When it is set to 1 (Enabled), each volume is tied to the partitions listed in VolToPart[].</Description>
	</RefParameter>
	
    <RefParameter Name="_USE_TRIM" Comment="USE_TRIM (Erase feature)" DefaultValue="0" Type="list" Group="Physical Drive Parameters" TabName="Set Defines">
        <PossibleValue Comment="Disabled" Value="0"/>
        <PossibleValue Comment="Enabled" Value="1"/>
        <Description>This option switches ATA-TRIM feature. (0:Disable or 1:Enable) To enable Trim feature, also CTRL_TRIM command should be implemented to the disk_ioctl() function.</Description>
    </RefParameter>
	
    <RefParameter Name="_FS_NOFSINFO" Comment="FS_NOFSINFO (Force full FAT scan)" DefaultValue="0" Type="list" Group="Physical Drive Parameters" TabName="Set Defines">
        <PossibleValue Comment="0" Value="0"/>
        <PossibleValue Comment="1" Value="1"/>
        <PossibleValue Comment="2" Value="2"/>
        <PossibleValue Comment="3" Value="3"/>
        <Description>If you need to know correct free space on the FAT32 volume, set bit 0 of this option and f_getfree() function at first time after volume mount will force a full FAT scan.&lt;br&gt;Bit 1 controls the last allocated cluster number as bit 0.&lt;br&gt; - bit0=0: Use free cluster count in the FSINFO if available.&lt;br&gt; - bit0=1: Do not trust free cluster count in the FSINFO.&lt;br&gt; - bit1=0: Use last allocated cluster number in the FSINFO if available. &lt;br&gt; - bit1=1: Do not trust last allocated cluster number in the FSINFO.</Description>
	</RefParameter>
	
    <!-- _FS_TINY Moved to System parameters in R0.12 -->
    <RefParameter Name="_FS_TINY" Comment="FS_TINY (Tiny mode)" DefaultValue="0" Type="list" Group="System Parameters" TabName="Set Defines">
        <PossibleValue Comment="Disabled" Value="0"/>
        <PossibleValue Comment="Enabled" Value="1"/>
        <Description>When FS_TINY is set to 1, FatFs uses the sector buffer in the file system object instead of the sector buffer in the individual file object for file data transfer.&lt;br&gt;
                     This reduces memory consumption 512 bytes each file object.</Description>
    </RefParameter>

    <!--  New in Fatfs R0.11 -->
    <RefParameter Name="_FS_NORTC" Comment="FS_NORTC (Timestamp feature)" DefaultValue="0" Type="list" Group="System Parameters" TabName="Set Defines">
        <PossibleValue Comment="Fixed timestamp" Value="1"/>
        <PossibleValue Comment="Dynamic timestamp" Value="0"/>
        <Description>The _FS_NORTC option switches timestamp feature. &lt;br&gt;- If the system does not have an RTC function or valid timestamp is not needed, set _FS_NORTC to 1 (Fixed timestamp) to disable the timestamp feature. All objects modified by FatFs will have a fixed timestamp defined by _NORTC_MON, _NORTC_MDAY and _NORTC_YEAR. &lt;br&gt;- When timestamp feature is enabled (Dynamic timestamp), get_fattime() function need to be added to the project to read current time form RTC and generate a timestamp. _NORTC_MON, _NORTC_MDAY and _NORTC_YEAR have no effect. </Description>
    </RefParameter>

    <!-- ************************************************************************ -->
    <!--  Default values changed in R0.13 for NORTC_YEAR and NORTC_MON (To check) -->
    <!-- ************************************************************************ -->

    <RefParameter Name="_NORTC_YEAR" Comment="      NORTC_YEAR (Year for timestamp)" DefaultValue="2015" Max="2107" Min="1980" Type="integer" Group="System Parameters" TabName="Set Defines">
        <Condition Diagnostic="Available in CubeMx since R0.11 version" Expression="(_FS_NORTC = 1)"/>
        <Description>As FS_NORTC is enabled, it is the year part of the timestamps used by Fatfs. </Description>
    </RefParameter>
    <RefParameter Name="_NORTC_YEAR" Comment="      NORTC_YEAR (Year for timestamp)" DefaultValue="2015" Max="2107" Min="1980" Type="integer" Group="System Parameters" TabName="Set Defines" Visible="false">
        <Description>Useless as FS_NORTC is disabled (otherwise, it is the year part of the timestamps used by Fatfs). </Description>
    </RefParameter><!-- uniqueElementList removed in 5.5.0 -->

    <RefParameter Name="_NORTC_MON" Comment="      NORTC_MON (Month for timestamp)" DefaultValue="6" Max="12" Min="1" Type="integer" Group="System Parameters" TabName="Set Defines">
        <Condition Diagnostic="Available in CubeMx since R0.11 version" Expression="(_FS_NORTC = 1)"/>
        <Description>As FS_NORTC is enabled, it is the month part of the timestamps used by Fatfs.</Description>
    </RefParameter>
    <RefParameter Name="_NORTC_MON" Comment="      NORTC_MON (Month for timestamp)" DefaultValue="6" Max="12" Min="1" Type="integer" Group="System Parameters" TabName="Set Defines" Visible="false">
        <Description>Useless as FS_NORTC is disabled (otherwise, it is the month part of the timestamps used by Fatfs). </Description>
    </RefParameter><!-- uniqueElementList removed in 5.5.0 -->

    <RefParameter Name="_NORTC_MDAY" Comment="      NORTC_MDAY (Day for timestamp)" DefaultValue="4" Max="30" Min="1" Type="integer" Group="System Parameters" TabName="Set Defines">
        <Condition Diagnostic="Available in CubeMx since R0.11 version" Expression="(_FS_NORTC = 1) &amp; (_NORTC_MON = 4 | _NORTC_MON = 6 | _NORTC_MON = 9 | _NORTC_MON = 11)"/>
        <Description>As FS_NORTC is enabled, it is the day part of the timestamps used by Fatfs. </Description>
    </RefParameter>
    <RefParameter Name="_NORTC_MDAY" Comment="      NORTC_MDAY (Day for timestamp)" DefaultValue="4" Max="28" Min="1" Type="integer" Group="System Parameters" TabName="Set Defines">
        <Condition Diagnostic="Available in CubeMx since R0.11 version" Expression="(_FS_NORTC = 1) &amp; (_NORTC_MON = 2)"/>
        <Description>As FS_NORTC is enabled, it is the day part of the timestamps used by Fatfs. </Description>
    </RefParameter>
    <RefParameter Name="_NORTC_MDAY" Comment="      NORTC_MDAY (Day for timestamp)" DefaultValue="4" Max="31" Min="1" Type="integer" Group="System Parameters" TabName="Set Defines">
        <Condition Diagnostic="Available in CubeMx since R0.11 version" Expression="(_FS_NORTC = 1)"/>
        <Description>As FS_NORTC is enabled, it is the day part of the timestamps used by Fatfs. </Description>
    </RefParameter>
    <RefParameter Name="_NORTC_MDAY" Comment="      NORTC_MDAY (Day for timestamp)" DefaultValue="4" Max="31" Min="1" Type="integer" Group="System Parameters" TabName="Set Defines" Visible="false">
        <Description>Useless as FS_NORTC is disabled (otherwise, it is the day part of the timestamps used by Fatfs). </Description>
    </RefParameter><!-- uniqueElementList removed in 5.5.0 -->
    <!--  New in Fatfs R0.11 -->

    <!-- _WORD_ACCESS removed in R0.12 -->
    <RefParameter Name="_WORD_ACCESS" Comment="WORD_ACCESS (Platform dependent access option)" DefaultValue="0" Type="list" Group="System Parameters" TabName="Set Defines">
        <Condition Diagnostic="_WORD_ACCESS available until R0.11 (removed in R0.12)" Expression="FATFS_version=11"/>
        <PossibleValue Comment="Byte access" Value="0"/>
        <PossibleValue Comment="Word access" Value="1"/>
        <Description>The WORD_ACCESS option is an only platform dependent option. It defines which access method is used to the word data on the FAT volume.&lt;br&gt; - 0: Byte-by-byte access. Always compatible with all platforms.&lt;br&gt; - 1: Word access. &lt;b&gt;Do not choose this unless under both the following conditions.&lt;/b&gt;&lt;br&gt;&#160;&#160;&#160;&#160; - Byte order on the memory is little-endian. &lt;br&gt;&#160;&#160;&#160;&#160; - Address miss-aligned word access is always allowed for all instructions.&lt;br&gt; If it is the case, WORD_ACCESS can also be set to 1 to improve performance and reduce code size.</Description>
    </RefParameter>
	<RefParameter Name="_WORD_ACCESS" Comment="WORD_ACCESS (Platform dependent access option)" DefaultValue="0" Type="list" Group="System Parameters" TabName="Set Defines" Visible="false">
		<PossibleValue Comment="Byte access" Value="0"/>
		<Description>Hidden as removed in R0.12.</Description>
	</RefParameter>	
    <!-- _WORD_ACCESS removed in R0.12 -->

    <RefParameter Name="_FS_REENTRANT" Comment="FS_REENTRANT (Re-Entrancy)" DefaultValue="1" Type="list" Group="System Parameters" TabName="Set Defines">
        <Condition Diagnostic="FS_REENTRANT forced to 1 as FREERTOS enabled" Expression="(RTOS_IN_USE=1)"/>
        <PossibleValue Comment="Enabled" Value="1"/>
        <Description>The FS_REENTRANT option switches the re-entrancy (thread safe) of the FatFs module.&lt;br&gt; - 1: Enable re-entrancy. Also user provided synchronization handlers, ff_req_grant(), ff_rel_grant(), ff_del_syncobj() and ff_cre_syncobj() function must be added to the project. </Description>
    </RefParameter>

    <RefParameter Name="_FS_REENTRANT" Comment="FS_REENTRANT (Re-Entrancy)" DefaultValue="0" Type="list" Group="System Parameters" TabName="Set Defines">
        <Condition Diagnostic="FS_REENTRANT forced to 0 as FREERTOS disabled" Expression="!(RTOS_IN_USE=1)"/>
        <PossibleValue Comment="Disabled" Value="0"/>
        <!-- <PossibleValue Comment="Disabled" Value="0" Semaphore="S_FS_REENTRANT_0"/> -->
        <Description>The FS_REENTRANT option switches the re-entrancy (thread safe) of the FatFs module.&lt;br&gt; - 0: Disable re-entrancy. SYNC_t and FS_TIMEOUT have no effect.</Description>
    </RefParameter>

    <RefParameter Name="_FS_TIMEOUT" Comment="FS_TIMEOUT (Timeout ticks)" DefaultValue="1000" Max="100000000" Min="1"  Type="integer" Group="System Parameters" TabName="Set Defines">
        <Description>Timeout period in unit of time ticks</Description>
    </RefParameter>


    <!-- ADDED/REWORKED FOR BETTER SUPPORT OF  CMSIS_RTOS V2 (cf syscall.c file) -->
    <RefParameter Name="_USE_MUTEX" Comment="USE_MUTEX" DefaultValue="0" Type="list" Group="System Parameters" TabName="Set Defines">
        <Condition Diagnostic="Useful when rtos is enabled" Expression="_FS_REENTRANT=1"/>
        <PossibleValue Comment="Disabled" Value="0"/>
        <PossibleValue Comment="Enabled" Value="1"/>
        <Description>New param for better support of CMSIS-RTOS v2</Description>
    </RefParameter>
    <RefParameter Name="_USE_MUTEX" Comment="USE_MUTEX" DefaultValue="0" Type="list" Group="System Parameters" TabName="Set Defines" Visible="false">
        <PossibleValue Comment="Disabled" Value="0"/>
        <PossibleValue Comment="Enabled" Value="1"/>
        <Description>New param for better support of CMSIS-RTOS v2</Description>
    </RefParameter>

      <!--  special case for L5, as there is no CMSIS V1!!! -->
    <RefParameter Name="_SYNC_t" Comment="SYNC_t (O/S sync object)" DefaultValue="osMutexId_t" Type="uniqueElementList" Group="System Parameters" TabName="Set Defines">
        <Condition Diagnostic="Useful when rtos is enabled" Expression="_FS_REENTRANT=1 &amp; _USE_MUTEX=1"/>
        <PossibleValue Comment="osMutexId_t" Value="osMutexId_t"/>
        <Description>O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc..</Description>
    </RefParameter>
    <RefParameter Name="_SYNC_t" Comment="SYNC_t (O/S sync object)" DefaultValue="osSemaphoreId_t" Type="uniqueElementList" Group="System Parameters" TabName="Set Defines">
        <Condition Diagnostic="Useful when rtos is enabled" Expression="_FS_REENTRANT=1"/>
        <PossibleValue Comment="osSemaphoreId_t" Value="osSemaphoreId_t"/>
        <Description>O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc..</Description>
    </RefParameter>
    <RefParameter Name="_SYNC_t" Comment="SYNC_t (O/S sync object)" DefaultValue="NULL" Type="uniqueElementList" Group="System Parameters" TabName="Set Defines" Visible="false">
        <PossibleValue Comment="No sync" Value="NULL"/>
        <Description>Not needed when there is no Os in use.</Description>
    </RefParameter>

    <!-- ADDED/REWORKED FOR BETTER SUPPORT OF CMSIS_RTOS V2 -->

    <RefParameter Name="_FS_LOCK" Comment="FS_LOCK (Number of files opened simultaneously)" DefaultValue="2" Max="255" Min="0"  Type="integer" Group="System Parameters" TabName="Set Defines">
        <Description>To enable file lock control feature, set FS_LOCK to 1 or greater. The value defines how many files can be opened simultaneously. </Description>
    </RefParameter>

    <!-- New in R0.12  -->
    <RefParameter Name="_USE_EXPAND" Comment="USE_EXPAND (Use f_expand function)" DefaultValue="0" Type="list" Group="Function Parameters" TabName="Set Defines">
        <Condition Diagnostic="Available in CubeMx since R0.12 version" Expression="(FATFS_version &gt; 11) &amp; (_FS_READONLY = 0)"/>
        <PossibleValue Comment="Disabled" Value="0"/>
        <PossibleValue Comment="Enabled" Value="1"/>
        <Description>Flag to enable the f_expand function (0:Disabled or 1:Enabled).&lt;br&gt;
                     The f_expand function prepares or allocates a contiguous data area to the file.&lt;br&gt;
                     Note: can be enabled as _FS_READONLY equals to 0 (Disabled)</Description>
    </RefParameter>
    <RefParameter Name="_USE_EXPAND" Comment="USE_EXPAND (Use f_expand function)" DefaultValue="0" Type="list" Group="Function Parameters" TabName="Set Defines">
        <Condition Diagnostic="Available in CubeMx since R0.12 version" Expression="(FATFS_version &gt; 11)"/>
        <PossibleValue Comment="Disabled" Value="0"/>
        <Description>Flag to enable the f_expand function (0:Disabled or 1:Enabled).&lt;br&gt;
                     The f_expand function prepares or allocates a contiguous data area to the file.&lt;br&gt;
                     Note: forced to disabled as _FS_READONLY equals to 1 (Enabled)</Description>
    </RefParameter>
    <RefParameter Name="_USE_EXPAND" Comment="USE_EXPAND (Use f_expand function)" DefaultValue="0" Type="list" Group="Function Parameters" TabName="Set Defines" Visible="false">
        <PossibleValue Comment="Disabled" Value="0"/>
        <Description>Hidden parameter when version less than 12.</Description>
    </RefParameter>   

    <RefParameter Name="_USE_CHMOD" Comment="USE_CHMOD (Change attributes function)" DefaultValue="0" Type="list" Group="Function Parameters" TabName="Set Defines">
        <Condition Diagnostic="Available in CubeMx since R0.12 version" Expression="(FATFS_version &gt; 11) &amp; (_FS_READONLY = 0)"/>
        <PossibleValue Comment="Disabled" Value="0"/>
        <PossibleValue Comment="Enabled" Value="1"/>
        <Description>Flag to enable the f_chmod function (0:Disabled or 1:Enabled).&lt;br&gt;
                     The f_chmod function changes the attribute of a file or sub-directory.&lt;br&gt;
                     Note: can be enabled as _FS_READONLY equals to 0 (Disabled)</Description>
    </RefParameter>
    <RefParameter Name="_USE_CHMOD" Comment="USE_CHMOD (Change attributes function)" DefaultValue="0" Type="list" Group="Function Parameters" TabName="Set Defines">
        <Condition Diagnostic="Available in CubeMx since R0.12 version" Expression="(FATFS_version &gt; 11)"/>
        <PossibleValue Comment="Disabled" Value="0"/>
        <Description>Flag to enable the f_chmod function (0:Disabled or 1:Enabled).&lt;br&gt;
                     The f_chmod function changes the attribute of a file or sub-directory.&lt;br&gt;
                     Note: forced to disabled as _FS_READONLY equals to 1 (Enabled)</Description>
    </RefParameter>
    <RefParameter Name="_USE_CHMOD" Comment="USE_CHMOD (Change attributes function)" DefaultValue="0" Type="list" Group="Function Parameters" TabName="Set Defines" Visible="false">
        <PossibleValue Comment="Disabled" Value="0"/>
        <Description>Hidden parameter when version less than 12.</Description>
    </RefParameter>

    <RefParameter Name="_FS_EXFAT" Comment="FS_EXFAT (Support of exFAT file system)" DefaultValue="0" Type="list" Group="System Parameters" TabName="Set Defines">
        <Condition Diagnostic="Available in CubeMx since R0.12 version" Expression="(FATFS_version &gt; 11) &amp; (!_USE_LFN=0)" />
        <PossibleValue Comment="Disabled" Value="0"/>
        <PossibleValue Comment="Enabled" Value="1"/>
        <Description>This option switches support of exFAT file system. (0:Disabled or 1:Enabled).&lt;br&gt;
                     When enable exFAT, also LFN needs to be enabled. (_USE_LFN >= 1).&lt;br&gt;
                     Note that enabling exFAT discards C89 compatibility.                           
        </Description>
    </RefParameter>
    <RefParameter Name="_FS_EXFAT" Comment="FS_EXFAT (Support of exFAT file system)" DefaultValue="0" Type="list" Group="System Parameters" TabName="Set Defines">
        <Condition Diagnostic="Forced to disabled as _USE_LFN equals to 0 (Disabled)" Expression="FATFS_version &gt; 11"/>
        <PossibleValue Comment="Disabled" Value="0"/>
        <Description>This option switches support of exFAT file system. (0:Disabled or 1:Enabled).&lt;br&gt;
                     When enable exFAT, also LFN needs to be enabled. (_USE_LFN >= 1).&lt;br&gt;
                     Note that enabling exFAT discards C89 compatibility.                           
        </Description>
    </RefParameter>
    <RefParameter Name="_FS_EXFAT" Comment="FS_EXFAT (Support of exFAT file system)" DefaultValue="0" Type="list" Group="System Parameters" TabName="Set Defines" Visible="false">
        <PossibleValue Comment="Disabled" Value="0"/>
        <Description>Hidden parameter when version != 12.</Description>
    </RefParameter>
    
    <!--  New in Fatfs R0.12 -->

    <!-- Internal parameters for detecting the enabled modes and include the right files in ffconf.h -->
    <RefParameter Name="_FS_FATFS_SDIO" Comment="SD mode" DefaultValue="1" Type="integer" Visible="false">
        <Condition Diagnostic="Equals to 1 if SDIO mode on" Expression="(SDIO_MODE_IN_USE=1)"/>
        <PossibleValue Comment="Enabled" Value="1"/>
    </RefParameter>
    <RefParameter Name="_FS_FATFS_SDIO" Comment="SD mode" DefaultValue="0" Type="integer" Visible="false">
        <PossibleValue Comment="Disabled" Value="0"/>
    </RefParameter>

    <RefParameter Name="_FS_FATFS_SDRAM" Comment="SDRAM mode" DefaultValue="1" Type="integer" Visible="false">
        <Condition Diagnostic="Equals to 1 if SDRAM mode on" Expression="S_FATFS_SDRAM$context"/>
        <PossibleValue Comment="Enabled" Value="1"/>
    </RefParameter>
    <RefParameter Name="_FS_FATFS_SDRAM" Comment="SDRAM mode" DefaultValue="0" Type="integer" Visible="false">
        <PossibleValue Comment="Disabled" Value="0"/>
    </RefParameter>

    <RefParameter Name="_FS_FATFS_SRAM" Comment="SRAM mode" DefaultValue="1" Type="integer" Visible="false">
        <Condition Diagnostic="Equals to 1 if SRAM mode on" Expression="(SRAM_MODE_IN_USE=1)"/>
        <PossibleValue Comment="Enabled" Value="1"/>
    </RefParameter>
    <RefParameter Name="_FS_FATFS_SRAM" Comment="SRAM mode" DefaultValue="0" Type="integer" Visible="false">
        <PossibleValue Comment="Disabled" Value="0"/>
    </RefParameter>

    <RefParameter Name="_FS_FATFS_USB" Comment="USB mode" DefaultValue="1" Type="integer" Visible="false">
        <Condition Diagnostic="Equals to 1 if USB mode on" Expression="S_FATFS_USB$context"/>
        <PossibleValue Comment="Enabled" Value="1"/>
    </RefParameter>
    <RefParameter Name="_FS_FATFS_USB" Comment="USB mode" DefaultValue="0" Type="integer" Visible="false">
        <PossibleValue Comment="Disabled" Value="0"/>
    </RefParameter>

    <!-- Basemode for FATFS -->
    <RefMode Name="FatFS_Basemode" Comment="Internal basemode for FATFS" Abstract="true">
        <!--5 following hidden for release version -->
        <!--
        <Parameter Name="FATFS_CONTEXT"/>
        <Parameter Name="RTOS_IN_USE"/>  
        <Parameter Name="SRAM_MODE_IN_USE"/> 
        <Parameter Name="SDIO_MODE_IN_USE"/> 
        <Parameter Name="USER_MODE_IN_USE"/>
         --> 
        
        <Parameter Name="FATFS_version"/>
        <!-- Parameters for Function and Buffer Configurations -->
        <Parameter Name="_FS_READONLY"/>
        <Parameter Name="_FS_MINIMIZE"/>
        <Parameter Name="_USE_STRFUNC"/>
        <Parameter Name="_USE_FIND"/>
        <Parameter Name="_USE_MKFS"/>
        <Parameter Name="_USE_FASTSEEK"/>
        <Parameter Name="_USE_EXPAND"/>     <!-- R12 -->
        <Parameter Name="_USE_CHMOD"/>      <!-- R12 -->
        <Parameter Name="_USE_LABEL"/>
        <Parameter Name="_USE_FORWARD"/>
        <Parameter Name="_USE_BUFF_WO_ALIGNMENT"/>
        <!-- Parameters for Locale and Namespace Configurations -->
        <Parameter Name="_CODE_PAGE"/>
        <Parameter Name="_USE_LFN"/>
        <Parameter Name="_MAX_LFN"/>
        <Parameter Name="_LFN_UNICODE"/>
        <Parameter Name="_STRF_ENCODE"/>
        <Parameter Name="_FS_RPATH"/>
        <!-- Parameters for Physical Drive Configurations  -->
        <Parameter Name="_VOLUMES"/>
        <Parameter Name="_MAX_SS"/>
        <Parameter Name="_MIN_SS"/>
        <Parameter Name="_MULTI_PARTITION"/>
        <Parameter Name="_USE_TRIM"/>
        <Parameter Name="_FS_NOFSINFO"/>
        <!-- Parameters for System Configurations   -->
        <Parameter Name="_FS_TINY"/>       <!-- Moved in System Config with R0.12  -->
        <Parameter Name="_FS_EXFAT"/>      <!-- R12 -->
        <Parameter Name="_FS_NORTC"/>
        <Parameter Name="_NORTC_YEAR"/>
        <Parameter Name="_NORTC_MON"/>
        <Parameter Name="_NORTC_MDAY"/>	
        <Parameter Name="_WORD_ACCESS"/>   <!-- Removed in R12 --> 
        <Parameter Name="_FS_REENTRANT"/>
        <Parameter Name="_FS_TIMEOUT"/>
        <Parameter Name="_USE_MUTEX"/>
        <Parameter Name="_SYNC_t"/>
        <Parameter Name="_FS_LOCK"/>
        <!-- R12 + FW pack update (possible use of DMA templates)-->
        <Parameter Name="BOARD_NAME"/>
        
        <Parameter Name="VIRTUAL_CODE_PAGE"/>
    </RefMode>

    <!-- RefMode for SDIO FATFS -->
    <RefMode Name="SDIO" BaseMode="FatFS_Basemode" Abstract="false">
        <ConfigForMode>FATFS_SDIO_Init</ConfigForMode>
        <Parameter Name="_HSD"/>
        <Parameter Name="SD_MODE"/>
        <Parameter Name="USE_DMA_CODE_SD"/>
        <Parameter Name="SD_BSP_CODE"/>
        <BspDependency Name="Detect_SDIO" Comment="The presence of the SD card can be detected through a GPIO in Input Mode" BspIpName="GPIO" BspModeName="Input"/>
    </RefMode>

    <!-- RefMode for FSMC NAND16 FATFS -->
    <RefMode Name="FSMC_NAND16" BaseMode="FatFS_Basemode" Abstract="false">
        <ConfigForMode>FATFS_FSMC_NAND16_Init</ConfigForMode>
        <Parameter Name="_HNAND"/>
    </RefMode>

    <!-- RefMode for FMC SDRAM FATFS -->
    <RefMode Name="FMC_SDRAM" BaseMode="FatFS_Basemode" Abstract="false">
        <ConfigForMode>FATFS_FMC_SDRAM_Init</ConfigForMode>
        <Parameter Name="_HSDRAM"/>
    </RefMode>

    <!-- RefMode for SRAM, PSRAM and Muxed PSRAM FATFS -->
    <RefMode Name="SRAM" BaseMode="FatFS_Basemode" Abstract="false">
        <ConfigForMode>FATFS_SRAM_Init</ConfigForMode>
        <Parameter Name="_HSRAM"/>
        <Parameter Name="SRAM_BSP_CODE"/>
        <!-- <Parameter Name="BOARD_NAME"/> -->
    </RefMode>

    <!-- RefMode for USB FATFS -->
    <RefMode Name="USB" BaseMode="FatFS_Basemode" Abstract="false">
        <ConfigForMode>FATFS_USB_Init</ConfigForMode>
        <Parameter Name="_HUSBH"/>
        <Parameter Name="USE_DMA_CODE_USBH"/>   
    </RefMode>

    <!-- RefMode for GENERIC FATFS -->
    <RefMode Name="User_defined" BaseMode="FatFS_Basemode" Abstract="false">
        <ConfigForMode>FATFS_USER_DEFINED_Init</ConfigForMode>
        <!-- <Parameter Name="NEW_DISKIO_API"/> -->
        <Parameter Name="DISKIO_CODE"/>
        <!-- <Parameter Name="BOARD_NAME"/>  -->
    </RefMode>


    <!-- ModeLogicOperator for FATFS -->
    <ModeLogicOperator Name="OR">
        <!-- <Mode Name="FSMC_NAND16" UserName="NAND">
            <ModeLogicOperator Name="XOR">
                <Mode Name="FSMC_NAND16">
                    <SignalLogicalOp Name="AND">
                        <Signal IOMode="" Name="VS_FSMC_NAND16"/>
                    </SignalLogicalOp>
                </Mode>
            </ModeLogicOperator>
            <Condition Expression="NandFlash1|NandFlash2" Diagnostic="Active only with at least one FMC NAND Flash IP configured)"/>
        </Mode> -->
    
        <Mode Name="FMC_SDRAM" UserName="External SDRAM" RemoveCondition="!FMC:$modeexist_SdramChipSelect1_1">
            <ModeLogicOperator Name="NONE">
                <Mode Name="FMC_SDRAM">
                    <SignalLogicalOp Name="AND">
                        <Signal IOMode="" Name="VS_FMC_SDRAM"/>
                    </SignalLogicalOp>
                    <Semaphore>S_FATFS_SDRAM$context</Semaphore>
                </Mode>
            </ModeLogicOperator>
            <Condition Expression="(SdramChipSelect1|SdramChipSelect2)" Diagnostic="Active only with at least one FMC SDRAM IP configured"/>
        </Mode>

        <Mode Name="SRAM" UserName="External SRAM" RemoveCondition="!FMC:$modeexist_Sram1 &amp; !FSMC:$modeexist_Sram1 &amp; !FMC:$modeexist_Psram1 &amp; !FSMC:$modeexist_Psram1 &amp; !FMC:$modeexist_MuxedPsram1 &amp; !FSMC:$modeexist_MuxedPsram1 &amp; !FSMC_NOR_RAM:$modeexist_8-bit-PSRAM  &amp; !FSMC:$modeexist_Lcd1">
            <ModeLogicOperator Name="NONE">
                <Mode Name="SRAM">
                    <SignalLogicalOp Name="AND">
                        <Signal IOMode="" Name="VS_SRAM"/>
                    </SignalLogicalOp>
                    <Semaphore>S_FATFS_SRAM$context</Semaphore>
                    <!--  PATCH FOR L5 as the $context cannot be used!!! -->
                    <Semaphore>S_FATFS_SRAM_FOR_M33</Semaphore>
                    <!--  PATCH FOR L5 as the $context cannot be used!!! -->
                </Mode>
            </ModeLogicOperator>
            <Condition Expression="(Sram1|Sram2|Sram3|Sram4|Psram1|Psram2|Psram3|Psram4|MuxedPsram1|MuxedPsram2|MuxedPsram3|MuxedPsram4|Lcd1|Lcd2|Lcd3|Lcd4)" Diagnostic="Active only with at least one SRAM / PSRAM / Muxed PSRAM / LCD Interface configured"/>
        </Mode>

        <Mode Name="SDIO" UserName="SD Card" RemoveCondition="!SDIO:$modeexist_SD_1_bit &amp; !SDMMC:$modeexist_SD_1_bit &amp; !SDMMC1:$modeexist_SD_1_bit">
            <ModeLogicOperator Name="NONE">
                <Mode Name="SDIO">
                    <SignalLogicalOp Name="AND">
                        <Signal IOMode="" Name="VS_SDIO"/>
                    </SignalLogicalOp>
                    <Semaphore>S_FATFS_SDIO$context</Semaphore> <!-- to avoid some troubles with use dma template, for instance -->
                    <!--  PATCH FOR L5 as the $context cannot be used!!! -->
                    <Semaphore>S_FATFS_SDIO_FOR_M33</Semaphore> <!-- to avoid some troubles with use dma template, for instance -->
                    <!--  PATCH FOR L5 as the $context cannot be used!!! -->
                </Mode>
            </ModeLogicOperator>
            <Condition Expression="(SDIO_SD_Card|SDMMC1_SD_Card|SDMMC2_SD_Card)" Diagnostic="Active only with SDIO/SDMMC IP configured in a SD mode"/>
        </Mode>

        <Mode Name="USB" UserName="USB Disk" RemoveCondition="!USB_HOST$context:$modeexist_MSC_HS &amp; !USB_HOST$context:$modeexist_MSC_FS">
            <ModeLogicOperator Name="XOR">
                <Mode Name="USB">
                    <SignalLogicalOp Name="AND">
                        <Signal IOMode="" Name="VS_USB"/>
                    </SignalLogicalOp>
                    <Semaphore>S_FATFS_USB$context</Semaphore>   <!-- to avoid some troubles with use dma template, for instance -->
                </Mode>
            </ModeLogicOperator>
            <Condition Expression="(USB_HOST_MSC_FS$context|USB_HOST_MSC_HS$context|ALL_Classes_FS$context|ALL_Classes_HS$context)" Diagnostic="Active only with USB Host (class MSC) middleware"/>
        </Mode>

        <Mode Name="User_defined" UserName="User-defined">
            <ModeLogicOperator Name="XOR">
                <Mode Name="User_defined">
                    <SignalLogicalOp Name="AND">
                        <Signal IOMode="" Name="VS_Generic"/>
                    </SignalLogicalOp>
                    <Semaphore>S_FATFS_Generic$context</Semaphore>
                    <!--  PATCH FOR L5 as the $context cannot be used!!! -->
                    <Semaphore>S_FATFS_Generic_FOR_M33</Semaphore>
                    <!--  PATCH FOR L5 as the $context cannot be used!!! -->
                </Mode>
            </ModeLogicOperator>
            <Condition Expression="!S_FREERTOS_NATIVE" Diagnostic="Active only if FreeRTOS interface is not Native"/>
        </Mode>
    </ModeLogicOperator>

    <!-- RefSignal for FATFS (if not defined, the mode does not appear in the tree -->
    <RefSignal Name="VS_SDIO" Virtual="true"/>
    <!--  <RefSignal Name="VS_FSMC_NAND16" Virtual="true"/> -->
    <RefSignal Name="VS_FMC_SDRAM" Virtual="true"/>
    <RefSignal Name="VS_SRAM" Virtual="true"/>
    <RefSignal Name="VS_USB" Virtual="true"/>
    <RefSignal Name="VS_Generic" Virtual="true"/>

    <Semaphore>S_FATFS_ENABLED</Semaphore>
    <!--  <Semaphore>S_FATFS_ENABLED$context</Semaphore> --> <!-- only used by LIBJPEG (not on L5) -->
 
</IP>
