1<?xml version="1.0" encoding="utf-8"?> 2 3 4<!--**************************************************************************** 5* \file bakclk.cypersonality 6* \version 3.0 7* 8* \brief 9* CLK_BAK personality description file. It Supports CAT1A, CAT1B, CAT1C and CAT1D family of devices. 10* 11******************************************************************************** 12* \copyright 13* Copyright (c) 2022, Cypress Semiconductor Corporation (an Infineon company) or 14* an affiliate of Cypress Semiconductor Corporation. 15* SPDX-License-Identifier: Apache-2.0 16* 17* Licensed under the Apache License, Version 2.0 (the "License"); 18* you may not use this file except in compliance with the License. 19* You may obtain a copy of the License at 20* 21* http://www.apache.org/licenses/LICENSE-2.0 22* 23* Unless required by applicable law or agreed to in writing, software 24* distributed under the License is distributed on an "AS IS" BASIS, 25* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 26* See the License for the specific language governing permissions and 27* limitations under the License. 28*****************************************************************************--> 29 30<Personality id="bakclk" name="CLK_BAK" version="3.0" xmlns="http://cypress.com/xsd/cyhwpersonality_v7"> 31 <Dependencies> 32 <IpBlock name="mxs40srss,mxs40ssrss,mxs40srss_ver2,mxs40srss_ver3,mxs22srss" /> 33 <Resource name="srss\.clock\.bakclk" /> 34 </Dependencies> 35 <ExposedMembers> 36 <ExposedMember key="frequency" paramId="frequency" /> 37 <ExposedMember key="accuracy" paramId="accuracy" /> 38 <ExposedMember key="sourceClockDisplayName" paramId="sourceClock" /> 39 </ExposedMembers> 40 <Parameters> 41 <!-- PDL documentation --> 42 <ParamDoc id="pdlDoc" name="Configuration Help" group="Overview" default="file:///`${cy_libs_path()}`/docs/pdl_api_reference_manual/html/group__group__sysclk__clk__bak.html" linkText="Open Backup Domain Clock Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" /> 43 <ParamBool id="isS40sWcoPresent" name="S40S_Wco Present" group="Internal" default="`${lookupExpression("BACKUP_PRESENT", 0)}`" visible="false" editable="false" desc="PILO Present" /> 44 <ParamBool id="isWcoPresent" name="S40S_Wco Present" group="Internal" default="`${lookupExpression("WCO_PRESENT", 0)}`" visible="false" editable="false" desc="PILO Present" /> 45 <ParamBool id="is40ssrssAvailable" name="is40ssrssAvailable" group="" default="`${("mxs40ssrss" eq getIpBlockName())}`" visible="false" editable="false" desc="" /> 46 <ParamBool id="is40srss_ver2or3Available" name="is40srss_ver2or3Available" group="" default="`${("mxs40srss_ver2" eq getIpBlockName()) || ("mxs40srss_ver3" eq getIpBlockName())}`" visible="false" editable="false" desc="" /> 47 <ParamBool id="is22srssAvailable" name="is22srssAvailable" group="" default="`${("mxs22srss" eq getIpBlockName())}`" visible="false" editable="false" desc="" /> 48 <ParamBool id="is40srssAvailable" name="is40srssAvailable" group="" default="`${("mxs40srss" eq getIpBlockName())}`" visible="false" editable="false" desc="" /> 49 50 <ParamChoice id="sourceClock" name="Source Clock" group="General" default="lfclk" visible="true" editable="true" desc="The clock source selection"> 51 <Entry name="WCO" value="wco" visible="`${((isS40sWcoPresent) || (isWcoPresent)) && hasBlock("srss[0].clock[0].wco[0]")}`"/> 52 <Entry name="CLK_LF" value="lfclk" visible="true"/> 53 <Entry name="`${is40ssrssAvailable ? "ILO" : "ILO0"}`" value="ilo" visible="`${(is40ssrssAvailable || is40srss_ver2or3Available)}`"/> 54 <Entry name="PILO" value="pilo" visible="`${(("mxs40ssrss" eq getIpBlockName()) && (S40S_PILO_PRESENT)) || ("mxs22srss" eq getIpBlockName())}`"/> 55 <Entry name="LPECO_PRESCALER" value="lpecoprescaler" visible="`${("mxs40srss_ver3" eq getIpBlockName()) && lookupExpression("S40E_LPECO_PRESENT", 0)}`"/> 56 </ParamChoice> 57 <ParamString id="sourceClockRsc" name="Source Clock Resource" group="Internal" default="`${"srss[0].clock[0]." . sourceClock . "[0]"}`" visible="false" editable="false" desc="" /> 58 <!-- Set an error if the source clock is not enabled or contains an error --> 59 <ParamBool id="srcNotUsed" name="Clock Source Enabled" group="Internal" default="`${!isBlockUsed(sourceClockRsc)}`" visible="false" editable="false" desc="" /> 60 <ParamBool id="error" name="Clock Error" group="Internal" default="`${!isBlockUsed(sourceClockRsc)}`" visible="false" editable="false" desc="" /> 61 <ParamRange id="frequency" name="Frequency" group="Internal" default="`${!error ? getExposedMember(sourceClockRsc, "frequency") : 0}`" min="0" max="100000" resolution="1" visible="false" editable="false" desc="" /> 62 <ParamString id="accuracy" name="accuracy" group="Internal" default="`${!error ? getExposedMember(sourceClockRsc, "accuracy") : 0}`" visible="false" editable="false" desc="" /> 63 <ParamString id="frequencyInfo" name="Frequency" group="General" default="`${formatFrequency(frequency,accuracy)}`" visible="true" editable="false" desc="The actual frequency" /> 64 <ParamString id="sourceClockApiName" name="Source Clock API Name" group="Internal" default="`${sourceClock eq wco ? "WCO" : sourceClock eq ilo ? "ILO" : sourceClock eq pilo ? "PILO" : "CLKLF"}`" visible="false" editable="false" desc="" /> 65 </Parameters> 66 <DRCs> 67 <DRC type="ERROR" text="Source clock for CLK_BAK is not enabled" condition="`${srcNotUsed}`" > 68 <FixIt action="ENABLE_BLOCK" target="`${sourceClockRsc}`" value="" valid="true" /> 69 </DRC> 70 </DRCs> 71 <ConfigFirmware> 72 <ConfigInclude value="cy_sysclk.h" include="true" /> 73 <ConfigDefine name="CY_CFG_SYSCLK_CLKBAK_ENABLED" value="1" public="false" include="true" /> 74 <ConfigDefine name="CY_CFG_SYSCLK_CLKBAK_SOURCE" value="CY_SYSCLK_BAK_IN_`${sourceClockApiName}`" public="false" include="true" /> 75 <ConfigFunction signature="__STATIC_INLINE void Cy_SysClk_ClkBakInit()" body=" Cy_SysClk_ClkBakSetSource(CY_SYSCLK_BAK_IN_`${sourceClockApiName}`);" public="false" include="`${(is40srssAvailable || is40ssrssAvailable || is40srss_ver2or3Available)}`" guard="(!defined(CY_DEVICE_SECURE))" /> 76 <ConfigFunction signature="__STATIC_INLINE void Cy_SysClk_ClkBakInit()" body=" Cy_SysClk_ClkBakSetSource(CY_SYSCLK_BAK_IN_`${sourceClockApiName}`);" public="false" include="`${(is22srssAvailable)}`" guard="defined(CORE_NAME_CM33_0)" /> 77 </ConfigFirmware> 78</Personality> 79