1<?xml version="1.0" encoding="utf-8"?> 2 3 4<!--**************************************************************************** 5* \file eco.cypersonality 6* \version 3.0 7* 8* \brief 9* ECO personality description file. It supports CAT1A, CAT1B, CAT1C and 10* CAT1D devices. 11* 12******************************************************************************** 13* \copyright 14* Copyright (c) 2022, Cypress Semiconductor Corporation (an Infineon company) or 15* an affiliate of Cypress Semiconductor Corporation. 16* SPDX-License-Identifier: Apache-2.0 17* 18* Licensed under the Apache License, Version 2.0 (the "License"); 19* you may not use this file except in compliance with the License. 20* You may obtain a copy of the License at 21* 22* http://www.apache.org/licenses/LICENSE-2.0 23* 24* Unless required by applicable law or agreed to in writing, software 25* distributed under the License is distributed on an "AS IS" BASIS, 26* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 27* See the License for the specific language governing permissions and 28* limitations under the License. 29*****************************************************************************--> 30 31<Personality id="eco" name="ECO" version="3.0" xmlns="http://cypress.com/xsd/cyhwpersonality_v7"> 32 <Dependencies> 33 <IpBlock name="mxs40srss,mxs40srss_ver3,mxs22srss,mxs40ssrss" /> 34 <IpBlock name="mxs40ioss,mxs22ioss" /> 35 <Resource name="srss\.clock\.eco" /> 36 </Dependencies> 37 <ExposedMembers> 38 <ExposedMember key="frequency" paramId="frequency" /> 39 <ExposedMember key="accuracy" paramId="accuracyPct" /> 40 <ExposedMember key="suppressCodeGen" paramId="suppressWcoCodeGen" /> 41 </ExposedMembers> 42 <Parameters> 43 <!-- PDL documentation --> 44 <ParamDoc id="pdlDoc" name="Configuration Help" group="Overview" default="file:///`${cy_libs_path()}`/docs/pdl_api_reference_manual/html/group__group__sysclk__eco.html" linkText="Open ECO Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" /> 45 46 <ParamRange id="ecoFrequency" name="Frequency (MHz)" group="General" default="24.0000" visible="true" editable="true" min="16" max="35" resolution="0.0001" desc="" /> 47 <ParamRange id="frequency" name="Frequency (Hz)" group="Internal" default="`${ecoFrequency * 1000000}`" visible="false" editable="false" min="16000000" max="35000000" resolution="1" desc="" /> 48 49 <ParamRange id="accuracyPpm" name="Accuracy (±ppm)" group="General" default="0" min="0" max="1000000" resolution="1" visible="true" editable="true" desc="Clock accuracy in ppm" /> 50 <ParamString id="accuracyPct" name="Accuracy (±%)" group="General" default="`${accuracyPpm/10000.0}`" visible="true" editable="false" desc="Clock accuracy in %" /> 51 52 <ParamRange id="driveLevel" name="Drive Level (uW)" group="General" default="100" min="1" max="1000" resolution="1" visible="true" editable="true" desc="" /> 53 <ParamRange id="esr" name="Equivalent Series Resistance ESR (ohm)" group="General" default="50" min="1" max="1000" resolution="1" visible="true" editable="true" desc="" /> 54 <ParamRange id="c0" name="Crystal Shunt Capacitance C0 (pF)" group="General" default="0" min="0" max="100" resolution="1" visible="true" editable="true" desc="" /> 55 <ParamRange id="cLoad" name="Parallel Load Capacitance Cload (pF)" group="General" default="18" min="1" max="100" resolution="1" visible="true" editable="true" desc="" /> 56 <ParamRange id="csum" name="summary capacitance" group="General" default="`${c0 + cLoad}`" min="1" max="200" resolution="1" visible="false" editable="false" desc="" /> 57 58 <ParamBool id="debug" name="debug" group="General" default="false" visible="false" editable="false" desc="" /> 59 60 <ParamRange id="maxAmpl" name="Max Ampl" group="General" default="`${sqrt(driveLevel / (2.0 * esr)) * 1000 / (3.14 * ecoFrequency * csum)}`" min="0" max="100000" resolution="0.001" visible="`${debug}`" editable="false" desc="" /> 61 <ParamRange id="maxAmplpp" name="Max Ampl Vpp" group="General" default="`${2 * maxAmpl}`" min="0" max="100000" resolution="0.001" visible="`${debug}`" editable="false" desc="" /> 62 <ParamRange id="gmMin" name="GM Min" group="General" default="`${(5 * 4 * 3.14 * 3.14 * ecoFrequency * ecoFrequency * csum * csum * 4 * esr) / 1000000000}`" min="0" max="100000" resolution="0.001" visible="`${debug}`" editable="false" desc="" /> 63 <ParamRange id="amplSect" name="ampl sections" group="General" default="`${floor(gmMin / 9)}`" visible="`${debug}`" editable="false" min="0" max="100000" resolution="1" desc="" /> 64 65 <ParamBool id="errorMxs40srss" name="error" group="General" default="`${maxAmplpp < 1.3 || amplSect > 3}`" visible="false" editable="false" desc="" /> 66 <ParamBool id="errorMxs40srss_ver3Mxs22srss" name="error" group="General" default="`${maxAmplpp < 0.3 || amplSect > 3}`" visible="false" editable="false" desc="" /> 67 <ParamBool id="error" name="error" group="General" default="`${(("mxs40srss" eq getIpBlockName()) ? (errorMxs40srss) : (errorMxs40srss_ver3Mxs22srss))}`" visible="`${debug}`" editable="false" desc="" /> 68 69 <ParamRange id="agcEnMxs40srss" name="AGC EN" group="General" default="1" min="0" max="100000" resolution="1" visible="false" editable="false" desc="" /> 70 <ParamRange id="agcEnMxs40srss_ver3Mxs22srss" name="AGC EN" group="General" default="`${maxAmpl < 0.50 ? -1 : 71 maxAmpl >= 0.50 && maxAmpl < 1.10 ? 1 : 0}`" min="0" max="100000" resolution="1" visible="false" editable="false" desc="" /> 72 <ParamRange id="agcEn" name="AGC EN" group="General" default="`${(("mxs40srss" eq getIpBlockName()) ? (agcEnMxs40srss) : (agcEnMxs40srss_ver3Mxs22srss))}`" min="0" max="100000" resolution="1" visible="`${debug}`" editable="false" desc="" /> 73 74 <ParamRange id="wdTrimMxs40srss" name="WD Trim" group="General" default="7" min="0" max="100000" resolution="1" visible="false" editable="false" desc="" /> 75 <ParamRange id="wdTrimMxs40srss_ver3Mxs22srss" name="WD Trim" group="General" default="`${maxAmpl < 0.50 ? -1 : 76 maxAmpl >= 0.50 && maxAmpl < 0.60 ? 2 : 77 maxAmpl >= 0.60 && maxAmpl < 0.70 ? 3 : 78 maxAmpl >= 0.70 && maxAmpl < 0.80 ? 4 : 79 maxAmpl >= 0.80 && maxAmpl < 0.90 ? 5 : 80 maxAmpl >= 0.90 && maxAmpl < 1.0 ? 6 : 81 maxAmpl >= 1.0 && maxAmpl < 1.10 ? 7 : 7}`" min="0" max="100000" resolution="1" visible="false" editable="false" desc="" /> 82 <ParamRange id="wdTrimMxs40ssrss" name="WD Trim" group="General" default="`${maxAmpl < 0.05 ? -1 : 83 maxAmpl eq 0.05 ? 0 : 84 maxAmpl eq 0.75 ? 1 : 85 maxAmpl eq 0.10 ? 2 : 86 maxAmpl eq 0.125 ? 3 : 87 maxAmpl eq 0.15 ? 4 : 88 maxAmpl eq 0.175 ? 5 : 89 maxAmpl eq 0.20 ? 6 : 7}`" min="0" max="100000" resolution="1" visible="false" editable="false" desc="" /> 90 <ParamRange id="wdTrim" name="WD Trim" group="General" default="`${(("mxs40srss" eq getIpBlockName()) ? (wdTrimMxs40srss) : 91 ("mxs40ssrss" eq getIpBlockName()) ? (wdTrimMxs40ssrss) : (wdTrimMxs40srss_ver3Mxs22srss))}`" min="0" max="100000" resolution="1" visible="`${debug}`" editable="false" desc="" /> 92 93 <ParamRange id="aTrimMxs40srss" name="A Trim" group="General" default="15" min="0" max="100000" resolution="1" visible="false" editable="false" desc="" /> 94 <ParamRange id="aTrimMxs40srss_ver3Mxs22srss" name="A Trim" group="General" default="`${maxAmpl < 0.50 ? -1 : 95 maxAmpl >= 0.50 && maxAmpl < 0.55 ? 4 : 96 maxAmpl >= 0.55 && maxAmpl < 0.60 ? 5 : 97 maxAmpl >= 0.60 && maxAmpl < 0.65 ? 6 : 98 maxAmpl >= 0.65 && maxAmpl < 0.70 ? 7 : 99 maxAmpl >= 0.70 && maxAmpl < 0.75 ? 8 : 100 maxAmpl >= 0.75 && maxAmpl < 0.80 ? 9 : 101 maxAmpl >= 0.80 && maxAmpl < 0.85 ? 10 : 102 maxAmpl >= 0.85 && maxAmpl < 0.90 ? 11 : 103 maxAmpl >= 0.90 && maxAmpl < 0.95 ? 12 : 104 maxAmpl >= 0.95 && maxAmpl < 1.0 ? 13 : 105 maxAmpl >= 1.0 && maxAmpl < 1.05 ? 14 : 106 maxAmpl >= 1.05 && maxAmpl < 1.10 ? 15 : 0}`" min="0" max="100000" resolution="1" visible="false" editable="false" desc="" /> 107 <ParamRange id="aTrimMxs40ssrss" name="A Trim" group="General" default="`${maxAmpl < 0.150 ? -1 : 108 maxAmpl eq 0.150 ? 0 : 109 maxAmpl eq 0.175 ? 1 : 110 maxAmpl eq 0.200 ? 2 : 111 maxAmpl eq 0.225 ? 3 : 112 maxAmpl eq 0.250 ? 4 : 113 maxAmpl eq 0.275 ? 5 : 114 maxAmpl eq 0.300 ? 6 : 115 maxAmpl eq 0.325 ? 7 : 116 maxAmpl eq 0.350 ? 8 : 117 maxAmpl eq 0.375 ? 9 : 118 maxAmpl eq 0.400 ? A : 119 maxAmpl eq 0.425 ? B : 120 maxAmpl eq 0.450 ? C : 121 maxAmpl eq 0.475 ? D : 122 maxAmpl eq 0.500 ? E : F}`" min="0" max="100000" resolution="1" visible="false" editable="false" desc="" /> 123 <ParamRange id="aTrim" name="A Trim" group="General" default="`${(("mxs40srss" eq getIpBlockName()) ? (aTrimMxs40srss) : 124 ("mxs40srss" eq getIpBlockName()) ? (aTrimMxs40ssrss) :(aTrimMxs40srss_ver3Mxs22srss))}`" min="0" max="100000" resolution="1" visible="`${debug}`" editable="false" desc="" /> 125 126 <ParamRange id="fTrim" name="F Trim" group="General" default="`${(("mxs40srss" eq getIpBlockName()) ? (3) : (0))}`" min="0" max="100000" resolution="1" visible="`${debug}`" editable="false" desc="" /> 127 128 <ParamRange id="rTrimMxs40srss" name="R Trim" group="General" default="0" min="0" max="100000" resolution="1" visible="false" editable="false" desc="" /> 129 <ParamRange id="rTrimMxs40srss_ver3Mxs22srss" name="R Trim" group="General" default="`${maxAmpl <= 0 ? -1 : 130 maxAmpl > 0 && maxAmpl <= 16.5 ? 3 : 131 maxAmpl > 16.5 && maxAmpl <= 23.33 ? 2 : 132 maxAmpl > 23.33 && maxAmpl <= 28.6 ? 1 : 0}`" min="0" max="100000" resolution="1" visible="false" editable="false" desc="" /> 133 <ParamRange id="rTrim" name="R Trim" group="General" default="`${(("mxs40srss" eq getIpBlockName()) ? (rTrimMxs40srss) : (rTrimMxs40srss_ver3Mxs22srss))}`" min="0" max="100000" resolution="1" visible="`${debug}`" editable="false" desc="" /> 134 135 <ParamRange id="gTrimMxs40srss" name="G Trim" group="General" default="`${amplSect > 1 ? amplSect : amplSect == 1 ? 0 : 1}`" min="0" max="100000" resolution="1" visible="false" editable="false" desc="" /> 136 <ParamRange id="gTrimMxs40srss_ver3Mxs22srss" name="G Trim" group="General" default="`${maxAmpl > 15.40 ? -1 : 137 maxAmpl >= 0 && maxAmpl < 2.2 ? 1 : 138 maxAmpl >= 2.2 && maxAmpl < 4.4 ? 2 : 139 maxAmpl >= 4.4 && maxAmpl < 6.6 ? 3 : 140 maxAmpl >= 6.6 && maxAmpl < 8.8 ? 4 : 141 maxAmpl >= 8.8 && maxAmpl < 11.0 ? 5 : 142 maxAmpl >= 11.0 && maxAmpl < 13.2 ? 6 : 7}`" min="0" max="100000" resolution="1" visible="false" editable="false" desc="" /> 143 <ParamRange id="gTrim" name="G Trim" group="General" default="`${(("mxs40srss" eq getIpBlockName()) ? (gTrimMxs40srss) : (gTrimMxs40srss_ver3Mxs22srss))}`" min="0" max="100000" resolution="1" visible="`${debug}`" editable="false" desc="" /> 144 145 <!-- Restrict ECO connections to pins --> 146 <ParamSignal port="eco_in[0]" name="Input" group="Connections" visible="true" desc="The input/passive terminal of the internal ECO circuitry" canBeEmpty="false" requirePreferred="true" isDependency="true"> 147 <Constraint type="REQUIRE" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" /> 148 </ParamSignal> 149 <ParamSignal port="eco_out[0]" name="Output" group="Connections" visible="true" desc="The output/active terminal of the internal ECO circuitry" canBeEmpty="false" requirePreferred="true" isDependency="true"> 150 <Constraint type="REQUIRE" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" /> 151 </ParamSignal> 152 153 <ParamString id="gpio_in_port" name="gpio_in_port" group="General" default="`${getInstFromLocation(getParamValue("eco_in[0]"), "port")}`" visible="false" editable="false" desc="" /> 154 <ParamString id="gpio_in_pin" name="gpio_in_pin" group="General" default="`${getInstFromLocation(getParamValue("eco_in[0]"), "pin")}`" visible="false" editable="false" desc="" /> 155 <ParamString id="gpio_out_port" name="gpio_out_port" group="General" default="`${getInstFromLocation(getParamValue("eco_out[0]"), "port")}`" visible="false" editable="false" desc="" /> 156 <ParamString id="gpio_out_pin" name="gpio_out_pin" group="General" default="`${getInstFromLocation(getParamValue("eco_out[0]"), "pin")}`" visible="false" editable="false" desc="" /> 157 <ParamBool id="suppressWcoCodeGen" name="Suppress WCO PIN Configuration Code Generation" group="Internal" default="true" 158 visible="false" editable="false" desc="Prevents pins connected to this personality to generate configuration code" /> 159 </Parameters> 160 <DRCs> 161 <DRC type="ERROR" text="Parameters provided cause the maximum trans-conductance and amplitude control range to exceed the legal design limits." condition="`${error}`" /> 162 <DRC type="ERROR" text="The sum of C0 and Cload should not exceed 100 pF." condition="`${csum > 100}`" /> 163 </DRCs> 164 <ConfigFirmware> 165 <ConfigInclude value="cy_gpio.h" include="true" /> 166 <ConfigInclude value="cy_sysclk.h" include="true" /> 167 <ConfigDefine name="CY_CFG_SYSCLK_ECO_ENABLED" value="1" public="false" include="true" /> 168 <ConfigDefine name="CY_CFG_SYSCLK_ECO_FREQ" value="`${frequency}`UL" public="false" include="true" /> 169 <ConfigDefine name="CY_CFG_SYSCLK_ECO_GPIO_IN_PRT" value="GPIO_PRT`${gpio_in_port}`" public="false" include="true" /> 170 <ConfigDefine name="CY_CFG_SYSCLK_ECO_GPIO_IN_PIN" value="`${gpio_in_pin}`" public="false" include="true" /> 171 <ConfigDefine name="CY_CFG_SYSCLK_ECO_GPIO_OUT_PRT" value="GPIO_PRT`${gpio_out_port}`" public="false" include="true" /> 172 <ConfigDefine name="CY_CFG_SYSCLK_ECO_GPIO_OUT_PIN" value="`${gpio_out_pin}`" public="false" include="true" /> 173 <ConfigDefine name="CY_CFG_SYSCLK_ECO_CLOAD" value="`${cLoad}`UL" public="false" include="true" /> 174 <ConfigDefine name="CY_CFG_SYSCLK_ECO_ESR" value="`${esr}`UL" public="false" include="true" /> 175 <ConfigDefine name="CY_CFG_SYSCLK_ECO_DRIVE_LEVEL" value="`${driveLevel}`UL" public="false" include="true" /> 176 <ConfigFunction signature="__STATIC_INLINE void Cy_SysClk_EcoInit()" body=" (void)Cy_GPIO_Pin_FastInit(GPIO_PRT`${gpio_in_port}`, `${gpio_in_pin}`, CY_GPIO_DM_ANALOG, 0UL, HSIOM_SEL_GPIO);
 (void)Cy_GPIO_Pin_FastInit(GPIO_PRT`${gpio_out_port}`, `${gpio_out_pin}`, CY_GPIO_DM_ANALOG, 0UL, HSIOM_SEL_GPIO);
 if (CY_SYSCLK_BAD_PARAM == Cy_SysClk_EcoConfigure(CY_CFG_SYSCLK_ECO_FREQ, `${csum}`UL, `${esr}`UL, `${driveLevel}`UL))
 {
 cycfg_ClockStartupError(CY_CFG_SYSCLK_ECO_ERROR);
 }
 if (CY_SYSCLK_TIMEOUT == Cy_SysClk_EcoEnable(3000UL))
 {
 cycfg_ClockStartupError(CY_CFG_SYSCLK_ECO_ERROR);
 }" public="false" include="`${!error}`" guard="(!defined(CY_DEVICE_SECURE))" /> 177 <ConfigInstruction value="Cy_SysClk_EcoSetFrequency(CY_CFG_SYSCLK_ECO_FREQ);" purpose="RESERVE" include="`${("mxs40srss" eq getIpBlockName())}`" /> 178 </ConfigFirmware> 179</Personality> 180