1<?xml version="1.0" encoding="utf-8"?> 2 3 4<!--**************************************************************************** 5* \file canfd.cypersonality 6* \version 3.0 7* 8* \brief 9* CAN FD personality description file. 10* This supports CAT1A, CAT1B, CAT1C and CAT1D devices. 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="canfd" name="CAN FD" version="3.0" xmlns="http://cypress.com/xsd/cyhwpersonality_v7"> 30 <Dependencies> 31 <IpBlock name="mxttcanfd,mxttcanfd_s40s,mxttcanfd_s40e" /> 32 <Resource name="canfd\.chan" /> 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__canfd.html" linkText="Open CAN FD Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" /> 38 39 <!-- Callback Functions --> 40 <ParamRange id="InstCount" name="Instance Number" group="General" default="`${CAN_NR}`" min="0" max="2" resolution="1" visible="false" editable="false" desc="This parameter specifies count of total instances." /> 41 42 <!-- Callback Functions --> 43 <ParamString id="txCallback" name="TxCallback Function" group="Callback Functions" default="NULL" visible="true" editable="true" desc="The Callback function for transmit completed." /> 44 <ParamString id="rxCallback" name="RxCallback Function" group="Callback Functions" default="NULL" visible="true" editable="true" desc="The Callback function for receive completed." /> 45 <ParamString id="errorCallback" name="ErrorCallback Function" group="Callback Functions" default="NULL" visible="true" editable="true" desc="The Callback function for CAN related errors." /> 46 47 <!-- Mode --> 48 <ParamBool id="mode" name="CAN FD Mode" group="Mode" default="false" visible="true" editable="true" desc="Set if CAN FD, reset if Classic CAN mode." /> 49 50 <!-- Connections --> 51 <ParamSignal port="clock_can[0]" name="Clock Signal" group="Connections" visible="`${hasVisibleOption("clock_can[0]")}`" desc="The clock input defines the operating frequency." canBeEmpty="false" /> 52 <ParamSignal port="clock_can_en[0]" name="Clock Signal" group="Connections" visible="`${hasVisibleOption("clock_can_en[0]")}`" desc="The clock input defines the operating frequency." canBeEmpty="false" /> 53 <ParamString id="sourceClock" name="Source Clock" group="Connections" default="`${(hasVisibleOption("clock_can_en[0]")) ? (getBlockFromSignal("clock_can_en[0]")) : (getBlockFromSignal("clock_can[0]"))}`" visible="false" editable="false" desc="Source Clock Resource" /> 54 <ParamRange id="canClkHz" name="CAN Clk in Hz" group="Connections" default="`${getExposedMember(sourceClock, "frequency")}`" min="1" max="200000000" resolution="1" visible="false" editable="false" desc="CAN clock frequency in Hz" /> 55 <ParamString id="ClkFreq" name="Clock Frequency" group="Connections" default="`${(canClkHz < 1000000) ? (canClkHz / 1000.0) . " kHz" : (canClkHz / 1000000.0) . " MHz"}`" visible="true" editable="false" desc="Frequency of the connected clock" /> 56 <ParamSignal port="ttcan_rx[0]" name="CAN Rx Pin" group="Connections" visible="true" desc="Reserve the ttcan_rx[0]." canBeEmpty="true" > 57 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 58 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 59 <Fixed value="CY_GPIO_DM_HIGHZ" /> 60 </Parameter> 61 </Constraint> 62 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 63 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 64 <Fixed value="CY_GPIO_DM_HIGHZ" /> 65 </Parameter> 66 </Constraint> 67 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 68 </ParamSignal> 69 <ParamSignal port="ttcan_tx[0]" name="CAN Tx Pin" group="Connections" visible="true" desc="ttcan_tx[0]" canBeEmpty="true" > 70 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 71 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 72 <Fixed value="CY_GPIO_DM_STRONG" /> 73 </Parameter> 74 </Constraint> 75 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 76 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 77 <Fixed value="CY_GPIO_DM_STRONG" /> 78 </Parameter> 79 </Constraint> 80 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 81 </ParamSignal> 82 <ParamSignal port="tr_fifo0[0]" name="DMA Rx FIFO 0 Trigger Output" group="Connections" visible="true" desc="Connects Rx FIFO 0 trigger output to the DMA." canBeEmpty="true" > 83 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 84 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 85 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 86 </Parameter> 87 </Constraint> 88 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 89 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 90 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 91 </Parameter> 92 </Constraint> 93 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 94 </ParamSignal> 95 <ParamSignal port="tr_fifo1[0]" name="DMA Rx FIFO 1 Trigger Output" group="Connections" visible="true" desc="Connects Rx FIFO 1 trigger output to the DMA." canBeEmpty="true" > 96 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 97 <Parameter id="DriveModes" severity="DEFAULT" reason=""> 98 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 99 </Parameter> 100 </Constraint> 101 <Constraint type="ACCEPT" targetLocation="ioss\[\d+\]\.port\[\d+\]\.pin.*" valid="true" > 102 <Parameter id="DriveModes" severity="INFO" reason="The pin Drive Mode parameter does not match expected."> 103 <Fixed value="CY_GPIO_DM_STRONG_IN_OFF" /> 104 </Parameter> 105 </Constraint> 106 <Constraint type="ACCEPT" targetLocation=".*" valid="true" /> 107 </ParamSignal> 108 109 <!-- Message RAM --> 110 <ParamRange id="messageRAMaddress" name="Message RAM Address Offset" group="Message RAM" default="0" min="0" max="4294967295" resolution="4" visible="true" editable="true" desc="The start address offset of Message RAM for the channel (in bytes)." /> 111 <ParamRange id="noOfTxEvenFifo" name="Number of Tx Even FIFO Elements" group="Message RAM" default="10" min="0" max="32" resolution="1" visible="false" editable="false" desc="The Number Of Tx Even FIFO elements for the channel." /> 112 <ParamRange id="messageRAMsize" name="Message RAM Size" group="Message RAM" default="`${MRAM_SIZE * 1024}`" min="`${8 * noOfTxEvenFifo}`" max="`${MRAM_SIZE * 1024}`" resolution="4" visible="true" editable="true" desc="The size in bytes of Message RAM for the channel." /> 113 114 <!-- Bitrate Setting --> 115 <ParamRange id="nominalPrescaler" name="Nominal Prescaler" group="Bitrate Setting" default="4" min="1" max="512" resolution="1" visible="true" editable="true" desc="Nominal Bit Rate Prescaler." /> 116 <ParamRange id="nominalTimeSegment1" name="Nominal Time Segment 1" group="Bitrate Setting" default="16" min="2" max="256" resolution="1" visible="true" editable="true" desc="Nominal Time segment before sample point." /> 117 <ParamRange id="nominalTimeSegment2" name="Nominal Time Segment 2" group="Bitrate Setting" default="7" min="2" max="128" resolution="1" visible="true" editable="true" desc="Nominal Time segment after sample point." /> 118 <ParamRange id="nominalSyncJumpWidth" name="Nominal Synchronization Jump Width" group="Bitrate Setting" default="4" min="1" max="128" resolution="1" visible="true" editable="true" desc="Nominal Synchronization Jump Width." /> 119 <ParamRange id="nominalBaudRateBps" name="Nominal Bit Rate" group="Bitrate Setting" default="`${canClkHz / (nominalTimeSegment1 + nominalTimeSegment2 + 1) / nominalPrescaler}`" min="0" max="8000000" resolution="1" visible="false" editable="false" desc="Nominal baud rate in bps." /> 120 <ParamString id="nominalBaudRateKbps" name="Nominal Bit Rate" group="Bitrate Setting" default="`${(nominalBaudRateBps / 1000) . " kbps" }`" visible="true" editable="false" desc="Nominal baud rate in kbps." /> 121 <ParamString id="nominalSamplingPoint" name="Nominal Sampling Point" group="Bitrate Setting" default="`${(100 * (1 + nominalTimeSegment1) / (1 + nominalTimeSegment1 + nominalTimeSegment2)) . "%" }`" visible="true" editable="false" desc="Nominal Sampling Point in percents." /> 122 123 <!-- Fast Bitrate Setting --> 124 <ParamRange id="dataPrescaler" name="Data Prescaler" group="Fast Bitrate Setting" default="2" min="1" max="32" resolution="1" visible="`${mode}`" editable="true" desc="Bit Rate Prescaler." /> 125 <ParamRange id="dataTimeSegment1" name="Data Time Segment 1" group="Fast Bitrate Setting" default="15" min="1" max="32" resolution="1" visible="`${mode}`" editable="true" desc="Time segment before sample point." /> 126 <ParamRange id="dataTimeSegment2" name="Data Time Segment 2" group="Fast Bitrate Setting" default="8" min="1" max="16" resolution="1" visible="`${mode}`" editable="true" desc="Time segment after sample point." /> 127 <ParamRange id="dataSyncJumpWidth" name="Data Synchronization Jump Width" group="Fast Bitrate Setting" default="4" min="1" max="16" resolution="1" visible="`${mode}`" editable="true" desc="Synchronization Jump Width." /> 128 <ParamRange id="dataBaudRateBps" name="Data Bit Rate" group="Fast Bitrate Setting" default="`${canClkHz / (dataTimeSegment1 + dataTimeSegment2 + 1) / (dataPrescaler)}`" min="0" max="8000000" resolution="1" visible="false" editable="false" desc="Data baud rate in bps." /> 129 <ParamString id="dataBaudRateKbps" name="Data Bit Rate" group="Fast Bitrate Setting" default="`${(dataBaudRateBps / 1000) . " kbps" }`" visible="`${mode}`" editable="false" desc="Data baud rate in kbps." /> 130 <ParamString id="dataSamplingPoint" name="Data Sampling Point" group="Fast Bitrate Setting" default="`${(100 * (1 + dataTimeSegment1) / (1 + dataTimeSegment1 + dataTimeSegment2)) . "%" }`" visible="`${mode}`" editable="false" desc="Data Sampling Point in percents." /> 131 132 <!-- Transceiver Delay Compensation Offset Configuration --> 133 <ParamBool id="tdcEnabled" name="Transceiver Delay Compensation Enabled" group="Transceiver Delay Compensation Offset Configuration" default="false" visible="true" editable="true" desc="Transceiver delay compensation enabled." /> 134 <ParamRange id="tdcOffset" name="TDC Delay Compensation Offset" group="Transceiver Delay Compensation Offset Configuration" default="0" min="0" max="127" resolution="1" visible="`${tdcEnabled}`" editable="true" desc="Transmitter Delay Compensation Offset." /> 135 <ParamRange id="tdcFilterWindow" name="TDC Filter Window Length" group="Transceiver Delay Compensation Offset Configuration" default="0" min="0" max="127" resolution="1" visible="`${tdcEnabled}`" editable="true" desc="Transmitter Delay Compensation Filter Window Length." /> 136 137 138 <!-- Standard ID Filter Setting --> 139 <ParamRange id="numberOfSIDFilters" name="Number of SID Filters" group="Standard ID Filter Setting" default="1" min="0" max="128" resolution="1" visible="true" editable="true" desc="Number of Standard Message ID Filters." /> 140 141 <Repeat count="128"> 142 <ParamChoice id="sfecSidFilter$idx" name="Standard Filter Element Configuration" group="Standard ID Filter Element#$idx" default="CY_CANFD_SFEC_STORE_RX_FIFO_0" visible="`${numberOfSIDFilters > $idx}`" editable="true" desc="Standard Filter Element Configuration if the filter matches."> 143 <Entry name="Disable the Filter Element" value="CY_CANFD_SFEC_DISABLE" visible="true" /> 144 <Entry name="Store in Rx FIFO 0" value="CY_CANFD_SFEC_STORE_RX_FIFO_0" visible="true" /> 145 <Entry name="Store in Rx FIFO 1" value="CY_CANFD_SFEC_STORE_RX_FIFO_1" visible="true" /> 146 <Entry name="Reject ID" value="CY_CANFD_SFEC_REJECT_ID" visible="true" /> 147 <Entry name="Set Priority" value="CY_CANFD_SFEC_SET_PRIORITY" visible="true" /> 148 <Entry name="Set Priority and Store in FIFO 0" value="CY_CANFD_SFEC_SET_PRIORITY_STORE_FIFO_0" visible="true" /> 149 <Entry name="Set Priority and Store in FIFO 1" value="CY_CANFD_SFEC_SET_PRIORITY_STORE_FIFO_1" visible="true" /> 150 <Entry name="Store into Rx Buffer or as Debug Message" value="CY_CANFD_SFEC_STORE_RX_BUFFER" visible="true" /> 151 </ParamChoice> 152 <ParamChoice id="sftSidFilter$idx" name="Standard Filter Type" group="Standard ID Filter Element#$idx" default="CY_CANFD_SFT_RANGE_SFID1_SFID2" visible="`${(numberOfSIDFilters > $idx) && (sfecSidFilter$idx ne CY_CANFD_SFEC_STORE_RX_BUFFER)}`" editable="true" desc="Standard Filter Type."> 153 <Entry name="Range Filter from SFID1 to SFID2" value="CY_CANFD_SFT_RANGE_SFID1_SFID2" visible="true" /> 154 <Entry name="Dual ID Filter for SFID1 or SFID2" value="CY_CANFD_SFT_DUAL_ID" visible="true" /> 155 <Entry name="Classic Filter: SFID1 = Filter, SFID2 = Mask" value="CY_CANFD_SFT_CLASSIC_FILTER" visible="true" /> 156 <Entry name="Filter Element Disabled" value="CY_CANFD_SFT_DISABLED" visible="true" /> 157 </ParamChoice> 158 <ParamString id="sftSidFilterVal$idx" name="Standard Filter Type" group="Standard ID Filter Element#$idx" default="`${sfecSidFilter$idx ne CY_CANFD_SFEC_STORE_RX_BUFFER ? sftSidFilter$idx : CY_CANFD_SFT_CLASSIC_FILTER}`" visible="false" editable="false" desc="Standard Filter Type." /> 159 <ParamRange id="sfid1_SidFilter$idx" name="SFID1" group="Standard ID Filter Element#$idx" default="0" min="0" max="2047" resolution="1" visible="`${numberOfSIDFilters > $idx}`" editable="true" desc="First ID of standard ID filter element. When filtering for Rx Buffers or for debug messages this field defines the ID of a standard message to be stored. The received identifiers must match exactly, no masking mechanism is used." /> 160 <ParamRange id="sfid2_SidFilter$idx" name="SFID2" group="Standard ID Filter Element#$idx" default="0" min="0" max="2047" resolution="1" visible="`${(numberOfSIDFilters > $idx) && (sfecSidFilter$idx ne CY_CANFD_SFEC_STORE_RX_BUFFER) }`" editable="true" desc="Second ID of standard ID filter element." /> 161 <ParamChoice id="sfid2_10_9_SidFilter$idx" name="Store the Received Message" group="Standard ID Filter Element#$idx" default="0" visible="`${(numberOfSIDFilters > $idx) && (sfecSidFilter$idx eq CY_CANFD_SFEC_STORE_RX_BUFFER) }`" editable="true" desc="Decides whether the received message is stored into an Rx Buffer or treated as message A, B, or C of the debug message sequence."> 162 <Entry name="Store Message into an Rx Buffer" value="0" visible="true" /> 163 <Entry name="Debug Message A" value="1" visible="true" /> 164 <Entry name="Debug Message B" value="2" visible="true" /> 165 <Entry name="Debug Message C" value="3" visible="true" /> 166 </ParamChoice> 167 <ParamRange id="sfid2_5_0_SidFilter$idx" name="Rx Buffer Element" group="Standard ID Filter Element#$idx" default="0" min="0" max="63" resolution="1" visible="`${(numberOfSIDFilters > $idx) && (sfecSidFilter$idx eq CY_CANFD_SFEC_STORE_RX_BUFFER) }`" editable="true" desc="The offset to the Rx Buffer Start Address RXBC.RBSA for storage of a matching message." /> 168 </Repeat> 169 170 171 172 <!-- Extended ID Filter Setting --> 173 <ParamRange id="numberOfEXTIDFilters" name="Number of XID Filters" group="Extended ID Filter Setting" default="1" min="0" max="64" resolution="1" visible="true" editable="true" desc="Number of Extended Message ID Filters." /> 174 175 <Repeat count="64"> 176 <ParamChoice id="efecXidFilter$idx" name="Extended Filter Element Configuration" group="Extended ID Filter Element#$idx" default="CY_CANFD_EFEC_STORE_RX_FIFO_0" visible="`${numberOfEXTIDFilters > $idx}`" editable="true" desc="Extended Filter Element Configuration if the filter matches."> 177 <Entry name="Disable the Filter Element" value="CY_CANFD_EFEC_DISABLE" visible="true" /> 178 <Entry name="Store in Rx FIFO 0" value="CY_CANFD_EFEC_STORE_RX_FIFO_0" visible="true" /> 179 <Entry name="Store in Rx FIFO 1" value="CY_CANFD_EFEC_STORE_RX_FIFO_1" visible="true" /> 180 <Entry name="Reject ID" value="CY_CANFD_EFEC_REJECT_ID" visible="true" /> 181 <Entry name="Set Priority" value="CY_CANFD_EFEC_SET_PRIORITY" visible="true" /> 182 <Entry name="Set Priority and Store in FIFO 0" value="CY_CANFD_EFEC_SET_PRIORITY_STORE_FIFO_0" visible="true" /> 183 <Entry name="Set Priority and Store in FIFO 1" value="CY_CANFD_EFEC_SET_PRIORITY_STORE_FIFO_1" visible="true" /> 184 <Entry name="Store into Rx Buffer or as Debug Message" value="CY_CANFD_EFEC_STORE_RX_BUFFER" visible="true" /> 185 </ParamChoice> 186 <ParamChoice id="eftXidFilter$idx" name="Extended Filter Type" group="Extended ID Filter Element#$idx" default="CY_CANFD_EFT_RANGE_EFID1_EFID2" visible="`${(numberOfEXTIDFilters > $idx) && (efecXidFilter$idx ne CY_CANFD_EFEC_STORE_RX_BUFFER)}`" editable="true" desc="Extended Filter Type."> 187 <Entry name="Range Filter from EFID1 to EFID2" value="CY_CANFD_EFT_RANGE_EFID1_EFID2" visible="true" /> 188 <Entry name="Dual ID Filter for EFID1 or EFID2" value="CY_CANFD_EFT_DUAL_ID" visible="true" /> 189 <Entry name="Classic Filter: EFID1 = Filter, EFID2 = Mask" value="CY_CANFD_EFT_CLASSIC_FILTER" visible="true" /> 190 <Entry name="Filter Element Disabled" value="CY_CANFD_EFT_RANGE_EFID1_EFID2_NO_MSK" visible="true" /> 191 </ParamChoice> 192 <ParamRange id="efid1_XidFilter$idx" name="EFID1" group="Extended ID Filter Element#$idx" default="0" min="0" max="536870911" resolution="1" visible="`${numberOfEXTIDFilters > $idx}`" editable="true" desc="First ID of extended ID filter element. When filtering for Rx Buffers or for debug messages this field defines the ID of an extended message to be stored. The received identifiers must match exactly, only XIDAM masking mechanism is used." /> 193 <ParamRange id="efid2_XidFilter$idx" name="EFID2" group="Extended ID Filter Element#$idx" default="0" min="0" max="536870911" resolution="1" visible="`${(numberOfEXTIDFilters > $idx) && (efecXidFilter$idx ne CY_CANFD_EFEC_STORE_RX_BUFFER) }`" editable="true" desc="Second ID of extended ID filter element." /> 194 <ParamChoice id="efid2_10_9_XidFilter$idx" name="Store the Received Message" group="Extended ID Filter Element#$idx" default="0" visible="`${(numberOfEXTIDFilters > $idx) && (efecXidFilter$idx eq CY_CANFD_EFEC_STORE_RX_BUFFER) }`" editable="true" desc="Decides whether the received message is stored into an Rx Buffer or treated as message A, B, or C of the debug message sequence."> 195 <Entry name="Store Message into an Rx Buffer" value="0" visible="true" /> 196 <Entry name="Debug Message A" value="1" visible="true" /> 197 <Entry name="Debug Message B" value="2" visible="true" /> 198 <Entry name="Debug Message C" value="3" visible="true" /> 199 </ParamChoice> 200 <ParamRange id="efid2_5_0_XidFilter$idx" name="Rx Buffer Element" group="Extended ID Filter Element#$idx" default="0" min="0" max="63" resolution="1" visible="`${(numberOfEXTIDFilters > $idx) && (efecXidFilter$idx eq CY_CANFD_EFEC_STORE_RX_BUFFER) }`" editable="true" desc="The offset to the Rx Buffer Start Address RXBC.RBSA for storage of a matching message." /> 201 </Repeat> 202 203 <ParamRange id="extIDANDMask" name="Extended ID AND Mask XIDAM" group="Extended ID Filter Setting" default="536870911" min="0" max="536870911" resolution="1" visible="true" editable="true" desc="Extended ID AND Mask XIDAM." /> 204 205 <!-- Global Filter Setting --> 206 <ParamChoice id="nonMatchingFramesStandard" name="Accept Non-matching Frames Standard" group="Global Filter Setting" default="CY_CANFD_ACCEPT_IN_RXFIFO_0" visible="true" editable="true" desc="Defines how received messages with 11-bit IDs that do not match any element of the filter list are 207treated."> 208 <Entry name="Accept in Rx FIFO 0" value="CY_CANFD_ACCEPT_IN_RXFIFO_0" visible="true" /> 209 <Entry name="Accept in Rx FIFO 1" value="CY_CANFD_ACCEPT_IN_RXFIFO_1" visible="true" /> 210 <Entry name="Reject " value="CY_CANFD_REJECT_NON_MATCHING" visible="true" /> 211 </ParamChoice> 212 <ParamChoice id="nonMatchingFramesExtended" name="Accept Non-matching Frames Extended" group="Global Filter Setting" default="CY_CANFD_ACCEPT_IN_RXFIFO_0" visible="true" editable="true" desc="Defines how received messages with 29-bit IDs that do not match any element of the filter list are 213treated."> 214 <Entry name="Accept in Rx FIFO 0" value="CY_CANFD_ACCEPT_IN_RXFIFO_0" visible="true" /> 215 <Entry name="Accept in Rx FIFO 1" value="CY_CANFD_ACCEPT_IN_RXFIFO_1" visible="true" /> 216 <Entry name="Reject " value="CY_CANFD_REJECT_NON_MATCHING" visible="true" /> 217 </ParamChoice> 218 <ParamBool id="rejectRemoteFramesStandard" name="Reject Remote Frames Standard" group="Global Filter Setting" default="false" visible="true" editable="true" desc="Reject all remote frames with 11-bit standard IDs." /> 219 <ParamBool id="rejectRemoteFramesExtended" name="Reject Remote Frames Extended" group="Global Filter Setting" default="false" visible="true" editable="true" desc="Reject all remote frames with 29-bit extended IDs." /> 220 221 <!-- Rx Buffers and FIFO Setting --> 222 <ParamChoice id="rxBufferDataValue" name="Rx Buffer Data Field Size" group="Rx Buffers and FIFO Setting" default="8" visible="true" editable="true" desc="Rx Buffer Data Field Size."> 223 <Entry name="8 Byte Data Field" value="8" visible="true" /> 224 <Entry name="12 Byte Data Field" value="12" visible="true" /> 225 <Entry name="16 Byte Data Field" value="16" visible="true" /> 226 <Entry name="20 Byte Data Field" value="20" visible="true" /> 227 <Entry name="24 Byte Data Field" value="24" visible="true" /> 228 <Entry name="32 Byte Data Field" value="32" visible="true" /> 229 <Entry name="48 Byte Data Field" value="48" visible="true" /> 230 <Entry name="64 Byte Data Field" value="64" visible="true" /> 231 </ParamChoice> 232 <ParamString id="rxBufferDataSize" name="Rx Buffer Data Field Size ENUM" group="Rx Buffers and FIFO Setting" default="CY_CANFD_BUFFER_DATA_SIZE_`${rxBufferDataValue}`" visible="false" editable="false" desc="Rx Buffer Data Field Size ENUM." /> 233 234 <ParamChoice id="rxFifo0DataValue" name="Rx FIFO 0 Data Field Size" group="Rx Buffers and FIFO Setting" default="8" visible="true" editable="true" desc="Rx FIFO 0 Data Field Size."> 235 <Entry name="8 Byte Data Field" value="8" visible="true" /> 236 <Entry name="12 Byte Data Field" value="12" visible="true" /> 237 <Entry name="16 Byte Data Field" value="16" visible="true" /> 238 <Entry name="20 Byte Data Field" value="20" visible="true" /> 239 <Entry name="24 Byte Data Field" value="24" visible="true" /> 240 <Entry name="32 Byte Data Field" value="32" visible="true" /> 241 <Entry name="48 Byte Data Field" value="48" visible="true" /> 242 <Entry name="64 Byte Data Field" value="64" visible="true" /> 243 </ParamChoice> 244 <ParamString id="rxFifo0DataSize" name="Rx FIFO 0 Data Field Size ENUM" group="Rx Buffers and FIFO Setting" default="CY_CANFD_BUFFER_DATA_SIZE_`${rxFifo0DataValue}`" visible="false" editable="false" desc="Rx FIFO 0 Data Field Size ENUM." /> 245 246 <ParamChoice id="rxFifo1DataValue" name="Rx FIFO 1 Data Field Size" group="Rx Buffers and FIFO Setting" default="8" visible="true" editable="true" desc="Rx FIFO 1 Data Field Size."> 247 <Entry name="8 Byte Data Field" value="8" visible="true" /> 248 <Entry name="12 Byte Data Field" value="12" visible="true" /> 249 <Entry name="16 Byte Data Field" value="16" visible="true" /> 250 <Entry name="20 Byte Data Field" value="20" visible="true" /> 251 <Entry name="24 Byte Data Field" value="24" visible="true" /> 252 <Entry name="32 Byte Data Field" value="32" visible="true" /> 253 <Entry name="48 Byte Data Field" value="48" visible="true" /> 254 <Entry name="64 Byte Data Field" value="64" visible="true" /> 255 </ParamChoice> 256 <ParamString id="rxFifo1DataSize" name="Rx FIFO 1 Data Field Size ENUM" group="Rx Buffers and FIFO Setting" default="CY_CANFD_BUFFER_DATA_SIZE_`${rxFifo1DataValue}`" visible="false" editable="false" desc="Rx FIFO 1 Data Field Size ENUM." /> 257 <ParamRange id="noOfRxBuffers" name="Number of Rx Buffers" group="Rx Buffers and FIFO Setting" default="1" min="0" max="64" resolution="1" visible="true" editable="true" desc="Number of Rx Buffers." /> 258 259 <!-- Rx FIFO 0 Configuration --> 260 <ParamChoice id="modeFifo0" name="FIFO 0 Operation Mode" group="Rx FIFO 0 Configuration" default="CY_CANFD_FIFO_MODE_BLOCKING" visible="true" editable="true" desc="CAN FD Rx FIFO 0 operating mode."> 261 <Entry name="FIFO Blocking Mode" value="CY_CANFD_FIFO_MODE_BLOCKING" visible="true" /> 262 <Entry name="FIFO Overwrite Mode" value="CY_CANFD_FIFO_MODE_OVERWRITE" visible="true" /> 263 </ParamChoice> 264 <ParamRange id="watermarkFifo0" name="Watermark" group="Rx FIFO 0 Configuration" default="0" min="0" max="64" resolution="1" visible="true" editable="true" desc="Rx FIFO 0 Watermark." /> 265 <ParamRange id="numberOfFifo0Elements" name="Rx FIFO 0 Size" group="Rx FIFO 0 Configuration" default="0" min="0" max="64" resolution="1" visible="true" editable="true" desc="Number Of FIFO 0 elements." /> 266 <ParamBool id="topPointerLogicEnabledFifo0" name="FIFO 0 Top Pointer Logic Enabled" group="Rx FIFO 0 Configuration" default="false" visible="true" editable="true" desc="FIFO 0 Top Pointer Logic Enabled." /> 267 268 <!-- Rx FIFO 1 Configuration --> 269 <ParamChoice id="modeFifo1" name="FIFO 1 Operation Mode" group="Rx FIFO 1 Configuration" default="CY_CANFD_FIFO_MODE_BLOCKING" visible="true" editable="true" desc="CAN FD Rx FIFO 1 operating mode."> 270 <Entry name="FIFO Blocking Mode" value="CY_CANFD_FIFO_MODE_BLOCKING" visible="true" /> 271 <Entry name="FIFO Overwrite Mode" value="CY_CANFD_FIFO_MODE_OVERWRITE" visible="true" /> 272 </ParamChoice> 273 <ParamRange id="watermarkFifo1" name="Watermark" group="Rx FIFO 1 Configuration" default="0" min="0" max="64" resolution="1" visible="true" editable="true" desc="Rx FIFO 1 Watermark." /> 274 <ParamRange id="numberOfFifo1Elements" name="Rx FIFO 1 Size" group="Rx FIFO 1 Configuration" default="0" min="0" max="64" resolution="1" visible="true" editable="true" desc="Number Of FIFO 1 elements." /> 275 <ParamBool id="topPointerLogicEnabledFifo1" name="FIFO 1 Top Pointer Logic Enabled" group="Rx FIFO 1 Configuration" default="false" visible="true" editable="true" desc="FIFO 1 Top Pointer Logic Enabled." /> 276 277 <!-- Tx Buffers Setting --> 278 <ParamChoice id="txBufferDataValue" name="Tx Buffer Data Field Size" group="Tx Buffers Setting" default="8" visible="true" editable="true" desc="Tx Buffer Data Field Size."> 279 <Entry name="8 Byte Data Field" value="8" visible="true" /> 280 <Entry name="12 Byte Data Field" value="12" visible="true" /> 281 <Entry name="16 Byte Data Field" value="16" visible="true" /> 282 <Entry name="20 Byte Data Field" value="20" visible="true" /> 283 <Entry name="24 Byte Data Field" value="24" visible="true" /> 284 <Entry name="32 Byte Data Field" value="32" visible="true" /> 285 <Entry name="48 Byte Data Field" value="48" visible="true" /> 286 <Entry name="64 Byte Data Field" value="64" visible="true" /> 287 </ParamChoice> 288 <ParamString id="txBufferDataSize" name="Tx Buffer Data Field Size ENUM" group="Tx Buffers Setting" default="CY_CANFD_BUFFER_DATA_SIZE_`${txBufferDataValue}`" visible="false" editable="false" desc="Tx Buffer Data Field Size." /> 289 <ParamRange id="noOfTxBuffers" name="Number of Tx Buffers" group="Tx Buffers Setting" default="1" min="0" max="32" resolution="1" visible="true" editable="true" desc="Number of Tx Buffers." /> 290 291 <Repeat count="32"> 292 <!-- Tx Buffer #$idx --> 293 <ParamChoice id="xtd_$idx" name="XTD" group="Tx Buffer #$idx" default="CY_CANFD_XTD_STANDARD_ID" visible="`${noOfTxBuffers > $idx}`" editable="true" desc="Extended Identifier (Tx Buffer #$idx)."> 294 <Entry name="11-bit Standard Identifier" value="CY_CANFD_XTD_STANDARD_ID" visible="true" /> 295 <Entry name="29-bit Extended Identifier" value="CY_CANFD_XTD_EXTENDED_ID" visible="true" /> 296 </ParamChoice> 297 <ParamRange id="id_$idx" name="Identifier" group="Tx Buffer #$idx" default="0" min="0" max="`${xtd_$idx eq CY_CANFD_XTD_STANDARD_ID ? 2047 : 536870911}`" resolution="1" visible="`${noOfTxBuffers > $idx}`" editable="true" desc="Standard or extended identifier of Tx Buffer #$idx (depending on bit XTD)." /> 298 <ParamChoice id="rtr_$idx" name="RTR" group="Tx Buffer #$idx" default="CY_CANFD_RTR_DATA_FRAME" visible="`${noOfTxBuffers > $idx}`" editable="true" desc="Remote Transmission Request (Tx Buffer #$idx). When RTR = 1, the M_TTCAN transmits a remote frame according to ISO 11898-1:2015."> 299 <Entry name="Data Frame" value="CY_CANFD_RTR_DATA_FRAME" visible="true" /> 300 <Entry name="Remote Frame" value="CY_CANFD_RTR_REMOTE_FRAME" visible="true" /> 301 </ParamChoice> 302 <ParamChoice id="esi_$idx" name="ESI" group="Tx Buffer #$idx" default="CY_CANFD_ESI_ERROR_ACTIVE" visible="`${(noOfTxBuffers > $idx) && (mode)}`" editable="true" desc="Error State Indicator in CAN FD format (Tx Buffer #$idx)."> 303 <Entry name="ESI bit depends only on Error Passive Flag" value="CY_CANFD_ESI_ERROR_ACTIVE" visible="true" /> 304 <Entry name="ESI bit transmitted recessive" value="CY_CANFD_ESI_ERROR_PASSIVE" visible="true" /> 305 </ParamChoice> 306 307 <ParamRange id="dlc_$idx" name="DLC" group="Tx Buffer #$idx" default="0" min="0" max="15" resolution="1" visible="`${noOfTxBuffers > $idx}`" editable="true" desc="Data Length Code (Tx Buffer #$idx)." /> 308 <ParamChoice id="fdf_$idx" name="FDF" group="Tx Buffer #$idx" default="CY_CANFD_FDF_STANDARD_FRAME" visible="`${(noOfTxBuffers > $idx) && (mode)}`" editable="true" desc="FD Format (Tx Buffer #$idx)."> 309 <Entry name="Classic CAN Format" value="CY_CANFD_FDF_STANDARD_FRAME" visible="true" /> 310 <Entry name="CAN FD Format" value="CY_CANFD_FDF_CAN_FD_FRAME" visible="true" /> 311 </ParamChoice> 312 <ParamBool id="brs_$idx" name="BRS" group="Tx Buffer #$idx" default="false" visible="`${(noOfTxBuffers > $idx) && (mode)}`" editable="true" desc="Enable Bit Rate Switching (Tx Buffer #$idx)." /> 313 <ParamBool id="efc_$idx" name="EFC" group="Tx Buffer #$idx" default="false" visible="`${noOfTxBuffers > $idx}`" editable="true" desc="Enable Event FIFO control (Tx Buffer #$idx)." /> 314 <ParamRange id="mm_$idx" name="MM" group="Tx Buffer #$idx" default="0" min="0" max="255" resolution="1" visible="`${noOfTxBuffers > $idx}`" editable="true" desc="Message marker (Tx Buffer #$idx)." /> 315 316 <ParamRange id="data_0_$idx" name="Data 0" group="Tx Buffer #$idx" default="0" min="0" max="4294967295" resolution="1" visible="`${(noOfTxBuffers > $idx)}`" editable="true" desc="32-bit word Data 0 (Data Bytes 0-3)." /> 317 <ParamRange id="data_1_$idx" name="Data 1" group="Tx Buffer #$idx" default="0" min="0" max="4294967295" resolution="1" visible="`${(noOfTxBuffers > $idx)}`" editable="true" desc="32-bit word Data 1 (Data Bytes 4-7)." /> 318 <ParamRange id="data_2_$idx" name="Data 2" group="Tx Buffer #$idx" default="0" min="0" max="4294967295" resolution="1" visible="`${(noOfTxBuffers > $idx) && (txBufferDataValue > 8)}`" editable="true" desc="32-bit word Data 2 (Data Bytes 8-11)." /> 319 <ParamRange id="data_3_$idx" name="Data 3" group="Tx Buffer #$idx" default="0" min="0" max="4294967295" resolution="1" visible="`${(noOfTxBuffers > $idx) && (txBufferDataValue > 12)}`" editable="true" desc="32-bit word Data 3 (Data Bytes 12-15)." /> 320 <ParamRange id="data_4_$idx" name="Data 4" group="Tx Buffer #$idx" default="0" min="0" max="4294967295" resolution="1" visible="`${(noOfTxBuffers > $idx) && (txBufferDataValue > 16)}`" editable="true" desc="32-bit word Data 4 (Data Bytes 16-19)." /> 321 <ParamRange id="data_5_$idx" name="Data 5" group="Tx Buffer #$idx" default="0" min="0" max="4294967295" resolution="1" visible="`${(noOfTxBuffers > $idx) && (txBufferDataValue > 20)}`" editable="true" desc="32-bit word Data 5 (Data Bytes 20-23)." /> 322 <ParamRange id="data_6_$idx" name="Data 6" group="Tx Buffer #$idx" default="0" min="0" max="4294967295" resolution="1" visible="`${(noOfTxBuffers > $idx) && (txBufferDataValue > 24)}`" editable="true" desc="32-bit word Data 6 (Data Bytes 24-27)." /> 323 <ParamRange id="data_7_$idx" name="Data 7" group="Tx Buffer #$idx" default="0" min="0" max="4294967295" resolution="1" visible="`${(noOfTxBuffers > $idx) && (txBufferDataValue > 24)}`" editable="true" desc="32-bit word Data 7 (Data Bytes 28-31)." /> 324 <ParamRange id="data_8_$idx" name="Data 8" group="Tx Buffer #$idx" default="0" min="0" max="4294967295" resolution="1" visible="`${(noOfTxBuffers > $idx) && (txBufferDataValue > 32)}`" editable="true" desc="32-bit word Data 8 (Data Bytes 32-35)." /> 325 <ParamRange id="data_9_$idx" name="Data 9" group="Tx Buffer #$idx" default="0" min="0" max="4294967295" resolution="1" visible="`${(noOfTxBuffers > $idx) && (txBufferDataValue > 32)}`" editable="true" desc="32-bit word Data 9 (Data Bytes 36-39)." /> 326 <ParamRange id="data_10_$idx" name="Data 10" group="Tx Buffer #$idx" default="0" min="0" max="4294967295" resolution="1" visible="`${(noOfTxBuffers > $idx) && (txBufferDataValue > 32)}`" editable="true" desc="32-bit word Data 10 (Data Bytes 40-43)." /> 327 <ParamRange id="data_11_$idx" name="Data 11" group="Tx Buffer #$idx" default="0" min="0" max="4294967295" resolution="1" visible="`${(noOfTxBuffers > $idx) && (txBufferDataValue > 32)}`" editable="true" desc="32-bit word Data 11 (Data Bytes 44-47)." /> 328 <ParamRange id="data_12_$idx" name="Data 12" group="Tx Buffer #$idx" default="0" min="0" max="4294967295" resolution="1" visible="`${(noOfTxBuffers > $idx) && (txBufferDataValue > 48)}`" editable="true" desc="32-bit word Data 12 (Data Bytes 48-51)." /> 329 <ParamRange id="data_13_$idx" name="Data 13" group="Tx Buffer #$idx" default="0" min="0" max="4294967295" resolution="1" visible="`${(noOfTxBuffers > $idx) && (txBufferDataValue > 48)}`" editable="true" desc="32-bit word Data 13 (Data Bytes 52-55)." /> 330 <ParamRange id="data_14_$idx" name="Data 14" group="Tx Buffer #$idx" default="0" min="0" max="4294967295" resolution="1" visible="`${(noOfTxBuffers > $idx) && (txBufferDataValue > 48)}`" editable="true" desc="32-bit word Data 14 (Data Bytes 56-59)." /> 331 <ParamRange id="data_15_$idx" name="Data 15" group="Tx Buffer #$idx" default="0" min="0" max="4294967295" resolution="1" visible="`${(noOfTxBuffers > $idx) && (txBufferDataValue > 48)}`" editable="true" desc="32-bit word Data 15 (Data Bytes 60-63)." /> 332 </Repeat> 333 334 <!-- CAN FD instance number --> 335 <ParamString id="instNumber" name="Instance number" group="Internal" default="`${getInstNumber("canfd")}`" visible="false" editable="false" desc="CAN FD Instance name number." /> 336 <ParamRange id="channel" name="Channel Number" group="Internal" default="`${getInstNumber("chan")}`" min="0" max="8" resolution="1" visible="false" editable="false" desc="CAN FD Channel number" /> 337 338 <!-- Other --> 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 <!-- Message RAM --> 342 <ParamRange id="consumedMRAM" name="Consumed Message RAM" group="Message RAM" default="`${4 * numberOfSIDFilters + 8 * numberOfEXTIDFilters + (8 + rxFifo0DataValue) * numberOfFifo0Elements + (8 + rxFifo1DataValue) * numberOfFifo1Elements + (8 + rxBufferDataValue) * noOfRxBuffers + 8 * noOfTxEvenFifo + (8 + txBufferDataValue) * noOfTxBuffers}`" min="0" max="4294967295" resolution="1" visible="false" editable="false" desc="Consumed Message RAM in bytes." /> 343 <ParamString id="consumedMRAMstring" name="Consumed Message RAM" group="Message RAM" default="`${consumedMRAM . " bytes"}`" visible="true" editable="false" desc="Consumed Message RAM in bytes." /> 344 345 <!-- Peripheral clock divider connection --> 346 <ParamString id="pclk" name="PCLK" group="Internal" default="`${(hasVisibleOption("clock_can_en[0]")) ? (getBlockFromSignal("clock_can_en[0]")) : (getBlockFromSignal("clock_can[0]"))}`" visible="false" editable="false" desc="Connected peripheral clock divider (PCLK)" /> 347 <ParamBool id="pclkOkInternal" name="PCLK Valid" group="Internal" default="`${hasConnection("clock_can", 0) && isBlockUsed(pclk)}`" visible="false" editable="false" desc="Checks whether there is a PCLK connected and enabled" /> 348 <ParamBool id="pclkOkInternalEn" name="PCLK Valid" group="Internal" default="`${hasConnection("clock_can_en", 0) && isBlockUsed(pclk)}`" visible="false" editable="false" desc="Checks whether there is a PCLK connected and enabled" /> 349 <ParamBool id="pclkOk" name="PCLK Valid" group="Internal" default="`${(hasVisibleOption("clock_can_en[0]")) ? (pclkOkInternalEn) : (pclkOkInternal)}`" visible="false" editable="false" desc="Checks whether there is a PCLK connected and enabled" /> 350 <ParamString id="pclkDstInstInternal" name="PCLK Destination" group="Internal" default="PCLK_CANFD`${instNumber}`_CLOCK_CAN`${channel}`" visible="false" editable="false" desc="" /> 351 <ParamString id="pclkDstInstInternalEn" name="PCLK Destination" group="Internal" default="PCLK_CANFD`${instNumber}`_CLOCK_CAN_EN`${channel}`" visible="false" editable="false" desc="" /> 352 <ParamString id="pclkDstInst" name="PCLK Destination" group="Internal" default="`${(hasVisibleOption("clock_can_en[0]")) ? (pclkDstInstInternalEn) : (pclkDstInstInternal)}`" visible="false" editable="false" desc=""/> 353 354 <ParamString id="ipblockName" name="IP Block Name" group="Internal" default="`${getIpBlockName()}`" visible="false" editable="false" desc="Gets the name of the IP Block." /> 355 <ParamString id="version" name="version number" group="Internal" default="`${getVersion()}`" visible="false" editable="false" desc="Gets the version of the IP Block." /> 356 </Parameters> 357 358 <DRCs> 359 <!--MRAM DRCs--> 360 <DRC type="ERROR" text="Consumed Message RAM exceeds the Message RAM size." condition="`${(consumedMRAM > messageRAMsize) ? true : false}`" /> 361 362 <!--Bit Rate DRCs--> 363 <DRC type="ERROR" text="Nominal Synchronization Jump Width must be less than Nominal Time Segment 1." condition="`${(nominalSyncJumpWidth > nominalTimeSegment1) ? true : false}`"/> 364 <DRC type="ERROR" text="Nominal Synchronization Jump Width must be less than Nominal Time Segment 2." condition="`${(nominalSyncJumpWidth > nominalTimeSegment2) ? true : false}`"/> 365 <DRC type="ERROR" text="Data Synchronization Jump Width must be less than Data Time Segment 1." condition="`${((dataSyncJumpWidth > dataTimeSegment1) && (mode)) ? true : false}`"/> 366 <DRC type="ERROR" text="Data Synchronization Jump Width must be less than Data Time Segment 2." condition="`${((dataSyncJumpWidth > dataTimeSegment2) && (mode)) ? true : false}`"/> 367 <DRC type="ERROR" text="Data Bit Rate must be greater than or equal to Nominal Bit Rate." condition="`${((nominalBaudRateBps > dataBaudRateBps) && (mode)) ? true : false}`"/> 368 369 <!--Standard ID filter DRCs--> 370 <DRC type="ERROR" text="SFID2 for SID Filter $idx must be greater than or equal to SFID1." condition="`${(sfid1_SidFilter$idx > sfid2_SidFilter$idx) && (numberOfSIDFilters > $idx) && (sfecSidFilter$idx ne CY_CANFD_SFEC_STORE_RX_BUFFER) ? true : false}`" repeatCount="128" /> 371 <DRC type="ERROR" text="EFID2 for XID Filter $idx must be greater than or equal to EFID1." condition="`${(efid1_XidFilter$idx > efid2_XidFilter$idx) && (numberOfEXTIDFilters > $idx) && (efecXidFilter$idx ne CY_CANFD_EFEC_STORE_RX_BUFFER) ? true : false}`" repeatCount="64" /> 372 373 <!--FIFO DRCs--> 374 <DRC type="ERROR" text="Rx FIFO 0 Size must be greater than Rx FIFO 0 Watermark." condition="`${((watermarkFifo0 ge numberOfFifo0Elements) && (numberOfFifo0Elements ne 0)) ? true : false}`"/> 375 <DRC type="ERROR" text="Rx FIFO 1 Size must be greater than Rx FIFO 1 Watermark." condition="`${((watermarkFifo1 ge numberOfFifo1Elements) && (numberOfFifo1Elements ne 0)) ? true : false}`"/> 376 <DRC type="ERROR" text="Rx FIFO 0 Size must be greater than 1 when FIFO 0 Top Pointer Logic Enabled." condition="`${(topPointerLogicEnabledFifo0 && (numberOfFifo0Elements < 2)) ? true : false}`"/> 377 <DRC type="ERROR" text="Rx FIFO 1 Size must be greater than 1 when FIFO 1 Top Pointer Logic Enabled." condition="`${(topPointerLogicEnabledFifo1 && (numberOfFifo1Elements < 2)) ? true : false}`"/> 378 </DRCs> 379 380 <ConfigFirmware> 381 <ConfigInclude value="cy_canfd.h" include="true" /> 382 <ConfigInclude value="cy_sysclk.h" include="`${pclkOk}`" /> 383 <ConfigInclude value="cyhal_hwmgr.h" include="true" guard="defined (CY_USING_HAL)" /> 384 385 <ConfigDefine name="`${INST_NAME}`_HW" value="CANFD`${instNumber}`" public="true" include="true" /> 386 <ConfigDefine name="`${INST_NAME}`_CHANNEL" value="CANFD`${instNumber}`_CH`${channel}`" public="true" include="true" /> 387 <ConfigDefine name="`${INST_NAME}`_STD_ID_FILTER_ID_$idx" value="$idx" public="true" include="`${numberOfSIDFilters > $idx}`" repeatCount="128"/> 388 <ConfigDefine name="`${INST_NAME}`_EXT_ID_FILTER_ID_$idx" value="$idx" public="true" include="`${numberOfEXTIDFilters > $idx}`" repeatCount="64"/> 389 <ConfigDefine name="`${INST_NAME}`_DATA_$idx" value="$idx" public="true" include="true" repeatCount="16"/> 390 <ConfigDefine name="`${INST_NAME}`_IRQ_0" value="canfd_`${instNumber}`_interrupts0_`${channel}`_IRQn" public="true" include="true"/> 391 <ConfigDefine name="`${INST_NAME}`_IRQ_1" value="canfd_`${instNumber}`_interrupts1_`${channel}`_IRQn" public="true" include="true"/> 392 393 <ConfigDefine name="`${INST_NAME}`_STD_ID_FILTER_$idx" public="false" 394 include="`${numberOfSIDFilters > $idx}`" repeatCount="128" value="\
{\
 395 .sfid2 = `${(sfecSidFilter$idx ne CY_CANFD_SFEC_STORE_RX_BUFFER) ? 396 sfid2_SidFilter$idx : 397 ((sfid2_10_9_SidFilter$idx << 9U) | sfid2_5_0_SidFilter$idx)}`U, \
 398 .sfid1 = `${sfid1_SidFilter$idx}`U, \
 399 .sfec = `${sfecSidFilter$idx}`, \
 400 .sft = `${sftSidFilterVal$idx}`, \
 401}" /> 402 403 <ConfigDefine name="`${INST_NAME}`_EXT_ID_FILTER_$idx" public="false" 404 include="`${numberOfEXTIDFilters > $idx}`" repeatCount="64" value="\
{\
 405 .f0_f = &`${INST_NAME . "_extIdFilterF0Config_$idx"}`, \
 406 .f1_f = &`${INST_NAME . "_extIdFilterF1Config_$idx"}`, \
 407}"/> 408 409 <ConfigStruct name="`${txCallback . "(void)"}`" type="void" const="false" public="true" include="`${txCallback ne "NULL"}`" isArray="false" > 410 </ConfigStruct> 411 <ConfigStruct name="`${rxCallback . "(bool rxFIFOMsg, uint8_t msgBufOrRxFIFONum, cy_stc_canfd_rx_buffer_t* basemsg)"}`" type="void" const="false" public="true" include="`${rxCallback ne "NULL"}`" isArray="false" > 412 </ConfigStruct> 413 <ConfigStruct name="`${errorCallback . "(uint32_t errorMask)"}`" type="void" const="false" public="true" include="`${errorCallback ne "NULL"}`" isArray="false" > 414 </ConfigStruct> 415 416 <ConfigStruct name="`${INST_NAME . "_nominalBitrateConfig"}`" type="cy_stc_canfd_bitrate_t" const="`${inFlash}`" public="true" include="true" > 417 <Member name="prescaler" value="`${nominalPrescaler}`U - 1U" /> 418 <Member name="timeSegment1" value="`${nominalTimeSegment1}`U - 1U" /> 419 <Member name="timeSegment2" value="`${nominalTimeSegment2}`U - 1U" /> 420 <Member name="syncJumpWidth" value="`${nominalSyncJumpWidth}`U - 1U" /> 421 </ConfigStruct> 422 423 <ConfigStruct name="`${INST_NAME . "_dataBitrateConfig"}`" type="cy_stc_canfd_bitrate_t" const="`${inFlash}`" public="true" include="true" > 424 <Member name="prescaler" value="`${dataPrescaler}`U - 1U" /> 425 <Member name="timeSegment1" value="`${dataTimeSegment1}`U - 1U" /> 426 <Member name="timeSegment2" value="`${dataTimeSegment2}`U - 1U" /> 427 <Member name="syncJumpWidth" value="`${dataSyncJumpWidth}`U - 1U" /> 428 </ConfigStruct> 429 430 <ConfigStruct name="`${INST_NAME . "_tdcConfig"}`" type="cy_stc_canfd_transceiver_delay_compensation_t" const="`${inFlash}`" public="true" include="true" > 431 <Member name="tdcEnabled" value="`${tdcEnabled}`" /> 432 <Member name="tdcOffset" value="`${tdcOffset}`U" /> 433 <Member name="tdcFilterWindow" value="`${tdcFilterWindow}`U" /> 434 </ConfigStruct> 435 436 <ConfigStruct name="`${INST_NAME . "_stdIdFilter_$idx"}`" type="cy_stc_id_filter_t" const="`${inFlash}`" public="true" include="`${numberOfSIDFilters > $idx}`" repeatCount="128" > 437 <Member name="sfid2" value="`${(sfecSidFilter$idx ne CY_CANFD_SFEC_STORE_RX_BUFFER) ? 438 sfid2_SidFilter$idx : 439 ((sfid2_10_9_SidFilter$idx << 9U) | sfid2_5_0_SidFilter$idx)}`U" /> 440 <Member name="sfid1" value="`${sfid1_SidFilter$idx}`U" /> 441 <Member name="sfec" value="`${sfecSidFilter$idx}`" /> 442 <Member name="sft" value="`${sftSidFilterVal$idx}`" /> 443 </ConfigStruct> 444 445 <ConfigStruct name="`${INST_NAME . "_stdIdFilters"}`" type="cy_stc_id_filter_t" isArray="true" const="`${inFlash}`" public="true" include="true" > 446 <Member name="`${##}`" value="`${INST_NAME}`_STD_ID_FILTER_`${##}`" include="`${numberOfSIDFilters > ##}`" count="128"/> 447 </ConfigStruct> 448 449 <ConfigStruct name="`${INST_NAME . "_sidFiltersConfig"}`" type="cy_stc_canfd_sid_filter_config_t" const="`${inFlash}`" public="true" include="true" > 450 <Member name="numberOfSIDFilters" value="`${numberOfSIDFilters}`U" /> 451 <Member name="sidFilter" value="`${INST_NAME . "_stdIdFilters"}`" /> 452 </ConfigStruct> 453 454 <ConfigStruct name="`${INST_NAME . "_extIdFilterF0Config_$idx"}`" type="cy_stc_canfd_f0_t" const="`${inFlash}`" public="true" include="`${numberOfEXTIDFilters > $idx}`" repeatCount="64" > 455 <Member name="efid1" value="`${efid1_XidFilter$idx}`U" /> 456 <Member name="efec" value="`${efecXidFilter$idx}`" /> 457 </ConfigStruct> 458 459 <ConfigStruct name="`${INST_NAME . "_extIdFilterF1Config_$idx"}`" type="cy_stc_canfd_f1_t" const="`${inFlash}`" public="true" include="`${numberOfEXTIDFilters > $idx}`" repeatCount="64" > 460 <Member name="efid2" value="`${(efecXidFilter$idx ne CY_CANFD_EFEC_STORE_RX_BUFFER) ? 461 efid2_XidFilter$idx : 462 ((efid2_10_9_XidFilter$idx << 9U) | efid2_5_0_XidFilter$idx)}`U" /> 463 <Member name="eft" value="`${eftXidFilter$idx}`" /> 464 </ConfigStruct> 465 466 <ConfigStruct name="`${INST_NAME . "_extIdFilter_$idx"}`" type="cy_stc_extid_filter_t" const="`${inFlash}`" public="true" include="`${numberOfEXTIDFilters > $idx}`" repeatCount="64" > 467 <Member name="f0_f" value="&`${INST_NAME . "_extIdFilterF0Config_$idx"}`" /> 468 <Member name="f1_f" value="&`${INST_NAME . "_extIdFilterF1Config_$idx"}`" /> 469 </ConfigStruct> 470 471 <ConfigStruct name="`${INST_NAME . "_extIdFilters"}`" type="cy_stc_extid_filter_t" isArray="true" const="`${inFlash}`" public="true" include="true" > 472 <Member name="`${##}`" value="`${INST_NAME}`_EXT_ID_FILTER_`${##}`" include="`${numberOfEXTIDFilters > ##}`" count="64"/> 473 </ConfigStruct> 474 475 <ConfigStruct name="`${INST_NAME . "_extIdFiltersConfig"}`" type="cy_stc_canfd_extid_filter_config_t" const="`${inFlash}`" public="true" include="true" > 476 <Member name="numberOfEXTIDFilters" value="`${numberOfEXTIDFilters}`U" /> 477 <Member name="extidFilter" value="(cy_stc_extid_filter_t*)&`${INST_NAME . "_extIdFilters"}`" /> 478 <Member name="extIDANDMask" value="`${extIDANDMask}`UL" /> 479 </ConfigStruct> 480 481 <ConfigStruct name="`${INST_NAME . "_globalFilterConfig"}`" type="cy_stc_canfd_global_filter_config_t" const="`${inFlash}`" public="true" include="true" > 482 <Member name="nonMatchingFramesStandard" value="`${nonMatchingFramesStandard}`" /> 483 <Member name="nonMatchingFramesExtended" value="`${nonMatchingFramesExtended}`" /> 484 <Member name="rejectRemoteFramesStandard" value="`${rejectRemoteFramesStandard}`" /> 485 <Member name="rejectRemoteFramesExtended" value="`${rejectRemoteFramesExtended}`" /> 486 </ConfigStruct> 487 488 <ConfigStruct name="`${INST_NAME . "_rxFifo0Config"}`" type="cy_en_canfd_fifo_config_t" const="`${inFlash}`" public="true" include="true" > 489 <Member name="mode" value="`${modeFifo0}`" /> 490 <Member name="watermark" value="`${watermarkFifo0}`U" /> 491 <Member name="numberOfFIFOElements" value="`${numberOfFifo0Elements}`U" /> 492 <Member name="topPointerLogicEnabled" value="`${topPointerLogicEnabledFifo0}`" /> 493 </ConfigStruct> 494 495 <ConfigStruct name="`${INST_NAME . "_rxFifo1Config"}`" type="cy_en_canfd_fifo_config_t" const="`${inFlash}`" public="true" include="true" > 496 <Member name="mode" value="`${modeFifo1}`" /> 497 <Member name="watermark" value="`${watermarkFifo1}`U" /> 498 <Member name="numberOfFIFOElements" value="`${numberOfFifo1Elements}`U" /> 499 <Member name="topPointerLogicEnabled" value="`${topPointerLogicEnabledFifo1}`" /> 500 </ConfigStruct> 501 502 <ConfigStruct name="`${INST_NAME . "_config"}`" type="cy_stc_canfd_config_t" const="`${inFlash}`" public="true" include="true" > 503 <Member name="txCallback" value="`${txCallback}`" /> 504 <Member name="rxCallback" value="`${rxCallback}`" /> 505 <Member name="errorCallback" value="`${errorCallback}`" /> 506 <Member name="canFDMode" value="`${mode ? "true" : "false"}`" /> 507 <Member name="bitrate" value="&`${INST_NAME . "_nominalBitrateConfig"}`" /> 508 <Member name="fastBitrate" value="&`${INST_NAME . "_dataBitrateConfig"}`" /> 509 <Member name="tdcConfig" value="&`${INST_NAME . "_tdcConfig"}`" /> 510 <Member name="sidFilterConfig" value="&`${INST_NAME . "_sidFiltersConfig"}`" /> 511 <Member name="extidFilterConfig" value="&`${INST_NAME . "_extIdFiltersConfig"}`" /> 512 <Member name="globalFilterConfig" value="&`${INST_NAME . "_globalFilterConfig"}`" /> 513 <Member name="rxBufferDataSize" value="`${rxBufferDataSize}`" /> 514 <Member name="rxFIFO1DataSize" value="`${rxFifo1DataSize}`" /> 515 <Member name="rxFIFO0DataSize" value="`${rxFifo0DataSize}`" /> 516 <Member name="txBufferDataSize" value="`${txBufferDataSize}`" /> 517 <Member name="rxFIFO0Config" value="&`${INST_NAME . "_rxFifo0Config"}`" /> 518 <Member name="rxFIFO1Config" value="&`${INST_NAME . "_rxFifo1Config"}`" /> 519 <Member name="noOfRxBuffers" value="`${noOfRxBuffers}`U" /> 520 <Member name="noOfTxBuffers" value="`${noOfTxBuffers}`U" /> 521 <Member name="messageRAMaddress" value="CY_CAN`${instNumber}`MRAM_BASE + `${messageRAMaddress}`U" /> 522 <Member name="messageRAMsize" value="`${messageRAMsize}`U" /> 523 </ConfigStruct> 524 525 <ConfigStruct name="`${INST_NAME . "_T0RegisterBuffer_$idx"}`" type="cy_stc_canfd_t0_t" const="false" public="true" include="`${noOfTxBuffers > $idx}`" repeatCount="32" > 526 <Member name="id" value="`${id_$idx}`U" /> 527 <Member name="rtr" value="`${((fdf_$idx eq CY_CANFD_FDF_CAN_FD_FRAME) && (mode)) ? CY_CANFD_RTR_DATA_FRAME : rtr_$idx}`" /> 528 <Member name="xtd" value="`${xtd_$idx}`" /> 529 <Member name="esi" value="`${esi_$idx}`" /> 530 </ConfigStruct> 531 532 <ConfigStruct name="`${INST_NAME . "_T1RegisterBuffer_$idx"}`" type="cy_stc_canfd_t1_t" const="false" public="true" include="`${noOfTxBuffers > $idx}`" repeatCount="32" > 533 <Member name="dlc" value="`${dlc_$idx}`U" /> 534 <Member name="brs" value="`${brs_$idx}`" /> 535 <Member name="fdf" value="`${mode ? fdf_$idx : CY_CANFD_FDF_STANDARD_FRAME}`" /> 536 <Member name="efc" value="`${efc_$idx}`" /> 537 <Member name="mm" value="`${mm_$idx}`U" /> 538 </ConfigStruct> 539 540 <ConfigStruct name="`${INST_NAME . "_dataBuffer_$idx"}`" type="uint32_t" isArray="true" const="false" public="true" include="`${noOfTxBuffers > $idx}`" repeatCount="32" > 541 <Member name="`${INST_NAME}`_DATA_0" value="`${data_0_$idx}`U" include="true" /> 542 <Member name="`${INST_NAME}`_DATA_1" value="`${data_1_$idx}`U" include="true" /> 543 <Member name="`${INST_NAME}`_DATA_2" value="`${data_2_$idx}`U" include="`${(txBufferDataValue > 8)}`" /> 544 <Member name="`${INST_NAME}`_DATA_3" value="`${data_3_$idx}`U" include="`${(txBufferDataValue > 12)}`" /> 545 <Member name="`${INST_NAME}`_DATA_4" value="`${data_4_$idx}`U" include="`${(txBufferDataValue > 16)}`" /> 546 <Member name="`${INST_NAME}`_DATA_5" value="`${data_5_$idx}`U" include="`${(txBufferDataValue > 20)}`" /> 547 <Member name="`${INST_NAME}`_DATA_6" value="`${data_6_$idx}`U" include="`${(txBufferDataValue > 24)}`" /> 548 <Member name="`${INST_NAME}`_DATA_7" value="`${data_7_$idx}`U" include="`${(txBufferDataValue > 24)}`" /> 549 <Member name="`${INST_NAME}`_DATA_8" value="`${data_8_$idx}`U" include="`${(txBufferDataValue > 32)}`" /> 550 <Member name="`${INST_NAME}`_DATA_9" value="`${data_9_$idx}`U" include="`${(txBufferDataValue > 32)}`" /> 551 <Member name="`${INST_NAME}`_DATA_10" value="`${data_10_$idx}`U" include="`${(txBufferDataValue > 32)}`" /> 552 <Member name="`${INST_NAME}`_DATA_11" value="`${data_11_$idx}`U" include="`${(txBufferDataValue > 32)}`" /> 553 <Member name="`${INST_NAME}`_DATA_12" value="`${data_12_$idx}`U" include="`${(txBufferDataValue > 48)}`" /> 554 <Member name="`${INST_NAME}`_DATA_13" value="`${data_13_$idx}`U" include="`${(txBufferDataValue > 48)}`" /> 555 <Member name="`${INST_NAME}`_DATA_14" value="`${data_14_$idx}`U" include="`${(txBufferDataValue > 48)}`" /> 556 <Member name="`${INST_NAME}`_DATA_15" value="`${data_15_$idx}`U" include="`${(txBufferDataValue > 48)}`" /> 557 </ConfigStruct> 558 559 <ConfigStruct name="`${INST_NAME . "_txBuffer_$idx"}`" type="cy_stc_canfd_tx_buffer_t" const="false" public="true" include="`${noOfTxBuffers > $idx}`" repeatCount="32" > 560 <Member name="t0_f" value="&`${INST_NAME . "_T0RegisterBuffer_$idx"}`" /> 561 <Member name="t1_f" value="&`${INST_NAME . "_T1RegisterBuffer_$idx"}`" /> 562 <Member name="data_area_f" value="`${INST_NAME . "_dataBuffer_$idx"}`" /> 563 </ConfigStruct> 564 565 <ConfigStruct name="`${INST_NAME}`_obj" type="cyhal_resource_inst_t" const="true" public="true" include="true" guard="defined (CY_USING_HAL)"> 566 <Member name="type" value="CYHAL_RSC_CAN" /> 567 <Member name="block_num" value="`${getInstNumber("canfd")}`U" /> 568 <Member name="channel_num" value="`${getInstNumber("chan")}`U" /> 569 </ConfigStruct> 570 571 <ConfigFunction signature="__WEAK void `${txCallback}`()" body="" public="false" include="`${txCallback ne "NULL"}`"/> 572 <ConfigFunction signature="__WEAK void `${rxCallback}`(bool rxFIFOMsg, uint8_t msgBufOrRxFIFONum, cy_stc_canfd_rx_buffer_t* basemsg)" body=" (void)rxFIFOMsg;
 (void)msgBufOrRxFIFONum;
 (void)basemsg;" public="false" include="`${rxCallback ne "NULL"}`"/> 573 <ConfigFunction signature="__WEAK void `${errorCallback}`(uint32_t errorMask)" body=" (void)errorMask;" public="false" include="`${errorCallback ne "NULL"}`"/> 574 575 <ConfigInstruction value="Cy_SysClk_PeriphAssignDivider(`${pclkDstInst}`, `${getExposedMember(pclk, "clockSel")}`);" include="`${(ipblockName eq "mxttcanfd_s40s") && (version eq 1) && pclkOk}`" /> 576 <ConfigInstruction value="Cy_SysClk_PeriPclkAssignDivider(`${pclkDstInst}`, `${getExposedMember(pclk, "clockSel")}`);" include="`${(((ipblockName eq "mxttcanfd") && (version eq 3)) || ((ipblockName eq "mxttcanfd_s40e") && (version eq 1))) && pclkOk}`" /> 577 <ConfigInstruction value="cyhal_hwmgr_reserve(&`${INST_NAME}`_obj);" include="true" guard="defined (CY_USING_HAL)" /> 578 579 </ConfigFirmware> 580 581</Personality> 582