<?xml version="1.0" encoding="utf-8" standalone="no"?>
<IP xmlns="http://mcd.rou.st.com/modules.php?name=mcu" DBVersion="V4.0" Name="RCC" Version="STM32Cube_FW_L5_V1.0.0RC1" IncludeFile="stm32l5xx_ll_crs.h;stm32l5xx_ll_rcc.h;stm32l5xx_ll_bus.h;stm32l5xx_ll_system.h;stm32l5xx_ll_exti.h;stm32l5xx_ll_cortex.h;stm32l5xx_ll_utils.h;stm32l5xx_ll_pwr.h;stm32l5xx_ll_dma.h" 
    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_Configs.xsd">

    <RefConfig Name="RCC_OSCConfig">
      
        <!--flash latency configuration-->

        <IFCondition Expression ="1=1">
            <CallLibMethod Name="LL_FLASH_SetLatency">
                <MethodArg Name="Latency" ParameterName="FLatency"/>            
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression ="FLatency=FLASH_LATENCY_0">
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#twhile(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_0)#n#t{#n#t}#n"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression ="FLatency=FLASH_LATENCY_1">
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#twhile(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_1)#n#t{#n#t}#n"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression ="FLatency=FLASH_LATENCY_2">
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#twhile(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_2)#n#t{#n#t}#n"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression ="FLatency=FLASH_LATENCY_3">
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#twhile(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_3)#n#t{#n#t}#n"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression ="FLatency=FLASH_LATENCY_4">
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#twhile(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_4)#n#t{#n#t}#n"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression ="FLatency=FLASH_LATENCY_5">
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#twhile(LL_FLASH_GetLatency()!= LL_FLASH_LATENCY_5)#n#t{#n#t}#n"/>
            </CallLibMethod>
        </IFCondition>

        <!--voltage scaling configuration-->
        <IFCondition Expression ="1=1">

            <CallLibMethod Name="LL_PWR_SetRegulVoltageScaling">
                <MethodArg Name="VoltageScaling" ParameterName="PWR_Regulator_Voltage_Scale"/>
            
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression ="PWR_Regulator_Voltage_Scale=PWR_REGULATOR_VOLTAGE_SCALE1_BOOST">
            <CallLibMethod Name="LL_PWR_EnableRange1BoostMode">
            </CallLibMethod>
        </IFCondition>

        <!--Clock source activation-->
        <IFCondition Expression ="HSEUsed=1 &amp; HSEByPass ">
            <CallLibMethod Name="LL_RCC_HSE_EnableBypass" />
        </IFCondition>     
		
        <IFCondition Expression ="HSEUsed=1">
            <CallLibMethod Name="LL_RCC_HSE_Enable"/>
   
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#t /* Wait till HSE is ready */#n#twhile(LL_RCC_HSE_IsReady() != 1)#n#t{#n#t}#n"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="HSIUsed=1">
            <CallLibMethod Name="LL_RCC_HSI_Enable"/>
     
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#t /* Wait till HSI is ready */#n#twhile(LL_RCC_HSI_IsReady() != 1)#n#t{#n#t}#n"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression ="HSIUsed=1">
            <CallLibMethod Name="LL_RCC_HSI_SetCalibTrimming">
                <MethodArg Name="Value" ParameterName="HSICalibrationValue"/>
            </CallLibMethod>
        </IFCondition>
		
        <IFCondition Expression ="HSI48Used=1">
            <CallLibMethod Name="LL_RCC_HSI48_Enable"/>

            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#t /* Wait till HSI48 is ready */#n#twhile(LL_RCC_HSI48_IsReady() != 1)#n#t{#n#t}#n"/>
            </CallLibMethod>
        </IFCondition>
	
        <IFCondition Expression ="LSIUsed=1">
            <CallLibMethod Name="LL_RCC_LSI_Enable"/>

            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#t /* Wait till LSI is ready */#n#twhile(LL_RCC_LSI_IsReady() != 1)#n#t{#n#t}#n"/>
            </CallLibMethod>
        </IFCondition>
		
        <IFCondition Expression ="MSIUsed=1">
            <CallLibMethod Name="LL_RCC_MSI_Enable"/>

            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#t /* Wait till MSI is ready */#n#twhile(LL_RCC_MSI_IsReady() != 1)#n#t{#n#t}#n"/>
            </CallLibMethod>			
        </IFCondition>
		
        <IFCondition Expression ="MSIUsed=1">
            <CallLibMethod Name="LL_RCC_MSI_EnableRangeSelection"/>
        </IFCondition>
		
        <IFCondition Expression ="MSIUsed=1">
            <CallLibMethod Name="LL_RCC_MSI_SetRange">
                <MethodArg Name="Range" ParameterName="MSIClockRange"/>
            </CallLibMethod>
        </IFCondition>
		
        <IFCondition Expression ="MSIUsed=1">
            <CallLibMethod Name="LL_RCC_MSI_SetCalibTrimming">
                <MethodArg Name="Value" ParameterName="MSICalibrationValue"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression ="RTCUsed_ForRCC|LSCOConfig|(LSEUsed=1)">
            <CallLibMethod Name="LL_PWR_EnableBkUpAccess">
            </CallLibMethod>
        </IFCondition> 	 
 
        <IFCondition Expression ="LSEUsed=1 &amp; (LSEByPass | LSEByPassRTC)">
            <CallLibMethod Name="LL_RCC_LSE_EnableBypass"/>
        </IFCondition>
        <IFCondition Expression ="(LSEOscillator | LSEOscillatorRTC) &amp;(LSEUsed=1)">
            <CallLibMethod Name="LL_RCC_LSE_SetDriveCapability">
                <MethodArg Name="LSEDrive" ParameterName="LSE_Drive_Capability"/>
            </CallLibMethod>
        
        </IFCondition> 
        <IFCondition Expression ="LSEUsed=1">
            <CallLibMethod Name="LL_RCC_LSE_Enable"/>
         
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#t /* Wait till LSE is ready */#n#twhile(LL_RCC_LSE_IsReady() != 1)#n#t{#n#t}#n"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression ="MSIUsed=1&amp;MSIAutoCalibrationON">
            <CallLibMethod Name="LL_RCC_MSI_EnablePLLMode"/>
        </IFCondition>

        <!--PLL configuration-->		
        <IFCondition Expression ="PLLUsedForSys=1">
            <CallLibMethod Name="LL_RCC_PLL_ConfigDomain_SYS">
                <MethodArg Name="Source" ParameterName="PLLSource"/>
                <MethodArg Name="PLLM" ParameterName="PLLM"/>
                <MethodArg Name="PLLN" ParameterName="PLLN"/>
                <MethodArg Name="PLLR" ParameterName="PLLR"/>
            </CallLibMethod>
        </IFCondition>		

        <IFCondition Expression ="PLLUsedForSAI=1">
            <CallLibMethod Name="LL_RCC_PLL_ConfigDomain_SAI">
                <MethodArg Name="Source" ParameterName="PLLSource"/>
                <MethodArg Name="PLLM" ParameterName="PLLM"/>
                <MethodArg Name="PLLN" ParameterName="PLLN"/>
                <MethodArg Name="PLLP" ParameterName="PLLP"/>
            </CallLibMethod>
        </IFCondition>		

        <IFCondition Expression ="PLLUsedForCK48=1">
            <CallLibMethod Name="LL_RCC_PLL_ConfigDomain_48M">
                <MethodArg Name="Source" ParameterName="PLLSource"/>
                <MethodArg Name="PLLM" ParameterName="PLLM"/>
                <MethodArg Name="PLLN" ParameterName="PLLN"/>
                <MethodArg Name="PLLQ" ParameterName="PLLQ"/>
            </CallLibMethod>
        </IFCondition>

        <!--PLL activation-->
        <IFCondition Expression ="PLLUsedForCK48=1">
            <CallLibMethod Name="LL_RCC_PLL_EnableDomain_48M"/>
        </IFCondition>		
		
        <IFCondition Expression ="PLLUsedForSys=1">
            <CallLibMethod Name="LL_RCC_PLL_EnableDomain_SYS"/>
        </IFCondition>
		
        <IFCondition Expression ="PLLUsedForSAI=1">
            <CallLibMethod Name="LL_RCC_PLL_EnableDomain_SAI"/>
        </IFCondition>
		
        <IFCondition Expression ="PLLUsed=1">
            <CallLibMethod Name="LL_RCC_PLL_Enable"/>
   
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#t /* Wait till PLL is ready */#n#twhile(LL_RCC_PLL_IsReady() != 1)#n#t{#n#t}#n"/>
            </CallLibMethod>
        </IFCondition>
        
        <!--sys clock source + AHB/APB configuration-->
        <IFCondition Expression ="HCLKsup80=1" >

            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#t   /* Intermediate AHB prescaler 2 when target frequency clock is higher than 80 MHz */#n#t LL_RCC_SetAHBPrescaler(LL_RCC_SYSCLK_DIV_2);#n#t"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="1=1">
            <CallLibMethod Name="LL_RCC_SetSysClkSource">
                <MethodArg Name="Source" ParameterName="SYSCLKSource"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="SysSourcePLL">
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#t /* Wait till System clock is ready */#n#twhile(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_PLL)#n#t{#n#t}#n"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="SysSourceHSE">
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#t /* Wait till System clock is ready */#n#twhile(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_HSE)#n#t{#n#t}#n"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="SysSourceHSI">
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#t /* Wait till System clock is ready */#n#twhile(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_HSI)#n#t{#n#t}#n"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="SysSourceMSI">
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#t /* Wait till System clock is ready */#n#twhile(LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_MSI)#n#t{#n#t}#n"/>
            </CallLibMethod>
        </IFCondition>		
		
        <IFCondition Expression ="HCLKsup80=1">
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#t/* Insure 1µs transition state at intermediate medium speed clock based on DWT*/#n#tCoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;#n#t"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression ="HCLKsup80=1">
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#tDWT-&gt;CTRL |= DWT_CTRL_CYCCNTENA_Msk;#n#tDWT-&gt;CYCCNT = 0;#n#twhile(DWT->CYCCNT &lt; 100);#n#t"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="1=1">
            <CallLibMethod Name="LL_RCC_SetAHBPrescaler">
                <MethodArg Name="Prescaler" ParameterName="AHBCLKDivider"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="1=1">

            <CallLibMethod Name="LL_RCC_SetAPB1Prescaler">
                <MethodArg Name="Prescaler" ParameterName="APB1CLKDivider"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="1=1">
            <CallLibMethod Name="LL_RCC_SetAPB2Prescaler">
                <MethodArg Name="Prescaler" ParameterName="APB2CLKDivider"/>
            </CallLibMethod>
        </IFCondition>

        <!--system core frequency set,systick init,systick priority configuration-->
        <IFCondition Expression ="USE_FULL_LL_DRIVER">
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n"/>
            </CallLibMethod>
            <CallLibMethod Name="LL_Init1msTick">
                <MethodArg Name="HCLKFrequency" ParameterName="CortexFreq_Value"/>
            </CallLibMethod>
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="1=1">
            <CallLibMethod Name="LL_SetSystemCoreClock">
                <MethodArg Name="HCLKFrequency" ParameterName="HCLKFreq_Value"/>            
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression ="!USE_FULL_LL_DRIVER">
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#t /* Update the time base */"/>
            </CallLibMethod>
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#tif (HAL_InitTick (TICK_INT_PRIORITY) != HAL_OK)#n#t{#n#t#tError_Handler();#t#n#t}"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression ="RCC_TZ_PRIV">
            <CallLibMethod Name="LL_RCC_EnablePrivilege"/>
        </IFCondition>
        <IFCondition Expression ="RCC_TZ_PRIV">
            <CallLibMethod Name="LL_RCC_ConfigSecure">
                <MethodArg Name="Configuration" ParameterName="ItemSECPRIV"/>
            </CallLibMethod>
        <Else>
            <IFCondition Expression ="S_SECURE">
                <CallLibMethod Name="LL_RCC_ConfigSecure">
                    <MethodArg Name="Configuration" ParameterName="ItemSEC"/>
                </CallLibMethod>
            </IFCondition>
        </Else>                  
        </IFCondition>
    </RefConfig>

    <RefConfig Name="RCC_MCO1Config">
        <!--MCO clock source -->
        <IFCondition Expression ="((Semaphore_input_Channel1TIM17 &amp; TIM17 &amp; SEM2RCC_MCO_REQUIRED_TIM17)|MCOConfig)">
            <CallLibMethod Name="LL_RCC_ConfigMCO">
                <MethodArg Name="MCOxPrescaler" ParameterName="RCC_MCODiv"/>
                <MethodArg Name="MCOxSource" ParameterName="RCC_MCO1Source"/>
            </CallLibMethod>
        </IFCondition> 
    </RefConfig>

    <RefConfig Name="RCC_PeriphClockConfig">
        <!--peripheral clock source configuration -->
        <IFCondition Expression ="RTCUsed_ForRCC &amp; RTCSourceLSI">
            <CallLibMethod Name="HardCode:RTC" Type="HardCode">
                <HardCode Text="#tif(LL_RCC_GetRTCClockSource() != LL_RCC_RTC_CLKSOURCE_LSI)#n#t{"/>
            </CallLibMethod>
        <Else>
            <IFCondition Expression ="RTCUsed_ForRCC &amp; RTCSourceLSE">
                <CallLibMethod Name="HardCode:RTC" Type="HardCode">
                    <HardCode Text="#tif(LL_RCC_GetRTCClockSource() != LL_RCC_RTC_CLKSOURCE_LSE)#n#t{"/>
                </CallLibMethod>
                <Else>
                    <IFCondition Expression ="RTCUsed_ForRCC &amp; RTCSourceHSE">
                        <CallLibMethod Name="HardCode:RTC" Type="HardCode">
                            <HardCode Text="#tif(LL_RCC_GetRTCClockSource() != LL_RCC_RTC_CLKSOURCE_HSE_DIV32)#n#t{"/>
                            </CallLibMethod>
                    </IFCondition>
                </Else>
            </IFCondition>
        </Else>
        </IFCondition>

        <IFCondition Expression ="RTCUsed_ForRCC">
            <CallLibMethod Name="#tLL_RCC_ForceBackupDomainReset">
            </CallLibMethod>

            <CallLibMethod Name="#tLL_RCC_ReleaseBackupDomainReset">
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="RTCUsed_ForRCC|LCDUsed_ForRCC">
            <CallLibMethod Name="#tLL_RCC_SetRTCClockSource">
                <MethodArg Name="Source" ParameterName="RTCClockSelection"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression ="RTCUsed_ForRCC">
            <CallLibMethod Name="HardCode:RTC"  Type="HardCode">
                <HardCode Text="#t}"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="USART1Used_ForRCC">
            <CallLibMethod Name="LL_RCC_SetUSARTClockSource">
                <MethodArg Name="USARTxSource" ParameterName="USART1CLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="LPUARTUsed_ForRCC">
            <CallLibMethod Name="LL_RCC_SetLPUARTClockSource">
                <MethodArg Name="LPUARTxSource" ParameterName="LPUART1CLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="USART2Used_ForRCC">
            <CallLibMethod Name="LL_RCC_SetUSARTClockSource">
                <MethodArg Name="USARTxSource" ParameterName="USART2CLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="USART3Used_ForRCC">
            <CallLibMethod Name="LL_RCC_SetUSARTClockSource">
                <MethodArg Name="USARTxSource" ParameterName="USART3CLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="UART4Used_ForRCC">
            <CallLibMethod Name="LL_RCC_SetUARTClockSource">
                <MethodArg Name="UARTxSource" ParameterName="UART4CLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="UART5Used_ForRCC">
            <CallLibMethod Name="LL_RCC_SetUARTClockSource">
                <MethodArg Name="UARTxSource" ParameterName="UART5CLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="I2C1Used_ForRCC">
            <CallLibMethod Name="LL_RCC_SetI2CClockSource">
                <MethodArg Name="I2CxSource" ParameterName="I2C1CLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="I2C3Used_ForRCC">
            <CallLibMethod Name="LL_RCC_SetI2CClockSource">
                <MethodArg Name="I2CxSource" ParameterName="I2C3CLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="I2C2Used_ForRCC">
            <CallLibMethod Name="LL_RCC_SetI2CClockSource">
                <MethodArg Name="I2CxSource" ParameterName="I2C2CLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="I2C4Used_ForRCC">
            <CallLibMethod Name="LL_RCC_SetI2CClockSource">
                <MethodArg Name="I2CxSource" ParameterName="I2C4CLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="LPTIM2Used_ForRCC">
            <CallLibMethod Name="LL_RCC_SetLPTIMClockSource">
                <MethodArg Name="LPTIMxSource" ParameterName="LPTIM2CLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="LPTIM1Used_ForRCC">
            <CallLibMethod Name="LL_RCC_SetLPTIMClockSource">
                <MethodArg Name="LPTIMxSource" ParameterName="LPTIM1CLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="LPTIM3Used_ForRCC">
            <CallLibMethod Name="LL_RCC_SetLPTIMClockSource">
                <MethodArg Name="LPTIMxSource" ParameterName="LPTIM3CLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="SAI1_SAIBUsed_ForRCC|SAI1_SAIAUsed_ForRCC">
            <CallLibMethod Name="LL_RCC_SetSAIClockSource">
                <MethodArg Name="SAIxSource" ParameterName="SAI1CLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="SAI2_SAIBUsed_ForRCC|SAI2_SAIAUsed_ForRCC">
            <CallLibMethod Name="LL_RCC_SetSAIClockSource">
                <MethodArg Name="SAIxSource" ParameterName="SAI2CLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="SDMMC1Used_ForRCC ">
            <CallLibMethod Name="LL_RCC_SetSDMMCKernelClockSource">
                <MethodArg Name="SDMMCxSource" ParameterName="SDMMCClockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="(SDMMC1Used_ForRCC &amp; SDMMC1SourceIsClock48) ">
            <CallLibMethod Name="LL_RCC_SetSDMMCClockSource">
                <MethodArg Name="SDMMCxSource" ParameterName="SDMMC1ClockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="RNGUsed_ForRCC ">
            <CallLibMethod Name="LL_RCC_SetRNGClockSource">
                <MethodArg Name="RNGxSource" ParameterName="RNGCLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="USBUsed_ForRCC">
            <CallLibMethod Name="LL_RCC_SetUSBClockSource">
                <MethodArg Name="USBxSource" ParameterName="USBCLockSelection"/>         
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="USE_ADC1|USE_ADC2|USE_ADC3">
            <CallLibMethod Name="LL_RCC_SetADCClockSource">
                <MethodArg Name="ADCxSource" ParameterName="ADCCLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="DFSDM1Used_ForRCC">
            <CallLibMethod Name="LL_RCC_SetDFSDMClockSource">
                <MethodArg Name="DFSDMxSource" ParameterName="DFSDMCLockSelection"/>
            </CallLibMethod>
        </IFCondition>
 
        <IFCondition Expression ="DFSDM1Used_ForRCC &amp; SEM2RCC_SAI1_CK_REQUIRED_DFSDM1">
            <CallLibMethod Name="LL_RCC_SetDFSDMAudioClockSource">
                <MethodArg Name="DFSDMAudioxSource" ParameterName="DFSDMAudioCLockSelection"/>
            </CallLibMethod>
        </IFCondition>	

        <IFCondition Expression ="OCTOSPI1Used_ForRCC|OCTOSPI2Used_ForRCC">
            <CallLibMethod Name="LL_RCC_SetOCTOSPIClockSource">
                <MethodArg Name="OCTOSPIxSource" ParameterName="OCTOSPIMCLockSelection"/>
            </CallLibMethod>
        </IFCondition>

        <IFCondition Expression ="FDCAN1Used_ForRCC">
            <CallLibMethod Name="LL_RCC_SetFDCANClockSource">
                <MethodArg Name="FDCANxSource" ParameterName="FDCANClockSelection"/>
            </CallLibMethod>
        </IFCondition>       
    </RefConfig>

    <RefConfig Name="RCC_CommonPeriphClockConfig">
        <!--PLLSAI1 configuration-->		
        <IFCondition Expression ="(PLLSAI1UsedForCK48=1)">
            <CallLibMethod Name="LL_RCC_PLLSAI1_ConfigDomain_48M">
                <MethodArg Name="Source" ParameterName="PLLSAI1Source"/>
                <MethodArg Name="PLLSAI1M" ParameterName="PLLSAI1M"/>
                <MethodArg Name="PLLSAI1N" ParameterName="PLLSAI1N"/>
                <MethodArg Name="PLLSAI1Q" ParameterName="PLLSAI1Q"/>
            </CallLibMethod>
        </IFCondition>
		
        <IFCondition Expression ="(PLLSAI1UsedForSAI=1)">
            <CallLibMethod Name="LL_RCC_PLLSAI1_ConfigDomain_SAI">
                <MethodArg Name="Source" ParameterName="PLLSAI1Source"/>
                <MethodArg Name="PLLSAI1M" ParameterName="PLLSAI1M"/>
                <MethodArg Name="PLLSAI1N" ParameterName="PLLSAI1N"/>
                <MethodArg Name="PLLSAI1P" ParameterName="PLLSAI1P"/>
            </CallLibMethod>
        </IFCondition>
		
        <IFCondition Expression ="(PLLSAI1UsedFOrADC=1)">
            <CallLibMethod Name="LL_RCC_PLLSAI1_ConfigDomain_ADC">
                <MethodArg Name="Source" ParameterName="PLLSAI1Source"/>
                <MethodArg Name="PLLSAI1M" ParameterName="PLLSAI1M"/>
                <MethodArg Name="PLLSAI1N" ParameterName="PLLSAI1N"/>
                <MethodArg Name="PLLSAI1R" ParameterName="PLLSAI1R"/>
            </CallLibMethod>
        </IFCondition>
        <!--PLLSAI1 activation-->
        <IFCondition Expression ="PLLSAI1UsedForCK48=1">
            <CallLibMethod Name="LL_RCC_PLLSAI1_EnableDomain_48M"/>
        </IFCondition>
		
        <IFCondition Expression ="PLLSAI1UsedFOrADC=1">
            <CallLibMethod Name="LL_RCC_PLLSAI1_EnableDomain_ADC"/>
        </IFCondition> 

        <IFCondition Expression ="PLLSAI1UsedForSAI=1">
            <CallLibMethod Name="LL_RCC_PLLSAI1_EnableDomain_SAI"/>
        </IFCondition>		

        <IFCondition Expression ="PLLSAI1Used=1">
            <CallLibMethod Name="LL_RCC_PLLSAI1_Enable"/>
   
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#t /* Wait till PLLSAI1 is ready */#n#twhile(LL_RCC_PLLSAI1_IsReady() != 1)#n#t{#n#t}"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression ="PLLSAI1Used=1 &amp; PLLSAI2Used=1">
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n"/>
            </CallLibMethod>
        </IFCondition>

        <!--PLLSAI2 configuration-->		
        <IFCondition Expression ="(PLLSAI2UsedFOrSAI=1)">
            <CallLibMethod Name="LL_RCC_PLLSAI2_ConfigDomain_SAI">
                <MethodArg Name="Source" ParameterName="PLLSAI2Source"/>
                <MethodArg Name="PLLSAI2M" ParameterName="PLLSAI2M"/>
                <MethodArg Name="PLLSAI2N" ParameterName="PLLSAI2N"/>
                <MethodArg Name="PLLSAI2P" ParameterName="PLLSAI2P"/>
            </CallLibMethod>
        </IFCondition>

        <!--PLLSAI2 activation-->
        <IFCondition Expression ="PLLSAI2UsedFOrSAI=1">
            <CallLibMethod Name="LL_RCC_PLLSAI2_EnableDomain_SAI"/>
        </IFCondition>

        <IFCondition Expression ="PLLSAI2Used=1">
            <CallLibMethod Name="LL_RCC_PLLSAI2_Enable"/>
     
            <CallLibMethod Name="" Type="HardCode">
                <HardCode Text="#n#t /* Wait till PLLSAI2 is ready */#n#twhile(LL_RCC_PLLSAI2_IsReady() != 1)#n#t{#n#t}"/>
            </CallLibMethod>
        </IFCondition>
    </RefConfig>

    <RefConfig Name="RCC_LSCOConfig">
        <!--LSCO  code gen-->
        <IFCondition Expression ="LSCOConfig">
            <CallLibMethod Name="LL_RCC_LSCO_Enable"/>
        </IFCondition>

        <IFCondition Expression ="LSCOConfig">
            <CallLibMethod Name="LL_RCC_LSCO_SetSource">
                <MethodArg Name="Source" ParameterName="LSCOSource1"/>
            </CallLibMethod>
        </IFCondition>
    </RefConfig>

    <RefConfig Name="RCC_CSS_Enable">
        <!--CSS enable code gen-->
        <IFCondition Expression ="CSSEnabled">
            <CallLibMethod Name="LL_RCC_HSE_EnableCSS"/>
        </IFCondition>
		
        <IFCondition Expression ="RCC_LSECSS_ENABLED">
            <CallLibMethod Name="LL_RCC_LSE_EnableCSS"/>
        </IFCondition>        
    </RefConfig>

    <RefConfig Name="RCC_CRSConfig">
        <IFCondition Expression ="EnableCRS">
            <CallLibMethod Name="LL_CRS_SetSyncDivider">
                <MethodArg Name="Divider" ParameterName="Prescaler"/>
            </CallLibMethod>
            
            <CallLibMethod Name="LL_CRS_SetSyncPolarity">
                <MethodArg Name="Divider" ParameterName="Polarity"/>
            </CallLibMethod>
        
            <CallLibMethod Name="LL_CRS_SetSyncSignalSource">
                <MethodArg Name="Source" ParameterName="Source"/>
            </CallLibMethod>
        
            <CallLibMethod Name="LL_CRS_SetReloadCounter">
                <MethodArg Name="Value" ParameterName="ReloadValueARGLL"/>
            </CallLibMethod>
        
            <CallLibMethod Name="LL_CRS_SetFreqErrorLimit">
                <MethodArg Name="Value" ParameterName="ErrorLimitValue"/>
            </CallLibMethod>
        
            <CallLibMethod Name="LL_CRS_SetHSI48SmoothTrimming">
                <MethodArg Name="Value" ParameterName="HSI48CalibrationValue"/>
            </CallLibMethod>
        </IFCondition>
    </RefConfig>
    <RefConfig Name="CRS_CLK_ENABLE">
        <IFCondition Expression ="EnableCRS">
            <CallLibMethod Name="LL_APB1_GRP1_EnableClock">
                <MethodArg Name="Periphs" ParameterName="PERIPH_CRSAEG"/>
            </CallLibMethod>
        
            <CallLibMethod Name="LL_APB1_GRP1_ForceReset">
                <MethodArg Name="Periphs" ParameterName="PERIPH_CRSAEG"/>
            </CallLibMethod>
        
            <CallLibMethod Name="LL_APB1_GRP1_ReleaseReset">
                <MethodArg Name="Periphs" ParameterName="PERIPH_CRSAEG"/>
            </CallLibMethod>
        </IFCondition>         
    </RefConfig>

    <LibMethod Comment="" Name="LL_PWR_SetRegulVoltageScaling">
        <Argument AddressOf="false" GenericType="simple" Name="VoltageScaling"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_FLASH_SetLatency">
        <Argument AddressOf="false" GenericType="simple" Name="FLatency"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_RCC_LSE_SetDriveCapability">
        <Argument AddressOf="false" GenericType="simple" Name="LSEDrive"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_RCC_HSE_EnableCSS"/>
          
    <LibMethod Comment="" Name="LL_RCC_HSE_EnableBypass" />
    
    <LibMethod Comment="" Name="LL_RCC_HSE_Enable"/>

    <LibMethod Comment="" Name="LL_RCC_HSI_Enable"/>
    
    <LibMethod Comment="" Name="LL_RCC_HSI48_Enable"/>
  
    <LibMethod Comment="" Name="LL_RCC_LSE_Enable"/>
	
    <LibMethod Comment="" Name="LL_RCC_LSE_EnableBypass"/>
	
    <LibMethod Comment="" Name="LL_RCC_LSE_EnableCSS"/>
	
    <LibMethod Comment="" Name="LL_RCC_LSI_Enable"/>
	
    <LibMethod Comment="" Name="LL_RCC_MSI_Enable"/>
	
    <LibMethod Comment="" Name="LL_RCC_MSI_EnablePLLMode"/>
	
    <LibMethod Comment="" Name="LL_RCC_MSI_EnableRangeSelection">
     
    </LibMethod>
    <LibMethod Comment="" Name="LL_RCC_MSI_SetRange">
        <Argument AddressOf="false" GenericType="simple" Name="Range"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_RCC_MSI_SetCalibTrimming">
        <Argument AddressOf="false" GenericType="simple" Name="Value"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_RCC_HSI_SetCalibTrimming">
        <Argument AddressOf="false" GenericType="simple" Name="Value"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_LSCO_Enable"/>
	
    <LibMethod Comment="" Name="LL_RCC_LSCO_SetSource">
        <Argument AddressOf="false" GenericType="simple" Name="Source"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_SetSysClkSource">
        <Argument AddressOf="false" GenericType="simple" Name="Source"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_SetAHBPrescaler">
        <Argument AddressOf="false" GenericType="simple" Name="Prescaler"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_SetAPB1Prescaler">
        <Argument AddressOf="false" GenericType="simple" Name="Prescaler"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_SetAPB2Prescaler">
        <Argument AddressOf="false" GenericType="simple" Name="Prescaler"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_ConfigMCO">
        <Argument AddressOf="false" GenericType="simple" Name="MCOxSource"/>
        <Argument AddressOf="false" GenericType="simple" Name="MCOxPrescaler"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_SetUSARTClockSource">
        <Argument AddressOf="false" GenericType="simple" Name="USARTxSource"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_SetLPUARTClockSource">
        <Argument AddressOf="false" GenericType="simple" Name="LPUARTxSource"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_SetUARTClockSource">
        <Argument AddressOf="false" GenericType="simple" Name="UARTxSource"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_SetI2CClockSource">
        <Argument AddressOf="false" GenericType="simple" Name="I2CxSource"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_SetLPTIMClockSource">
        <Argument AddressOf="false" GenericType="simple" Name="LPTIMxSource"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_SetSAIClockSource">
        <Argument AddressOf="false" GenericType="simple" Name="SAIxSource"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_SetSDMMCClockSource">
        <Argument AddressOf="false" GenericType="simple" Name="SDMMCxSource"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_RCC_SetSDMMCKernelClockSource">
        <Argument AddressOf="false" GenericType="simple" Name="SDMMCxSource"/>
    </LibMethod>

    <LibMethod Comment="" Name="LL_RCC_SetOCTOSPIClockSource">
        <Argument AddressOf="false" GenericType="simple" Name="OCTOSPIxSource"/>
    </LibMethod>

    <LibMethod Comment="" Name="LL_RCC_SetDFSDMAudioClockSource">
        <Argument AddressOf="false" GenericType="simple" Name="DFSDMAudioxSource"/>
    </LibMethod>
    
    <LibMethod Comment="" Name="LL_RCC_PLLSAI2_EnableDomain_LTDC"/>
    <LibMethod Comment="" Name="LL_RCC_PLLSAI2_EnableDomain_DSI"/>
    <LibMethod Comment="" Name="LL_PWR_EnableRange1BoostMode"/>
	
    <LibMethod Comment="" Name="LL_RCC_SetRNGClockSource">
        <Argument AddressOf="false" GenericType="simple" Name="RNGxSource"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_SetUSBClockSource">
        <Argument AddressOf="false" GenericType="simple" Name="USBxSource"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_SetADCClockSource">
        <Argument AddressOf="false" GenericType="simple" Name="ADCxSource"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_SetFDCANClockSource">
        <Argument AddressOf="false" GenericType="simple" Name="FDCANxSource"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_SetDFSDMClockSource">
        <Argument AddressOf="false" GenericType="simple" Name="DFSDMxSource"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="#tLL_RCC_SetRTCClockSource">
        <Argument AddressOf="false" GenericType="simple" Name="Source"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_EnableRTC"/>
	
    <LibMethod Comment="" Name="LL_PWR_EnableBkUpAccess"/>
    <LibMethod Comment="" Name="#tLL_RCC_ForceBackupDomainReset"/>
    <LibMethod Comment="" Name="#tLL_RCC_ReleaseBackupDomainReset"/>
    <LibMethod Comment="" Name="LL_RCC_PLL_Enable"/>
	
    <LibMethod Comment="" Name="LL_RCC_PLL_ConfigDomain_SYS">
        <Argument AddressOf="false" GenericType="simple" Name="Source"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLM"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLN"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLR"/>
    </LibMethod>

    <LibMethod Comment="" Name="LL_RCC_PLL_ConfigDomain_SAI">
        <Argument AddressOf="false" GenericType="simple" Name="Source"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLM"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLN"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLP"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_PLL_ConfigDomain_48M">
        <Argument AddressOf="false" GenericType="simple" Name="Source"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLM"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLN"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLQ"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_PLL_EnableDomain_SYS"/>
	
    <LibMethod Comment="" Name="LL_RCC_PLL_EnableDomain_SAI"/>
	
    <LibMethod Comment="" Name="LL_RCC_PLL_EnableDomain_48M"/>
	
    <LibMethod Comment="" Name="LL_RCC_PLLSAI1_Enable"/>
	
    <LibMethod Comment="" Name="LL_RCC_PLLSAI1_ConfigDomain_48M">
        <Argument AddressOf="false" GenericType="simple" Name="Source"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLSAI1M"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLSAI1N"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLSAI1Q"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_PLLSAI1_ConfigDomain_SAI">
        <Argument AddressOf="false" GenericType="simple" Name="Source"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLSAI1M"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLSAI1N"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLSAI1P"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_PLLSAI1_ConfigDomain_ADC">
        <Argument AddressOf="false" GenericType="simple" Name="Source"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLSAI1M"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLSAI1N"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLSAI1R"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_PLLSAI1_EnableDomain_48M"/>
	
    <LibMethod Comment="" Name="LL_RCC_PLLSAI1_EnableDomain_ADC"/>
	
    <LibMethod Comment="" Name="LL_RCC_PLLSAI1_EnableDomain_SAI"/>
	
    <LibMethod Comment="" Name="LL_RCC_PLLSAI2_Enable"/>
	
    <LibMethod Comment="" Name="LL_RCC_PLLSAI2_ConfigDomain_SAI">
        <Argument AddressOf="false" GenericType="simple" Name="Source"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLSAI2M"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLSAI2N"/>
        <Argument AddressOf="false" GenericType="simple" Name="PLLSAI2P"/>
    </LibMethod>
	
    <LibMethod Comment="" Name="LL_RCC_PLLSAI2_EnableDomain_SAI"/>
	
    <LibMethod Comment="" Name="LL_SetSystemCoreClock">
        <Argument AddressOf="false" GenericType="simple" Name="HCLKFrequency"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_Init1msTick">
        <Argument AddressOf="false" GenericType="simple" Name="HCLKFrequency"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_APB1_GRP1_EnableClock">
        <Argument AddressOf="false" GenericType="simple" Name="Periphs"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_APB1_GRP1_ForceReset">
        <Argument AddressOf="false" GenericType="simple" Name="Periphs"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_APB1_GRP1_ReleaseReset">
        <Argument AddressOf="false" GenericType="simple" Name="Periphs"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_CRS_SetSyncDivider">
        <Argument AddressOf="false" GenericType="simple" Name="Divider"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_CRS_SetSyncPolarity">
        <Argument AddressOf="false" GenericType="simple" Name="Polarity"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_CRS_SetSyncSignalSource">
        <Argument AddressOf="false" GenericType="simple" Name="Source"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_CRS_SetReloadCounter">
        <Argument AddressOf="false" GenericType="simple" Name="Value"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_CRS_SetFreqErrorLimit">
        <Argument AddressOf="false" GenericType="simple" Name="Value"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_CRS_SetHSI48SmoothTrimming">
        <Argument AddressOf="false" GenericType="simple" Name="Value"/>
    </LibMethod>
    <LibMethod Comment="" Name="LL_RCC_EnablePrivilege"/>
    <LibMethod Comment="" Name="LL_RCC_ConfigSecure">
        <Argument AddressOf="false" GenericType="simple" Name="Configuration"/>        
    </LibMethod>
    <RefComponent Cclass="HAL" Cgroup="RCC" Cversion="1.5.0">
        <File Category="header" Name="Drivers/STM32L5xx_HAL_Driver/Inc/stm32l5xx_ll_bus.h"/>
        <File Category="header" Name="Drivers/STM32L5xx_HAL_Driver/Inc/stm32l5xx_ll_cortex.h"/>
        <File Category="header" Name="Drivers/STM32L5xx_HAL_Driver/Inc/stm32l5xx_ll_rcc.h"/>
        <File Category="header" Name="Drivers/STM32L5xx_HAL_Driver/Inc/stm32l5xx_ll_crs.h"/>
        <File Category="header" Name="Drivers/STM32L5xx_HAL_Driver/Inc/stm32l5xx_ll_system.h"/>
        <File Category="header" Name="Drivers/STM32L5xx_HAL_Driver/Inc/stm32l5xx_ll_utils.h"/>
        <File Category="header" Name="Drivers/STM32L5xx_HAL_Driver/Src/stm32l5xx_ll_utils.c"/> 
        <File Category="header" Name="Drivers/STM32L5xx_HAL_Driver/Inc/stm32l5xx_ll_exti.h"/>
        <File Category="header" Name="Drivers/STM32L5xx_HAL_Driver/Src/stm32l5xx_ll_exti.c"/>
        <File Category="header" Name="Drivers/STM32L5xx_HAL_Driver/Inc/stm32l5xx_ll_pwr.h"/>
        <File Category="header" Name="Drivers/STM32L5xx_HAL_Driver/Inc/stm32l5xx_ll_gpio.h"/>
        <File Category="header" Name="Drivers/STM32L5xx_HAL_Driver/Inc/stm32l5xx_ll_dma.h"/>
        <File Category="header" Name="Drivers/STM32L5xx_HAL_Driver/Inc/stm32l5xx_ll_dmamux.h"/>
    </RefComponent>
</IP>
