<?xml version="1.0" encoding="utf-8"?> <!--**************************************************************************** * \file pathmux.cypersonality * \version 1.0 * * \brief * PATH_MUX personality description file. * ******************************************************************************** * \copyright * Copyright 2018-2019 Cypress Semiconductor Corporation * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *****************************************************************************--> <Personality id="mxs40pathmux" name="PATH_MUX" version="1.0" path="Clocks/Fast" xmlns="http://cypress.com/xsd/cyhwpersonality_v1"> <Dependencies> <IpBlock name="mxs40srss" /> <Resource name="srss\.clock\.pathmux" used="true" /> </Dependencies> <ExposedMembers> <ExposedMember key="frequency" paramId="frequency" /> <ExposedMember key="accuracy" paramId="accuracy" /> <ExposedMember key="sourceClock" paramId="sourceClock" /> <ExposedMember key="error" paramId="error" /> </ExposedMembers> <Parameters> <!-- PDL documentation --> <ParamDoc id="pdlDoc" name="Configuration Help" group="Peripheral Documentation" default="file:///`${cy_libs_path()}`/docs/pdl_api_reference_manual/html/group__group__sysclk__path__src.html" linkText="Open Clock Path Source Documentation" visible="true" desc="Opens the Peripheral Driver Library Documentation" /> <ParamRange id="clockInst" name="CLK_PATH Instance" group="Interal" default="`${getInstNumber("pathmux")}`" min="0" max="`${NUM_CLKPATH-1}`" resolution="1" visible="false" editable="false" desc="" /> <ParamChoice id="sourceClock" name="Source Clock" group="General" default="imo" visible="true" editable="true" desc="The clock source for Clock Path `${clockInst}`"> <Entry name="IMO" value="imo" visible="true"/> <Entry name="ECO" value="eco" visible="true"/> <Entry name="EXTCLK" value="ext" visible="true"/> <Entry name="ALTHF" value="althf" visible="`${ALTHF_PRESENT}`"/> <Entry name="ILO" value="ilo" visible="true"/> <Entry name="PILO" value="pilo" visible="`${PILO_PRESENT}`"/> <Entry name="WCO" value="wco" visible="`${BACKUP_PRESENT}`"/> </ParamChoice> <ParamString id="sourceClockRsc" name="Source Clock Resource" group="Internal" default="`${"srss[0].clock[0]." . sourceClock . "[0]"}`" visible="false" editable="false" desc="" /> <ParamString id="sourceClockApiName" name="Source Clock Name" group="Internal" default="`${sourceClock eq imo ? "IMO" : sourceClock eq eco ? "ECO" : sourceClock eq ext ? "EXT" : sourceClock eq althf ? "ALTHF" : sourceClock eq ilo ? "ILO" : sourceClock eq pilo ? "PILO" : "WCO"}`" visible="false" editable="false" desc="" /> <ParamString id="sourceClockNumber" name="Source Clock Number" group="Internal" default="`${sourceClock eq imo ? 0 : sourceClock eq eco ? 1 : sourceClock eq ext ? 2 : sourceClock eq althf ? 3 : sourceClock eq ilo ? 4 : sourceClock eq pilo ? 5 : 6}`" visible="false" editable="false" desc="" /> <!-- Set an error if the source clock is not enabled --> <ParamBool id="error" name="Clock Error" group="Internal" default="`${!isBlockUsed(sourceClockRsc)}`" visible="false" editable="false" desc="" /> <!-- Use default values in case of error --> <ParamRange id="frequency" name="Frequency" group="Internal" default="`${!error ? getExposedMember(sourceClockRsc, "frequency") : 0}`" min="0" max="100000000" resolution="1" visible="false" editable="false" desc="" /> <ParamString id="accuracy" name="accuracy" group="Internal" default="`${!error ? getExposedMember(sourceClockRsc, "accuracy") : 0}`" visible="false" editable="false" desc="" /> <!-- If the frequency is less than one MHz, display its value in kHz --> <ParamString id="frequencyInfo" name="Source Frequency" group="General" default="`${formatFrequency(frequency,accuracy)}`" visible="true" editable="false" desc="The Clock Path frequency provided by the chosen clock source" /> </Parameters> <DRCs> <DRC type="ERROR" text="Source clock for PATH_MUX`${clockInst}` is not enabled" condition="`${error}`" > <FixIt action="ENABLE_BLOCK" target="`${sourceClockRsc}`" value="" valid="true" /> </DRC> </DRCs> <ConfigFirmware> <ConfigInclude value="cy_sysclk.h" include="true" /> <ConfigInclude value="cyhal_hwmgr.h" include="true" guard="defined (CY_USING_HAL)" /> <ConfigDefine name="CY_CFG_SYSCLK_CLKPATH`${clockInst}`_ENABLED" value="1" public="false" include="true" /> <ConfigDefine name="CY_CFG_SYSCLK_CLKPATH`${clockInst}`_SOURCE" value="CY_SYSCLK_CLKPATH_IN_`${sourceClockApiName}`" public="false" include="true" /> <ConfigDefine name="CY_CFG_SYSCLK_CLKPATH`${clockInst}`_SOURCE_NUM" value="`${sourceClockNumber}`UL" public="false" include="true" /> <ConfigStruct name="`${INST_NAME}`_obj" type="cyhal_resource_inst_t" const="true" public="true" include="true" guard="defined (CY_USING_HAL)"> <Member name="type" value="CYHAL_RSC_CLKPATH" /> <Member name="block_num" value="`${clockInst}`U" /> <Member name="channel_num" value="0U" /> </ConfigStruct> <ConfigFunction signature="__STATIC_INLINE void Cy_SysClk_ClkPath`${clockInst}`Init()" body=" Cy_SysClk_ClkPathSetSource(`${clockInst}`U, CY_CFG_SYSCLK_CLKPATH`${clockInst}`_SOURCE);" public="false" include="true" guard="((!CY_CPU_CORTEX_M4) || (!defined(CY_DEVICE_SECURE)))" /> <ConfigInstruction value="cyhal_hwmgr_reserve(&`${INST_NAME}`_obj);" include="true" guard="defined (CY_USING_HAL)" /> </ConfigFirmware> </Personality>