1<?xml version="1.0" encoding="utf-8"?> 2 3 4<!--**************************************************************************** 5* \file pwm_v2.cypersonality 6* \version 1.0 7* 8* \brief 9* PWM 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="mxs40pwm_ver2" name="PWM" 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__pwm.html" linkText="Open PWM (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="pCntAMCEx" name="pCntAMCEx" desc="pCntAMCEx" group="Internal" default="GRP_NR[`${pCntGroup}`].CNT.GRP_AMC_PRESENT" visible="false" editable="false" /> 50 <ParamBool id="pCntAMC" name="pCntAMC" desc="pCntAMC" group="Internal" default="`${lookupExpression(pCntAMCEx) eq 1}`" visible="false" editable="false" /> 51 52 <ParamString id="TCPWM_version" name="TCPWM Version" group="General" default="TCPWM_ver2" visible="true" editable="false" desc="Version of the TCPWM hardware block"/> 53 54 <ParamChoice id="PwmMode" name="PWM Mode" group="General" default="CY_TCPWM_PWM_MODE_PWM" visible="true" editable="true" desc="Selects the PWM mode of operation."> 55 <Entry name="PWM" value="CY_TCPWM_PWM_MODE_PWM" visible="true" /> 56 <Entry name="PWM Dead Time" value="CY_TCPWM_PWM_MODE_DEADTIME" visible="true" /> 57 <Entry name="PWM Pseudo random" value="CY_TCPWM_PWM_MODE_PSEUDORANDOM" visible="true" /> 58 </ParamChoice> 59 <ParamBool id="pPwmNePrs" name="pPwmNePrs" desc="pPwmNePrs" group="Internal" default="`${PwmMode ne CY_TCPWM_PWM_MODE_PSEUDORANDOM}`" visible="false" editable="false" /> 60 61 <ParamChoice id="ClockPrescaler" name="Clock Prescaler" group="General" default="CY_TCPWM_PWM_PRESCALER_DIVBY_1" visible="`${PwmMode ne CY_TCPWM_PWM_MODE_DEADTIME}`" editable="true" desc="Divides down the input clock." > 62 <Entry name="Divide by 1" value="CY_TCPWM_PWM_PRESCALER_DIVBY_1" visible="true" /> 63 <Entry name="Divide by 2" value="CY_TCPWM_PWM_PRESCALER_DIVBY_2" visible="true" /> 64 <Entry name="Divide by 4" value="CY_TCPWM_PWM_PRESCALER_DIVBY_4" visible="true" /> 65 <Entry name="Divide by 8" value="CY_TCPWM_PWM_PRESCALER_DIVBY_8" visible="true" /> 66 <Entry name="Divide by 16" value="CY_TCPWM_PWM_PRESCALER_DIVBY_16" visible="true" /> 67 <Entry name="Divide by 32" value="CY_TCPWM_PWM_PRESCALER_DIVBY_32" visible="true" /> 68 <Entry name="Divide by 64" value="CY_TCPWM_PWM_PRESCALER_DIVBY_64" visible="true" /> 69 <Entry name="Divide by 128" value="CY_TCPWM_PWM_PRESCALER_DIVBY_128" visible="true" /> 70 </ParamChoice> 71 <ParamChoice id="Resolution" name="PWM Resolution" group="General" default="`${(pCntWidth eq 16) ? "CY_TCPWM_PWM_RESOLUTION_WIDTH_16_BITS" : "CY_TCPWM_PWM_RESOLUTION_WIDTH_32_BITS"}`" visible="true" editable="false" desc="Selects the width of the PWM."> 72 <Entry name="16-bits" value="CY_TCPWM_PWM_RESOLUTION_WIDTH_16_BITS" visible="true" /> 73 <Entry name="32-bits" value="CY_TCPWM_PWM_RESOLUTION_WIDTH_32_BITS" visible="true" /> 74 </ParamChoice> 75 <ParamChoice id="PwmAlignment" name="PWM Alignment" group="General" default="CY_TCPWM_PWM_LEFT_ALIGN" visible="`${pPwmNePrs}`" editable="true" desc="Selects which direction the PWM counts in. Left = Up, Right = Down, Center/Asymmetric = Up/Down." > 76 <Entry name="Left Aligned" value="CY_TCPWM_PWM_LEFT_ALIGN" visible="true" /> 77 <Entry name="Right Aligned" value="CY_TCPWM_PWM_RIGHT_ALIGN" visible="true" /> 78 <Entry name="Center Aligned" value="CY_TCPWM_PWM_CENTER_ALIGN" visible="true" /> 79 <Entry name="Asymmetric" value="CY_TCPWM_PWM_ASYMMETRIC_ALIGN" visible="true" /> 80 <Entry name="Asymmetric CC0 & CC1" value="CY_TCPWM_PWM_ASYMMETRIC_CC0_CC1_ALIGN" visible="`${pCntAMC}`" /> 81 <Entry name="Center Asymmetric CC0 & CC1" value="CY_TCPWM_PWM_CENTER_ASYMMETRIC_CC0_CC1_ALIGN" visible="`${pCntAMC}`" /> 82 </ParamChoice> 83 <ParamBool id="SwapUnderflowOverflow" name="Swap Underflow Overflow Set/Clear" group="General" default="false" visible="`${((pPwmNePrs) && ((PwmAlignment eq CY_TCPWM_PWM_CENTER_ALIGN) || (PwmAlignment eq CY_TCPWM_PWM_ASYMMETRIC_ALIGN)))}`" editable="true" desc="If checked on underflow event, output is SET and on overflow event output is CLEAR." /> 84 <ParamChoice id="RunMode" name="Run Mode" group="General" default="CY_TCPWM_PWM_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."> 85 <Entry name="Continuous" value="CY_TCPWM_PWM_CONTINUOUS" visible="true" /> 86 <Entry name="One Shot" value="CY_TCPWM_PWM_ONESHOT" visible="true" /> 87 </ParamChoice> 88 <ParamRange id="DeadClocks" name="Dead Time Clocks" group="General" default="0" min="0" max="`${(pCntAMC) ? 65535 : 255}`" resolution="1" visible="`${PwmMode eq CY_TCPWM_PWM_MODE_DEADTIME}`" editable="true" desc="Number of clock cycles of dead time between PWM outputs. Range: 0-255 on standard PWM or 0-65535 on PWM with advanced motor control." /> 89 <ParamBool id="ImmediateKill" name="Immediate Kill" group="General" default="false" visible="true" editable="true" desc="If checked kill event immediately deactivates the dt_line_out and dt_line_compl_out. If not with the next module clock." /> 90 91 <!--Period--> 92 <ParamBool id="EnablePeriodSwap" name="Enable Period Swap" group="Period" default="false" visible="`${!(PwmMode eq CY_TCPWM_PWM_MODE_PSEUDORANDOM)}`" editable="true" desc="If checked the periods will be swapped at the next OV/UN when a swap event has been registered." /> 93 <ParamRange id="Period0" name="`${EnablePeriodSwap ? "Period 0" : "Period"}`" group="Period" default="32768" min="0" max="`${pCntWidthMax}`" resolution="1" visible="true" editable="true" desc="Sets the period of the counter. Range: 0-65535 (for 16 bit resolution) or 0–4294967295 (for 32 bit resolution)." /> 94 <ParamRange id="Period1" name="Period 1" group="Period" default="32768" min="0" max="`${pCntWidthMax}`" resolution="1" visible="`${EnablePeriodSwap}`" editable="true" desc="Sets the period of the counter. Range: 0-65535 (for 16 bit resolution) or 0–4294967295 (for 32 bit resolution)." /> 95 96 <!--Taps Enabled--> 97 <ParamRange id="TapsEnabled" name="Taps Enabled" group="Taps Enabled" default="45" min="0" max="`${pCntWidthMax}`" resolution="1" visible="`${PwmMode eq CY_TCPWM_PWM_MODE_PSEUDORANDOM}`" editable="true" desc="Sets the tap value. Range: 0-65535 (for 16 bit resolution) or 0–4294967295 (for 32 bit resolution)." /> 98 99 <!--Compare--> 100 <ParamBool id="EnableCompare0Swap" name="Enable Compare 0 Swap" group="Compare" default="false" visible="true" editable="true" desc="If checked the compare register will be swapped at the next OV/UN when a swap event has been registered." /> 101 <ParamRange id="Compare0" name="Compare 0" group="Compare" default="16384" min="0" max="`${pCntWidthMax}`" resolution="1" visible="true" 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)." /> 102 <ParamRange id="Compare1" name="Compare 0 Buff" group="Compare" default="16384" min="0" max="`${pCntWidthMax}`" resolution="1" visible="`${EnableCompare0Swap}`" editable="true" desc="Sets the buffered compare value. Range: 0-65535 (for 16 bit resolution) or 0–4294967295 (for 32 bit resolution)." /> 103 104 <!--Compare1--> 105 <ParamBool id="EnableCompare1Swap" name="Enable Compare 1 Swap" group="Compare" default="false" visible="`${pCntCC1}`" editable="true" desc="If checked the compare register will be swapped at the next OV/UN when a swap event has been registered." /> 106 <ParamRange id="Compare2" name="Compare 1" group="Compare" default="16384" min="0" max="`${pCntWidthMax}`" resolution="1" visible="`${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)." /> 107 <ParamRange id="Compare3" name="Compare 1 Buff" group="Compare" default="16384" min="0" max="`${pCntWidthMax}`" resolution="1" visible="`${EnableCompare1Swap && pCntCC1}`" editable="true" desc="Sets the buffered compare value. Range: 0-65535 (for 16 bit resolution) or 0–4294967295 (for 32 bit resolution)." /> 108 109 <!-- Event Generation --> 110 <ParamBool id="pEventGenerationVisible" name="pEventGenerationVisible" group="Internal" default="`${(pCntAMC && ((PwmAlignment eq CY_TCPWM_PWM_CENTER_ALIGN) || (PwmAlignment eq CY_TCPWM_PWM_ASYMMETRIC_ALIGN) || (PwmAlignment eq CY_TCPWM_PWM_CENTER_ASYMMETRIC_CC0_CC1_ALIGN)))}`" visible="false" editable="false" desc="" /> 111 <ParamBool id="Compare0MatchUp" name="Compare 0 match up" group="Event Generation" default="true" visible="`${pEventGenerationVisible}`" editable="true" desc="test" /> 112 <ParamBool id="Compare0MatchDown" name="Compare 0 match Down" group="Event Generation" default="false" visible="`${pEventGenerationVisible}`" editable="true" desc="test" /> 113 <ParamBool id="Compare1MatchUp" name="Compare 1 match up" group="Event Generation" default="true" visible="`${pEventGenerationVisible}`" editable="true" desc="test" /> 114 <ParamBool id="Compare1MatchDown" name="Compare 1 match Down" group="Event Generation" default="false" visible="`${pEventGenerationVisible}`" editable="true" desc="test" /> 115 116 <!--Interrupts--> 117 <ParamBool id="InterruptTC" name="Overflow & Underflow" group="Interrupt Source" default="false" visible="true" editable="true" desc="Generate interrupt on Overflow & Underflow events" /> 118 <ParamBool id="InterruptCC0" name="Compare 0" group="Interrupt Source" default="false" visible="true" editable="true" desc="Generates interrupt when counter value matches with compare 0 value" /> 119 <ParamBool id="InterruptCC1" name="Compare 1" group="Interrupt Source" default="false" visible="`${pCntCC1}`" editable="true" desc="Generates interrupt when counter value matches with compare 1 value" /> 120 <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" /> 121 122 <!--Inputs--> 123 <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]")}`" /> 124 <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]")}`" /> 125 126 <ParamChoice id="CountInput" name="Count Input" group="Inputs" default="CY_TCPWM_INPUT_DISABLED" visible="`${pPwmNePrs}`" editable="true" desc="Determines if a count input is needed and how that input is registered." > 127 <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" /> 128 <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" /> 129 <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" /> 130 <Entry name="Level" value="CY_TCPWM_INPUT_LEVEL" visible="true" /> 131 <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" /> 132 </ParamChoice> 133 <ParamSignal port="count[0]" name="Count Signal" group="Inputs" visible="`${((pPwmNePrs) && (CountInput ne CY_TCPWM_INPUT_DISABLED))}`" desc="This digital input causes the PWM to count depending on how the it is configured." canBeEmpty="`${CountInput eq CY_TCPWM_INPUT_DISABLED}`" > 134 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 135 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 136 <Fixed value="CY_GPIO_DM_HIGHZ" /> 137 </Parameter> 138 </Constraint> 139 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 140 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 141 <Fixed value="CY_GPIO_DM_HIGHZ" /> 142 </Parameter> 143 </Constraint> 144 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 145 </ParamSignal> 146 <ParamChoice id="Kill0Input" name="Kill 0 Input" group="Inputs" default="CY_TCPWM_INPUT_DISABLED" visible="true" editable="true" desc="Determines how the kill 0 input behaves." > 147 <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" /> 148 <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" /> 149 <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" /> 150 <Entry name="Level" value="CY_TCPWM_INPUT_LEVEL" visible="true" /> 151 <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" /> 152 </ParamChoice> 153 <ParamSignal port="stop[0]" name="Kill 0 Signal" group="Inputs" visible="`${Kill0Input ne CY_TCPWM_INPUT_DISABLED}`" desc="This digital input kills the PWM, based on the Kill0 Input selection." canBeEmpty="`${Kill0Input eq CY_TCPWM_INPUT_DISABLED}`" > 154 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 155 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 156 <Fixed value="CY_GPIO_DM_HIGHZ" /> 157 </Parameter> 158 </Constraint> 159 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 160 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 161 <Fixed value="CY_GPIO_DM_HIGHZ" /> 162 </Parameter> 163 </Constraint> 164 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 165 </ParamSignal> 166 <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." > 167 <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" /> 168 <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" /> 169 <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" /> 170 <Entry name="Level" value="CY_TCPWM_INPUT_LEVEL" visible="`${PwmMode eq CY_TCPWM_PWM_MODE_PSEUDORANDOM}`" /> 171 <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" /> 172 </ParamChoice> 173 <ParamSignal port="reload[0]" name="Reload Signal" group="Inputs" visible="`${ReloadInput ne CY_TCPWM_INPUT_DISABLED}`" desc="This digital input triggers a reload of the PWM, and starts the PWM." canBeEmpty="`${ReloadInput eq CY_TCPWM_INPUT_DISABLED}`" > 174 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 175 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 176 <Fixed value="CY_GPIO_DM_HIGHZ" /> 177 </Parameter> 178 </Constraint> 179 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 180 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 181 <Fixed value="CY_GPIO_DM_HIGHZ" /> 182 </Parameter> 183 </Constraint> 184 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 185 </ParamSignal> 186 <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." > 187 <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" /> 188 <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" /> 189 <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" /> 190 <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" /> 191 </ParamChoice> 192 <ParamSignal port="start[0]" name="Start Signal" group="Inputs" visible="`${StartInput ne CY_TCPWM_INPUT_DISABLED}`" desc="This digital input triggers a Start of the PWM." canBeEmpty="`${StartInput eq CY_TCPWM_INPUT_DISABLED}`" > 193 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 194 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 195 <Fixed value="CY_GPIO_DM_HIGHZ" /> 196 </Parameter> 197 </Constraint> 198 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 199 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 200 <Fixed value="CY_GPIO_DM_HIGHZ" /> 201 </Parameter> 202 </Constraint> 203 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 204 </ParamSignal> 205 <ParamChoice id="SwapInput" name="Swap Input" group="Inputs" default="CY_TCPWM_INPUT_DISABLED" visible="true" editable="true" desc="This input controls when compare and period swaps occur." > 206 <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" /> 207 <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" /> 208 <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" /> 209 <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" /> 210 </ParamChoice> 211 <ParamSignal port="capture0[0]" name="Swap Signal" group="Inputs" visible="`${SwapInput ne CY_TCPWM_INPUT_DISABLED}`" desc="This input latches a SWAP command. The swap doesn’t occur until the next Overflow/Underflow event." canBeEmpty="`${SwapInput eq CY_TCPWM_INPUT_DISABLED}`" > 212 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 213 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 214 <Fixed value="CY_GPIO_DM_HIGHZ" /> 215 </Parameter> 216 </Constraint> 217 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 218 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 219 <Fixed value="CY_GPIO_DM_HIGHZ" /> 220 </Parameter> 221 </Constraint> 222 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 223 </ParamSignal> 224 <ParamChoice id="Kill1Input" name="Kill 1 Input" group="Inputs" default="CY_TCPWM_INPUT_DISABLED" visible="`${pCntCC1}`" editable="true" desc="Determines how the kill 1 input behaves." > 225 <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" /> 226 <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" /> 227 <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" /> 228 <Entry name="Level" value="CY_TCPWM_INPUT_LEVEL" visible="true" /> 229 <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" /> 230 </ParamChoice> 231 <ParamSignal port="capture1[0]" name="Kill 1 Signal" group="Inputs" visible="`${Kill1Input ne CY_TCPWM_INPUT_DISABLED}`" desc="This digital input kills the PWM, based on the Kill1 Input selection." canBeEmpty="`${Kill1Input eq CY_TCPWM_INPUT_DISABLED}`" > 232 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 233 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 234 <Fixed value="CY_GPIO_DM_HIGHZ" /> 235 </Parameter> 236 </Constraint> 237 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 238 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 239 <Fixed value="CY_GPIO_DM_HIGHZ" /> 240 </Parameter> 241 </Constraint> 242 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 243 </ParamSignal> 244 245 <!--Kill Mode--> 246 <ParamChoice id="KillMode" name="Kill Mode" group="Kill Mode" default="CY_TCPWM_PWM_STOP_ON_KILL" visible="`${Kill0Input ne CY_TCPWM_INPUT_DISABLED}`" editable="true" desc="Determines what the kill signal does to the PWM." > 247 <Entry name="Asynchronous Kill" value="CY_TCPWM_PWM_ASYNC_KILL" visible="true" /> 248 <Entry name="Synchronous Kill" value="CY_TCPWM_PWM_SYNCH_KILL" visible="true" /> 249 <Entry name="Stop on Kill" value="CY_TCPWM_PWM_STOP_ON_KILL" visible="true" /> 250 </ParamChoice> 251 252 <!--PWM Output Polarity--> 253 <ParamBool id="InvertPwm" name="Invert PWM Output" group="PWM Output Polarity" default="false" visible="true" editable="true" desc="If checked the main PWM output is inverted." /> 254 <ParamBool id="InvertPwm_n" name="Invert PWM_n Output" group="PWM Output Polarity" default="false" visible="true" editable="true" desc="If checked the main PWM_n output is inverted." /> 255 256 <!--PWM output on Disable--> 257 <ParamChoice id="PwmDisabledOutput" name="PWM Disabled Output" group="PWM Disabled Output" default="CY_TCPWM_PWM_OUTPUT_HIGHZ" visible="true" editable="true" desc="Specifies the behavior of the PWM outputs while PWM is disabled." > 258 <Entry name="High Impedance" value="CY_TCPWM_PWM_OUTPUT_HIGHZ" visible="true" /> 259 <Entry name="Retain" value="CY_TCPWM_PWM_OUTPUT_RETAIN" visible="true" /> 260 <Entry name="Low" value="CY_TCPWM_PWM_OUTPUT_LOW" visible="true" /> 261 <Entry name="High" value="CY_TCPWM_PWM_OUTPUT_HIGH" visible="true" /> 262 </ParamChoice> 263 264 <!--Outputs--> 265 <ParamSignal port="line[0]" name="PWM (line)" group="Outputs" visible="true" desc="PWM output" canBeEmpty="true" > 266 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 267 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 268 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 269 </Parameter> 270 </Constraint> 271 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 272 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 273 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 274 </Parameter> 275 </Constraint> 276 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 277 </ParamSignal> 278 <ParamSignal port="line_compl[0]" name="PWM_n (line_compl)" group="Outputs" visible="true" desc="Complimentary PWM output." canBeEmpty="true" > 279 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 280 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 281 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 282 </Parameter> 283 </Constraint> 284 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 285 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 286 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 287 </Parameter> 288 </Constraint> 289 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 290 </ParamSignal> 291 292 <!--Trigger Outputs--> 293 <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." > 294 <Entry name="Overflow" value="CY_TCPWM_CNT_TRIGGER_ON_OVERFLOW" visible="`${PwmMode ne CY_TCPWM_PWM_MODE_PSEUDORANDOM}`" /> 295 <Entry name="Underflow" value="CY_TCPWM_CNT_TRIGGER_ON_UNDEFLOW" visible="`${PwmMode ne CY_TCPWM_PWM_MODE_PSEUDORANDOM}`" /> 296 <Entry name="Terminal Count" value="CY_TCPWM_CNT_TRIGGER_ON_TC" visible="true" /> 297 <Entry name="Compare 0 Match" value="CY_TCPWM_CNT_TRIGGER_ON_CC0_MATCH" visible="true" /> 298 <Entry name="Compare 1 Match" value="CY_TCPWM_CNT_TRIGGER_ON_CC1_MATCH" visible="`${pCntCC1}`" /> 299 <Entry name="PWM (line_out)" value="CY_TCPWM_CNT_TRIGGER_ON_LINE_OUT" visible="true" /> 300 <Entry name="Disabled" value="CY_TCPWM_CNT_TRIGGER_ON_DISABLED" visible="true" /> 301 </ParamChoice> 302 <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}`" > 303 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 304 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 305 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 306 </Parameter> 307 </Constraint> 308 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 309 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 310 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 311 </Parameter> 312 </Constraint> 313 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 314 </ParamSignal> 315 <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." > 316 <Entry name="Overflow" value="CY_TCPWM_CNT_TRIGGER_ON_OVERFLOW" visible="`${PwmMode ne CY_TCPWM_PWM_MODE_PSEUDORANDOM}`" /> 317 <Entry name="Underflow" value="CY_TCPWM_CNT_TRIGGER_ON_UNDEFLOW" visible="`${PwmMode ne CY_TCPWM_PWM_MODE_PSEUDORANDOM}`" /> 318 <Entry name="Terminal Count" value="CY_TCPWM_CNT_TRIGGER_ON_TC" visible="true" /> 319 <Entry name="Compare 0 Match" value="CY_TCPWM_CNT_TRIGGER_ON_CC0_MATCH" visible="true" /> 320 <Entry name="Compare 1 Match" value="CY_TCPWM_CNT_TRIGGER_ON_CC1_MATCH" visible="`${pCntCC1}`" /> 321 <Entry name="PWM (line_out)" value="CY_TCPWM_CNT_TRIGGER_ON_LINE_OUT" visible="true" /> 322 <Entry name="Disabled" value="CY_TCPWM_CNT_TRIGGER_ON_DISABLED" visible="true" /> 323 </ParamChoice> 324 <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}`" > 325 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 326 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 327 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 328 </Parameter> 329 </Constraint> 330 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 331 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 332 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 333 </Parameter> 334 </Constraint> 335 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 336 </ParamSignal> 337 338 <!--Config--> 339 <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)." /> 340 341 <!-- Peripheral clock divider connection --> 342 <ParamString id="definePrefix" name="Define prefix" group="Internal" default="`${"TCPWM" . tcpwmInst . "_GRP" . pCntGroup . "_CNT" . getInstNumber("cnt")}`" visible="false" editable="false" desc="" /> 343 <ParamString id="defineInputDisabled" name="Define input disabled" group="Internal" default="`${INST_NAME . "_INPUT_DISABLED & 0x3U"}`" visible="false" editable="false" desc="" /> 344 <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)" /> 345 <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" /> 346 <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="" /> 347 348 <!-- Auxiliary internal parameters--> 349 <ParamBool id="pC0GtP0" name="pC0GtP0" desc="pC0GtP0" group="Internal" default="`${Compare0 > Period0}`" visible="false" editable="false" /> 350 <ParamBool id="pC0GtP1" name="pC0GtP1" desc="pC0GtP1" group="Internal" default="`${Compare0 > Period1}`" visible="false" editable="false" /> 351 <ParamBool id="pC1GtP0" name="pC1GtP0" desc="pC1GtP0" group="Internal" default="`${Compare1 > Period0}`" visible="false" editable="false" /> 352 <ParamBool id="pC1GtP1" name="pC1GtP1" desc="pC1GtP1" group="Internal" default="`${Compare1 > Period1}`" visible="false" editable="false" /> 353 <ParamBool id="pC2GtP0" name="pC2GtP0" desc="pC2GtP0" group="Internal" default="`${Compare2 > Period0}`" visible="false" editable="false" /> 354 <ParamBool id="pC2GtP1" name="pC2GtP1" desc="pC2GtP1" group="Internal" default="`${Compare2 > Period1}`" visible="false" editable="false" /> 355 <ParamBool id="pC3GtP0" name="pC3GtP0" desc="pC3GtP0" group="Internal" default="`${Compare3 > Period0}`" visible="false" editable="false" /> 356 <ParamBool id="pC3GtP1" name="pC3GtP1" desc="pC3GtP1" group="Internal" default="`${Compare3 > Period1}`" visible="false" editable="false" /> 357 358 <ParamBool id="pAlignAsymm" name="pAlignAsymm" desc="pAlignAsymm" group="Internal" default="`${(PwmAlignment eq CY_TCPWM_PWM_ASYMMETRIC_ALIGN) || (PwmAlignment eq CY_TCPWM_PWM_ASYMMETRIC_CC0_CC1_ALIGN) || (PwmAlignment eq CY_TCPWM_PWM_CENTER_ASYMMETRIC_CC0_CC1_ALIGN)}`" visible="false" editable="false" /> 359 <ParamBool id="pAlignCenter" name="pAlignCenter" desc="pAlignCenter" group="Internal" default="`${PwmAlignment eq CY_TCPWM_PWM_CENTER_ALIGN}`" visible="false" editable="false" /> 360 <ParamBool id="pAlignAsymmOrCenter" name="pAlignAsymmOrCenter" desc="pAlignAsymmOrCenter" group="Internal" default="`${pAlignAsymm || pAlignCenter}`" visible="false" editable="false" /> 361 <ParamBool id="pPwmNePrsAndC0GtP0" name="pPwmNePrsAndC0GtP0" desc="pPwmNePrsAndC0GtP0" group="Internal" default="`${pPwmNePrs && pC0GtP0}`" visible="false" editable="false" /> 362 <ParamBool id="pPwmNePrsAndC0GtP1" name="pPwmNePrsAndC0GtP1" desc="pPwmNePrsAndC0GtP1" group="Internal" default="`${pPwmNePrs && pC0GtP1}`" visible="false" editable="false" /> 363 <ParamBool id="pKillEqSynch" name="pKillEqSynch" desc="pKillEqSynch" group="Internal" default="`${KillMode eq CY_TCPWM_PWM_SYNCH_KILL}`" visible="false" editable="false" /> 364 <ParamBool id="pEnCAndNEnP" name="pEnCAndNEnP" desc="pEnCAndNEnP" group="Internal" default="`${EnableCompare0Swap && (!EnablePeriodSwap)}`" visible="false" editable="false" /> 365 <ParamBool id="pEnCAndEnP" name="pEnCAndEnP" desc="pEnCAndEnP" group="Internal" default="`${EnableCompare0Swap && EnablePeriodSwap}`" visible="false" editable="false" /> 366 <ParamBool id="pNEnCOrAssymAndC0GtP1" name="pNEnCOrAssymAndC0GtP1" desc="pNEnCOrAssymAndC0GtP1" group="Internal" default="`${((!EnableCompare0Swap) || pAlignAsymm)&& pC0GtP1}`" visible="false" editable="false" /> 367 <ParamBool id="pNePrsAndEnCAndEnP" name="pNePrsAndEnCAndEnP" desc="pNePrsAndEnCAndEnP" group="Internal" default="`${pPwmNePrs && pEnCAndEnP}`" visible="false" editable="false" /> 368 369 <!-- Clock Frequency --> 370 <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" /> 371 <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" /> 372 373 </Parameters> 374 375 <DRCs> 376 <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)}`" /> 377 <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)}`" /> 378 379 <!--Compare0 DRCs--> 380 <DRC type="INFO" text="Compare 0 value have to be less or equal to Period 0 (Period). A value larger than period is uses to get 100% duty cycle (Left Aligned alignment) or 0% duty cycle (Right Aligned alignment)." condition="`${pPwmNePrsAndC0GtP0}`" /> 381 <DRC type="INFO" text="Compare 0 value have to be less or equal to Period 1. A value larger than period is uses to get 100% duty cycle (Left Aligned alignment) or 0% duty cycle (Right Aligned alignment)." condition="`${pPwmNePrs && EnablePeriodSwap && pNEnCOrAssymAndC0GtP1}`" /> 382 383 <DRC type="ERROR" text="Compare 0 value must be less or equal to Period 0 (Period)." condition="`${pPwmNePrs &&pAlignAsymmOrCenter && pC0GtP0}`" paramId="Compare0" /> 384 <DRC type="ERROR" text="Compare 0 value must be less or equal to Period 1." condition="`${pPwmNePrs && pAlignAsymmOrCenter && EnablePeriodSwap && pNEnCOrAssymAndC0GtP1}`" paramId="Compare0" /> 385 386 <!--Compare0Buff DRCs--> 387 <DRC type="INFO" text="Compare 0 Buff value have to be less or equal to Period 0 (Period). A value larger than period is uses to get 100% duty cycle (Left Aligned alignment) or 0% duty cycle (Right Aligned alignment)." condition="`${pPwmNePrs && pEnCAndNEnP && pC1GtP0}`" /> 388 <DRC type="INFO" text="Compare 0 Buff value have to be less or equal to Period 1. A value larger than period is uses to get 100% duty cycle (Left Aligned alignment) or 0% duty cycle (Right Aligned alignment)." condition="`${pNePrsAndEnCAndEnP && pC1GtP1}`" /> 389 <DRC type="INFO" text="Compare 0 Buff value have to be less or equal to Period 0 (Period). A value larger than period is uses to get 100% duty cycle (Left Aligned alignment) or 0% duty cycle (Right Aligned alignment)." condition="`${pNePrsAndEnCAndEnP && pAlignAsymm && pC1GtP0}`" /> 390 391 <DRC type="ERROR" text="Compare 0 Buff value must be less or equal to Period 0 (Period)." condition="`${pAlignAsymmOrCenter && pEnCAndNEnP && pC1GtP0}`" paramId="Compare1" /> 392 <DRC type="ERROR" text="Compare 0 Buff value must be less or equal to Period 1." condition="`${pNePrsAndEnCAndEnP && pAlignAsymmOrCenter && pC1GtP1}`" paramId="Compare1" /> 393 <DRC type="ERROR" text="Compare 0 Buff value must be less or equal to Period 0 (Period)." condition="`${pNePrsAndEnCAndEnP && pAlignAsymmOrCenter && pC1GtP0}`" paramId="Compare1" /> 394 395 <!--Compare1 DRCs--> 396 <DRC type="INFO" text="Compare 1 value have to be less or equal to Period 0 (Period). A value larger than period is uses to get 100% duty cycle (Left Aligned alignment) or 0% duty cycle (Right Aligned alignment)." condition="`${pCntCC1 && pPwmNePrs && pC2GtP0}`" /> 397 <DRC type="INFO" text="Compare 1 value have to be less or equal to Period 1. A value larger than period is uses to get 100% duty cycle (Left Aligned alignment) or 0% duty cycle (Right Aligned alignment)." condition="`${pCntCC1 && pPwmNePrs && EnablePeriodSwap && ((!EnableCompare1Swap) || pAlignAsymm) && pC2GtP1}`" /> 398 399 <DRC type="ERROR" text="Compare 1 value must be less or equal to Period 0 (Period)." condition="`${pAlignAsymmOrCenter && pCntCC1 && pPwmNePrs && pC2GtP0}`" paramId="Compare2" /> 400 <DRC type="ERROR" text="Compare 1 value must be less or equal to Period 1." condition="`${pAlignAsymmOrCenter && pCntCC1 && pPwmNePrs && EnablePeriodSwap && ((!EnableCompare1Swap) || pAlignAsymm) && pC2GtP1}`" paramId="Compare2" /> 401 402 <!--Compare1Buff DRCs--> 403 <DRC type="INFO" text="Compare 1 Buff value have to be less or equal to Period 0 (Period). A value larger than period is uses to get 100% duty cycle (Left Aligned alignment) or 0% duty cycle (Right Aligned alignment)." condition="`${pCntCC1 && pPwmNePrs && EnableCompare1Swap && ((!EnablePeriodSwap) || (EnablePeriodSwap && pAlignAsymm)) && pC3GtP0}`" /> 404 <DRC type="INFO" text="Compare 1 Buff value have to be less or equal to Period 1. A value larger than period is uses to get 100% duty cycle (Left Aligned alignment) or 0% duty cycle (Right Aligned alignment)." condition="`${pCntCC1 && pPwmNePrs && EnablePeriodSwap && pC3GtP1}`" /> 405 406 <DRC type="ERROR" text="Compare 1 Buff value must be less or equal to Period 0 (Period)." condition="`${pAlignAsymmOrCenter && pCntCC1 && pPwmNePrs && EnableCompare1Swap && ((!EnablePeriodSwap) || (EnablePeriodSwap && pAlignAsymm)) && pC3GtP0}`" paramId="Compare3" /> 407 <DRC type="ERROR" text="Compare 1 Buff value must be less or equal to Period 1." condition="`${pAlignAsymmOrCenter && pCntCC1 && pPwmNePrs && EnablePeriodSwap && pC3GtP1}`" paramId="Compare3" /> 408 409 <!--CountInput DRCs--> 410 <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"> 411 <FixIt action="SET_PARAM" target="CountInput" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" /> 412 <FixIt action="SET_PARAM" target="CountInput" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" /> 413 <FixIt action="SET_PARAM" target="CountInput" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" /> 414 <FixIt action="SET_PARAM" target="CountInput" value="CY_TCPWM_INPUT_LEVEL" valid="true" /> 415 </DRC> 416 417 <!--ReloadInput DRCs--> 418 <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"> 419 <FixIt action="SET_PARAM" target="ReloadInput" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" /> 420 <FixIt action="SET_PARAM" target="ReloadInput" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" /> 421 <FixIt action="SET_PARAM" target="ReloadInput" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" /> 422 <FixIt action="SET_PARAM" target="ReloadInput" value="CY_TCPWM_INPUT_LEVEL" valid="true" /> 423 </DRC> 424 425 <!--StartInput DRCs--> 426 <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"> 427 <FixIt action="SET_PARAM" target="StartInput" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" /> 428 <FixIt action="SET_PARAM" target="StartInput" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" /> 429 <FixIt action="SET_PARAM" target="StartInput" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" /> 430 </DRC> 431 432 <!--SwapInput DRCs--> 433 <DRC type="ERROR" text="Swap Event has to be enabled to use Swap Signal." condition="`${hasConnection("capture0", 0) && (SwapInput eq CY_TCPWM_INPUT_DISABLED)}`" paramId="SwapInput"> 434 <FixIt action="SET_PARAM" target="SwapInput" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" /> 435 <FixIt action="SET_PARAM" target="SwapInput" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" /> 436 <FixIt action="SET_PARAM" target="SwapInput" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" /> 437 <FixIt action="SET_PARAM" target="SwapInput" value="CY_TCPWM_INPUT_LEVEL" valid="true" /> 438 </DRC> 439 440 <!--Kill0Input DRCs--> 441 <DRC type="ERROR" text="Level is not supported for Stop on Kill mode." condition="`${((KillMode eq CY_TCPWM_PWM_STOP_ON_KILL) && (Kill0Input eq CY_TCPWM_INPUT_LEVEL))}`" paramId="Kill0Input" /> 442 <DRC type="ERROR" text="Asynchronous Kill mode just supports Level mode." condition="`${((Kill0Input ne CY_TCPWM_INPUT_DISABLED) && (KillMode eq CY_TCPWM_PWM_ASYNC_KILL) && (Kill0Input ne CY_TCPWM_INPUT_LEVEL))}`" paramId="Kill0Input" /> 443 <DRC type="ERROR" text="Synchronous Kill mode just supports Rising Edge mode." condition="`${((Kill0Input ne CY_TCPWM_INPUT_DISABLED) && pKillEqSynch && (Kill0Input ne CY_TCPWM_INPUT_RISINGEDGE))}`" 444 paramId="Kill0Input" /> 445 <DRC type="ERROR" text="Kill 0 Event has to be enabled to use Kill 0 Signal." condition="`${hasConnection("stop", 0) && (Kill0Input eq CY_TCPWM_INPUT_DISABLED)}`" paramId="Kill0Input"> 446 <FixIt action="SET_PARAM" target="Kill0Input" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" /> 447 <FixIt action="SET_PARAM" target="Kill0Input" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" /> 448 <FixIt action="SET_PARAM" target="Kill0Input" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" /> 449 <FixIt action="SET_PARAM" target="Kill0Input" value="CY_TCPWM_INPUT_LEVEL" valid="true" /> 450 </DRC> 451 452 <!--Kill1Input DRCs--> 453 <DRC type="ERROR" text="Level is not supported for Stop on Kill mode." condition="`${(pCntCC1 &&(KillMode eq CY_TCPWM_PWM_STOP_ON_KILL) && (Kill1Input eq CY_TCPWM_INPUT_LEVEL))}`" paramId="Kill1Input" /> 454 <DRC type="ERROR" text="Asynchronous Kill mode just supports Level mode." condition="`${((Kill1Input ne CY_TCPWM_INPUT_DISABLED) && pCntCC1 &&(KillMode eq CY_TCPWM_PWM_ASYNC_KILL) && (Kill1Input ne CY_TCPWM_INPUT_LEVEL))}`" paramId="Kill1Input" /> 455 <DRC type="ERROR" text="Synchronous Kill mode just supports Rising Edge mode." condition="`${((Kill1Input ne CY_TCPWM_INPUT_DISABLED) && pCntCC1 && pKillEqSynch && (Kill1Input ne CY_TCPWM_INPUT_RISINGEDGE))}`" 456 paramId="Kill1Input" /> 457 <DRC type="ERROR" text="Kill 1 Event has to be enabled to use Kill 1 Signal." condition="`${hasConnection("capture1", 0) && (Kill1Input eq CY_TCPWM_INPUT_DISABLED)}`" paramId="Kill1Input"> 458 <FixIt action="SET_PARAM" target="Kill1Input" value="CY_TCPWM_INPUT_RISINGEDGE" valid="true" /> 459 <FixIt action="SET_PARAM" target="Kill1Input" value="CY_TCPWM_INPUT_FALLINGEDGE" valid="true" /> 460 <FixIt action="SET_PARAM" target="Kill1Input" value="CY_TCPWM_INPUT_EITHEREDGE" valid="true" /> 461 <FixIt action="SET_PARAM" target="Kill1Input" value="CY_TCPWM_INPUT_LEVEL" valid="true" /> 462 </DRC> 463 464 <!--KillMode DRCs--> 465 <DRC type="ERROR" text="Synchronous Kill mode is not supported for PWM Pseudo Random mode." condition="`${pKillEqSynch && (PwmMode eq CY_TCPWM_PWM_MODE_PSEUDORANDOM)}`" paramId="PwmMode" /> 466 467 <!--Trigger Output DRCs--> 468 <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"> 469 <FixIt action="SET_PARAM" target="trigger0Event" value="CY_TCPWM_CNT_TRIGGER_ON_OVERFLOW" valid="true" /> 470 <FixIt action="SET_PARAM" target="trigger0Event" value="CY_TCPWM_CNT_TRIGGER_ON_UNDEFLOW" valid="true" /> 471 <FixIt action="SET_PARAM" target="trigger0Event" value="CY_TCPWM_CNT_TRIGGER_ON_TC" valid="true" /> 472 <FixIt action="SET_PARAM" target="trigger0Event" value="CY_TCPWM_CNT_TRIGGER_ON_CC0_MATCH" valid="true" /> 473 <FixIt action="SET_PARAM" target="trigger0Event" value="CY_TCPWM_CNT_TRIGGER_ON_CC1_MATCH" valid="`${pCntCC1}`" /> 474 <FixIt action="SET_PARAM" target="trigger0Event" value="CY_TCPWM_CNT_TRIGGER_ON_LINE_OUT" valid="true" /> 475 </DRC> 476 <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"> 477 <FixIt action="SET_PARAM" target="trigger1Event" value="CY_TCPWM_CNT_TRIGGER_ON_OVERFLOW" valid="true" /> 478 <FixIt action="SET_PARAM" target="trigger1Event" value="CY_TCPWM_CNT_TRIGGER_ON_UNDEFLOW" valid="true" /> 479 <FixIt action="SET_PARAM" target="trigger1Event" value="CY_TCPWM_CNT_TRIGGER_ON_TC" valid="true" /> 480 <FixIt action="SET_PARAM" target="trigger1Event" value="CY_TCPWM_CNT_TRIGGER_ON_CC0_MATCH" valid="true" /> 481 <FixIt action="SET_PARAM" target="trigger1Event" value="CY_TCPWM_CNT_TRIGGER_ON_CC1_MATCH" valid="`${pCntCC1}`" /> 482 <FixIt action="SET_PARAM" target="trigger1Event" value="CY_TCPWM_CNT_TRIGGER_ON_LINE_OUT" valid="true" /> 483 </DRC> 484 </DRCs> 485 486 <ConfigFirmware> 487 <ConfigInclude value="cy_tcpwm_pwm.h" include="true" /> 488 <ConfigInclude value="cy_sysclk.h" include="`${pclkOk}`" /> 489 <ConfigInclude value="cycfg_routing.h" include="true" /> 490 <ConfigInclude value="cyhal_hwmgr.h" include="true" guard="defined (CY_USING_HAL)" /> 491 492 <ConfigDefine name="`${INST_NAME}`_HW" value="TCPWM`${tcpwmInst}`" public="true" include="true" /> 493 <ConfigDefine name="`${INST_NAME}`_NUM" value="`${cntInst}`UL" public="true" include="true" /> 494 <ConfigDefine name="`${INST_NAME}`_IRQ" value="tcpwm_`${tcpwmInst}`_interrupts_`${cntInst}`_IRQn" public="true" include="`${InterruptTC || InterruptCC0 || InterruptCC1}`" /> 495 <ConfigDefine name="`${INST_NAME}`_INPUT_DISABLED" value="0x7U" public="false" include="true" /> 496 <ConfigStruct name="`${INST_NAME . "_config"}`" type="cy_stc_tcpwm_pwm_config_t" const="`${inFlash}`" public="true" include="true" > 497 <Member name="pwmMode" value="`${PwmMode}`" /> 498 <Member name="clockPrescaler" value="`${ClockPrescaler}`" /> 499 <Member name="pwmAlignment" value="`${PwmAlignment}`" /> 500 <Member name="deadTimeClocks" value="`${DeadClocks}`" /> 501 <Member name="runMode" value="`${RunMode}`" /> 502 <Member name="period0" value="`${Period0}`" /> 503 <Member name="period1" value="`${Period1}`" /> 504 <Member name="enablePeriodSwap" value="`${EnablePeriodSwap}`" /> 505 <Member name="compare0" value="`${Compare0}`" /> 506 <Member name="compare1" value="`${Compare1}`" /> 507 <Member name="enableCompareSwap" value="`${EnableCompare0Swap}`" /> 508 <Member name="interruptSources" value="`${InterruptSource}`" /> 509 <Member name="invertPWMOut" value="`${InvertPwm ? "CY_TCPWM_PWM_INVERT_ENABLE" : "CY_TCPWM_PWM_INVERT_DISABLE"}`" /> 510 <Member name="invertPWMOutN" value="`${InvertPwm_n ? "CY_TCPWM_PWM_INVERT_ENABLE" : "CY_TCPWM_PWM_INVERT_DISABLE"}`" /> 511 <Member name="killMode" value="`${KillMode}`" /> 512 <Member name="swapInputMode" value="`${SwapInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : SwapInput}`" /> 513 <Member name="swapInput" value="`${SwapInput eq CY_TCPWM_INPUT_DISABLED ? "CY_TCPWM_INPUT_0" : (definePrefix . "_CAPTURE0_VALUE")}`" /> 514 <Member name="reloadInputMode" value="`${ReloadInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : ReloadInput}`" /> 515 <Member name="reloadInput" value="`${ReloadInput eq CY_TCPWM_INPUT_DISABLED ? "CY_TCPWM_INPUT_0" : (definePrefix . "_RELOAD_VALUE")}`" /> 516 <Member name="startInputMode" value="`${StartInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : StartInput}`" /> 517 <Member name="startInput" value="`${StartInput eq CY_TCPWM_INPUT_DISABLED ? "CY_TCPWM_INPUT_0" : (definePrefix . "_START_VALUE")}`" /> 518 <Member name="killInputMode" value="`${Kill0Input eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : Kill0Input}`" /> 519 <Member name="killInput" value="`${Kill0Input eq CY_TCPWM_INPUT_DISABLED ? "CY_TCPWM_INPUT_0" : (definePrefix . "_STOP_VALUE")}`" /> 520 <Member name="countInputMode" value="`${CountInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : CountInput}`" /> 521 <Member name="countInput" value="`${CountInput eq CY_TCPWM_INPUT_DISABLED ? "CY_TCPWM_INPUT_1" : (definePrefix . "_COUNT_VALUE")}`" /> 522 <Member name="swapOverflowUnderflow" value="`${((PwmAlignment eq CY_TCPWM_PWM_CENTER_ALIGN) || (PwmAlignment eq CY_TCPWM_PWM_ASYMMETRIC_ALIGN)) ? SwapUnderflowOverflow : false}`" /> 523 <Member name="immediateKill" value="`${ImmediateKill}`" /> 524 <Member name="tapsEnabled" value="`${TapsEnabled}`" /> 525 <Member name="compare2" value="`${pCntCC1 ? Compare2 : "CY_TCPWM_GRP_CNT_CC0_DEFAULT"}`" /> 526 <Member name="compare3" value="`${pCntCC1 ? Compare3 : "CY_TCPWM_GRP_CNT_CC0_BUFF_DEFAULT"}`" /> 527 <Member name="enableCompare1Swap" value="`${EnableCompare1Swap}`" /> 528 <Member name="compare0MatchUp" value="`${Compare0MatchUp}`" /> 529 <Member name="compare0MatchDown" value="`${Compare0MatchDown}`" /> 530 <Member name="compare1MatchUp" value="`${Compare1MatchUp}`" /> 531 <Member name="compare1MatchDown" value="`${Compare1MatchDown}`" /> 532 <Member name="kill1InputMode" value="`${Kill1Input eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : Kill1Input}`" /> 533 <Member name="kill1Input" value="`${Kill1Input eq CY_TCPWM_INPUT_DISABLED ? "CY_TCPWM_INPUT_0" : (definePrefix . "_CAPTURE1_VALUE")}`" /> 534 <Member name="pwmOnDisable" value="`${PwmDisabledOutput}`" /> 535 <Member name="trigger0Event" value="`${trigger0Event}`" /> 536 <Member name="trigger1Event" value="`${trigger1Event}`" /> 537 </ConfigStruct> 538 539 <ConfigStruct name="`${INST_NAME}`_obj" type="cyhal_resource_inst_t" const="true" public="true" include="true" guard="defined (CY_USING_HAL)"> 540 <Member name="type" value="CYHAL_RSC_TCPWM" /> 541 <Member name="block_num" value="`${(getInstNumber("tcpwm") * pMaxGroupCount) + pCntGroup}`U" /> 542 <Member name="channel_num" value="`${getInstNumber("cnt")}`U" /> 543 </ConfigStruct> 544 545 <ConfigInstruction value="Cy_SysClk_PeriphAssignDivider(`${pclkDst}`, `${getExposedMember(pclk, "clockSel")}`);" include="`${pclkOk}`" /> 546 <ConfigInstruction value="cyhal_hwmgr_reserve(&`${INST_NAME}`_obj);" include="true" guard="defined (CY_USING_HAL)" /> 547 </ConfigFirmware> 548</Personality> 549