1<?xml version="1.0" encoding="utf-8"?> 2 3 4<!--**************************************************************************** 5* \file counter_v2.cypersonality 6* \version 1.0 7* 8* \brief 9* Timer - Counter personality description file. 10* 11******************************************************************************** 12* \copyright 13* Copyright 2018-2022 Cypress Semiconductor Corporation 14* SPDX-License-Identifier: Apache-2.0 15* 16* Licensed under the Apache License, Version 2.0 (the "License"); 17* you may not use this file except in compliance with the License. 18* You may obtain a copy of the License at 19* 20* http://www.apache.org/licenses/LICENSE-2.0 21* 22* Unless required by applicable law or agreed to in writing, software 23* distributed under the License is distributed on an "AS IS" BASIS, 24* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 25* See the License for the specific language governing permissions and 26* limitations under the License. 27*****************************************************************************--> 28 29<Personality id="mxs40timercounter_ver2" name="Timer - Counter" version="1.0" xmlns="http://cypress.com/xsd/cyhwpersonality_v7"> 30 <Dependencies> 31 <IpBlock name="mxtcpwm_ver2,mxtcpwm" /> 32 <Resource name="tcpwm\.group\.cnt" /> 33 </Dependencies> 34 <ExposedMembers /> 35 <Parameters> 36 <!-- PDL documentation --> 37 <ParamDoc id="pdlDoc" name="Configuration Help" group="Overview" default="file:///`${cy_libs_path()}`/docs/pdl_api_reference_manual/html/group__group__tcpwm__counter.html" linkText="Open Timer - Counter (TCPWM) Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" /> 38 39 <!--General--> 40 <ParamRange id="pCntGroup" name="pCntGroup" desc="pCntGroup" group="Internal" default="`${getInstNumber("group")}`" min="0" max="3" resolution="1" visible="false" editable="false" /> 41 <ParamRange id="pMaxGroupCount" name="pMaxGroupCount" desc="pMaxGroupCount" group="Internal" default="4" min="0" max="4" resolution="1" visible="false" editable="false" /> 42 <ParamString id="pCntWidthEx" name="pCntWidthEx" desc="pCntWidthEx" group="Internal" default="GRP_NR[`${pCntGroup}`].CNT.GRP_CNT_WIDTH" visible="false" editable="false" /> 43 <ParamRange id="pCntWidth" name="pCntWidth" desc="pCntWidth" group="Internal" default="`${lookupExpression(pCntWidthEx)}`" min="0" max="32" resolution="1" visible="false" editable="false" /> 44 <ParamRange id="pCntWidthMax" name="pCntWidthMax" desc="pCntWidthMax" group="Internal" default="`${pow(2, pCntWidth)-1}`" min="0" max="4294967296" resolution="1" visible="false" editable="false" /> 45 <ParamRange id="tcpwmInst" name="TCPWM Number" group="Internal" default="`${getInstNumber("tcpwm")}`" min="0" max="3" resolution="1" visible="false" editable="false" desc="" /> 46 <ParamRange id="cntInst" name="CNT Number" group="Internal" default="`${getInstNumber("cnt") + pCntGroup * 256}`" min="0" max="1023" resolution="1" visible="false" editable="false" desc="" /> 47 <ParamString id="pCntCC1Ex" name="pCntCC1Ex" desc="pCntCC1Ex" group="Internal" default="GRP_NR[`${pCntGroup}`].CNT.GRP_CC1_PRESENT" visible="false" editable="false" /> 48 <ParamBool id="pCntCC1" name="pCntCC1" desc="pCntCC1" group="Internal" default="`${lookupExpression(pCntCC1Ex) eq 1}`" visible="false" editable="false" /> 49 <ParamString id="TCPWM_version" name="TCPWM Version" group="General" default="TCPWM_ver2" visible="true" editable="false" desc="Version of the TCPWM hardware block"/> 50 <ParamChoice id="ClockPrescaler" name="Clock Prescaler" group="General" default="CY_TCPWM_COUNTER_PRESCALER_DIVBY_1" visible="true" editable="true" desc="Divides down the input clock." > 51 <Entry name="Divide by 1" value="CY_TCPWM_COUNTER_PRESCALER_DIVBY_1" visible="true" /> 52 <Entry name="Divide by 2" value="CY_TCPWM_COUNTER_PRESCALER_DIVBY_2" visible="true" /> 53 <Entry name="Divide by 4" value="CY_TCPWM_COUNTER_PRESCALER_DIVBY_4" visible="true" /> 54 <Entry name="Divide by 8" value="CY_TCPWM_COUNTER_PRESCALER_DIVBY_8" visible="true" /> 55 <Entry name="Divide by 16" value="CY_TCPWM_COUNTER_PRESCALER_DIVBY_16" visible="true" /> 56 <Entry name="Divide by 32" value="CY_TCPWM_COUNTER_PRESCALER_DIVBY_32" visible="true" /> 57 <Entry name="Divide by 64" value="CY_TCPWM_COUNTER_PRESCALER_DIVBY_64" visible="true" /> 58 <Entry name="Divide by 128" value="CY_TCPWM_COUNTER_PRESCALER_DIVBY_128" visible="true" /> 59 </ParamChoice> 60 <ParamChoice id="Resolution" name="Counter Resolution" group="General" default="`${(pCntWidth eq 16) ? "CY_TCPWM_COUNTER_RESOLUTION_WIDTH_16_BITS" : "CY_TCPWM_COUNTER_RESOLUTION_WIDTH_32_BITS"}`" visible="true" editable="false" desc="Selects the size of the counter."> 61 <Entry name="16-bits" value="CY_TCPWM_COUNTER_RESOLUTION_WIDTH_16_BITS" visible="true" /> 62 <Entry name="32-bits" value="CY_TCPWM_COUNTER_RESOLUTION_WIDTH_32_BITS" visible="true" /> 63 </ParamChoice> 64 <ParamChoice id="RunMode" name="Run Mode" group="General" default="CY_TCPWM_COUNTER_CONTINUOUS" visible="true" editable="true" desc="If Continuous is selected counter runs forever. If One Shot is selected counter runs for one period and stops."> 65 <Entry name="Continuous" value="CY_TCPWM_COUNTER_CONTINUOUS" visible="true" /> 66 <Entry name="One Shot" value="CY_TCPWM_COUNTER_ONESHOT" visible="true" /> 67 </ParamChoice> 68 <ParamChoice id="CountDirection" name="Count Direction" group="General" default="CY_TCPWM_COUNTER_COUNT_UP" visible="true" editable="true" desc="Selects the direction the counter counts." > 69 <Entry name="Up" value="CY_TCPWM_COUNTER_COUNT_UP" visible="true" /> 70 <Entry name="Down" value="CY_TCPWM_COUNTER_COUNT_DOWN" visible="true" /> 71 <Entry name="Up/Down1" value="CY_TCPWM_COUNTER_COUNT_UP_DOWN_1" visible="true" /> 72 <Entry name="Up/Down2" value="CY_TCPWM_COUNTER_COUNT_UP_DOWN_2" visible="true" /> 73 </ParamChoice> 74 <ParamRange id="Period" name="Period" group="General" default="32768" min="0" max="`${pCntWidthMax}`" resolution="1" visible="true" editable="true" desc="Sets the period of the Timer/Counter. Range: 0-65535 (for 16 bit resolution) or 0–4294967295 (for 32 bit resolution)." /> 75 <ParamChoice id="CompareOrCapture" name="Compare or Capture" group="General" default="CY_TCPWM_COUNTER_MODE_CAPTURE" visible="true" editable="true" desc="Selects the mode for the compare capture register."> 76 <Entry name="Capture" value="CY_TCPWM_COUNTER_MODE_CAPTURE" visible="true" /> 77 <Entry name="Compare" value="CY_TCPWM_COUNTER_MODE_COMPARE" visible="true" /> 78 </ParamChoice> 79 <ParamBool id="pCCeqCompare" name="pCCeqCompare" desc="pCCeqCompare" group="Internal" default="`${CompareOrCapture eq CY_TCPWM_COUNTER_MODE_COMPARE}`" visible="false" editable="false" /> 80 81 <!--Compare--> 82 <ParamBool id="EnableCompare0Swap" name="Enable Compare 0 Swap" group="Compare" default="false" visible="`${pCCeqCompare}`" editable="true" desc="When selected the compare register is swapped between compare 0 and compare 0 buffer each time the comparison is true." /> 83 <ParamRange id="Compare0" name="`${EnableCompare0Swap ? "Compare 0" : "Compare"}`" group="Compare" default="16384" min="0" max="`${pCntWidthMax}`" resolution="1" visible="`${pCCeqCompare}`" editable="true" desc="Sets the compare value. Range: 0-65535 (for 16 bit resolution) or 0–4294967295 (for 32 bit resolution)." /> 84 <ParamRange id="Compare1" name="Compare 0 Buff" group="Compare" default="16384" min="0" max="`${pCntWidthMax}`" resolution="1" visible="`${pCCeqCompare && EnableCompare0Swap}`" editable="true" desc="Sets the compare value. Range: 0-65535 (for 16 bit resolution) or 0–4294967295 (for 32 bit resolution)." /> 85 <ParamBool id="EnableCompare1Swap" name="Enable Compare 1 Swap" group="Compare" default="false" visible="`${pCCeqCompare && pCntCC1}`" editable="true" desc="When selected the compare register is swapped between compare 1 and compare 1 buffer each time the comparison is true." /> 86 <ParamRange id="Compare2" name="Compare 1" group="Compare" default="16384" min="0" max="`${pCntWidthMax}`" resolution="1" visible="`${pCCeqCompare && pCntCC1}`" editable="true" desc="Sets the compare value. When the count value equals the compare the compare output pulses high. Range: 0-65535 (for 16 bit resolution) or 0–4294967295 (for 32 bit resolution)." /> 87 <ParamRange id="Compare3" name="Compare 1 Buff" group="Compare" default="16384" min="0" max="`${pCntWidthMax}`" resolution="1" visible="`${pCCeqCompare && EnableCompare1Swap && pCntCC1}`" editable="true" desc="Sets the buffered compare value. Range: 0-65535 (for 16 bit resolution) or 0–4294967295 (for 32 bit resolution)." /> 88 89 <!--Capture--> 90 <ParamChoice id="Capture0Input" name="Capture 0 Input" group="Capture" default="CY_TCPWM_INPUT_DISABLED" visible="`${CompareOrCapture eq CY_TCPWM_COUNTER_MODE_CAPTURE}`" editable="true" desc="This parameter determines if a Capture 0 terminal is displayed." > 91 <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" /> 92 <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" /> 93 <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" /> 94 <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" /> 95 </ParamChoice> 96 <ParamSignal port="capture0[0]" name="Capture 0 Signal" group="Capture" visible="`${(Capture0Input ne CY_TCPWM_INPUT_DISABLED) && (CompareOrCapture eq CY_TCPWM_COUNTER_MODE_CAPTURE)}`" desc="This input triggers a capture of the current count value." canBeEmpty="`${Capture0Input eq CY_TCPWM_INPUT_DISABLED}`" > 97 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 98 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 99 <Fixed value="CY_GPIO_DM_HIGHZ" /> 100 </Parameter> 101 </Constraint> 102 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 103 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 104 <Fixed value="CY_GPIO_DM_HIGHZ" /> 105 </Parameter> 106 </Constraint> 107 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 108 </ParamSignal> 109 110 <ParamChoice id="Capture1Input" name="Capture 1 Input" group="Capture" default="CY_TCPWM_INPUT_DISABLED" visible="`${pCntCC1 && (CompareOrCapture eq CY_TCPWM_COUNTER_MODE_CAPTURE)}`" editable="true" desc="This parameter determines if a Capture 1 terminal is displayed." > 111 <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" /> 112 <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" /> 113 <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" /> 114 <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" /> 115 </ParamChoice> 116 <ParamSignal port="capture1[0]" name="Capture 1 Signal" group="Capture" visible="`${(Capture1Input ne CY_TCPWM_INPUT_DISABLED) && (pCntCC1 && (CompareOrCapture eq CY_TCPWM_COUNTER_MODE_CAPTURE))}`" desc="This input triggers a capture of the current count value." canBeEmpty="`${Capture1Input eq CY_TCPWM_INPUT_DISABLED}`" > 117 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 118 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 119 <Fixed value="CY_GPIO_DM_HIGHZ" /> 120 </Parameter> 121 </Constraint> 122 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 123 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 124 <Fixed value="CY_GPIO_DM_HIGHZ" /> 125 </Parameter> 126 </Constraint> 127 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 128 </ParamSignal> 129 130 <!--Interrupts--> 131 <ParamBool id="InterruptTC" name="Overflow & Underflow" group="Interrupt Source" default="false" visible="true" editable="true" desc="Generate interrupt on Overflow & Underflow events" /> 132 <ParamBool id="InterruptCC0" name="Compare 0 & Capture 0" group="Interrupt Source" default="false" visible="true" editable="true" desc="Generate interrupt on Compare & Capture 0 events" /> 133 <ParamBool id="InterruptCC1" name="Compare 1 & Capture 1" group="Interrupt Source" default="false" visible="`${pCntCC1}`" editable="true" desc="Generate interrupt on Compare1 event" /> 134 <ParamString id="InterruptSource" name="InterruptSource" desc="InterruptSource" group="Interrupt Source" default="(CY_TCPWM_INT_ON_TC `${(InterruptTC)? "" : "& 0U"}`) | (CY_TCPWM_INT_ON_CC0 `${(InterruptCC0)? "" : "& 0U"}`) | (CY_TCPWM_INT_ON_CC1 `${(InterruptCC1)? "" : "& 0U"}`)" visible="false" editable="false" /> 135 136 <!--Inputs--> 137 <ParamSignal port="clock[0]" name="Clock Signal" group="Inputs" visible="`${hasVisibleOption("clock[0]")}`" desc="The clock input defines the operating frequency." canBeEmpty="`${!hasVisibleOption("clock[0]")}`" /> 138 <ParamSignal port="clock_counter_en[0]" name="Clock Signal" group="Inputs" visible="`${hasVisibleOption("clock_counter_en[0]")}`" desc="The clock input defines the operating frequency." canBeEmpty="`${!hasVisibleOption("clock_counter_en[0]")}`" /> 139 <ParamChoice id="CountInput" name="Count Input" group="Inputs" default="CY_TCPWM_INPUT_DISABLED" visible="true" editable="true" desc="Determines if a count input is needed and how that input is registered." > 140 <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" /> 141 <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" /> 142 <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" /> 143 <Entry name="Level" value="CY_TCPWM_INPUT_LEVEL" visible="true" /> 144 <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" /> 145 </ParamChoice> 146 <ParamSignal port="count[0]" name="Count Signal" group="Inputs" visible="`${CountInput ne CY_TCPWM_INPUT_DISABLED}`" desc="This input causes the counter to count depending on how the input is configured. For example, if this input is configured for level sensitive, the counter will change its count on each pre-scaled clock edge." canBeEmpty="`${CountInput eq CY_TCPWM_INPUT_DISABLED}`" > 147 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 148 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 149 <Fixed value="CY_GPIO_DM_HIGHZ" /> 150 </Parameter> 151 </Constraint> 152 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 153 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 154 <Fixed value="CY_GPIO_DM_HIGHZ" /> 155 </Parameter> 156 </Constraint> 157 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 158 </ParamSignal> 159 <ParamChoice id="StopInput" name="Stop Input" group="Inputs" default="CY_TCPWM_INPUT_DISABLED" visible="true" editable="true" desc="Determines if a stop input is needed and how that input is registered." > 160 <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" /> 161 <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" /> 162 <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" /> 163 <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" /> 164 </ParamChoice> 165 <ParamSignal port="stop[0]" name="Stop Signal" group="Inputs" visible="`${StopInput ne CY_TCPWM_INPUT_DISABLED}`" desc="This input stops the counter." canBeEmpty="`${StopInput eq CY_TCPWM_INPUT_DISABLED}`" > 166 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 167 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 168 <Fixed value="CY_GPIO_DM_HIGHZ" /> 169 </Parameter> 170 </Constraint> 171 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 172 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 173 <Fixed value="CY_GPIO_DM_HIGHZ" /> 174 </Parameter> 175 </Constraint> 176 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 177 </ParamSignal> 178 <ParamChoice id="ReloadInput" name="Reload Input" group="Inputs" default="CY_TCPWM_INPUT_DISABLED" visible="true" editable="true" desc="Determines if a reload input is needed and how the reload signal input is registered." > 179 <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" /> 180 <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" /> 181 <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" /> 182 <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" /> 183 </ParamChoice> 184 <ParamSignal port="reload[0]" name="Reload Signal" group="Inputs" visible="`${ReloadInput ne CY_TCPWM_INPUT_DISABLED}`" desc="This input triggers a reload of the counter, and starts the counter." canBeEmpty="`${ReloadInput eq CY_TCPWM_INPUT_DISABLED}`" > 185 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 186 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 187 <Fixed value="CY_GPIO_DM_HIGHZ" /> 188 </Parameter> 189 </Constraint> 190 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 191 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 192 <Fixed value="CY_GPIO_DM_HIGHZ" /> 193 </Parameter> 194 </Constraint> 195 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 196 </ParamSignal> 197 <ParamChoice id="StartInput" name="Start Input" group="Inputs" default="CY_TCPWM_INPUT_DISABLED" visible="true" editable="true" desc="Determines if a start input is needed and how that input is registered." > 198 <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" /> 199 <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" /> 200 <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" /> 201 <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" /> 202 </ParamChoice> 203 <ParamSignal port="start[0]" name="Start Signal" group="Inputs" visible="`${StartInput ne CY_TCPWM_INPUT_DISABLED}`" desc="This input starts the counter." canBeEmpty="`${StartInput eq CY_TCPWM_INPUT_DISABLED}`" > 204 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 205 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 206 <Fixed value="CY_GPIO_DM_HIGHZ" /> 207 </Parameter> 208 </Constraint> 209 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 210 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 211 <Fixed value="CY_GPIO_DM_HIGHZ" /> 212 </Parameter> 213 </Constraint> 214 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 215 </ParamSignal> 216 217 <!--Trigger Outputs--> 218 <ParamChoice id="trigger0Event" name="Trigger 0 Event" group="Trigger Outputs" default="CY_TCPWM_CNT_TRIGGER_ON_DISABLED" visible="true" editable="true" desc="This output used to connect TCPWM event signals to other peripherals." > 219 <Entry name="Overflow" value="CY_TCPWM_CNT_TRIGGER_ON_OVERFLOW" visible="true" /> 220 <Entry name="Underflow" value="CY_TCPWM_CNT_TRIGGER_ON_UNDEFLOW" visible="true" /> 221 <Entry name="Terminal Count" value="CY_TCPWM_CNT_TRIGGER_ON_TC" visible="true" /> 222 <Entry name="Compare 0 Match" value="CY_TCPWM_CNT_TRIGGER_ON_CC0_MATCH" visible="true" /> 223 <Entry name="Compare 1 Match" value="CY_TCPWM_CNT_TRIGGER_ON_CC1_MATCH" visible="false" /> 224 <Entry name="Disabled" value="CY_TCPWM_CNT_TRIGGER_ON_DISABLED" visible="true" /> 225 </ParamChoice> 226 <ParamSignal port="tr_out0[0]" name="Trigger 0 Signal" group="Trigger Outputs" visible="`${trigger0Event ne CY_TCPWM_CNT_TRIGGER_ON_DISABLED}`" desc="Signals to connect on Trigger 0 Event" canBeEmpty="`${trigger0Event eq CY_TCPWM_CNT_TRIGGER_ON_DISABLED}`"> 227 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 228 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 229 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 230 </Parameter> 231 </Constraint> 232 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 233 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 234 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 235 </Parameter> 236 </Constraint> 237 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 238 </ParamSignal> 239 <ParamChoice id="trigger1Event" name="Trigger 1 Event" group="Trigger Outputs" default="CY_TCPWM_CNT_TRIGGER_ON_DISABLED" visible="true" editable="true" desc="This output used to connect TCPWM event signals to other peripherals." > 240 <Entry name="Overflow" value="CY_TCPWM_CNT_TRIGGER_ON_OVERFLOW" visible="true" /> 241 <Entry name="Underflow" value="CY_TCPWM_CNT_TRIGGER_ON_UNDEFLOW" visible="true" /> 242 <Entry name="Terminal Count" value="CY_TCPWM_CNT_TRIGGER_ON_TC" visible="true" /> 243 <Entry name="Compare 0 Match" value="CY_TCPWM_CNT_TRIGGER_ON_CC0_MATCH" visible="true" /> 244 <Entry name="Compare 1 Match" value="CY_TCPWM_CNT_TRIGGER_ON_CC1_MATCH" visible="false" /> 245 <Entry name="Disabled" value="CY_TCPWM_CNT_TRIGGER_ON_DISABLED" visible="true" /> 246 </ParamChoice> 247 <ParamSignal port="tr_out1[0]" name="Trigger 1 Signal" group="Trigger Outputs" visible="`${trigger1Event ne CY_TCPWM_CNT_TRIGGER_ON_DISABLED}`" desc="Signals to connect on Trigger 1 Event" canBeEmpty="`${trigger1Event eq CY_TCPWM_CNT_TRIGGER_ON_DISABLED}`" > 248 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 249 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 250 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 251 </Parameter> 252 </Constraint> 253 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 254 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 255 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 256 </Parameter> 257 </Constraint> 258 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 259 </ParamSignal> 260 261 <!-- Clock Frequency --> 262 <ParamString id="sourceClock" name="sourceClock" group="General" default="`${(hasVisibleOption("clock[0]")) ? (getBlockFromSignal("clock[0]")) : (getBlockFromSignal("clock_counter_en[0]"))}`" visible="false" editable="false" desc="Source Clock Resource" /> 263 <ParamRange id="tcpwmClkHz" name="tcpwmClkHz" group="General" default="`${getExposedMember(sourceClock, "frequency")}`" min="0" max="400000000" resolution="1" visible="false" editable="false" desc="TCPWM clock frequency in Hz" /> 264 265 <!--Config--> 266 <ParamBool id="inFlash" name="Store Config in Flash" group="Advanced" default="true" visible="true" editable="true" desc="Controls whether the configuration structure is stored in flash (const, true) or SRAM (not const, false)." /> 267 268 <!-- Peripheral clock divider connection --> 269 <ParamString id="definePrefix" name="Define prefix" group="Internal" default="`${"TCPWM" . tcpwmInst . "_GRP" . pCntGroup . "_CNT" . getInstNumber("cnt")}`" visible="false" editable="false" desc="" /> 270 <ParamString id="defineInputDisabled" name="Define input disabled" group="Internal" default="`${INST_NAME . "_INPUT_DISABLED & 0x3U"}`" visible="false" editable="false" desc="" /> 271 <ParamString id="pclk" name="PCLK" group="Internal" default="`${hasVisibleOption("clock_counter_en[0]") ? getBlockFromSignal("clock_counter_en[0]"):getBlockFromSignal("clock[0]")}`" visible="false" editable="false" desc="Connected peripheral clock divider (PCLK)" /> 272 <ParamBool id="pclkOk" name="PCLK Valid" group="Internal" default="`${hasVisibleOption("clock_counter_en[0]") ? hasConnection("clock_counter_en", 0) && isBlockUsed(pclk) : hasConnection("clock", 0) && isBlockUsed(pclk)}`" visible="false" editable="false" desc="Checks whether there is a PCLK connected and enabled" /> 273 <ParamString id="pclkDst" name="PCLK Destination" group="Internal" default="`${hasVisibleOption("clock_counter_en[0]") ? "PCLK_TCPWM" . tcpwmInst . "_CLOCK_COUNTER_EN" . cntInst : "PCLK_TCPWM" . tcpwmInst . "_CLOCKS" . cntInst}`" visible="false" editable="false" desc="" /> 274 275 </Parameters> 276 277 <DRCs> 278 279 <DRC type="ERROR" paramId="clock_en[0]" text="Maximum input clock signal frequency supported is 100 Mhz. Please fix input clock setting." condition="`${(hasVisibleOption("clock[0]")) && (tcpwmClkHz > 100000000)}`" /> 280 <DRC type="ERROR" paramId="clock_counter_en[0]" text="Maximum input clock signal frequency supported is 100 Mhz. Please fix input clock setting." condition="`${(hasVisibleOption("clock_counter_en[0]")) && (tcpwmClkHz > 100000000)}`" /> 281 282 <!--Compare0 DRCs--> 283 <DRC type="ERROR" text="Compare 0 value must be less or equal to period." condition="`${pCCeqCompare && (Compare0 > Period)}`" paramId="Compare0" /> 284 285 <!--CompareBuff0 DRCs--> 286 <DRC type="ERROR" text="Compare 0 Buffer value must be less or equal to period." condition="`${pCCeqCompare && EnableCompare0Swap && (Compare1 > Period)}`" paramId="Compare1" /> 287 288 <!--Compare1 DRCs--> 289 <DRC type="ERROR" text="Compare 1 value must be less or equal to period." condition="`${pCntCC1 && pCCeqCompare && (Compare2 > Period)}`" paramId="Compare2" /> 290 291 <!--CompareBuff1 DRCs--> 292 <DRC type="ERROR" text="Compare 1 Buffer value must be less or equal to period." condition="`${pCntCC1 && pCCeqCompare && EnableCompare1Swap && (Compare3 > Period)}`" paramId="Compare3" /> 293 294 <!--CountInput DRCs--> 295 <DRC type="ERROR" text="Count Event has to be enabled to use Count Signal." condition="`${hasConnection("count", 0) && (CountInput eq CY_TCPWM_INPUT_DISABLED)}`" paramId="CountInput"> 296 <FixIt action="SET_PARAM" target="CountInput" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" /> 297 <FixIt action="SET_PARAM" target="CountInput" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" /> 298 <FixIt action="SET_PARAM" target="CountInput" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" /> 299 <FixIt action="SET_PARAM" target="CountInput" value="CY_TCPWM_INPUT_LEVEL" valid="true" /> 300 </DRC> 301 302 <!--ReloadInput DRCs--> 303 <DRC type="ERROR" text="Reload Event has to be enabled to use Reload Signal." condition="`${hasConnection("reload", 0) && (ReloadInput eq CY_TCPWM_INPUT_DISABLED)}`" paramId="ReloadInput"> 304 <FixIt action="SET_PARAM" target="ReloadInput" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" /> 305 <FixIt action="SET_PARAM" target="ReloadInput" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" /> 306 <FixIt action="SET_PARAM" target="ReloadInput" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" /> 307 <FixIt action="SET_PARAM" target="ReloadInput" value="CY_TCPWM_INPUT_LEVEL" valid="true" /> 308 </DRC> 309 310 <!--StartInput DRCs--> 311 <DRC type="ERROR" text="Start Event has to be enabled to use Start Signal." condition="`${hasConnection("start", 0) && (StartInput eq CY_TCPWM_INPUT_DISABLED)}`" paramId="StartInput"> 312 <FixIt action="SET_PARAM" target="StartInput" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" /> 313 <FixIt action="SET_PARAM" target="StartInput" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" /> 314 <FixIt action="SET_PARAM" target="StartInput" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" /> 315 <FixIt action="SET_PARAM" target="StartInput" value="CY_TCPWM_INPUT_LEVEL" valid="true" /> 316 </DRC> 317 318 <!--Capture0Input DRCs--> 319 <DRC type="ERROR" text="Capture 0 Event has to be enabled to use Capture 0 Signal." condition="`${hasConnection("capture0", 0) && (Capture0Input eq CY_TCPWM_INPUT_DISABLED)}`" paramId="Capture0Input"> 320 <FixIt action="SET_PARAM" target="Capture0Input" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" /> 321 <FixIt action="SET_PARAM" target="Capture0Input" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" /> 322 <FixIt action="SET_PARAM" target="Capture0Input" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" /> 323 <FixIt action="SET_PARAM" target="Capture0Input" value="CY_TCPWM_INPUT_LEVEL" valid="true" /> 324 </DRC> 325 326 <!--Capture1Input DRCs--> 327 <DRC type="ERROR" text="Capture 1 Event has to be enabled to use Capture 1 Signal." condition="`${hasConnection("capture1", 0) && (Capture1Input eq CY_TCPWM_INPUT_DISABLED)}`" paramId="Capture1Input"> 328 <FixIt action="SET_PARAM" target="Capture1Input" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" /> 329 <FixIt action="SET_PARAM" target="Capture1Input" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" /> 330 <FixIt action="SET_PARAM" target="Capture1Input" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" /> 331 <FixIt action="SET_PARAM" target="Capture1Input" value="CY_TCPWM_INPUT_LEVEL" valid="true" /> 332 </DRC> 333 334 <!--StopInput DRCs--> 335 <DRC type="ERROR" text="Stop Event has to be enabled to use Stop Signal." condition="`${hasConnection("stop", 0) && (StopInput eq CY_TCPWM_INPUT_DISABLED)}`" paramId="StopInput"> 336 <FixIt action="SET_PARAM" target="StopInput" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" /> 337 <FixIt action="SET_PARAM" target="StopInput" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" /> 338 <FixIt action="SET_PARAM" target="StopInput" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" /> 339 <FixIt action="SET_PARAM" target="StopInput" value="CY_TCPWM_INPUT_LEVEL" valid="true" /> 340 </DRC> 341 342 343 <!--Trigger Output DRCs--> 344 <DRC type="ERROR" text="Trigger 0 Event has to be enabled to use Trigger 0 Signal." condition="`${hasConnection("tr_out0", 0) && (trigger0Event eq CY_TCPWM_CNT_TRIGGER_ON_DISABLED)}`" paramId="trigger0Event"> 345 <FixIt action="SET_PARAM" target="trigger0Event" value="CY_TCPWM_CNT_TRIGGER_ON_OVERFLOW" valid="true" /> 346 <FixIt action="SET_PARAM" target="trigger0Event" value="CY_TCPWM_CNT_TRIGGER_ON_UNDEFLOW" valid="true" /> 347 <FixIt action="SET_PARAM" target="trigger0Event" value="CY_TCPWM_CNT_TRIGGER_ON_TC" valid="true" /> 348 <FixIt action="SET_PARAM" target="trigger0Event" value="CY_TCPWM_CNT_TRIGGER_ON_CC0_MATCH" valid="true" /> 349 <FixIt action="SET_PARAM" target="trigger0Event" value="CY_TCPWM_CNT_TRIGGER_ON_CC1_MATCH" valid="false" /> 350 </DRC> 351 <DRC type="ERROR" text="Trigger 1 Event has to be enabled to use Trigger 1 Signal." condition="`${hasConnection("tr_out1", 0) && (trigger1Event eq CY_TCPWM_CNT_TRIGGER_ON_DISABLED)}`" paramId="trigger1Event"> 352 <FixIt action="SET_PARAM" target="trigger1Event" value="CY_TCPWM_CNT_TRIGGER_ON_OVERFLOW" valid="true" /> 353 <FixIt action="SET_PARAM" target="trigger1Event" value="CY_TCPWM_CNT_TRIGGER_ON_UNDEFLOW" valid="true" /> 354 <FixIt action="SET_PARAM" target="trigger1Event" value="CY_TCPWM_CNT_TRIGGER_ON_TC" valid="true" /> 355 <FixIt action="SET_PARAM" target="trigger1Event" value="CY_TCPWM_CNT_TRIGGER_ON_CC0_MATCH" valid="true" /> 356 <FixIt action="SET_PARAM" target="trigger1Event" value="CY_TCPWM_CNT_TRIGGER_ON_CC1_MATCH" valid="false" /> 357 </DRC> 358 </DRCs> 359 360 <ConfigFirmware> 361 <ConfigInclude value="cy_tcpwm_counter.h" include="true" /> 362 <ConfigInclude value="cy_sysclk.h" include="`${pclkOk}`" /> 363 <ConfigInclude value="cycfg_routing.h" include="true" /> 364 <ConfigInclude value="cyhal_hwmgr.h" include="true" guard="defined (CY_USING_HAL)" /> 365 366 <ConfigDefine name="`${INST_NAME}`_HW" value="TCPWM`${tcpwmInst}`" public="true" include="true" /> 367 <ConfigDefine name="`${INST_NAME}`_NUM" value="`${cntInst}`UL" public="true" include="true" /> 368 <ConfigDefine name="`${INST_NAME}`_IRQ" value="tcpwm_`${tcpwmInst}`_interrupts_`${cntInst}`_IRQn" public="true" include="`${InterruptTC || InterruptCC0 || InterruptCC1}`" /> 369 <ConfigDefine name="`${INST_NAME}`_INPUT_DISABLED" value="0x7U" public="false" include="true" /> 370 <ConfigStruct name="`${INST_NAME . "_config"}`" type="cy_stc_tcpwm_counter_config_t" const="`${inFlash}`" public="true" include="true" > 371 <Member name="period" value="`${Period}`" /> 372 <Member name="clockPrescaler" value="`${ClockPrescaler}`" /> 373 <Member name="runMode" value="`${RunMode}`" /> 374 <Member name="countDirection" value="`${CountDirection}`" /> 375 <Member name="compareOrCapture" value="`${CompareOrCapture}`" /> 376 <Member name="compare0" value="`${Compare0}`" /> 377 <Member name="compare1" value="`${Compare1}`" /> 378 <Member name="enableCompareSwap" value="`${pCCeqCompare ? EnableCompare0Swap : pCCeqCompare}`" /> 379 <Member name="interruptSources" value="`${InterruptSource}`" /> 380 <Member name="captureInputMode" value="`${Capture0Input eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : Capture0Input}`" /> 381 <Member name="captureInput" value="`${Capture0Input eq CY_TCPWM_INPUT_DISABLED ? "CY_TCPWM_INPUT_0" : (definePrefix . "_CAPTURE0_VALUE")}`" /> 382 <Member name="reloadInputMode" value="`${ReloadInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : ReloadInput}`" /> 383 <Member name="reloadInput" value="`${ReloadInput eq CY_TCPWM_INPUT_DISABLED ? "CY_TCPWM_INPUT_0" : (definePrefix . "_RELOAD_VALUE")}`" /> 384 <Member name="startInputMode" value="`${StartInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : StartInput}`" /> 385 <Member name="startInput" value="`${StartInput eq CY_TCPWM_INPUT_DISABLED ? "CY_TCPWM_INPUT_0" : (definePrefix . "_START_VALUE")}`" /> 386 <Member name="stopInputMode" value="`${StopInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : StopInput}`" /> 387 <Member name="stopInput" value="`${StopInput eq CY_TCPWM_INPUT_DISABLED ? "CY_TCPWM_INPUT_0" : (definePrefix . "_STOP_VALUE")}`" /> 388 <Member name="countInputMode" value="`${CountInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : CountInput}`" /> 389 <Member name="countInput" value="`${CountInput eq CY_TCPWM_INPUT_DISABLED ? "CY_TCPWM_INPUT_1" : (definePrefix . "_COUNT_VALUE")}`" /> 390 <Member name="capture1InputMode" value="`${Capture1Input eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : Capture1Input}`" /> 391 <Member name="capture1Input" value="`${Capture1Input eq CY_TCPWM_INPUT_DISABLED ? "CY_TCPWM_INPUT_0" : (definePrefix . "_CAPTURE1_VALUE")}`" /> 392 <Member name="compare2" value="`${pCntCC1 ? Compare2 : "CY_TCPWM_GRP_CNT_CC0_DEFAULT"}`" /> 393 <Member name="compare3" value="`${pCntCC1 ? Compare3 : "CY_TCPWM_GRP_CNT_CC0_BUFF_DEFAULT"}`" /> 394 <Member name="enableCompare1Swap" value="`${pCCeqCompare ? EnableCompare1Swap : pCCeqCompare}`" /> 395 <Member name="trigger0Event" value="`${trigger0Event}`" /> 396 <Member name="trigger1Event" value="`${trigger1Event}`" /> 397 </ConfigStruct> 398 399 <ConfigStruct name="`${INST_NAME}`_obj" type="cyhal_resource_inst_t" const="true" public="true" include="true" guard="defined (CY_USING_HAL)"> 400 <Member name="type" value="CYHAL_RSC_TCPWM" /> 401 <Member name="block_num" value="`${(getInstNumber("tcpwm") * pMaxGroupCount) + pCntGroup}`U" /> 402 <Member name="channel_num" value="`${getInstNumber("cnt")}`U" /> 403 </ConfigStruct> 404 405 <ConfigInstruction value="Cy_SysClk_PeriphAssignDivider(`${pclkDst}`, `${getExposedMember(pclk, "clockSel")}`);" include="`${pclkOk}`" /> 406 <ConfigInstruction value="cyhal_hwmgr_reserve(&`${INST_NAME}`_obj);" include="true" guard="defined (CY_USING_HAL)" /> 407 </ConfigFirmware> 408</Personality> 409