1<?xml version="1.0" encoding="utf-8"?>
2
3
4<!--****************************************************************************
5* \file uart.cypersonality
6* \version 3.0
7*
8* \brief
9* UART personality description file. It Supports CAT1A, CAT1B and CAT1C family of devices.
10*
11********************************************************************************
12* \copyright
13* Copyright 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="uart" name="UART" version="3.0" xmlns="http://cypress.com/xsd/cyhwpersonality_v7">
30  <Dependencies>
31    <IpBlock name="mxscb,mxscb_ver2_s40e,mxs22scb">
32         <Version major="1"/>
33         <Version major="2" />
34         <Version major="4" />
35      <Param name="UART" value="1" />
36    </IpBlock>
37    <Resource name="scb" />
38  </Dependencies>
39  <ExposedMembers />
40
41  <Parameters>
42    <!-- PDL documentation -->
43    <ParamDoc id="pdlDoc" name="Configuration Help" group="Overview" default="file:///`${cy_libs_path()}`/docs/pdl_api_reference_manual/html/group__group__scb__uart.html" linkText="Open UART (SCB) Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" />
44
45    <!-- Internal -->
46    <ParamString id="version" name="version number" group="Internal" default="`${getVersion()}`" visible="false" editable="false" desc="" />
47    <ParamString id="ipName" name="IP name" group="Internal" default="`${getIpBlockName()}`" visible="false" editable="false" desc="" />
48
49    <!-- General -->
50    <ParamChoice id="ComMode" name="Com Mode" group="General" default="CY_SCB_UART_STANDARD" visible="true" editable="true" desc="This parameter defines the sub-mode of UART as: Standard, SmartCard or IrDA.">
51      <Entry name="Standard"  value="CY_SCB_UART_STANDARD"  visible="true" />
52      <Entry name="SmartCard" value="CY_SCB_UART_SMARTCARD" visible="true" />
53      <Entry name="IrDA"      value="CY_SCB_UART_IRDA"      visible="true" />
54    </ParamChoice>
55    <ParamBool id="Standard" name="Standard" group="Internal" default="`${ComMode eq CY_SCB_UART_STANDARD}`" visible="false" editable="false" desc="This parameter defines SmartCard." />
56    <ParamBool id="SmartCard" name="SmartCard" group="Internal" default="`${ComMode eq CY_SCB_UART_SMARTCARD}`" visible="false" editable="false" desc="This parameter defines SmartCard." />
57    <ParamBool id="IrDA" name="IrDA" group="Internal" default="`${ComMode eq CY_SCB_UART_IRDA}`" visible="false" editable="false" desc="This parameter defines SmartCard." />
58
59    <ParamBool id="IrdaLowPower" name="Low Power Receiving" group="General" default="false" visible="`${IrDA}`" editable="true" desc="This parameter enables the low-power receiver option. Only applicable when Com Mode is IrDA."/>
60
61    <ParamRange id="BaudRate" name="Baud Rate (bps)" group="General" default="115200" min="1" max="8000000" resolution="1" visible="true" editable="true" desc="Baud rate that UART operates. Maximum baud rate is 8 Mbps in LP mode." />
62
63    <!--Oversample-->
64    <ParamChoice id="Oversample" name="Oversample" group="General" default="8" visible="`${!IrDA}`" editable="true" desc="This parameter defines how many SCB clocks oversample the selected baud rate.">
65      <Entry name="8"  value="8"  visible="true" />
66      <Entry name="9"  value="9"  visible="true" />
67      <Entry name="10" value="10" visible="true" />
68      <Entry name="11" value="11" visible="true" />
69      <Entry name="12" value="12" visible="true" />
70      <Entry name="13" value="13" visible="true" />
71      <Entry name="14" value="14" visible="true" />
72      <Entry name="15" value="15" visible="true" />
73      <Entry name="16" value="16" visible="true" />
74    </ParamChoice>
75
76    <ParamRange id="IrDAOversample" name="Oversample" group="General" default="16" min="16" max="16" resolution="1" visible="`${IrDA &amp;&amp; !IrdaLowPower}`" editable="false" desc="This parameter defines how many SCB clocks oversample the selected baud rate."/>
77
78    <ParamRange id="IrDALpOversample" name="Oversample" group="General" default="`${(BaudRate eq 1200) ? 1536 : (BaudRate eq 2400) ? 768 : (BaudRate eq 9600) ? 192 : (BaudRate eq 19200) ? 96 : (BaudRate eq 38400) ? 48 : (BaudRate eq 57600) ? 32 : 16}`" min="16" max="1536" resolution="1" visible="`${IrDA &amp;&amp; IrdaLowPower}`" editable="false" desc="This parameter defines how many SCB clocks oversample the selected baud rate."/>
79
80    <ParamString id="IrDAOversampleDefine" name="IrDAOversampleDefine" group="General" default="`${(BaudRate eq 1200) ? &quot;CY_SCB_UART_IRDA_LP_OVS1536&quot; : (BaudRate eq 2400) ?  &quot;CY_SCB_UART_IRDA_LP_OVS768&quot; : (BaudRate eq 9600) ?  &quot;CY_SCB_UART_IRDA_LP_OVS192&quot; : (BaudRate eq 19200) ? &quot;CY_SCB_UART_IRDA_LP_OVS96&quot; : (BaudRate eq 38400) ? &quot;CY_SCB_UART_IRDA_LP_OVS48&quot; : (BaudRate eq 57600) ? &quot;CY_SCB_UART_IRDA_LP_OVS32&quot; :  &quot;CY_SCB_UART_IRDA_LP_OVS16&quot;}`" visible="false" editable="false" desc="This parameter provides define for oversample in IrDA low receiver power mode."/>
81
82    <ParamRange id="OversampleFinal" name="OversampleFinal" group="Internal" default="`${(Standard || SmartCard) ? Oversample : (IrDA &amp;&amp; !IrdaLowPower) ? IrDAOversample : IrDALpOversample}`" min="1" max="1536" resolution="1" visible="false" editable="false" desc="This parameter defines how many SCB clocks oversample the selected baud rate."/>
83
84    <ParamChoice id="BitsOrder" name="Bit Order" group="General" default="CY_SCB_UART_LSB_FIRST" visible="true" editable="true" desc="This parameter defines the direction in which the serial data is transmitted. When set to the MSB first, the most-significant bit is transmitted first. When set to the LSB first, the least-significant bit is transmitted first.">
85      <Entry name="MSB First" value="CY_SCB_UART_MSB_FIRST" visible="true" />
86      <Entry name="LSB First" value="CY_SCB_UART_LSB_FIRST" visible="true" />
87    </ParamChoice>
88    <ParamChoice id="DataWidth" name="Data Width" group="General" default="8" visible="true" editable="true" desc="This option defines the width of a single data element in bits. The range: 5-9.">
89      <Entry name="5 bits" value="5" visible="true" />
90      <Entry name="6 bits" value="6" visible="true" />
91      <Entry name="7 bits" value="7" visible="true" />
92      <Entry name="8 bits" value="8" visible="true" />
93      <Entry name="9 bits" value="9" visible="true" />
94    </ParamChoice>
95    <ParamChoice id="ParityType" name="Parity" group="General" default="CY_SCB_UART_PARITY_NONE" visible="`${Standard &amp;&amp; (DataWidth ne 9)}`" editable="true" desc="This parameter defines the functionality of the parity bit location in the transfer as None, Odd or Even.">
96      <Entry name="Even" value="CY_SCB_UART_PARITY_EVEN" visible="true" />
97      <Entry name="Odd"  value="CY_SCB_UART_PARITY_ODD"  visible="true" />
98      <Entry name="None" value="CY_SCB_UART_PARITY_NONE" visible="true" />
99    </ParamChoice>
100    <ParamBool id="MultiProcParityCheck" name="Parity" group="General" default="`${Standard &amp;&amp; (DataWidth eq 9)}`" visible="false" editable="false" desc="" />
101    <ParamString id="MultiProcParity" name="Parity" group="General" default="None" visible="`${MultiProcParityCheck}`" editable="false" desc="Multi Processor Mode supports Parity = None" />
102    <ParamString id="SmartCardParity" name="Parity" group="General" default="Even" visible="`${SmartCard}`" editable="false" desc="SmartCard supports Parity = Even" />
103    <ParamString id="IrdaCardParity"  name="Parity" group="General" default="None" visible="`${IrDA}`" editable="false" desc="IrDA supports Parity = None" />
104    <ParamChoice id="StopBits" name="Stop Bits" group="General" default="CY_SCB_UART_STOP_BITS_1" visible="`${!SmartCard}`" editable="true" desc="This parameter defines the number of stop bits.">
105      <Entry name="1 bit"    value="CY_SCB_UART_STOP_BITS_1"   visible="true" />
106      <Entry name="1.5 bits" value="CY_SCB_UART_STOP_BITS_1_5" visible="true" />
107      <Entry name="2 bits"   value="CY_SCB_UART_STOP_BITS_2"   visible="true" />
108      <Entry name="2.5 bits" value="CY_SCB_UART_STOP_BITS_2_5" visible="true" />
109      <Entry name="3 bits"   value="CY_SCB_UART_STOP_BITS_3"   visible="true" />
110      <Entry name="3.5 bits" value="CY_SCB_UART_STOP_BITS_3_5" visible="true" />
111      <Entry name="4 bits"   value="CY_SCB_UART_STOP_BITS_4"   visible="true" />
112    </ParamChoice>
113    <ParamString id="SmartCardStopBits" name="Stop Bits" group="General" default="2 bits" visible="`${SmartCard}`" editable="false" desc="SmartCard supports Stop Bits = 2 bits." />
114
115    <!-- EnableInputFilter -->
116    <ParamBool id="EnableInputFilter" name="Enable Digital Filter" group="General" default="`${false}`" visible="`${ComMode ne CY_SCB_UART_IRDA}`" editable="true" desc="This parameter applies a digital 3-tap median filter to the UART input lines." />
117    <ParamBool id="IrDAInputFilter" name="Enable Digital Filter" group="General" default="`${true}`" visible="`${IrDA}`" editable="false" desc="IrDA mode always enables digital filter." />
118
119    <!-- Support RS-485 -->
120    <ParamBool id="EnableTxEn" name="TX-Enable" group="Support RS-485" default="false" visible="`${!SmartCard}`" editable="true" desc="This parameter enables TX_EN output." />
121
122    <!-- Hardware buffer size (defines FIFO size) -->
123    <ParamRange id="hwBufferSize" name="Hardware Buffer Size" group="Internal" default="`${lookupExpression(&quot;EZ_DATA_NR&quot;)}`" min="0" max="512" resolution="1" visible="false" editable="false" desc="Hardware buffer size." />
124    <ParamRange id="FifoLevelByte" name="FIFO Level (Byte)" group="Internal" default="`${(hwBufferSize / 2) - 1}`" min="1" max="512" resolution="1" visible="false" editable="false" desc="FIFO Level for byte entry." />
125    <ParamRange id="FifoLevelHalfword" name="FIFO Level (Halfword)" group="Internal" default="`${(hwBufferSize / 4) - 1}`" min="1" max="512" resolution="1" visible="false" editable="false" desc="FIFO Level for byte entry." />
126    <ParamRange id="FifoLevelMax" name="FIFO Level Max" group="Internal" default="`${(DataWidth &lt;= 8) ? FifoLevelByte : FifoLevelHalfword}`" min="1" max="512" resolution="1" visible="false" editable="false" desc="FIFO Level for byte entry." />
127
128    <!--Flow Control-->
129    <ParamBool id="FlowControl" name="Enable Flow Control" group="Flow Control" default="false" visible="`${!SmartCard}`" editable="true" desc="This parameter enables the cts input." />
130    <ParamChoice id="CtsPolarity" name="CTS Polarity" group="Flow Control" default="CY_SCB_UART_ACTIVE_LOW" visible="`${!SmartCard}`" editable="true" desc="This parameter defines the active polarity of the CTS output signal as Active Low or Active High.">
131      <Entry name="Active Low" value="CY_SCB_UART_ACTIVE_LOW" visible="true" />
132      <Entry name="Active High" value="CY_SCB_UART_ACTIVE_HIGH" visible="true" />
133    </ParamChoice>
134    <ParamChoice id="RtsPolarity" name="RTS Polarity" group="Flow Control" default="CY_SCB_UART_ACTIVE_LOW" visible="`${!SmartCard}`" editable="true" desc="This parameter defines the active polarity of the RTS output signal as Active Low or Active High.">
135      <Entry name="Active Low" value="CY_SCB_UART_ACTIVE_LOW" visible="true" />
136      <Entry name="Active High" value="CY_SCB_UART_ACTIVE_HIGH" visible="true" />
137    </ParamChoice>
138    <ParamRange id="RtsTriggerLevel" name="RTS Activation Level" group="Flow Control" default="63" min="0" max="`${FifoLevelMax}`" resolution="1" visible="`${!SmartCard}`" editable="true" desc="This parameter determines the behavior of the RTS signal as follows: while the RX FIFO has fewer entries than the RTS Active When, the signal remains active; otherwise, the signal becomes inactive. The range: 0 – `${FifoLevelByte}` (when Data Width is less than or equal 8), and 0 - `${FifoLevelHalfword}` otherwise." />
139
140    <ParamString id="Tx_out_descr" name="tx_out description" group="Internal" default="The transmitter output drives the output serial data to another device on the serial bus." visible="false" editable="false" desc="tx_out description" />
141    <ParamString id="Rx_tx_out_descr" name="rx_tx_out description" group="Internal" default="The receive and transmit output receives and transmits data from/to another device on the bus. This pin presents if the Com Mode parameter is SmartCard. Note that Drive Mode of the connected pin must be Open Drain Drives Low." visible="false" editable="false" desc="rx_tx_out description" />
142
143    <ParamString id="Rts_out_descr" name="rts_out description" group="Internal" default="The request to send output notifies another device that this device is ready to receive data." visible="false" editable="false" desc="rts_out description" />
144    <ParamString id="Tx_out_en_descr" name="tx_out_en description" group="Internal" default="The transmitter enable keeps the output level high during serial data transfer." visible="false" editable="false" desc="tx_out_en description" />
145
146    <!-- Clock Constraint -->
147    <ParamRange id="uartClkHz" name="uartClkHz" group="Internal" default="`${BaudRate * OversampleFinal}`" min="0" max="400000000" resolution="1" visible="false" editable="false" desc="SCB UART clock to operate with desired baud rate." />
148
149    <ParamString id="hfclockperi" name="PCLK Destination Clock" group="Internal" default="srss[0].clock[0].periclk[0]" visible="false" editable="false" desc="String variable used for source peri clock." />
150    <ParamString id="hfclock1" name="PCLK Destination Clock" group="Internal" default="srss[0].clock[0].hfclk[1]" visible="false" editable="false" desc="String variable used for source HF clock1." />
151    <ParamString id="hfclock2" name="PCLK Destination Clock" group="Internal" default="srss[0].clock[0].hfclk[2]" visible="false" editable="false" desc="String variable used for source HF clock2." />
152
153    <ParamString id="hfclocksource" name="PCLK Destination" group="Internal" default="`${((ipName ne &quot;mxs22scb&quot;) ? ((version eq 1)  ? hfclockperi : ((version eq 4) ? hfclock1 : hfclock2)) : hfclock1) }`" visible="false" editable="false" desc="Generates PCLK connection define." />
154
155    <ParamRange  id="clkPeriHz" name="clkPeriHz" group="Internal" default="`${getExposedMember(hfclocksource, &quot;frequency&quot;)}`" min="0" max="400000000" resolution="1" visible="false" editable="false" desc="Clk_Peri frequency." />
156    <ParamRange  id="uartDiv" name="uartDiv" group="Internal" default="`${clkPeriHz / cast(float, uartClkHz)}`" min="1" max="16777216" resolution="1" visible="false" editable="false" desc="UART pclk divider value." />
157    <ParamBool id="useUartDiv8" name="useUartDiv8" group="Internal" default="`${(uartDiv &lt;= pow(2, 8))}`" visible="false" editable="false" desc="Checks whether 8-bit divider can be used for UART operation." />
158
159    <ParamSignal port="clock[0]" name="Clock" group="Connections" visible="`${hasVisibleOption(&quot;clock[0]&quot;)}`" desc="Clock that operates this block." canBeEmpty="false" >
160      <Constraint type="ACCEPT" targetLocation="peri\[\d+\](\.group\[\d+\])?\.div_8.*" valid="`${useUartDiv8}`" >
161        <Parameter id="intDivider" severity="ERROR" reason="Clock frequency does not match desired `${uartClkHz / 1000.0}` kHz.">
162          <Fixed
163            value="`${((getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) - floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) >= 0.5) ? ceil(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) : floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz)}`" />
164        </Parameter>
165      </Constraint>
166      <Constraint type="ACCEPT" targetLocation="peri\[\d+\](\.group\[\d+\])?\.div_16\[.*" valid="true" >
167        <Parameter id="intDivider" severity="ERROR" reason="Clock frequency does not match desired `${uartClkHz / 1000.0}`kHz." >
168          <Fixed
169            value="`${((getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) - floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) >= 0.5) ? ceil(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) : floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz)}`" />
170        </Parameter>
171      </Constraint>
172      <Constraint type="ACCEPT" targetLocation="peri\[\d+\](\.group\[\d+\])?\.div_(16.5|24.5).*" valid="true" >
173        <Parameter id="intDivider" severity="ERROR" reason="Update integer divider. Clock frequency does not match desired `${uartClkHz / 1000.0}`kHz." >
174          <Fixed
175            value="`${floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / cast(float, uartClkHz))}`" />
176        </Parameter>
177        <Parameter id="fracDivider" severity="ERROR" reason="Update fractional divider. Clock frequency does not match desired `${uartClkHz / 1000.0}`kHz." >
178          <Fixed
179            value="`${((((getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) - floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz)) * 32.0) - floor(((getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) - floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz)) * 32.0) >= 0.5) ? (ceil(((getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) - floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz)) * 32.0) == 32 ? 31 : ceil(((getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) - floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz)) * 32.0)) : floor(((getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) - floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz)) * 32.0)}`" />
180        </Parameter>
181      </Constraint>
182      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
183    </ParamSignal>
184
185    <ParamSignal port="clock_scb_en[0]" name="Clock" group="Connections" visible="`${hasVisibleOption(&quot;clock_scb_en[0]&quot;)}`" desc="Clock that operates this block." canBeEmpty="false" >
186      <Constraint type="ACCEPT" targetLocation="peri\[\d+\](\.group\[\d+\])?\.div_8.*" valid="`${useUartDiv8}`" >
187        <Parameter id="intDivider" severity="ERROR" reason="Clock frequency does not match desired `${uartClkHz / 1000.0}` kHz.">
188          <Fixed
189            value="`${((getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) - floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) >= 0.5) ? ceil(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) : floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz)}`" />
190        </Parameter>
191      </Constraint>
192      <Constraint type="ACCEPT" targetLocation="peri\[\d+\](\.group\[\d+\])?\.div_16\[.*" valid="true" >
193        <Parameter id="intDivider" severity="ERROR" reason="Clock frequency does not match desired `${uartClkHz / 1000.0}`kHz." >
194          <Fixed
195            value="`${((getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) - floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) >= 0.5) ? ceil(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) : floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz)}`" />
196        </Parameter>
197      </Constraint>
198      <Constraint type="ACCEPT" targetLocation="peri\[\d+\](\.group\[\d+\])?\.div_(16.5|24.5).*" valid="true" >
199        <Parameter id="intDivider" severity="ERROR" reason="Update integer divider. Clock frequency does not match desired `${uartClkHz / 1000.0}`kHz." >
200          <Fixed
201            value="`${floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / cast(float, uartClkHz))}`" />
202        </Parameter>
203        <Parameter id="fracDivider" severity="ERROR" reason="Update fractional divider. Clock frequency does not match desired `${uartClkHz / 1000.0}`kHz." >
204          <Fixed
205            value="`${((((getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) - floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz)) * 32.0) - floor(((getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) - floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz)) * 32.0) >= 0.5) ? (ceil(((getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) - floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz)) * 32.0) == 32 ? 31 : ceil(((getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) - floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz)) * 32.0)) : floor(((getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz) - floor(getExposedMember(&quot;REF_LOCATION&quot;, &quot;frequency&quot;) * getExposedMember(&quot;REF_LOCATION&quot;, &quot;divider&quot;) / uartClkHz)) * 32.0)}`" />
206        </Parameter>
207      </Constraint>
208      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
209    </ParamSignal>
210
211    <ParamString id="sourceClock" name="sourceClock" group="Internal" default="`${(hasVisibleOption(&quot;clock[0]&quot;)) ? (getBlockFromSignal(&quot;clock[0]&quot;)) : (getBlockFromSignal(&quot;clock_scb_en[0]&quot;))}`" visible="false" editable="false" desc="Source Clock Resource" />
212    <ParamRange  id="scbClkHz" name="scbClkHz" group="Internal" default="`${(sourceClock ne &quot;&quot;) ? getExposedMember(sourceClock, &quot;frequency&quot;) : &quot;1&quot;}`" min="0" max="200000000" resolution="1" visible="false" editable="false" desc="SCB clock frequency in kHz" />
213    <ParamBool id="pClkDiv8" name="pClkDiv8" group="Internal" default="`${getExposedMember(sourceClock, &quot;type&quot;) eq &quot;CY_SYSCLK_DIV_8_BIT&quot;}`" visible="false" editable="false" desc="Source clock uses 8-bit divider." />
214
215    <ParamSignal port="uart_rx[0]" name="RX" group="Connections" visible="`${!SmartCard &amp;&amp; hasVisibleOption(&quot;uart_rx[0]&quot;)}`" desc="The receive input receives the serial data from another device on the serial bus." canBeEmpty="true">
216      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="`${!SmartCard}`" >
217        <Parameter id="DriveModes" severity="DEFAULT" reason="">
218          <Fixed value="CY_GPIO_DM_HIGHZ" />
219        </Parameter>
220      </Constraint>
221      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="`${!SmartCard}`" >
222        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
223          <Fixed value="CY_GPIO_DM_HIGHZ" />
224        </Parameter>
225      </Constraint>
226      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
227    </ParamSignal>
228
229    <ParamSignal port="uart_cts[0]" name="`${EnableTxEn ? &quot;TX_EN&quot; : &quot;CTS&quot;}`" group="Connections" visible="`${!SmartCard &amp;&amp; (FlowControl || EnableTxEn)  &amp;&amp; hasVisibleOption(&quot;uart_cts[0]&quot;)}`" desc="The clear to send input accepts notification that another device is ready to receive data." canBeEmpty="true">
230      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="`${!SmartCard &amp;&amp; (FlowControl || EnableTxEn)}`" >
231        <Parameter id="DriveModes" severity="DEFAULT" reason="">
232          <Fixed value="`${EnableTxEn ? &quot;CY_GPIO_DM_STRONG_IN_OFF&quot; : &quot;CY_GPIO_DM_HIGHZ&quot;}`" />
233        </Parameter>
234      </Constraint>
235      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="`${!SmartCard &amp;&amp; (FlowControl || EnableTxEn)}`" >
236        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
237          <Fixed value="`${EnableTxEn ? &quot;CY_GPIO_DM_STRONG_IN_OFF&quot; : &quot;CY_GPIO_DM_HIGHZ&quot;}`" />
238        </Parameter>
239      </Constraint>
240      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
241    </ParamSignal>
242
243    <ParamSignal port="uart_tx[0]" name="`${SmartCard ? &quot;RX_TX&quot; : &quot;TX&quot;}`" group="Connections" visible="`${hasVisibleOption(&quot;uart_tx[0]&quot;)}`" desc="`${SmartCard ? Rx_tx_out_descr : Tx_out_descr}`" canBeEmpty="`${!SmartCard}`">
244      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
245        <Parameter id="DriveModes" severity="DEFAULT" reason="">
246          <Fixed value="`${SmartCard ? &quot;CY_GPIO_DM_OD_DRIVESLOW&quot; : &quot;CY_GPIO_DM_STRONG_IN_OFF&quot;}`" />
247        </Parameter>
248      </Constraint>
249      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
250        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
251          <Fixed value="`${SmartCard ? &quot;CY_GPIO_DM_OD_DRIVESLOW&quot; : &quot;CY_GPIO_DM_STRONG_IN_OFF&quot;}`" />
252        </Parameter>
253      </Constraint>
254      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
255    </ParamSignal>
256
257    <ParamSignal port="uart_rts[0]" name="RTS" group="Connections" visible="`${!SmartCard &amp;&amp; FlowControl &amp;&amp; hasVisibleOption(&quot;uart_rts[0]&quot;)}`" desc="`${Rts_out_descr}`" canBeEmpty="true">
258      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="`${!SmartCard &amp;&amp; FlowControl}`" >
259        <Parameter id="DriveModes" severity="DEFAULT" reason="">
260          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
261        </Parameter>
262      </Constraint>
263      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="`${!SmartCard &amp;&amp; FlowControl}`" >
264        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
265          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
266        </Parameter>
267      </Constraint>
268      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
269    </ParamSignal>
270
271    <ParamSignal port="tr_rx_req[0]" name="RX Trigger Output" group="Connections" visible="`${hasVisibleOption(&quot;uart_rx[0]&quot;)}`" desc="Connects SCB RX trigger output to the DMA. Configure RX FIFO Level to define this output behavior." canBeEmpty="true" >
272      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
273        <Parameter id="DriveModes" severity="DEFAULT" reason="">
274          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
275        </Parameter>
276      </Constraint>
277     <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
278        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
279          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
280        </Parameter>
281      </Constraint>
282      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
283    </ParamSignal>
284    <ParamSignal port="tr_tx_req[0]" name="TX Trigger Output" group="Connections" visible="`${hasVisibleOption(&quot;uart_tx[0]&quot;)}`" desc="Connects SCB TX trigger output to the DMA. Configure TX FIFO Level to define this output behavior." canBeEmpty="true" >
285      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
286        <Parameter id="DriveModes" severity="DEFAULT" reason="">
287          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
288        </Parameter>
289      </Constraint>
290      <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" >
291        <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected.">
292          <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" />
293        </Parameter>
294      </Constraint>
295      <Constraint type="ACCEPT" targetLocation=".*" valid="true" />
296    </ParamSignal>
297
298    <!--Baud Rate-->
299    <ParamRange id="actualBaudRate" name="Actual Baud Rate (bps)" group="Actual Baud Rate" default="`${scbClkHz/OversampleFinal}`" min="0" max="4294967295" resolution="1" visible="true" editable="false" desc="The actual baud rate displays the baud rate at which the UART operates with current settings." />
300    <ParamRange id="BaudRateAccuracy" name="Baud Rate Accuracy (%)" group="Actual Baud Rate" default="`${(sourceClock ne &quot;&quot;) ? ((abs(BaudRate - actualBaudRate) / BaudRate) * 100) : ((abs(BaudRate) / BaudRate) * 100)}`" min="0" max="200000000" resolution="0.001" visible="true" editable="false" desc="Deviation of actual baud rate from desired baud rate (does not include Clk_Peri accuracy)." />
301    <ParamString id="ClkFreq" name="Clock Frequency" group="Actual Baud Rate" default="`${(scbClkHz &lt; 1000000) ? (scbClkHz / 1000.0) . &quot; kHz&quot; : (scbClkHz / 1000000.0) . &quot; MHz&quot;}`" visible="true" editable="false" desc="Frequency of the connected clock" />
302
303    <ParamRange id="RxTriggerLevel" name="RX FIFO Level" group="Trigger Level" default="63" min="0" max="`${FifoLevelMax}`" resolution="1" visible="true" editable="true" desc="This parameter determines the behavior of the signal which drives the RX FIFO Above Level interrupt source and the RX Trigger Output as follows: the signal remains active until the number of data elements in the RX FIFO is greater than the value of the RX FIFO Level. For example, the RX FIFO has 8 data elements and the RX FIFO level is 0. The signal remains active until all data elements are read from the RX FIFO. The range: 0 – `${FifoLevelByte}` (when Data Width is less or equal 8), and 0 - `${FifoLevelHalfword}` otherwise." />
304
305    <ParamRange id="TxTriggerLevel" name="TX FIFO Level" group="Trigger Level" default="63" min="0" max="`${FifoLevelMax}`" resolution="1" visible="true" editable="true" desc="This parameter determines the behavior of the signal which drives the TX FIFO below-level interrupt source and TX Trigger Output as follows: until the number of data elements in the TX FIFO is less than the value of TX FIFO level. For example, the TX FIFO has 0 data elements (empty) and the TX FIFO level is 7. The signal remains active until TX FIFO has 7 data elements. The range: 0 – `${FifoLevelByte}` (when Data Width is less or equal 8), and 0 - `${FifoLevelHalfword}` otherwise." />
306
307    <!--Multi Processor Mode-->
308    <ParamBool id="MultiProc" name="Enable Multi Processor Mode" group="Multi Processor Mode" default="false" visible="`${!SmartCard}`" editable="true" desc="This parameter enables the UART multi-processor mode. Only applicable when Com Mode is Standard." />
309    <ParamRange id="MpRxAddress" name="Address" group="Multi Processor Mode" default="0" min="0" max="255" resolution="1" visible="`${!SmartCard}`" editable="true" desc="This parameter specifies the UART address. Only applicable when the Enable Multi Processor Mode parameter is true." />
310    <ParamRange id="MpRxAddressMask" name="Mask" group="Multi Processor Mode" default="255" min="0" max="255" resolution="1" visible="`${!SmartCard}`" editable="true" desc="This parameter specifies the UART address mask. Only applicable when the Enable Multi Processor Mode parameter is true.
311    - Bit value 0 – excludes a bit from the address comparison.
312    - Bit value 1 – the bit needs to match with the corresponding bit of the UART address." />
313    <ParamBool id="MpRxAcceptAddress" name="Accept Matching Address in RX FIFO" group="Multi Processor Mode" default="false" visible="`${!SmartCard}`" editable="true" desc="This parameter determines whether to put the matched UART address into the RX FIFO. Only applicable when the Enable Multi Processor Mode parameter is true." />
314
315    <!-- Drop options -->
316    <ParamBool id="DropOnFrameErr" name="Drop on Frame Error" group="Advanced" default="false" visible="true" editable="true" desc="This parameter determines if the data is dropped from the RX FIFO on a frame error event." />
317    <ParamBool id="DropOnParityErr" name="Drop on Parity Error" group="Advanced" default="false" visible="true" editable="true" desc="This parameter determines if the data is dropped from the RX FIFO on a parity error event." />
318
319    <!--Break Width-->
320    <ParamRange id="BreakSignalBits" name="Break Signal Bits" group="Advanced" default="11" min="7" max="16" resolution="1" visible="`${Standard}`" editable="true" desc="This parameter specifies the break width in bits. The range: 7-16." />
321
322    <!--Break Level-->
323    <ParamChoice id="BreakLevel" name="Break Level" group="Advanced" default="0" visible="`${(((version &gt; 1) || (ipName eq &quot;mxs22scb&quot;)) &amp;&amp; (Standard))}`" editable="true" desc="This parameter specifies the low or high level pulse detection for break condition.">
324      <Entry name="Low Level Pulse Detection" value="0" visible="true" />
325      <Entry name="High Level Pulse Detection" value="1" visible="true" />
326    </ParamChoice>
327
328    <!--Smart Card-->
329    <ParamBool id="SmCardRetryOnNack" name="Retry on Nack" group="Advanced" default="false" visible="`${SmartCard}`" editable="true" desc="This parameter defines whether to send a message again when a NACK response is received. Only applicable when Com Mode is SmartCard." />
330
331    <!--IrDA-->
332    <ParamChoice id="IrdaPolarity" name="Invert RX" group="Advanced" default="NON_INVERTING" visible="`${IrDA}`" editable="true" desc="This parameter enables the inversion of the incoming RX line signal. Only applicable when Com Mode is IrDA.">
333      <Entry name="Non-Inverting" value="NON_INVERTING" visible="true" />
334      <Entry name="Inverting" value="INVERTING" visible="true" />
335    </ParamChoice>
336
337    <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)." />
338
339    <!-- API Mode -->
340    <ParamChoice id="ApiMode" name="API Mode" group="API Mode" default="HIGH_LEVEL" visible="true" editable="true" desc="This parameter defines which API set will be used during driver operation. High Level means driver controls interrupt sources and Cy_SCB_UART_Interrupt function must be called in the interrupt handler hooked to NVIC. Low Level means that the user configures interrupt sources and implements own interrupt handler or do not use interrupt at all.">
341      <Entry name="High Level" value="HIGH_LEVEL" visible="true" />
342      <Entry name="Low Level"  value="LOW_LEVEL"  visible="true" />
343    </ParamChoice>
344    <ParamBool id="ConfigIntr" name="ConfigIntr" group="Internal" default="`${ApiMode eq LOW_LEVEL}`" visible="false" editable="false" desc="This parameter specifies the visibility of all RX Interrupt Sources parameter." />
345
346    <!--RX Interrupt Sources-->
347    <ParamBool id="IntrRxNotEmpty" name="RX FIFO not Empty" group="RX Interrupt Sources" default="false" visible="`${ConfigIntr}`" editable="true" desc="This parameter enables the RX FIFO not-empty interrupt source to trigger the interrupt output." />
348    <ParamBool id="IntrRxFull" name="RX FIFO Full" group="RX Interrupt Sources" default="false" visible="`${ConfigIntr}`" editable="true" desc="This parameter enables the RX FIFO full interrupt source to trigger the interrupt output." />
349    <ParamBool id="IntrRxOverflow" name="RX FIFO Overflow" group="RX Interrupt Sources" default="false" visible="`${ConfigIntr}`" editable="true" desc="This parameter enables the RX FIFO overflow interrupt source to trigger the interrupt output." />
350    <ParamBool id="IntrRxUnderflow" name="RX FIFO Underflow" group="RX Interrupt Sources" default="false" visible="`${ConfigIntr}`" editable="true" desc="This parameter enables the RX FIFO underflow interrupt source to trigger the interrupt output." />
351    <ParamBool id="IntrRxFrameErr" name="RX Frame Error" group="RX Interrupt Sources" default="false" visible="`${ConfigIntr}`" editable="true" desc="This parameter enables the RX frame error interrupt source to trigger the interrupt output." />
352    <ParamBool id="IntrRxParityErr" name="RX Parity Error" group="RX Interrupt Sources" default="false" visible="`${ConfigIntr &amp;&amp; (ParityType ne CY_SCB_UART_PARITY_NONE) &amp;&amp; (!IrDA) &amp;&amp; (!MultiProcParityCheck)}`" editable="true" desc="This parameter enables the RX parity error interrupt source to trigger the interrupt output." />
353    <ParamBool id="IntrRxBreakDetected" name="Break Detected" group="RX Interrupt Sources" default="false" visible="`${ConfigIntr}`" editable="true" desc="This parameter enables the RX break detection interrupt source to trigger the interrupt output." />
354    <ParamBool id="IntrRxTrigger" name="RX FIFO Above Level" group="RX Interrupt Sources" default="false" visible="`${ConfigIntr}`" editable="true" desc="This parameter enables the RX FIFO above-level interrupt source to trigger the interrupt output." />
355
356    <ParamRange id="RxIntrMask" name="RxIntrMask" group="RX Interrupt Sources" default="`${ConfigIntr ? (IntrRxTrigger ? 0x1 : 0) + (IntrRxNotEmpty ? 0x4 : 0) + (IntrRxFull ? 0x08 : 0) + (IntrRxOverflow ? 0x20 : 0) + (IntrRxUnderflow ? 0x40 : 0) + (IntrRxFrameErr ? 0x100 : 0) + (((ParityType ne CY_SCB_UART_PARITY_NONE) &amp;&amp; IntrRxParityErr) ? 0x200 : 0) + (IntrRxBreakDetected ? 0x800 : 0) : 0}`" min="0" max="4294967295" resolution="1" visible="false" editable="false" desc="This parameter defines the RX interrupt mask to be written into the SCB.INTR_RX_MASK register." />
357
358    <!--TX Interrupt Sources-->
359    <ParamBool id="IntrTxUartDone" name="UART Done" group="TX Interrupt Sources" default="false" visible="`${ConfigIntr}`" editable="true" desc="This parameter enables the UART done interrupt source to trigger the interrupt output." />
360    <ParamBool id="IntrTxUartLostArb" name="TX Lost Arbitration" group="TX Interrupt Sources" default="false" visible="`${ConfigIntr &amp;&amp; SmartCard}`" editable="true" desc="This parameter enables the TX lost arbitration interrupt source to trigger the interrupt output." />
361    <ParamBool id="IntrTxUartNack" name="TX NACK" group="TX Interrupt Sources" default="false" visible="`${ConfigIntr &amp;&amp; SmartCard}`" editable="true" desc="This parameter enables the TX NACK interrupt source to trigger the interrupt output." />
362    <ParamBool id="IntrTxEmpty" name="TX FIFO Empty" group="TX Interrupt Sources" default="false" visible="`${ConfigIntr}`" editable="true" desc="This parameter enables the TX FIFO empty interrupt source to trigger the interrupt output." />
363    <ParamBool id="IntrTxNotFull" name="TX FIFO not Full" group="TX Interrupt Sources" default="false" visible="`${ConfigIntr}`" editable="true" desc="This parameter enables the TX FIFO not-full interrupt source to trigger the interrupt output." />
364    <ParamBool id="IntrTxOverflow" name="TX FIFO Overflow" group="TX Interrupt Sources" default="false" visible="`${ConfigIntr}`" editable="true" desc="This parameter enables the TX FIFO overflow interrupt source to trigger the interrupt output." />
365    <ParamBool id="IntrTxUnderflow" name="TX FIFO Underflow" group="TX Interrupt Sources" default="false" visible="`${ConfigIntr}`" editable="true" desc="This parameter enables the TX FIFO underflow interrupt source to trigger the interrupt output." />
366    <ParamBool id="IntrTxTrigger" name="TX FIFO Below Level" group="TX Interrupt Sources" default="false" visible="`${ConfigIntr}`" editable="true" desc="This parameter enables the TX FIFO below-level interrupt source to trigger the interrupt output." />
367
368    <ParamRange id="TxIntrMask" name="Tx Intr Masks" group="TX Interrupt Sources" default="`${ConfigIntr ? (IntrTxTrigger ?  0x1 : 0) + (IntrTxNotFull ?  0x2 : 0) + (IntrTxEmpty ? 0x10 : 0) + (IntrTxOverflow ? 0x20 : 0) + (IntrTxUnderflow ?  0x40 : 0) + (IntrTxUartDone ? 0x200 : 0) + (((SmartCard) &amp;&amp; IntrTxUartNack) ? 0x100 : 0) + (((SmartCard) &amp;&amp; IntrTxUartLostArb) ? 0x400 : 0) : 0}`" min="0" max="4294967295" resolution="1" visible="false" editable="false" desc="This parameter defines the TX interrupt mask to be written into the SCB.INTR_TX_MASK register." />
369
370    <!-- SCB instance number -->
371    <ParamString id="InstNumber" name="InstNumber" group="Internal" default="`${getInstNumber(&quot;scb&quot;)}`" visible="false" editable="false" desc="SCB Instance name number." />
372
373    <!-- Peripheral clock divider connection -->
374    <ParamBool id="pclkOk" name="PCLK Valid" group="Internal" default="`${(hasVisibleOption(&quot;clock[0]&quot;)) ? (hasConnection(&quot;clock&quot;, 0) &amp;&amp; isBlockUsed(sourceClock)) : (hasConnection(&quot;clock_scb_en&quot;, 0) &amp;&amp; isBlockUsed(sourceClock)) }`" visible="false" editable="false" desc="Checks whether there is a PCLK connected and enabled." />
375
376    <ParamString id="pclkSCBClockString" name="PCLK Destination Clock" group="Internal" default="PCLK_SCB`${InstNumber}`_CLOCK" visible="false" editable="false" desc="String variable used for PCLK_SCB_CLOCK." />
377    <ParamString id="pclkSCBClockSCBENString" name="PCLK Destination Clock" group="Internal" default="PCLK_SCB`${InstNumber}`_CLOCK_SCB_EN" visible="false" editable="false" desc="String variable used only for PCLK_SCB_CLOCK_SCB_EN." />
378
379    <ParamString id="pclkDst" name="PCLK Destination" group="Internal" default="`${(hasVisibleOption(&quot;clock[0]&quot;)) ? pclkSCBClockString : pclkSCBClockSCBENString }`" visible="false" editable="false" desc="Generates PCLK connection define." />
380  </Parameters>
381
382  <DRCs>
383    <!-- DRC: 8-bit clock divider must not be used -->
384    <DRC type="ERROR" text="Wider clock divider resolution is required for UART to operate with baud rate `${BaudRate}` bps." paramId="clock[0]" condition="`${!useUartDiv8 &amp;&amp; pClkDiv8}`" />
385
386    <!-- DRC: 8-bit clock divider must not be used -->
387    <DRC type="ERROR" text="Wider clock divider resolution is required for UART to operate with baud rate `${BaudRate}` bps." paramId="clock_scb_en[0]" condition="`${!useUartDiv8 &amp;&amp; pClkDiv8}`" />
388
389    <!-- DRC: BaudRate for IrDA mode -->
390    <DRC type="ERROR" text="The baud rate value must be 115200, 57600, 38400, 19200, 9600, 2400 or 1200 bps when the IrDA mode is selected." paramId="BaudRate" condition="`${(IrDA) ? !((BaudRate eq 1200) || (BaudRate eq 2400) || (BaudRate eq 9600) || (BaudRate eq 19200) || (BaudRate eq 38400) || (BaudRate eq 57600) || (BaudRate eq 115200)) : false}`" />
391
392    <!-- DRC: checks DataWidth for Multi Processor -->
393    <DRC type="ERROR" text="To enable multi processor mode set Com Mode = Standard and Data Width = 9 bits." paramId="MultiProc" condition="`${MultiProc ? (!Standard || (DataWidth ne 9)) : false}`" />
394
395    <!-- DRC: checks that DataWidth = 9 is valid -->
396    <DRC type="ERROR" text="Only Standard mode supports 9 bits data width." paramId="DataWidth" condition="`${(!Standard &amp;&amp; (DataWidth eq 9))}`" />
397
398    <!-- DRC: checks break signal length in bits -->
399    <DRC type="ERROR" text="The break signal bits value must be at least by 2 bits greater than Data Width and less than or equal 16." paramId="BreakSignalBits" condition="`${(BreakSignalBits &lt; (DataWidth + 2)) ? true : false}`" />
400
401    <!-- DRC: checks EnableTxEn and FlowControl usage -->
402    <DRC type="ERROR" paramId="EnableTxEn" text="The FlowControl and TX-Enable options are mutually exclusive." condition="`${(EnableTxEn &amp;&amp; FlowControl) ? true : false}`" />
403
404    <!-- DRC: checks pins availability for SmartCard mode -->
405    <DRC type="ERROR" paramId="ComMode" text="The SmartCard mode is not supported for the selected SCB (Serial Communication Block)." condition="`${SmartCard &amp;&amp; !hasVisibleOption(&quot;uart_tx[0]&quot;)}`" />
406
407    <!-- DRC: checks pins availability for EnableTxEn  -->
408    <DRC type="ERROR" paramId="EnableTxEn" text="The TX-Enable option is not supported for the selected SCB (Serial Communication Block)." condition="`${EnableTxEn &amp;&amp; !hasVisibleOption(&quot;uart_cts[0]&quot;)}`" />
409
410    <!-- DRC: checks pins availability for SmartCard mode -->
411    <DRC type="ERROR" paramId="FlowControl" text="The Flow Control option is not supported for the selected SCB (Serial Communication Block)." condition="`${FlowControl &amp;&amp; !hasVisibleOption(&quot;uart_rts[0]&quot;) &amp;&amp; !hasVisibleOption(&quot;uart_cts[0]&quot;)}`" />
412  </DRCs>
413
414  <ConfigFirmware>
415    <ConfigInclude value="cy_scb_uart.h" include="true" />
416    <ConfigInclude value="cy_sysclk.h" include="`${pclkOk}`" />
417    <ConfigInclude value="cyhal_hwmgr.h" include="true" guard="defined (CY_USING_HAL)" />
418
419    <ConfigDefine name="`${INST_NAME}`_HW" value="SCB`${InstNumber}`" public="true" include="true" />
420    <ConfigDefine name="`${INST_NAME}`_IRQ" value="scb_`${InstNumber}`_interrupt_IRQn" public="true" include="true" />
421    <ConfigStruct name="`${INST_NAME}`_config" type="cy_stc_scb_uart_config_t" const="`${inFlash}`" public="true" include="true" >
422      <Member name="uartMode" value="`${ComMode}`" />
423      <Member name="enableMutliProcessorMode" value="`${MultiProc ? &quot;true&quot; : &quot;false&quot;}`" />
424      <Member name="smartCardRetryOnNack" value="`${(SmartCard &amp;&amp; SmCardRetryOnNack) ? &quot;true&quot; : &quot;false&quot;}`" />
425      <Member name="irdaInvertRx" value="`${(IrDA &amp;&amp; (IrdaPolarity eq INVERTING)) ? &quot;true&quot; : &quot;false&quot;}`" />
426      <Member name="irdaEnableLowPowerReceiver" value="`${(IrDA &amp;&amp; IrdaLowPower) ? &quot;true&quot; : &quot;false&quot;}`" />
427
428      <Member name="oversample" value="`${(Standard || SmartCard) ? Oversample : (IrDA &amp;&amp; !IrdaLowPower) ? IrDAOversample : IrDAOversampleDefine}`" />
429
430      <Member name="enableMsbFirst" value="`${(BitsOrder eq CY_SCB_UART_MSB_FIRST) ? &quot;true&quot; : &quot;false&quot;}`" />
431      <Member name="dataWidth" value="`${DataWidth}`UL" />
432      <Member name="parity" value="`${(Standard &amp;&amp; (DataWidth ne 9)) ? ParityType : (SmartCard) ? &quot;CY_SCB_UART_PARITY_EVEN&quot; : &quot;CY_SCB_UART_PARITY_NONE&quot;}`" />
433      <Member name="stopBits" value="`${StopBits}`" />
434      <Member name="enableInputFilter" value="`${((IrDA) ? &quot;true&quot; : EnableInputFilter) ? &quot;true&quot; : &quot;false&quot;}`" />
435      <Member name="breakWidth" value="`${BreakSignalBits}`UL" />
436      <Member name="dropOnFrameError" value="`${DropOnFrameErr}`" />
437      <Member name="dropOnParityError" value="`${((ParityType ne CY_SCB_UART_PARITY_NONE) &amp;&amp; DropOnParityErr) ? &quot;true&quot; : &quot;false&quot;}`" />
438      <Member name="breaklevel" value="`${BreakLevel ? &quot;true&quot; : &quot;false&quot;}`" include="`${(version &gt; 1) || (ipName eq &quot;mxs22scb&quot;)}`"  />
439
440      <Member name="receiverAddress"     value="`${MultiProc ? MpRxAddress : &quot;0x0UL&quot;}`" />
441      <Member name="receiverAddressMask" value="`${MultiProc ? MpRxAddressMask : &quot;0x0UL&quot;}`" />
442      <Member name="acceptAddrInFifo"    value="`${(MultiProc &amp;&amp; MpRxAcceptAddress) ? &quot;true&quot; : &quot;false&quot;}`" />
443
444      <Member name="enableCts"      value="`${FlowControl ? &quot;true&quot; : &quot;false&quot;}`" />
445      <Member name="ctsPolarity"    value="`${FlowControl ? CtsPolarity : &quot;CY_SCB_UART_ACTIVE_LOW&quot;}`" />
446      <Member name="rtsRxFifoLevel" value="`${FlowControl ? RtsTriggerLevel : &quot;0UL&quot;}`" />
447      <Member name="rtsPolarity"    value="`${FlowControl ? RtsPolarity : &quot;CY_SCB_UART_ACTIVE_LOW&quot;}`" />
448
449      <Member name="rxFifoTriggerLevel"  value="`${RxTriggerLevel}`UL" />
450      <Member name="rxFifoIntEnableMask" value="`${RxIntrMask}`UL" />
451
452      <Member name="txFifoTriggerLevel"  value="`${TxTriggerLevel}`UL" />
453      <Member name="txFifoIntEnableMask" value="`${TxIntrMask}`UL" />
454    </ConfigStruct>
455
456    <ConfigStruct name="`${INST_NAME}`_obj" type="cyhal_resource_inst_t" const="true" public="true" include="true" guard="defined (CY_USING_HAL)">
457      <Member name="type" value="CYHAL_RSC_SCB" />
458      <Member name="block_num" value="`${getInstNumber(&quot;scb&quot;)}`U" />
459      <Member name="channel_num" value="0U" />
460    </ConfigStruct>
461
462    <ConfigInstruction value="Cy_SysClk_PeriPclkAssignDivider(`${pclkDst}`, `${getExposedMember(sourceClock, &quot;clockSel&quot;)}`);" include="`${(((version &gt; 1) || (ipName eq &quot;mxs22scb&quot;)) &amp;&amp; pclkOk)}`"  />
463    <ConfigInstruction value="Cy_SysClk_PeriphAssignDivider(`${pclkDst}`, `${getExposedMember(sourceClock, &quot;clockSel&quot;)}`);" include="`${((version eq 1) &amp;&amp; pclkOk &amp;&amp; (ipName ne &quot;mxs22scb&quot;))}`"  />
464
465    <ConfigInstruction value="cyhal_hwmgr_reserve(&amp;`${INST_NAME}`_obj);" include="true" guard="defined (CY_USING_HAL)" />
466  </ConfigFirmware>
467</Personality>
468