1<?xml version="1.0" encoding="utf-8"?>
2
3
4<!--****************************************************************************
5* \file counter.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" name="Timer - Counter" version="1.0" xmlns="http://cypress.com/xsd/cyhwpersonality_v7">
30  <Dependencies>
31    <IpBlock name="mxtcpwm" />
32    <Resource name="tcpwm\.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="pCntWidthMax" name="pCntWidthMax" desc="pCntWidthMax" group="Internal"  default="`${pow(2, CNT.CNT_WIDTH)-1}`" min="0" max="4294967296" resolution="1" visible="false" editable="false" />
41
42    <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." >
43      <Entry name="Divide by 1" value="CY_TCPWM_COUNTER_PRESCALER_DIVBY_1" visible="true" />
44      <Entry name="Divide by 2" value="CY_TCPWM_COUNTER_PRESCALER_DIVBY_2" visible="true" />
45      <Entry name="Divide by 4" value="CY_TCPWM_COUNTER_PRESCALER_DIVBY_4" visible="true" />
46      <Entry name="Divide by 8" value="CY_TCPWM_COUNTER_PRESCALER_DIVBY_8" visible="true" />
47      <Entry name="Divide by 16" value="CY_TCPWM_COUNTER_PRESCALER_DIVBY_16" visible="true" />
48      <Entry name="Divide by 32" value="CY_TCPWM_COUNTER_PRESCALER_DIVBY_32" visible="true" />
49      <Entry name="Divide by 64" value="CY_TCPWM_COUNTER_PRESCALER_DIVBY_64" visible="true" />
50      <Entry name="Divide by 128" value="CY_TCPWM_COUNTER_PRESCALER_DIVBY_128" visible="true" />
51    </ParamChoice>
52    <ParamChoice id="Resolution" name="Counter Resolution" group="General" default="`${(CNT.CNT_WIDTH eq 16) ? &quot;CY_TCPWM_COUNTER_RESOLUTION_WIDTH_16_BITS&quot; : &quot;CY_TCPWM_COUNTER_RESOLUTION_WIDTH_32_BITS&quot;}`" visible="true" editable="false" desc="Selects the size of the counter.">
53      <Entry name="16-bits" value="CY_TCPWM_COUNTER_RESOLUTION_WIDTH_16_BITS" visible="true" />
54      <Entry name="32-bits" value="CY_TCPWM_COUNTER_RESOLUTION_WIDTH_32_BITS" visible="true" />
55    </ParamChoice>
56    <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.">
57      <Entry name="Continuous" value="CY_TCPWM_COUNTER_CONTINUOUS" visible="true" />
58      <Entry name="One Shot" value="CY_TCPWM_COUNTER_ONESHOT" visible="true" />
59    </ParamChoice>
60    <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." >
61      <Entry name="Up" value="CY_TCPWM_COUNTER_COUNT_UP" visible="true" />
62      <Entry name="Down" value="CY_TCPWM_COUNTER_COUNT_DOWN" visible="true" />
63      <Entry name="Up/Down1" value="CY_TCPWM_COUNTER_COUNT_UP_DOWN_1" visible="true" />
64      <Entry name="Up/Down2" value="CY_TCPWM_COUNTER_COUNT_UP_DOWN_2" visible="true" />
65    </ParamChoice>
66    <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)." />
67    <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.">
68      <Entry name="Capture" value="CY_TCPWM_COUNTER_MODE_CAPTURE" visible="true" />
69      <Entry name="Compare" value="CY_TCPWM_COUNTER_MODE_COMPARE" visible="true" />
70    </ParamChoice>
71    <ParamBool id="pCCeqCompare" name="pCCeqCompare" desc="pCCeqCompare" group="Internal" default="`${CompareOrCapture eq CY_TCPWM_COUNTER_MODE_COMPARE}`" visible="false" editable="false" />
72
73
74    <!--Compare-->
75    <ParamBool id="EnableCompareSwap" name="Enable Compare Swap" group="Compare" default="false" visible="`${pCCeqCompare}`" editable="true" desc="When selected the compare register is swapped between compare 0 and compare 1 each time the comparison is true." />
76    <ParamRange id="Compare0" name="`${EnableCompareSwap ? &quot;Compare 0&quot; : &quot;Compare&quot;}`" 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)." />
77    <ParamRange id="Compare1" name="Compare 1" group="Compare" default="16384" min="0" max="`${pCntWidthMax}`" resolution="1" visible="`${pCCeqCompare &amp;&amp; EnableCompareSwap}`" editable="true" desc="Sets the compare value. Range: 0-65535 (for 16 bit resolution) or 0–4294967295 (for 32 bit resolution)." />
78
79    <!--Capture-->
80    <ParamChoice id="CaptureInput" name="Capture 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 terminal is displayed." >
81      <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" />
82      <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" />
83      <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" />
84      <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" />
85    </ParamChoice>
86    <ParamSignal port="capture[0]" name="Capture Signal" group="Capture" visible="`${(CaptureInput ne CY_TCPWM_INPUT_DISABLED) &amp;&amp; (CompareOrCapture eq CY_TCPWM_COUNTER_MODE_CAPTURE)}`" desc="This input triggers a capture of the current count value." canBeEmpty="`${CaptureInput eq CY_TCPWM_INPUT_DISABLED}`" >
87      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
88        <Parameter id="DriveModes" severity="DEFAULT" reason="">
89          <Fixed value="CY_GPIO_DM_HIGHZ" />
90        </Parameter>
91      </Constraint>
92      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
93        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
94          <Fixed value="CY_GPIO_DM_HIGHZ" />
95        </Parameter>
96      </Constraint>
97      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
98    </ParamSignal>
99
100    <!--Interrupts-->
101    <ParamChoice id="InterruptSource" name="Interrupt Source" group="Interrupts" default="CY_TCPWM_INT_NONE" visible="true" editable="true" desc="Selects which events can trigger an interrupt." >
102      <Entry name="None" value="CY_TCPWM_INT_NONE" visible="true" />
103      <Entry name="Overflow &amp; Underflow" value="CY_TCPWM_INT_ON_TC" visible="true" />
104      <Entry name="Compare &amp; Capture" value="CY_TCPWM_INT_ON_CC" visible="true" />
105      <Entry name="Overflow &amp; Underflow or Compare &amp; Capture" value="CY_TCPWM_INT_ON_CC_OR_TC" visible="true" />
106    </ParamChoice>
107
108    <!--Inputs-->
109    <ParamSignal port="clock[0]" name="Clock Signal" group="Inputs" visible="true" desc="The clock input defines the operating frequency." canBeEmpty="false" />
110    <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." >
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="Level" value="CY_TCPWM_INPUT_LEVEL" visible="true" />
115      <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" />
116    </ParamChoice>
117    <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}`" >
118      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
119        <Parameter id="DriveModes" severity="DEFAULT" reason="">
120          <Fixed value="CY_GPIO_DM_HIGHZ" />
121        </Parameter>
122      </Constraint>
123      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
124        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
125          <Fixed value="CY_GPIO_DM_HIGHZ" />
126        </Parameter>
127      </Constraint>
128      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
129    </ParamSignal>
130    <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." >
131      <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" />
132      <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" />
133      <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" />
134      <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" />
135    </ParamChoice>
136    <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}`" >
137      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
138        <Parameter id="DriveModes" severity="DEFAULT" reason="">
139          <Fixed value="CY_GPIO_DM_HIGHZ" />
140        </Parameter>
141      </Constraint>
142      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
143        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
144          <Fixed value="CY_GPIO_DM_HIGHZ" />
145        </Parameter>
146      </Constraint>
147      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
148    </ParamSignal>
149    <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." >
150      <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" />
151      <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" />
152      <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" />
153      <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" />
154    </ParamChoice>
155    <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}`" >
156      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
157        <Parameter id="DriveModes" severity="DEFAULT" reason="">
158          <Fixed value="CY_GPIO_DM_HIGHZ" />
159        </Parameter>
160      </Constraint>
161      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
162        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
163          <Fixed value="CY_GPIO_DM_HIGHZ" />
164        </Parameter>
165      </Constraint>
166      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
167    </ParamSignal>
168    <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." >
169      <Entry name="Rising Edge" value="CY_TCPWM_INPUT_RISINGEDGE" visible="true" />
170      <Entry name="Falling Edge" value="CY_TCPWM_INPUT_FALLINGEDGE" visible="true" />
171      <Entry name="Either Edge" value="CY_TCPWM_INPUT_EITHEREDGE" visible="true" />
172      <Entry name="Disabled" value="CY_TCPWM_INPUT_DISABLED" visible="true" />
173    </ParamChoice>
174    <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}`" >
175      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
176        <Parameter id="DriveModes" severity="DEFAULT" reason="">
177          <Fixed value="CY_GPIO_DM_HIGHZ" />
178        </Parameter>
179      </Constraint>
180      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
181        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
182          <Fixed value="CY_GPIO_DM_HIGHZ" />
183        </Parameter>
184      </Constraint>
185      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
186    </ParamSignal>
187
188    <!--Outputs-->
189    <ParamSignal port="tr_overflow[0]" name="Overflow" group="Outputs" visible="true" desc="This output goes high when the count value overflows from the period to zero.
190    Reload will also generate an Overflow when up counting." canBeEmpty="true" >
191      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
192        <Parameter id="DriveModes" severity="DEFAULT" reason="">
193          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
194        </Parameter>
195      </Constraint>
196      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
197        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
198          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
199        </Parameter>
200      </Constraint>
201      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
202    </ParamSignal>
203    <ParamSignal port="tr_underflow[0]" name="Underflow" group="Outputs" visible="true" desc="This output goes high when the count value rolls over from zero to the period value.
204    Reload will also generate an underflow event in down and up/down counting modes." canBeEmpty="true" >
205      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
206        <Parameter id="DriveModes" severity="DEFAULT" reason="">
207          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
208        </Parameter>
209      </Constraint>
210      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
211        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
212          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
213        </Parameter>
214      </Constraint>
215      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
216    </ParamSignal>
217    <ParamSignal port="tr_compare_match[0]" name="`${pCCeqCompare ? &quot;Compare (cc_match)&quot; : &quot;Capture (cc_match)&quot;}`" group="Outputs" visible="true" desc="`${pCCeqCompare ? &quot;This digital output goes high when the compare value equals the counter value.&quot; : &quot;This output goes high when a capture occurs.&quot;}`" canBeEmpty="true" >
218      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
219        <Parameter id="DriveModes" severity="DEFAULT" reason="">
220          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
221        </Parameter>
222      </Constraint>
223      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
224        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
225          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
226        </Parameter>
227      </Constraint>
228      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
229    </ParamSignal>
230
231    <!--Config-->
232    <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)." />
233
234    <!-- Peripheral clock divider connection -->
235    <ParamRange id="tcpwmInst" name="TCPWM Number" group="Internal" default="`${getInstNumber(&quot;tcpwm&quot;)}`" min="0" max="127" resolution="1" visible="false" editable="false" desc="" />
236    <ParamRange id="cntInst" name="CNT Number" group="Internal" default="`${getInstNumber(&quot;cnt&quot;)}`" min="0" max="31" resolution="1" visible="false" editable="false" desc="" />
237    <ParamString id="definePrefix" name="Define prefix" group="Internal" default="`${&quot;TCPWM&quot; . tcpwmInst . &quot;_CNT&quot; . cntInst}`" visible="false" editable="false" desc="" />
238    <ParamString id="defineInputDisabled" name="Define input disabled" group="Internal" default="`${INST_NAME . &quot;_INPUT_DISABLED &amp; 0x3U&quot;}`" visible="false" editable="false" desc="" />
239    <ParamString id="pclk" name="PCLK" group="Internal" default="`${getBlockFromSignal(&quot;clock[0]&quot;)}`" visible="false" editable="false" desc="Connected peripheral clock divider (PCLK)" />
240    <ParamBool id="pclkOk" name="PCLK Valid" group="Internal" default="`${hasConnection(&quot;clock&quot;, 0) &amp;&amp; isBlockUsed(pclk)}`" visible="false" editable="false" desc="Checks whether there is a PCLK connected and enabled" />
241    <ParamString id="pclkDst" name="PCLK Destination" group="Internal" default="PCLK_TCPWM`${tcpwmInst}`_CLOCKS`${cntInst}`" visible="false" editable="false" desc="" />
242
243  </Parameters>
244
245  <DRCs>
246    <!--Compare0 DRCs-->
247    <DRC type="ERROR" text="Compare0 (Compare) value must be less or equal to period." condition="`${pCCeqCompare &amp;&amp; (Compare0 &gt; Period)}`" paramId="Compare0" />
248
249    <!--Compare1 DRCs-->
250    <DRC type="ERROR" text="Compare1 value must be less or equal to period." condition="`${pCCeqCompare &amp;&amp; EnableCompareSwap &amp;&amp; (Compare1 &gt; Period)}`" paramId="Compare1" />
251  </DRCs>
252
253  <ConfigFirmware>
254    <ConfigInclude value="cy_tcpwm_counter.h" include="true" />
255    <ConfigInclude value="cy_sysclk.h" include="`${pclkOk}`" />
256    <ConfigInclude value="cycfg_routing.h" include="true" />
257    <ConfigInclude value="cyhal_hwmgr.h" include="true" guard="defined (CY_USING_HAL)" />
258
259    <ConfigDefine name="`${INST_NAME}`_HW" value="TCPWM`${tcpwmInst}`" public="true" include="true" />
260    <ConfigDefine name="`${INST_NAME}`_NUM" value="`${cntInst}`UL" public="true" include="true" />
261    <ConfigDefine name="`${INST_NAME}`_MASK" value="(1UL &lt;&lt; `${cntInst}`)" public="true" include="true" />
262    <ConfigDefine name="`${INST_NAME}`_IRQ" value="tcpwm_`${tcpwmInst}`_interrupts_`${cntInst}`_IRQn" public="true" include="`${InterruptSource ne CY_TCPWM_INT_NONE}`" />
263    <ConfigDefine name="`${INST_NAME}`_INPUT_DISABLED" value="0x7U" public="false" include="true" />
264    <ConfigStruct name="`${INST_NAME . &quot;_config&quot;}`" type="cy_stc_tcpwm_counter_config_t" const="`${inFlash}`" public="true" include="true" >
265      <Member name="period" value="`${Period}`" />
266      <Member name="clockPrescaler" value="`${ClockPrescaler}`" />
267      <Member name="runMode" value="`${RunMode}`" />
268      <Member name="countDirection" value="`${CountDirection}`" />
269      <Member name="compareOrCapture" value="`${CompareOrCapture}`" />
270      <Member name="compare0" value="`${Compare0}`" />
271      <Member name="compare1" value="`${Compare1}`" />
272      <Member name="enableCompareSwap" value="`${pCCeqCompare ? EnableCompareSwap : pCCeqCompare}`" />
273      <Member name="interruptSources" value="`${InterruptSource}`" />
274      <Member name="captureInputMode" value="`${CaptureInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : CaptureInput}`" />
275      <Member name="captureInput" value="`${CaptureInput eq CY_TCPWM_INPUT_DISABLED ? &quot;CY_TCPWM_INPUT_0&quot; : (definePrefix . &quot;_CAPTURE_VALUE&quot;)}`" />
276      <Member name="reloadInputMode" value="`${ReloadInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : ReloadInput}`" />
277      <Member name="reloadInput" value="`${ReloadInput eq CY_TCPWM_INPUT_DISABLED ? &quot;CY_TCPWM_INPUT_0&quot; : (definePrefix . &quot;_RELOAD_VALUE&quot;)}`" />
278      <Member name="startInputMode" value="`${StartInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : StartInput}`" />
279      <Member name="startInput" value="`${StartInput eq CY_TCPWM_INPUT_DISABLED ? &quot;CY_TCPWM_INPUT_0&quot; : (definePrefix . &quot;_START_VALUE&quot;)}`" />
280      <Member name="stopInputMode" value="`${StopInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : StopInput}`" />
281      <Member name="stopInput" value="`${StopInput eq CY_TCPWM_INPUT_DISABLED ? &quot;CY_TCPWM_INPUT_0&quot; : (definePrefix . &quot;_STOP_VALUE&quot;)}`" />
282      <Member name="countInputMode" value="`${CountInput eq CY_TCPWM_INPUT_DISABLED ? defineInputDisabled : CountInput}`" />
283      <Member name="countInput" value="`${CountInput eq CY_TCPWM_INPUT_DISABLED ? &quot;CY_TCPWM_INPUT_1&quot; : (definePrefix . &quot;_COUNT_VALUE&quot;)}`" />
284    </ConfigStruct>
285
286    <ConfigStruct name="`${INST_NAME}`_obj" type="cyhal_resource_inst_t" const="true" public="true" include="true" guard="defined (CY_USING_HAL)">
287      <Member name="type" value="CYHAL_RSC_TCPWM" />
288      <Member name="block_num" value="`${getInstNumber(&quot;tcpwm&quot;)}`U" />
289      <Member name="channel_num" value="`${getInstNumber(&quot;cnt&quot;)}`U" />
290    </ConfigStruct>
291
292    <ConfigInstruction value="Cy_SysClk_PeriphAssignDivider(`${pclkDst}`, `${getExposedMember(pclk, &quot;clockSel&quot;)}`);" include="`${pclkOk}`"  />
293    <ConfigInstruction value="cyhal_hwmgr_reserve(&amp;`${INST_NAME}`_obj);" include="true" guard="defined (CY_USING_HAL)" />
294  </ConfigFirmware>
295</Personality>
296